/* ── Urniki — style.css ── */
:root {
  --bg:            #0f172a;
  --surface:       #1e293b;
  --surface2:      #263348;
  --border:        #334155;
  --border-h:      #475569;
  --text:          #f1f5f9;
  --text-sec:      #94a3b8;
  --primary:       #0d9488;
  --primary-h:     #0f766e;
  --primary-light: rgba(13,148,136,.15);
  --primary-border:rgba(13,148,136,.30);
  --danger:        #ef4444;
  --danger-h:      #dc2626;
  --success:       #22c55e;
  --weekend-bg:    rgba(255,255,255,.03);
  --today-bg:      rgba(13,148,136,.18);
  --today-border:  #0d9488;
  --banner-h:      34px;
  --copy-h:        26px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; }
a { color: inherit; text-decoration: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-h); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-sec); }

/* ── Header ── */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 1.25rem; gap: 1rem;
}
.app-logo {
  display: flex; align-items: center; gap: .45rem;
  font-size: 1.1rem; font-weight: 700; color: var(--primary);
  flex-shrink: 0;
}
.app-logo img { width: 22px; height: 22px; border-radius: 5px; }
.app-logo-home {
  background: none; border: none; padding: 0; font-family: inherit;
  cursor: pointer; transition: opacity .15s;
}
.app-logo-home:hover { opacity: .75; }

/* ── Home tab ── */
#tab-home {
  background:
    radial-gradient(ellipse at 25% 15%, rgba(13,148,136,.18) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 75%, rgba(99,102,241,.12) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 10%, rgba(59,130,246,.08) 0%, transparent 45%);
}
.home-container { max-width: 860px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.home-hero { text-align: center; padding: 2rem 0 2.5rem; }
.home-hero-icon { font-size: 3rem; margin-bottom: .75rem; line-height: 1; }
.home-hero-title { font-size: 1.7rem; font-weight: 700; margin-bottom: .75rem; }
.home-hero-sub { color: var(--text-sec); font-size: .97rem; max-width: 540px; margin: 0 auto; line-height: 1.65; }
.home-sections { display: flex; flex-direction: column; gap: 2.5rem; }
.home-section-title {
  font-size: .8rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 1.1rem;
}
.home-steps { display: flex; flex-direction: column; gap: .75rem; }
.home-step {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: .95rem 1.2rem;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.home-step:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(13,148,136,.2), 0 6px 24px rgba(13,148,136,.13);
  transform: translateY(-2px);
}
.home-step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: .8rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: .1rem;
}
.home-step-body { flex: 1; }
.home-step-title { font-weight: 700; font-size: .92rem; margin-bottom: .3rem; }
.home-step-desc { font-size: .85rem; color: var(--text-sec); line-height: 1.6; }
.home-step-desc strong { color: var(--text); }
.step-nav-btn {
  display: inline-block; background: var(--primary-light); color: var(--primary);
  border: 1px solid var(--primary-border); border-radius: 5px;
  padding: .1rem .5rem; font-size: .8rem; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: background .15s, color .15s;
}
.step-nav-btn:hover { background: var(--primary); color: #fff; }
.home-features {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .85rem;
}
.home-feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem 1.2rem;
  display: flex; gap: .85rem; align-items: flex-start;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.home-feature:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(13,148,136,.2), 0 6px 24px rgba(13,148,136,.13);
  transform: translateY(-2px);
}
.home-feature-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1.2; }
.home-feature-title { font-weight: 700; font-size: .88rem; margin-bottom: .2rem; }
.home-feature-desc { font-size: .82rem; color: var(--text-sec); line-height: 1.5; }

.header-scroll {
  display: flex; align-items: center; flex: 1; overflow-x: auto;
  scrollbar-width: none; min-width: 0;
}
.header-scroll::-webkit-scrollbar { display: none; }
.header-tabs {
  display: flex; gap: .15rem; flex-shrink: 0;
}
.htab {
  padding: .35rem .9rem; border-radius: 7px; border: none;
  background: transparent; color: var(--text-sec); font-size: .88rem;
  font-weight: 500; font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
.htab:hover { background: var(--surface2); color: var(--text); }
.htab.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }

.header-right {
  display: flex; align-items: center; gap: .65rem; flex-shrink: 0; margin-left: .5rem;
  padding-right: .25rem; font-size: .85rem; color: var(--text-sec);
}
.header-user { font-weight: 500; color: var(--text); }

/* ── Promo banner + copyright ── */
#promo-banner {
  position: fixed; bottom: var(--copy-h); left: 0; right: 0; z-index: 99;
  height: var(--banner-h);
  background: var(--surface2); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
#promo-link {
  font-size: .72rem; font-weight: 600; color: var(--text-sec);
  text-decoration: none; display: flex; align-items: center; gap: .35rem;
  padding: 0 1rem; width: 100%; justify-content: center;
  transition: opacity .5s, color .15s;
}
#promo-link:hover { color: var(--text); }
#copyright-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 99;
  height: var(--copy-h);
  background: var(--surface2); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  font-size: .63rem; color: var(--text-sec); opacity: .7;
  user-select: none; pointer-events: none;
}

/* ── Main content ── */
.app-main {
  margin-top: 52px;
  height: calc(100vh - 52px - var(--banner-h) - var(--copy-h));
  overflow-y: auto;
  padding: 1.5rem;
}

/* ── Tab panels ── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Osnovno pod-zavihki ── */
.sub-tabs {
  display: flex; gap: .35rem;
  border-bottom: 1px solid var(--border); margin-bottom: 1.25rem;
  position: sticky; top: 0; z-index: 10;
  background: var(--bg); padding-top: .25rem;
}
.stab {
  padding: .38rem 1rem; border: none; background: transparent;
  color: var(--text-sec); font-size: .88rem; font-family: inherit;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.stab:hover { color: var(--text); }
.stab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

/* ── Group sub-tabs ── */
.group-tabs-wrap {
  display: flex; align-items: center; gap: .35rem;
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--border); margin-bottom: 1rem; padding-bottom: .5rem;
}
.group-tabs-wrap::-webkit-scrollbar { display: none; }
.gtab {
  padding: .32rem .85rem; border-radius: 6px 6px 0 0; border: none;
  background: transparent; color: var(--text-sec); font-size: .86rem;
  font-weight: 500; font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s; border-bottom: 2px solid transparent;
}
.gtab:hover { color: var(--text); }
.gtab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.gtab-add {
  padding: .28rem .7rem; border-radius: 6px; border: 1px dashed var(--border-h);
  background: transparent; color: var(--text-sec); font-size: .82rem;
  font-family: inherit; cursor: pointer; transition: border-color .15s, color .15s;
  white-space: nowrap; flex-shrink: 0;
}
.gtab-add:hover { border-color: var(--primary); color: var(--primary); }

/* ── Month nav ── */
.month-nav {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem;
  overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap;
}
.month-nav::-webkit-scrollbar { display: none; }
.month-nav-title {
  font-weight: 700; font-size: 1rem; min-width: 150px; text-align: center;
}
.btn-icon {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
  transition: background .15s, border-color .15s;
}
.btn-icon:hover { background: var(--surface2); border-color: var(--border-h); }

/* ── Schedule grid ── */
.grid-wrap {
  overflow-y: auto;
  overflow-x: auto;
  max-height: calc(100vh - 52px - 8rem);
  margin-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
}
.dept-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: clip;
  margin-bottom: 1.25rem;
}
.dept-section:last-child { margin-bottom: 0; }
.dept-header-outer {
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--surface2);
}
.dept-header-outer::-webkit-scrollbar { display: none; }
.group-grid-wrap {
  overflow-x: auto;
  overflow-y: clip;
}
.urnik-grid {
  border-collapse: collapse;
  min-width: 100%;
  font-size: .82rem;
}
.urnik-grid th, .urnik-grid td {
  border: 1px solid var(--border);
  white-space: nowrap;
}
.urnik-grid thead th {
  background: var(--surface);
  color: var(--text-sec);
  font-weight: 600;
  padding: .35rem .5rem;
  text-align: center;
  position: sticky; top: 0; z-index: 3;
  min-width: 56px;
}
.urnik-grid thead th:first-child {
  position: sticky; left: 0; z-index: 4;
  min-width: 150px; text-align: left;
}
.urnik-grid tbody td {
  padding: 0;
  height: 52px;
  background: var(--surface);
}
.urnik-grid tbody td:first-child {
  position: sticky; left: 0; z-index: 2;
  background: var(--surface2);
  padding: 0 .6rem;
  font-weight: 500;
}
.urnik-grid .col-weekend {
  background: var(--weekend-bg);
}
.urnik-grid .col-today th,
.urnik-grid .col-today .grid-cell {
  background: var(--today-bg);
}
.urnik-grid thead .col-today {
  color: var(--primary);
}
.grid-cell {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: .2rem .25rem;
  transition: background .12s;
  min-width: 56px;
}
.grid-cell:hover { background: rgba(255,255,255,.06); }
.grid-cell.has-worker { cursor: pointer; }
.grid-cell.self-booked { box-shadow: inset 0 0 0 1px rgba(245,158,11,.35); background: rgba(245,158,11,.06); }
.grid-cell.self-booked:hover { background: rgba(245,158,11,.12); }
.worker-chip {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(13,148,136,.3);
  border-radius: 5px;
  padding: .15rem .3rem;
  max-width: 56px;
  overflow: hidden;
  text-align: center;
  line-height: 1.25;
}
.chip-name {
  font-size: .73rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chip-shift {
  font-size: .63rem; font-weight: 600; opacity: .8;
  white-space: nowrap; letter-spacing: -.01em;
}

/* ── Row actions ── */
.row-name-wrap {
  display: flex; align-items: center; gap: .3rem;
  height: 100%; padding: 0 .45rem 0 .35rem;
}
.row-reorder {
  display: flex; flex-direction: column; gap: 0; flex-shrink: 0;
  opacity: 0; transition: opacity .15s;
}
.urnik-grid tbody tr:hover .row-reorder { opacity: 1; }
.btn-row-action {
  background: none; border: none; color: var(--text-sec); cursor: pointer;
  font-size: .6rem; padding: 0 .18rem; line-height: 1.25; border-radius: 3px;
  transition: color .15s, background .15s;
}
.btn-row-action:hover { color: var(--primary); background: rgba(13,148,136,.12); }
.pos-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .83rem; cursor: default; border-radius: 4px; padding: .1rem .2rem;
  transition: background .15s;
}
.pos-name:hover { background: rgba(13,148,136,.09); color: var(--primary); }
.btn-del-pos, .btn-edit-pos {
  background: none; border: none; color: var(--border-h); cursor: pointer;
  font-size: .8rem; padding: .1rem .25rem; border-radius: 4px; flex-shrink: 0;
  opacity: 0; transition: opacity .15s, color .15s;
}
.urnik-grid tbody tr:hover .btn-del-pos,
.urnik-grid tbody tr:hover .btn-edit-pos { opacity: 1; }
.btn-del-pos:hover { color: var(--danger); }
.btn-edit-pos:hover { color: var(--primary); }

/* ── Picker popup ── */
.picker-popup {
  position: fixed; z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border-h);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  min-width: 200px; max-width: 240px;
  overflow: hidden;
}
.picker-search {
  width: 100%; padding: .55rem .75rem;
  background: var(--surface2); border: none; border-bottom: 1px solid var(--border);
  color: var(--text); font-size: .84rem; font-family: inherit; outline: none;
}
.picker-list {
  max-height: 220px; overflow-y: auto;
  padding: .3rem 0;
}
.picker-item {
  padding: .45rem .75rem; cursor: pointer; font-size: .85rem;
  display: flex; align-items: center; gap: .5rem;
  transition: background .1s;
}
.picker-item:hover { background: var(--surface2); }
.picker-item.active { color: var(--primary); font-weight: 600; }
.picker-item-warn { color: var(--danger) !important; }
.picker-item-warn:hover { background: rgba(239,68,68,.06) !important; }
.picker-warn-badge { font-size: .8rem; color: var(--danger); flex-shrink: 0; }
.picker-clear {
  padding: .45rem .75rem; border-top: 1px solid var(--border);
  cursor: pointer; font-size: .82rem; color: var(--danger);
  display: flex; align-items: center; gap: .5rem;
}
.picker-clear:hover { background: rgba(239,68,68,.08); }
.picker-back {
  padding: .5rem .75rem; border-bottom: 1px solid var(--border);
  font-size: .82rem; color: var(--text-sec); cursor: pointer;
  display: flex; align-items: center; gap: .4rem;
  font-weight: 600;
}
.picker-back:hover { background: var(--surface2); color: var(--text); }
.picker-shift-item {
  padding: .45rem .75rem; cursor: pointer; font-size: .84rem;
  display: flex; flex-direction: column; gap: .1rem;
  transition: background .1s;
}
.picker-shift-item:hover { background: var(--surface2); }
.picker-shift-item.active { background: var(--primary-light); }
.picker-shift-time { font-weight: 700; color: var(--primary); font-size: .83rem; }
.picker-shift-name { font-size: .77rem; color: var(--text-sec); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .48rem .9rem; border-radius: 8px; border: none; font-size: .85rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: background .15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); }
.btn-ghost { background: var(--surface2); color: var(--text-sec); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--border-h); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: rgba(239,68,68,.1); }
.btn-sm { padding: .28rem .65rem; font-size: .8rem; }

/* ── Workers list ── */
.workers-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem;
  margin-top: 1rem;
}
.workers-title-group { margin-bottom: 2rem; }
.workers-title-group:last-child { margin-bottom: 0; }
.workers-title-header {
  display: flex; align-items: center; gap: .5rem;
  padding-bottom: .55rem; margin-bottom: .75rem;
  border-bottom: 1.5px solid var(--border);
}
.workers-title-name {
  font-size: .82rem; font-weight: 700; color: var(--primary);
  letter-spacing: .05em; text-transform: uppercase;
}
.workers-title-noname {
  color: var(--text-sec); font-weight: 500; font-size: .82rem;
  text-transform: none; letter-spacing: 0;
}
.workers-title-count {
  background: var(--primary-light); color: var(--primary);
  border-radius: 20px; padding: .06rem .5rem;
  font-size: .73rem; font-weight: 700;
}
.workers-title-need {
  border-radius: 20px; padding: .06rem .55rem;
  font-size: .73rem; font-weight: 600;
  user-select: none;
}
.workers-title-need:hover { opacity: .8; }
.worker-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: .85rem 1rem; display: flex; align-items: center; gap: .85rem;
}
.worker-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem; flex-shrink: 0;
}
.worker-info { flex: 1; min-width: 0; }
.worker-name { font-weight: 600; font-size: .9rem; }
.worker-username { font-size: .78rem; color: var(--text-sec); }
.worker-hours { font-size: .75rem; color: var(--primary); font-weight: 600; margin-top: .1rem; }
.picker-worker-hrs { font-size: .75rem; color: var(--text-sec); flex-shrink: 0; }
.worker-card-moving { border-color: var(--primary); background: var(--primary-light); }
.worker-btns {
  display: grid; grid-template-columns: 1fr 1fr; gap: .3rem;
  margin-left: auto; flex-shrink: 0; width: 120px;
}
.worker-btns .btn { padding-left: .4rem; padding-right: .4rem; justify-content: center; }
.worker-btns button:last-child:nth-child(odd) { grid-column: span 2; }
.worker-btn-del { color: var(--danger) !important; border-color: var(--danger) !important; }
.worker-move-label { font-size: .75rem; color: var(--text-sec); margin-top: .1rem; }
.worker-move-obj { background: var(--surface) !important; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 300;
  display: flex; align-items: center; justify-content: center;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.5rem; width: 100%; max-width: 400px; box-shadow: 0 16px 48px rgba(0,0,0,.5);
  max-height: 90vh; overflow-y: auto;
}
.modal-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 1.1rem; }
.form-group { margin-bottom: .9rem; }
.form-group label { display: block; font-size: .82rem; color: var(--text-sec); font-weight: 500; margin-bottom: .35rem; }
.form-group input, .form-group select {
  width: 100%; padding: .55rem .75rem; background: var(--surface2);
  border: 1.5px solid var(--border); border-radius: 8px; color: var(--text);
  font-size: .88rem; font-family: inherit; outline: none;
  transition: border-color .15s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); }
.form-group .field-row { display: flex; gap: .65rem; }
.form-group .field-row .form-group { flex: 1; margin-bottom: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.25rem; }

/* ── Department header ── */
.dept-header {
  display: flex; align-items: center; gap: .35rem;
  padding: .35rem .75rem;
}
.dept-reorder {
  display: flex; flex-direction: column; gap: 0; flex-shrink: 0;
}
.dept-name {
  font-size: .82rem; font-weight: 700; color: var(--primary);
  letter-spacing: .02em; text-transform: uppercase;
  border-radius: 4px; padding: .1rem .3rem;
  white-space: nowrap;
}
.dept-name:hover { background: rgba(13,148,136,.1); }
.btn-dept-add {
  background: none; border: 1px dashed var(--border-h); color: var(--text-sec);
  font-size: .75rem; padding: .15rem .55rem; border-radius: 5px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.btn-dept-add:hover { border-color: var(--primary); color: var(--primary); }
.btn-dept-del, .btn-dept-edit {
  background: none; border: none; color: var(--text-sec); cursor: pointer;
  font-size: .8rem; padding: .15rem .35rem; border-radius: 4px;
  transition: color .15s, background .15s;
}
.btn-dept-del:hover { color: var(--danger); background: rgba(239,68,68,.1); }
.btn-dept-edit:hover { color: var(--primary); background: rgba(13,148,136,.1); }
.btn-dept-gen {
  background: var(--primary-light); color: var(--primary);
  border: 1px solid rgba(13,148,136,.25); border-radius: 5px;
  padding: .18rem .6rem; font-size: .76rem; cursor: pointer;
  font-family: inherit; font-weight: 600; white-space: nowrap;
  transition: background .12s;
}
.btn-dept-gen:hover { background: rgba(13,148,136,.28); }
.btn-dept-clear {
  background: transparent; color: var(--text-sec);
  border: 1px solid var(--border); border-radius: 5px;
  padding: .18rem .6rem; font-size: .76rem; cursor: pointer;
  font-family: inherit; font-weight: 600; white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s;
}
.btn-dept-clear:hover { background: rgba(239,68,68,.1); color: var(--danger); border-color: var(--danger); }

/* ── Modal separator ── */
.modal-sep { border: none; border-top: 1px solid var(--border); margin: .75rem 0; }

/* ── Worker preference tags ── */
.pref-label { font-size: .8rem; font-weight: 700; }
.pref-label-likes { color: var(--primary); }
.pref-label-dislikes { color: var(--text-sec); }
.pref-label-incompatible { color: var(--danger); }
.pref-tags {
  display: flex; flex-wrap: wrap; gap: .35rem;
  min-height: 1.6rem; margin-bottom: .4rem;
}
.pref-tag {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .15rem .45rem; border-radius: 20px; font-size: .75rem; font-weight: 600;
}
.pref-tag button {
  background: none; border: none; cursor: pointer; padding: 0; line-height: 1;
  font-size: .9rem; opacity: .7;
}
.pref-tag button:hover { opacity: 1; }
.pref-tag-likes       { background: rgba(13,148,136,.15); color: var(--primary); }
.pref-tag-dislikes    { background: rgba(148,163,184,.15); color: var(--text-sec); }
.pref-tag-incompatible { background: rgba(239,68,68,.15); color: var(--danger); }
.pref-add-sel {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-sec); border-radius: 6px; padding: .3rem .5rem;
  font-size: .8rem; font-family: inherit; cursor: pointer;
}
.pref-add-sel:focus { border-color: var(--primary); outline: none; color: var(--text); }

/* ── Title checkboxes (position edit modal) ── */
.title-checks {
  display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem;
}
.title-check-label {
  display: inline-flex; align-items: center; gap: .38rem;
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 20px; padding: .22rem .65rem;
  font-size: .82rem; cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}
.title-check-label:hover { border-color: var(--border-h); }
.title-check-label input[type="checkbox"] {
  width: auto; margin: 0; accent-color: var(--primary); cursor: pointer;
}
.title-check-label:has(input:checked) {
  background: var(--tc-bg, var(--primary-light));
  border-color: var(--tc-border, var(--primary));
  color: var(--tc-text, var(--primary));
  font-weight: 600;
}
.title-check-label.pe-secondary:has(input:checked) {
  border-style: dashed;
}

/* ── Picker filter row ── */
.picker-filter-label {
  display: flex; align-items: center; gap: .4rem;
  padding: .35rem .75rem; font-size: .78rem; color: var(--text-sec);
  border-bottom: 1px solid var(--border); cursor: pointer;
  background: rgba(13,148,136,.05);
}
.picker-filter-label:hover { color: var(--text); background: rgba(13,148,136,.1); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: calc(var(--banner-h) + var(--copy-h) + .75rem); right: 1.5rem; z-index: 500;
  background: var(--surface2); border: 1px solid var(--border-h);
  border-radius: 8px; padding: .65rem 1rem; font-size: .85rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  animation: toast-in .2s ease;
  pointer-events: none;
}
@keyframes toast-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* ── Empty state ── */
.empty-state {
  text-align: center; padding: 3rem 1rem; color: var(--text-sec); font-size: .9rem;
}
.empty-icon { font-size: 2.5rem; margin-bottom: .75rem; }

/* ── Alert ── */
.alert { padding: .65rem .9rem; border-radius: 8px; font-size: .88rem; margin-bottom: 1rem; }
.alert-error { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #f87171; }

/* ── Shifts ──────────────────────────────────────────────────────────────── */
.shifts-list { display:flex; flex-direction:column; gap:.65rem; }
.shift-card {
  background:var(--surface); border:1px solid var(--border); border-radius:10px;
  padding:.9rem 1.1rem; display:flex; align-items:flex-start; gap:1rem;
}
.shift-time {
  font-size:1.05rem; font-weight:700; color:var(--primary);
  white-space:nowrap; min-width:110px; padding-top:.05rem;
}
.shift-body { flex:1; min-width:0; }
.shift-name { font-weight:600; font-size:.9rem; margin-bottom:.45rem; }
.shift-days { display:flex; gap:.3rem; flex-wrap:wrap; align-items:center; }
.day-badge {
  padding:.12rem .42rem; border-radius:20px; font-size:.74rem; font-weight:600;
  background:var(--surface2); color:var(--text-sec); border:1px solid var(--border);
}
.day-badge.on { background:var(--primary-light); color:var(--primary); border-color:rgba(13,148,136,.3); }
.holiday-badge {
  padding:.12rem .48rem; border-radius:20px; font-size:.74rem; font-weight:600;
  background:rgba(251,191,36,.1); color:#fbbf24; border:1px solid rgba(251,191,36,.3);
}
/* Day toggle pills (in modal) */
.day-pill {
  padding:.28rem .62rem; border-radius:20px; border:1.5px solid var(--border-h);
  background:transparent; color:var(--text-sec); font-size:.8rem; font-weight:600;
  cursor:pointer; font-family:inherit; transition:all .15s; user-select:none;
}
.day-pill.active { background:var(--primary-light); border-color:var(--primary); color:var(--primary); }
.day-pills-wrap { display:flex; gap:.4rem; flex-wrap:wrap; margin-top:.4rem; }

/* ── Login page ── */
.lp-split { display: flex; min-height: 100vh; }
.lp-lang { position: absolute; top: .85rem; right: 1rem; display: flex; gap: .3rem; z-index: 20; }
.lp-lang-btn { padding: .28rem .7rem; border-radius: 6px; border: 1.5px solid #e2e8f0; background: #fff; color: #64748b; font-size: .75rem; font-weight: 700; cursor: pointer; font-family: inherit; letter-spacing: .05em; transition: background .15s, color .15s, border-color .15s; }
.lp-lang-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.lp-lang-btn:not(.active):hover { background: #f1f5f9; border-color: #cbd5e1; }
.lp-left {
  flex: 0 0 52%;
  background: linear-gradient(150deg, #0b1120 0%, #0f2830 50%, #0a2020 100%);
  padding: 2.75rem 3rem 3rem;
  display: flex; flex-direction: column; overflow-y: auto;
}
.lp-right {
  flex: 0 0 48%;
  background: #f8fafc; display: flex; align-items: flex-start;
  justify-content: center; padding: 4.5rem 2.5rem 3rem; color: #1e293b;
  position: relative;
}
.lp-brand { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.75rem; }
.lp-brand img { width: 36px; height: 36px; border-radius: 8px; }
.lp-brand-name { font-size: 1.45rem; font-weight: 700; color: var(--primary); letter-spacing: -.5px; }
.lp-headline { color: #fff; font-size: 1.6rem; font-weight: 700; line-height: 1.3; margin-bottom: 1.1rem; max-width: 440px; }
.lp-highlight { background: rgba(13,148,136,.14); border: 1px solid rgba(13,148,136,.35); border-radius: 12px; padding: .85rem 1.1rem; margin-bottom: .85rem; font-size: .8rem; color: rgba(255,255,255,.75); line-height: 1.5; }
.lp-highlight strong { color: var(--primary); }
.lp-highlight-head { font-weight: 700; font-size: .88rem; color: #fff; margin-bottom: .3rem; }
.lp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1.25rem; }
.lp-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: .75rem .9rem; }
.lp-card-head { font-weight: 600; font-size: .83rem; color: #fff; margin-bottom: .25rem; display: flex; align-items: center; gap: .4rem; }
.lp-card p { font-size: .74rem; color: rgba(255,255,255,.52); line-height: 1.45; margin: 0; }
.lp-note { border-top: 1px solid rgba(255,255,255,.1); padding-top: .9rem; font-size: .78rem; color: rgba(255,255,255,.5); line-height: 1.5; }
.lp-note strong { color: rgba(255,255,255,.8); }
.lp-right-inner { display: flex; flex-direction: column; gap: 1.75rem; width: 100%; max-width: 370px; }
.lp-form-wrap { width: 100%; }
.lp-free { background: linear-gradient(135deg,#f0fdf4,#ecfdf5); border: 1.5px solid #86efac; border-radius: 16px; padding: 1.3rem 1.5rem; }
.lp-free-badge { display: inline-block; background: #16a34a; color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: 1.5px; padding: .2rem .65rem; border-radius: 20px; margin-bottom: .7rem; }
.lp-free-title { font-size: 1.15rem; font-weight: 700; color: #15803d; margin-bottom: .65rem; }
.lp-free-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.lp-free-list li { font-size: .85rem; color: #166534; }
.lp-right .form-group label { color: #374151; font-size: .84rem; font-weight: 500; }
.lp-right .form-group input { background: #fff; border: 1.5px solid #e2e8f0; color: #111827; border-radius: 9px; }
.lp-right .form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,148,136,.12); outline: none; }
.nacin-preklop { display: flex; background: #e2e8f0; border-radius: 10px; padding: .25rem; margin-bottom: 1.75rem; }
.nacin-btn { flex: 1; padding: .52rem; border-radius: 8px; border: none; background: transparent; color: #64748b; font-size: .87rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: background .15s, color .15s; }
.nacin-btn.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(13,148,136,.3); }
.btn-login { display: block; width: 100%; padding: .8rem; background: var(--primary); color: #fff; border: none; border-radius: 9px; font-size: .9rem; font-weight: 700; letter-spacing: .06em; font-family: inherit; cursor: pointer; text-transform: uppercase; box-shadow: 0 4px 14px rgba(13,148,136,.35); transition: background .15s, box-shadow .15s; }
.btn-login:hover { background: var(--primary-h); box-shadow: 0 6px 18px rgba(13,148,136,.4); }
.lp-signup-row { text-align: center; margin-top: 1.1rem; font-size: .82rem; color: #64748b; }
.lp-signup-row a { color: #0d9488; font-weight: 600; cursor: pointer; }
.lp-signup-row a:hover { text-decoration: underline; }
.lp-input-wrap { position: relative; }
.lp-input-wrap input { padding-left: 2.5rem !important; }
.lp-icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; display: flex; }
.lp-check-row { display: flex; align-items: center; justify-content: space-between; margin: .8rem 0 1.2rem; font-size: .82rem; }
.lp-check-row label { display: flex; align-items: center; gap: .4rem; cursor: pointer; color: #475569; }
.lp-check-row input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--primary); }
.lp-right .alert-error { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #dc2626; border-radius: 8px; padding: .65rem .9rem; font-size: .88rem; margin-bottom: 1rem; }
.lp-right .alert-success { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); color: #16a34a; border-radius: 8px; padding: .65rem .9rem; font-size: .88rem; margin-bottom: 1rem; }

/* ── Language panel ── */
.lang-panel { padding: 1rem; display: flex; flex-direction: column; gap: .65rem; max-width: 360px; }
.lang-opt { display: flex; align-items: center; gap: .85rem; padding: .9rem 1.1rem; background: var(--surface2); border: 2px solid var(--border); border-radius: 10px; color: var(--text); font-size: 1rem; font-weight: 500; cursor: pointer; font-family: inherit; width: 100%; transition: border-color .15s, color .15s; }
.lang-opt:hover { border-color: var(--primary); }
.lang-opt.sel { border-color: var(--success); color: var(--success); }
.htab-lang { margin-left: auto; }

/* ── Violation chip ── */
.chip-violation {
  border: 2px solid var(--danger) !important;
  box-shadow: 0 0 0 1px rgba(239,68,68,.25);
}
.chip-secondary { border: 2px solid #3b82f6; }
.chip-secondary .chip-name { color: #3b82f6; }

/* ── Worker self-schedule cells ── */
.worker-cell-available {
  cursor: pointer; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.worker-cell-available:hover { background: var(--today-bg); }
.prijava-plus { font-size: 1.2rem; font-weight: 700; color: var(--primary); line-height: 1; }
.worker-cell-own {
  background: var(--primary-light); cursor: default;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); text-align: center;
}
.worker-cell-removable { cursor: pointer; }
.worker-cell-removable:hover { background: rgba(239,68,68,.12); }
.worker-cell-taken {
  background: var(--surface2); cursor: default;
  display: flex; align-items: center; justify-content: center;
  opacity: .6;
}
.worker-cell-locked { background: transparent; cursor: default; opacity: .35; }

/* ── Grid tooltip ── */
.grid-tooltip {
  position: fixed; z-index: 400;
  background: var(--surface); color: var(--text);
  border: 1px solid rgba(239,68,68,.45);
  border-radius: 7px; padding: .4rem .65rem;
  font-size: .78rem; line-height: 1.55;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  max-width: 280px;
}

/* ── Settings card ── */
.settings-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.setting-row {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .65rem 1rem; cursor: pointer; font-size: .86rem;
  border-bottom: 1px solid var(--border); user-select: none;
  transition: background .12s;
}
.rule-badge {
  display: inline-block; font-size: .6rem; font-weight: 800;
  letter-spacing: .05em; border-radius: 3px;
  padding: .05rem .32rem; margin-right: .35rem;
  border: 1px solid transparent; vertical-align: middle;
  position: relative; top: -.08em;
}
.rule-badge-eu { background: rgba(59,130,246,.15); color: #60a5fa; border-color: rgba(59,130,246,.3); }
.rule-badge-si  { background: rgba(34,197,94,.12);  color: #4ade80; border-color: rgba(34,197,94,.28); }
.setting-row:last-child { border-bottom: none; }
.setting-row:hover { background: var(--surface2); }
.setting-row input[type="checkbox"] {
  margin-top: .17rem; flex-shrink: 0;
  accent-color: var(--primary); cursor: pointer; width: auto;
}
.setting-row-num { cursor: default; align-items: center; flex-wrap: wrap; gap: .45rem; }
.setting-row-num:hover { background: none; }
.setting-row-num input[type="number"] {
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface2); color: var(--text);
  padding: .2rem .45rem; text-align: center; font-size: .86rem;
  -moz-appearance: textfield;
}
.setting-row-num input[type="number"]:focus { outline: none; border-color: var(--primary); }
.setting-row-num input[type="number"]::-webkit-inner-spin-button { opacity: 1; }

/* ── Objects list ── */
.object-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px;
  padding: .75rem 1rem; margin-bottom: .55rem; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.object-card:hover { border-color: var(--border-h); background: var(--surface2); }
.object-card.active {
  border-color: var(--primary); background: var(--primary-light);
}
.object-card-body {
  display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0;
}
.object-name {
  font-weight: 600; font-size: .92rem; color: var(--text); flex: 1;
}
.object-card.active .object-name { color: var(--primary); }
.object-badge {
  display: inline-flex; align-items: center;
  background: var(--primary); color: #fff;
  border-radius: 20px; padding: .12rem .55rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; white-space: nowrap;
}
.object-indicator {
  font-size: .78rem; font-weight: 600; color: var(--primary);
  background: var(--primary-light); border: 1px solid rgba(13,148,136,.25);
  border-radius: 20px; padding: .18rem .65rem; white-space: nowrap;
}
.object-indicator-btn {
  cursor: pointer; transition: background .15s, border-color .15s;
}
.object-indicator-btn:hover { background: rgba(13,148,136,.18); border-color: var(--primary); }
#object-switcher-dropdown {
  position: fixed; z-index: 500;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.35);
  min-width: 160px; overflow: hidden;
}
.obj-switch-item {
  padding: .55rem .85rem; font-size: .88rem; cursor: pointer;
  display: flex; align-items: center;
  transition: background .12s;
}
.obj-switch-item:hover { background: var(--surface2); }
.obj-switch-item.active { color: var(--primary); font-weight: 600; }

/* ── Shift type chip (grid row badge) ── */
.shift-type-chip {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  padding: .1rem .35rem; border-radius: 4px; margin-left: .3rem;
  background: rgba(13,148,136,.15); color: var(--primary);
  border: 1px solid rgba(13,148,136,.3); letter-spacing: .04em;
  flex-shrink: 0;
}

/* ── Shift type badge in shifts list ── */
.shift-type-badge-dopoldan  { background: rgba(251,146,60,.15) !important; color: #fb923c !important; border-color: rgba(251,146,60,.3) !important; }
.shift-type-badge-popoldan  { background: rgba(59,130,246,.15) !important; color: #60a5fa !important; border-color: rgba(59,130,246,.3) !important; }
.shift-type-badge-nocna     { background: rgba(139,92,246,.15) !important; color: #a78bfa !important; border-color: rgba(139,92,246,.3) !important; }
.shift-type-badge-celodnevna{ background: rgba(34,197,94,.15)  !important; color: #4ade80 !important; border-color: rgba(34,197,94,.3)  !important; }

/* ── Quota table ── */
.quota-table {
  width: 100%; border-collapse: collapse; font-size: .88rem;
}
.quota-table thead tr {
  color: var(--text-sec); font-size: .78rem;
  border-bottom: 1px solid var(--border);
}
.quota-table th, .quota-table td {
  padding: .4rem .5rem;
}
.quota-table th { font-weight: 600; }
.quota-table th:not(:first-child),
.quota-table td:not(:first-child) { text-align: center; }
.quota-table tbody tr { border-bottom: 1px solid var(--border); }
.quota-table tbody tr:last-child { border-bottom: none; }
.quota-num { font-weight: 600; color: var(--text); }
.quota-status { font-weight: 700; }
.quota-ok    { color: var(--success); }
.quota-short { color: var(--danger); }

/* ── Day header button in grid ── */
.day-header-btn {
  background: none; border: none; color: inherit; font: inherit;
  font-weight: 700; cursor: pointer; padding: 2px 5px;
  border-radius: 4px; line-height: inherit;
  transition: background .12s, color .12s;
}
.day-header-btn:hover { background: var(--primary-light); color: var(--primary); }

/* ── Day panel popup ── */
.day-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem .75rem; border-bottom: 1px solid var(--border);
  gap: .5rem;
}
.day-panel-header span {
  font-size: .82rem; font-weight: 700; color: var(--text);
}
.day-panel-close, .day-panel-nav {
  background: none; border: none; color: var(--text-sec); cursor: pointer;
  padding: 2px 5px; border-radius: 4px; flex-shrink: 0;
  transition: background .12s, color .12s;
}
.day-panel-close { font-size: .9rem; }
.day-panel-nav { font-size: 1.2rem; line-height: 1; }
.day-panel-close:hover { background: var(--surface2); }
.day-panel-nav:hover { color: var(--primary); background: var(--primary-light); }
.day-panel-loading {
  padding: .65rem .75rem; color: var(--text-sec); font-size: .82rem;
}
#day-panel-body {
  max-height: 336px; overflow-y: auto;
}
.day-panel-worker {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem .75rem; border-bottom: 1px solid var(--border);
}
.day-panel-worker:last-child { border-bottom: none; }
.day-panel-av {
  font-size: .78rem; font-weight: 700; color: var(--primary);
  background: var(--primary-light); border-radius: 50%;
  width: 22px; height: 22px; display: inline-flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
.day-panel-name {
  flex: 1; font-size: .82rem; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.status-btn-group { display: flex; gap: 3px; flex-shrink: 0; }
.status-btn {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-sec); border-radius: 4px; padding: 2px 6px;
  font-size: .7rem; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: background .12s, color .12s, border-color .12s;
}
.status-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.status-btn-active-LD   { background: rgba(16,185,129,.18) !important; color: #10b981 !important; border-color: rgba(16,185,129,.4) !important; }
.status-btn-active-LLD  { background: rgba(20,184,166,.18) !important; color: #14b8a6 !important; border-color: rgba(20,184,166,.4) !important; }
.status-btn-active-B100 { background: rgba(239,68,68,.15)  !important; color: #ef4444 !important; border-color: rgba(239,68,68,.35) !important; }
.status-btn-active-B80  { background: rgba(249,115,22,.15) !important; color: #f97316 !important; border-color: rgba(249,115,22,.35) !important; }
.status-btn-active-PD   { background: rgba(99,102,241,.15) !important; color: #818cf8 !important; border-color: rgba(99,102,241,.35) !important; }

/* ── Worker day status badges (in worker schedule) ── */
.status-badge {
  display: inline-block; padding: 1px 6px; border-radius: 9px;
  font-size: .68rem; font-weight: 700; letter-spacing: .03em;
  border: 1px solid transparent;
}
.status-badge-LD   { background: rgba(16,185,129,.18); color: #10b981; border-color: rgba(16,185,129,.35); }
.status-badge-LLD  { background: rgba(20,184,166,.18); color: #14b8a6; border-color: rgba(20,184,166,.35); }
.status-badge-B100 { background: rgba(239,68,68,.13);  color: #ef4444; border-color: rgba(239,68,68,.3); }
.status-badge-B80  { background: rgba(249,115,22,.13); color: #f97316; border-color: rgba(249,115,22,.3); }
.status-badge-PD   { background: rgba(99,102,241,.13); color: #818cf8; border-color: rgba(99,102,241,.3); }

/* ── Title color picker ── */
.title-color-picker { display: flex; gap: .28rem; align-items: center; margin-top: .35rem; flex-wrap: wrap; }
.color-swatch {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer; flex-shrink: 0;
  padding: 0; outline: none;
}
.color-swatch:hover { transform: scale(1.2); }
.swatch-active { border-color: #fff !important; box-shadow: 0 0 0 1px rgba(255,255,255,.5); }
.color-swatch-teal   { background: #0d9488; }
.color-swatch-blue   { background: #3b82f6; }
.color-swatch-indigo { background: #818cf8; }
.color-swatch-green  { background: #4ade80; }
.color-swatch-lime   { background: #a3e635; }
.color-swatch-orange { background: #f97316; }
.color-swatch-yellow { background: #fbbf24; }
.color-swatch-pink   { background: #f472b6; }
.color-swatch-red    { background: #f87171; }

/* ── Print setup ── */
.print-setup { padding: 2rem 1.5rem; max-width: 860px; }
.print-setup-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 1.5rem; }
.print-form-row { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.print-form-row .form-group { display: flex; flex-direction: column; gap: .35rem; }
.print-form-row .form-group label { font-size: .8rem; color: var(--text-sec); font-weight: 500; }
.print-form-row select { background: var(--surface2); border: 1px solid var(--border); color: var(--text); border-radius: 7px; padding: .45rem .65rem; font-size: .85rem; cursor: pointer; }
.print-dept-checks { margin-top: 1.25rem; }
.print-dept-label { font-size: .8rem; color: var(--text-sec); font-weight: 500; margin-bottom: .6rem; }
.print-dept-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.print-dept-check { display: flex; align-items: center; gap: .45rem; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: .4rem .75rem; font-size: .84rem; color: var(--text); cursor: pointer; transition: border-color .15s, background .15s; user-select: none; }
.print-dept-check:hover { border-color: var(--primary); }
.print-dept-check input { accent-color: var(--primary); cursor: pointer; }
.print-dept-check:has(input:checked) { background: rgba(13,148,136,.12); border-color: var(--primary); color: var(--primary); }
.print-dept-empty { font-size: .82rem; color: var(--text-sec); font-style: italic; margin-top: 1rem; }
.print-check-opt { display: flex; align-items: center; gap: .45rem; font-size: .83rem; color: var(--text); cursor: pointer; white-space: nowrap; }
.print-check-opt input { accent-color: var(--primary); cursor: pointer; }

/* ── Worker Schedule Panel (Urniki 2) ── */
.ws-panel { max-width: 520px; padding: 1.25rem 1rem; }
.ws-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.ws-title { flex: 1; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.ws-title strong { font-size: 1rem; font-weight: 700; }
.ws-meta { font-size: .75rem; color: var(--text-sec); }
.ws-nav { display: flex; align-items: center; gap: .2rem; flex-shrink: 0; }
.ws-month-label { font-size: .82rem; color: var(--text); white-space: nowrap; min-width: 100px; text-align: center; }
.ws-totals { display: flex; align-items: baseline; gap: .4rem; flex-shrink: 0; white-space: nowrap; }
.ws-total { font-size: .85rem; color: var(--primary); font-weight: 600; }
.ws-quota { font-size: .8rem; color: var(--text-muted); }
.ws-diff { font-size: .82rem; font-weight: 600; }
.ws-diff-pos { color: #22c55e; }
.ws-diff-neg { color: #ef4444; }
.ws-table { width: 100%; border-collapse: collapse; }
.ws-table tr { border-bottom: 1px solid var(--border); }
.ws-table tr.ws-weekend { background: var(--weekend-bg); }
.ws-table td { padding: .4rem .5rem; vertical-align: middle; }
.ws-day { color: var(--text-sec); font-size: .78rem; width: 2.6rem; }
.ws-date { color: var(--text-sec); font-size: .82rem; width: 2rem; }
.ws-cell { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ws-pos { font-size: .88rem; color: var(--text); }
.ws-shift { font-size: .75rem; color: var(--text-sec); }
.ws-empty { color: var(--border-h); font-size: .82rem; }

/* ── Status row in worker schedule ── */
.urnik-status-row .status-row-label {
  padding: .35rem .75rem; font-size: .72rem; font-weight: 600;
  color: var(--text-sec); white-space: nowrap;
}
.urnik-status-row td .grid-cell {
  display: flex; align-items: center; justify-content: center;
  min-height: 30px;
}

@media (max-width: 768px) {
  .lp-split { flex-direction: column-reverse; }
  .lp-left, .lp-right { flex: none; width: 100%; }
  .lp-left { padding: 2rem 1.5rem 2.5rem; }
  .lp-right { padding: 3.5rem 1.5rem 2rem; }
  .lp-headline { font-size: 1.3rem; }
  .lp-cards { grid-template-columns: 1fr; }
  .app-main { padding: 1rem .75rem; }
}

@media (max-width: 640px) {
  /* Prvi stolpec urnika — ožji */
  .urnik-grid thead th:first-child { min-width: 72px; }
  .urnik-grid tbody td:first-child { min-width: 72px; }
  /* Celice — ožje */
  .grid-cell { min-width: 38px; }
  /* Ime delovnega mesta v svoji vrstici, gumbi + chip v drugi */
  .row-reorder { display: none; }
  .row-name-wrap { flex-wrap: wrap; align-items: flex-start; padding: .2rem .3rem; gap: .05rem .2rem; }
  .pos-name { flex: 0 0 100%; font-size: .78rem; padding: .05rem 0; }
  .btn-edit-pos, .btn-del-pos { font-size: .72rem; padding: .05rem .18rem; }
  .shift-type-chip { font-size: .58rem; padding: .05rem .22rem; }
}

/* ════════════════════════════════════════
   TEME
   ════════════════════════════════════════ */

[data-theme="temna"] {
  --bg: #0f172a; --surface: #1e293b; --surface2: #263348;
  --border: #334155; --border-h: #475569;
  --text: #f1f5f9; --text-sec: #94a3b8;
  --primary: #0d9488; --primary-h: #0f766e;
  --primary-light: rgba(13,148,136,.15); --primary-border: rgba(13,148,136,.30);
  --danger: #ef4444; --danger-h: #dc2626; --success: #22c55e;
  --weekend-bg: rgba(255,255,255,.03); --today-bg: rgba(13,148,136,.18); --today-border: #0d9488;
}

[data-theme="antracitna"] {
  --bg: #18181b; --surface: #27272a; --surface2: #3f3f46;
  --border: #52525b; --border-h: #71717a;
  --text: #fafafa; --text-sec: #a1a1aa;
  --primary: #0d9488; --primary-h: #0f766e;
  --primary-light: rgba(13,148,136,.15); --primary-border: rgba(13,148,136,.30);
  --danger: #ef4444; --danger-h: #dc2626; --success: #22c55e;
  --weekend-bg: rgba(255,255,255,.03); --today-bg: rgba(13,148,136,.18); --today-border: #0d9488;
}

[data-theme="svetla"] {
  --bg: #f1f5f9; --surface: #ffffff; --surface2: #e2e8f0;
  --border: #cbd5e1; --border-h: #94a3b8;
  --text: #0f172a; --text-sec: #475569;
  --primary: #0d9488; --primary-h: #0f766e;
  --primary-light: rgba(13,148,136,.10); --primary-border: rgba(13,148,136,.25);
  --danger: #dc2626; --danger-h: #b91c1c; --success: #16a34a;
  --weekend-bg: rgba(0,0,0,.03); --today-bg: rgba(13,148,136,.10); --today-border: #0d9488;
}

[data-theme="bela"] {
  --bg: #ffffff; --surface: #f8fafc; --surface2: #f1f5f9;
  --border: #e2e8f0; --border-h: #cbd5e1;
  --text: #0f172a; --text-sec: #64748b;
  --primary: #0d9488; --primary-h: #0f766e;
  --primary-light: rgba(13,148,136,.09); --primary-border: rgba(13,148,136,.22);
  --danger: #dc2626; --danger-h: #b91c1c; --success: #16a34a;
  --weekend-bg: rgba(0,0,0,.025); --today-bg: rgba(13,148,136,.08); --today-border: #0d9488;
}

[data-theme="modra"] {
  --bg: #080d1a; --surface: #0d1530; --surface2: #141f42;
  --border: #1a2e5c; --border-h: #2a4a8c;
  --text: #e8f0fe; --text-sec: #7aa3d4;
  --primary: #3b82f6; --primary-h: #2563eb;
  --primary-light: rgba(59,130,246,.15); --primary-border: rgba(59,130,246,.30);
  --danger: #ef4444; --danger-h: #dc2626; --success: #22c55e;
  --weekend-bg: rgba(255,255,255,.025); --today-bg: rgba(59,130,246,.18); --today-border: #3b82f6;
}

[data-theme="zelena"] {
  --bg: #071510; --surface: #0c2218; --surface2: #122e21;
  --border: #1a4a30; --border-h: #236040;
  --text: #ecfdf5; --text-sec: #6ee7b7;
  --primary: #10b981; --primary-h: #059669;
  --primary-light: rgba(16,185,129,.15); --primary-border: rgba(16,185,129,.30);
  --danger: #ef4444; --danger-h: #dc2626; --success: #34d399;
  --weekend-bg: rgba(255,255,255,.025); --today-bg: rgba(16,185,129,.18); --today-border: #10b981;
}

[data-theme="oranzna"] {
  --bg: #160900; --surface: #241200; --surface2: #331a00;
  --border: #4a2800; --border-h: #6b3c00;
  --text: #fff7ed; --text-sec: #fdba74;
  --primary: #f97316; --primary-h: #ea580c;
  --primary-light: rgba(249,115,22,.15); --primary-border: rgba(249,115,22,.30);
  --danger: #ef4444; --danger-h: #dc2626; --success: #22c55e;
  --weekend-bg: rgba(255,255,255,.025); --today-bg: rgba(249,115,22,.18); --today-border: #f97316;
}

/* Home tab ozadje po temi */
[data-theme="svetla"] #tab-home,
[data-theme="bela"] #tab-home {
  background:
    radial-gradient(ellipse at 25% 15%, rgba(13,148,136,.07) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 75%, rgba(99,102,241,.05) 0%, transparent 50%);
}
[data-theme="modra"] #tab-home {
  background:
    radial-gradient(ellipse at 25% 15%, rgba(59,130,246,.2) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 75%, rgba(99,102,241,.12) 0%, transparent 50%);
}
[data-theme="zelena"] #tab-home {
  background:
    radial-gradient(ellipse at 25% 15%, rgba(16,185,129,.2) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 75%, rgba(16,185,129,.08) 0%, transparent 50%);
}
[data-theme="oranzna"] #tab-home {
  background:
    radial-gradient(ellipse at 25% 15%, rgba(249,115,22,.2) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 75%, rgba(249,115,22,.08) 0%, transparent 50%);
}

/* ── Theme picker ── */
.tema-wrap { position: relative; }
.tema-btn {
  display: flex; align-items: center; gap: .3rem;
  padding: .26rem .55rem; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-sec); font-size: .78rem; font-family: inherit;
  cursor: pointer; transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.tema-btn:hover { border-color: var(--border-h); color: var(--text); }
.tema-menu {
  position: fixed; z-index: 500;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; min-width: 150px;
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  overflow: hidden;
}
.tema-opcija {
  display: block; width: 100%; padding: .42rem .8rem;
  background: none; border: none;
  font-family: inherit; font-size: .82rem; color: var(--text);
  cursor: pointer; text-align: left; transition: background .12s; white-space: nowrap;
}
.tema-opcija:hover { background: var(--surface2); }
.tema-opcija.aktivna { font-weight: 700; color: var(--primary); }
