/* ===========================================================================
   AZOLPP — interni design (Phase A reskin)
   Vizual usklađen s handoff prototipom „Plovidbeni Redovi": primarna plava
   #1d4ed8, slate neutrali, IBM Plex Sans/Mono, radijusi 14/9/7. BEZ zlatne.
   (Javni portal — portal.css — ostaje navy/gold, ne dira se.)
   =========================================================================== */

:root {
  --brand-primary:       #1d4ed8;
  --brand-primary-hover: #1e40af;
  --brand-dark:          #1e40af;  /* gradijenti → plavo (bez navy) */
  --primary-tint:        #eff6ff;

  --sidebar-w: 230px;
  --topbar-h: 56px;

  /* Status */
  --color-success-bg: #DCFCE7; --color-success-text: #166534;
  --color-danger-bg:  #FEE2E2; --color-danger-text:  #991B1B;
  --color-warning-bg: #FEF3C7; --color-warning-text: #92400E;
  --color-info-bg:    #DBEAFE; --color-info-text:    #1E40AF;

  /* Prikazni status linije (Phase B) — 5 semantičkih boja (bg / text / dot / border) */
  --st-zatrazeno-bg:     #EDE9FE; --st-zatrazeno-text:     #5B21B6; --st-zatrazeno-dot:     #7C3AED; --st-zatrazeno-border:     #DDD6FE;
  --st-nabava-bg:        #FFEDD5; --st-nabava-text:        #9A3412; --st-nabava-dot:        #EA580C; --st-nabava-border:        #FED7AA;
  --st-usuglasavanje-bg: #FEF3C7; --st-usuglasavanje-text: #92400E; --st-usuglasavanje-dot: #D97706; --st-usuglasavanje-border: #FDE68A;
  --st-ceka-bg:          #DBEAFE; --st-ceka-text:          #1E40AF; --st-ceka-dot:          #2563EB; --st-ceka-border:          #BFDBFE;
  --st-odobreno-bg:      #DCFCE7; --st-odobreno-text:      #166534; --st-odobreno-dot:      #16A34A; --st-odobreno-border:      #BBF7D0;

  /* Površine i tekst (handoff slate skala) */
  --color-text:           #0f172a;
  --color-text-secondary: #334155;
  --color-muted:          #64748b;
  --color-faint:          #94a3b8;
  --color-border:         #e2e8f0;
  --color-border-divider: #eef2f6;
  --color-border-input:   #cbd5e1;
  --color-border-focus:   #93c5fd;
  --color-surface:        #f8fafc;
  --color-surface-input:  #fbfcfe;
  --color-bg:             #f1f5f9;
  --color-white:          #ffffff;

  /* Font — IBM Plex (handoff) */
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Menlo', 'Consolas', monospace;
  --fs-xs: 11px; --fs-sm: 12.5px; --fs-base: 14px; --fs-md: 15px;
  --fs-lg: 16px; --fs-xl: 18px; --fs-2xl: 21px; --fs-3xl: 24px;
  --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700; --fw-extrabold: 700;

  /* Geometrija (handoff: kartice 14, kontrole 9, segment 7, pill 20) */
  --radius-badge: 7px; --radius-pill: 20px; --radius-card: 14px;
  --radius-control: 9px; --radius-segment: 7px; --radius-tile: 11px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04);
  --shadow-md: 0 4px 12px rgba(15,23,42,.10);
  --shadow-lg: 0 20px 50px rgba(15,23,42,.30);
  --shadow-bar: 0 -2px 12px rgba(15,23,42,.05);
  --transition: 150ms ease;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-primary); text-decoration: none; }
.hidden { display: none !important; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--color-muted); }

/* ───────────── Buttons ───────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: var(--fw-semibold);
  padding: 10px 16px; border-radius: var(--radius-control); border: 1px solid transparent;
  cursor: pointer; transition: var(--transition); line-height: 1; white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn .mdi { font-size: 16px; }
.btn-primary { background: var(--brand-primary); color: #fff; box-shadow: 0 1px 2px rgba(29,78,216,.35); }
.btn-primary:hover:not(:disabled) { background: var(--brand-primary-hover); }
.btn-ghost { background: #fff; color: var(--color-text-secondary); border-color: var(--color-border-input); }
.btn-ghost:hover:not(:disabled) { background: var(--color-surface); }
.btn-danger { background: var(--color-danger-text); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #7f1717; }
.btn-block { width: 100%; justify-content: center; }

/* ───────────── Inputs / form-row ───────────── */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-4); }
.form-row label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--color-text-secondary); }
input, select, textarea {
  font-family: var(--font-sans); font-size: 13.5px; color: var(--color-text);
  padding: 10px 12px; border: 1px solid var(--color-border-input); border-radius: var(--radius-control);
  background: #fff; transition: var(--transition); width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(147,197,253,.35);
}

/* ───────────── Table ───────────── */
.table-wrap { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }
.table thead th {
  text-align: left; padding: 11px 14px; background: var(--color-surface);
  font-size: var(--fs-xs); font-weight: var(--fw-bold); text-transform: uppercase;
  letter-spacing: .06em; color: var(--color-muted); border-bottom: 1px solid var(--color-border);
}
.table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--color-border); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:nth-child(even) { background: #FCFCFD; }
.table tbody tr:hover { background: #F3F6FB; }

/* ───────────── Badge / status-pill ───────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px;
  border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: var(--fw-bold);
  text-transform: uppercase; letter-spacing: .04em;
}
.badge-success { background: var(--color-success-bg); color: var(--color-success-text); }
.badge-danger  { background: var(--color-danger-bg);  color: var(--color-danger-text); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning-text); }
.badge-info    { background: var(--color-info-bg);    color: var(--color-info-text); }
.badge-muted   { background: #EEF2F6; color: var(--color-muted); }
/* Prikazni status linije (Phase B) — 5 semantičkih pillova s točkom */
.badge .st-dot { width: 6px; height: 6px; border-radius: 50%; }
.badge-st-zatrazeno     { background: var(--st-zatrazeno-bg);     color: var(--st-zatrazeno-text); }
.badge-st-zatrazeno     .st-dot { background: var(--st-zatrazeno-dot); }
.badge-st-nabava        { background: var(--st-nabava-bg);        color: var(--st-nabava-text); }
.badge-st-nabava        .st-dot { background: var(--st-nabava-dot); }
.badge-st-usuglasavanje { background: var(--st-usuglasavanje-bg); color: var(--st-usuglasavanje-text); }
.badge-st-usuglasavanje .st-dot { background: var(--st-usuglasavanje-dot); }
.badge-st-ceka          { background: var(--st-ceka-bg);          color: var(--st-ceka-text); }
.badge-st-ceka          .st-dot { background: var(--st-ceka-dot); }
.badge-st-odobreno      { background: var(--st-odobreno-bg);      color: var(--st-odobreno-text); }
.badge-st-odobreno      .st-dot { background: var(--st-odobreno-dot); }
.badge-st-nije          { background: #f1f5f9;                    color: #64748b; }
.badge-st-nije          .st-dot { background: #94a3b8; }

/* Linija bez verzije za odabranu godinu — zatamnjeni red (nije_planirano) */
.row-unplanned > td { color: var(--color-muted); }
.row-unplanned .rel-cell { color: var(--color-muted); font-weight: var(--fw-semibold); }

/* ───────────── Modal ───────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.55);
  display: flex; align-items: center; justify-content: center; z-index: 1000; padding: var(--space-4);
}
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-header {
  background: #fff; color: var(--color-text); padding: 16px 20px; font-size: var(--fs-lg); font-weight: var(--fw-bold);
  display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--color-border);
}
.modal-header .close { background: none; border: none; color: var(--color-muted); cursor: pointer; font-size: 20px; opacity: .85; }
.modal-body { padding: 20px; }
.modal-body .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--color-border); display: flex; justify-content: flex-end; gap: var(--space-2); background: var(--color-surface); }

/* ───────────── Toast ───────────── */
.toast-container { position: fixed; top: 18px; right: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; min-width: 280px; max-width: 380px;
  background: #fff; border-left: 5px solid var(--color-muted); border-radius: var(--radius-card);
  box-shadow: var(--shadow-md); padding: 12px 14px; animation: toast-in .25s ease;
}
.toast .mdi { font-size: 20px; }
.toast .ttl { font-weight: var(--fw-bold); font-size: 13.5px; }
.toast .desc { font-size: var(--fs-sm); color: var(--color-text-secondary); }
.toast.toast-success { border-color: var(--color-success-text); }
.toast.toast-success .mdi { color: var(--color-success-text); }
.toast.toast-danger { border-color: var(--color-danger-text); }
.toast.toast-danger .mdi { color: var(--color-danger-text); }
.toast.toast-info { border-color: var(--brand-primary); }
.toast.toast-info .mdi { color: var(--brand-primary); }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ───────────── KPI / hero traka ───────────── */
.hero { background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark)); color: #fff; border-radius: var(--radius-card); padding: var(--space-6); box-shadow: var(--shadow-md); }
.hero h1 { margin: 0 0 4px; font-size: var(--fs-2xl); font-weight: var(--fw-extrabold); }
.hero p { margin: 0; opacity: .85; font-size: var(--fs-md); }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-4); }
.kpi { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-4); box-shadow: var(--shadow-sm); }
.kpi .label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); font-weight: var(--fw-bold); }
.kpi .value { font-size: var(--fs-3xl); font-weight: var(--fw-extrabold); color: var(--brand-primary); }
/* Clickable KPI (Phase B): status dot + filter ring */
.kpi.clickable { position: relative; cursor: pointer; transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition); }
.kpi.clickable:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi.active { border-color: var(--brand-primary); box-shadow: 0 0 0 2px rgba(29,78,216,.25); }
.kpi-dot { position: absolute; top: var(--space-4); right: var(--space-4); width: 12px; height: 12px; border-radius: 50%; }

/* ───────────── Segmented control (Phase B; reuse u C) ───────────── */
.seg { display: inline-flex; gap: 3px; padding: 3px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-control); }
.seg-btn { border: none; background: transparent; color: var(--color-muted); font-family: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); padding: 7px 13px; border-radius: var(--radius-segment); cursor: pointer; transition: background var(--transition), color var(--transition); }
.seg-btn:hover { color: var(--color-text); }
.seg-btn.active { background: #fff; color: var(--brand-primary); box-shadow: var(--shadow-sm); }

/* ───────────── Dashboard ("Plovidbene linije") ───────────── */
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-5); }
.dash-head .eyebrow { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .08em; text-transform: uppercase; color: var(--brand-primary); }
.dash-head h1 { margin: 2px 0 4px; font-size: var(--fs-3xl); font-weight: var(--fw-extrabold); color: var(--color-text); }
.dash-head .subtitle { margin: 0; font-size: var(--fs-base); color: var(--color-muted); }
.dash-yearbar { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-3) var(--space-4); box-shadow: var(--shadow-sm); margin-bottom: var(--space-5); }
.dash-yearbar .yb-label { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--color-muted); }
.dash-yearbar .yb-hint { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--color-muted); font-size: var(--fs-sm); }
.dash-kpi-label { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--color-muted); margin-bottom: var(--space-3); }
.gradovi-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.gradovi-chips .chip { background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text-secondary); padding: 2px 8px; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }

/* ───────────── Login ───────────── */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark)); padding: var(--space-4);
}
.login-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 400px; padding: var(--space-8); }
.login-card .brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: var(--space-2); }
.login-card .brand .mark { font-size: 30px; color: var(--brand-primary); }
.login-card .brand .word { font-size: var(--fs-3xl); font-weight: var(--fw-extrabold); letter-spacing: -.02em; color: var(--brand-dark); }
.login-card .subtitle { text-align: center; color: var(--color-muted); font-size: var(--fs-sm); margin-bottom: var(--space-6); }
.login-error { background: var(--color-danger-bg); color: var(--color-danger-text); padding: 9px 12px; border-radius: var(--radius-card); font-size: var(--fs-sm); font-weight: var(--fw-semibold); margin-bottom: var(--space-4); }

/* ───────────── App shell ───────────── */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; grid-template-rows: var(--topbar-h) 1fr; grid-template-areas: "topbar topbar" "sidebar main"; min-height: 100vh; }
.topbar {
  grid-area: topbar; background: #fff; color: var(--color-text); border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-6); z-index: 10;
}
.topbar .brand { display: flex; align-items: center; gap: 9px; font-weight: var(--fw-extrabold); font-size: var(--fs-lg); letter-spacing: -.01em; color: var(--color-text); }
.topbar .brand .mdi { font-size: 22px; color: var(--brand-primary); }
.topbar .right { display: flex; align-items: center; gap: var(--space-4); }
.topbar .user { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.topbar .user .name { font-weight: var(--fw-bold); font-size: var(--fs-base); }
.topbar .user .role { font-size: var(--fs-xs); color: var(--color-muted); text-transform: uppercase; letter-spacing: .05em; }
.topbar .logout { background: #fff; border: 1px solid var(--color-border-input); color: var(--color-text-secondary); padding: 6px 12px; border-radius: var(--radius-control); cursor: pointer; font-size: var(--fs-sm); font-weight: var(--fw-semibold); display: inline-flex; gap: 6px; align-items: center; }
.topbar .logout:hover { background: var(--color-surface); }

.sidebar { grid-area: sidebar; background: #fff; border-right: 1px solid var(--color-border); padding: var(--space-4) var(--space-2); overflow-y: auto; }
.sidebar .nav-group-label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--color-muted); font-weight: var(--fw-bold); padding: var(--space-4) var(--space-3) var(--space-1); }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-control);
  color: var(--color-text-secondary); font-weight: var(--fw-semibold); font-size: var(--fs-base);
  cursor: pointer; transition: var(--transition); margin-bottom: 2px; border: none; background: none; width: 100%; text-align: left;
}
.nav-item .mdi { font-size: 19px; color: var(--color-muted); }
.nav-item:hover { background: var(--color-surface); color: var(--color-text); }
.nav-item.active { background: var(--primary-tint); color: var(--brand-primary); }
.nav-item.active .mdi { color: var(--brand-primary); }

.main { grid-area: main; padding: var(--space-6); }
.view-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 50vh; color: var(--color-muted); text-align: center; }
.view-placeholder .mdi { font-size: 56px; color: #CBD5E1; margin-bottom: var(--space-3); }
.view-placeholder h2 { margin: 0 0 6px; color: var(--color-text-secondary); font-size: var(--fs-xl); }
.view-placeholder .soon { margin-top: var(--space-3); }

.no-access { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--color-muted); gap: var(--space-3); padding: var(--space-6); }
.no-access .mdi { font-size: 64px; color: #CBD5E1; }
.no-access h2 { color: var(--color-text-secondary); margin: 0; }

/* ───────────── UI-2 dopune (CRUD ekrani) ───────────── */
.filter-strip { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); flex-wrap: wrap; }
.filter-strip input, .filter-strip select { width: auto; }

.pagination { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-4); margin-top: var(--space-4); }

.cell-actions { text-align: right; white-space: nowrap; }
.btn-icon { padding: 6px 8px; }
.btn-icon .mdi { font-size: 17px; }
.btn-icon.danger { color: var(--color-danger-text); }
.btn-icon.danger:hover:not(:disabled) { background: var(--color-danger-bg); border-color: var(--color-danger-bg); }

.field-err { color: var(--color-danger-text); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }

/* ───────────── UI-3 dopune (Linije: route builder + gradovi) ───────────── */
.modal.wide { max-width: 640px; }
.route-add { display: flex; gap: var(--space-2); align-items: center; }
.route-add select { flex: 1; }
.route-builder { border: 1px solid var(--color-border); border-radius: var(--radius-card); max-height: 220px; overflow-y: auto; margin-top: var(--space-2); }
.route-row { display: flex; align-items: center; gap: var(--space-3); padding: 7px 10px; border-bottom: 1px solid var(--color-border); }
.route-row:last-child { border-bottom: none; }
.route-row .seq { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: var(--fw-bold); flex-shrink: 0; }
.route-row .nm { flex: 1; font-weight: var(--fw-semibold); }
.route-row .ops { display: flex; gap: 2px; }
.grad-multiselect { border: 1px solid var(--color-border); border-radius: var(--radius-card); max-height: 180px; overflow-y: auto; padding: var(--space-2); display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.grad-multiselect label { display: flex; align-items: center; gap: 6px; font-weight: var(--fw-medium); font-size: var(--fs-sm); }
.grad-multiselect input { width: auto; }

/* ───────────── UI-4 dopune (Verzije) ───────────── */
.versions-toolbar { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); flex-wrap: wrap; }
.versions-toolbar select { min-width: 300px; }
.badge-accent { background: var(--primary-tint); color: var(--brand-primary); }
.badge-gold { background: #E0E7FF; color: #3730A3; }  /* „Zakazano" — indigo (bez zlatne) */
.badge-grey { background: #E2E8F0; color: #475569; }
.badge-dark { background: #1E293B; color: #fff; }
.active-tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: var(--radius-pill); background: var(--color-success-text); color: #fff; font-size: 10px; font-weight: var(--fw-extrabold); letter-spacing: .05em; }
tr.row-active { background: #F0FAF4 !important; }

/* ───────────── UI-5a dopune (version-detail + Kalendar) ───────────── */
.vd-header { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-4); }
.vd-title h1 { margin: 0; font-size: var(--fs-2xl); }
.vd-sub { color: var(--color-text-secondary); font-size: var(--fs-base); margin-top: 2px; }
.ro-banner { display: flex; align-items: center; gap: 8px; background: var(--color-warning-bg); color: var(--color-warning-text); padding: 9px 14px; border-radius: var(--radius-card); font-weight: var(--fw-semibold); margin-bottom: var(--space-4); }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--color-border); margin-bottom: var(--space-5); }
.tab { background: none; border: none; padding: 10px 16px; font-family: var(--font-sans); font-size: var(--fs-base); font-weight: var(--fw-semibold); color: var(--color-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
.tab:disabled { cursor: default; opacity: .65; }

.sezona-card { border: 1px solid var(--color-border); border-radius: var(--radius-card); margin-bottom: var(--space-3); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.sezona-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; }
.sezona-head-main { display: flex; align-items: center; gap: 8px; }
.sezona-head-main .caret { transition: transform var(--transition); }
.sezona-head-main .caret.open { transform: rotate(90deg); }
.sezona-body { padding: 0 14px 14px; border-top: 1px solid var(--color-border); }
.sez-sub { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--color-muted); font-weight: var(--fw-bold); margin: 14px 0 8px; display: flex; align-items: center; gap: 6px; }
.raspon-list { display: flex; flex-wrap: wrap; gap: 6px; }
.raspon-chip { background: var(--color-info-bg); color: var(--color-info-text); padding: 3px 10px; border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: var(--fw-semibold); font-family: var(--font-mono); }
.tipdana-list { display: flex; flex-direction: column; gap: 4px; }
.tipdana-row { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-card); }
.tipdana-row .nm { font-weight: var(--fw-semibold); min-width: 140px; }
.tipdana-row .ops { margin-left: auto; }

.raspon-editor { display: flex; flex-direction: column; gap: 6px; }
.rasp-row { display: flex; align-items: center; gap: 8px; }
.rasp-row input[type="date"] { width: auto; flex: 1; }
.day-checks { display: flex; flex-wrap: wrap; gap: 10px; }
.day-checks label { display: flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.day-checks input { width: auto; }
.inline-check { display: flex; align-items: center; gap: 6px; font-weight: var(--fw-semibold); }
.inline-check input { width: auto; }

/* ───────────── UI-5b dopune (Polasci) ───────────── */
.polasci-block { margin: 8px 0 14px; }
.pb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pb-list { display: flex; flex-direction: column; gap: 4px; }
.polazak-row { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-card); }
.polazak-row .nm { font-family: var(--font-mono); font-size: var(--fs-sm); }
.polazak-row .ops { margin-left: auto; }
.vremena-grid { width: 100%; border-collapse: collapse; margin-top: 6px; }
.vremena-grid th { text-align: left; padding: 6px 8px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--color-muted); border-bottom: 1px solid var(--color-border); }
.vremena-grid td { padding: 5px 8px; border-bottom: 1px solid var(--color-border); }
.vremena-grid input[type="time"] { width: auto; }
.vremena-grid input:disabled { background: #F1F5F9; }
.vremena-grid tr.vg-skip { background: #F8FAFC; color: var(--color-muted); }

/* ───────────── UI-5c dopune (Iznimke/Cjenik) ───────────── */
.eur { text-align: right; font-family: var(--font-mono); font-weight: var(--fw-semibold); }
textarea { resize: vertical; }

/* ───────────── UI-6 dopune (Tijek / Suglasnost / Komentari) ───────────── */
.tijek-panel { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-4); margin-bottom: var(--space-4); box-shadow: var(--shadow-sm); }
.tijek-panel:empty { display: none; }
.action-bar { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tijek-context { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-card); font-weight: var(--fw-semibold); margin-bottom: var(--space-3); background: var(--color-info-bg); color: var(--color-info-text); }
.tijek-context.ok { background: var(--color-success-bg); color: var(--color-success-text); }
.tijek-context.sched { background: #E0E7FF; color: #3730A3; }
.sugl-summary { margin-top: var(--space-3); font-weight: var(--fw-semibold); color: var(--color-warning-text); display: flex; align-items: center; gap: 6px; }
.sugl-summary.ok { color: var(--color-success-text); }
.suglasnost-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sugl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); background: #EEF2F6; color: var(--color-muted); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.sugl-chip.ok { background: var(--color-success-bg); color: var(--color-success-text); }
.sugl-chip .btn-icon { padding: 2px 5px; }

.komentari { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-4); margin-top: var(--space-5); box-shadow: var(--shadow-sm); }
.kom-title { margin: 0 0 var(--space-3); font-size: var(--fs-lg); display: flex; align-items: center; gap: 8px; }
.kom-list { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-4); }
.kom-item { border-left: 3px solid var(--color-border); padding: 4px 0 4px 12px; }
.kom-meta { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.kom-meta .btn-icon { margin-left: auto; padding: 2px 6px; }
.kom-text { margin-top: 3px; white-space: pre-wrap; }
.kom-add { display: flex; gap: var(--space-2); align-items: flex-start; }
.kom-add textarea { flex: 1; }

/* ───────────── Line master-detail (Phase C1a) ───────────── */
.ld-header-right { margin-left: auto; }
.ld-vercontrols { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.ld-vercontrols select { width: auto; }
.btn-sm { padding: 5px 9px; font-size: var(--fs-sm); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(320px, 3fr); gap: var(--gap-grid, var(--space-6)); align-items: start; padding-bottom: 96px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-left { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.detail-panel { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); overflow: hidden; position: sticky; top: var(--space-4); }
/* LD-4: right-panel tab strip (prototype) */
.ld-tabs { display: flex; padding: 0 8px; margin-bottom: 0; gap: 0; border-bottom: 1px solid var(--color-border); }
.ld-tabs .tab { flex: 1; padding: 14px 6px; font-size: 12.5px; font-weight: 600; color: #64748b; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-align: center; }
.ld-tabs .tab.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
.ld-panel-body { padding: var(--space-4); }
.ld-subtabs { margin-bottom: var(--space-4); }
.ld-soon { display: flex; align-items: center; gap: 8px; color: var(--color-muted); padding: var(--space-5) var(--space-2); font-size: var(--fs-base); }

/* request / procurement kartice */
.ld-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); overflow: hidden; }
.ld-card-head { display: flex; align-items: center; gap: 8px; padding: 12px var(--space-4); font-weight: var(--fw-bold); border-bottom: 1px solid var(--color-border); }
.ld-card-head.request { background: #EDE9FE; color: #5B21B6; }
.ld-card-head.nabava { background: #FFEDD5; color: #9A3412; }
.ld-card-body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); }
.ld-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.ld-label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--color-muted); font-weight: var(--fw-bold); margin-bottom: 3px; }
.ld-val { font-size: var(--fs-base); font-weight: var(--fw-semibold); }
.ld-obraz { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-3); white-space: pre-wrap; line-height: 1.5; }
.ld-daterow { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.ld-daterow input { width: auto; }

/* fiksna akcijska traka */
.action-bar.ld-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-between; align-items: center; padding: 12px var(--space-8); background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-top: 1px solid var(--color-border); box-shadow: 0 -2px 12px rgba(15,23,42,.06); }
.action-bar.ld-bar.hidden { display: none; }
.ld-bar-note { display: flex; align-items: center; gap: 8px; color: var(--color-text-secondary); font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.ld-bar-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.suglasnost-chips.col { flex-direction: column; align-items: stretch; }
.suglasnost-chips.col .sugl-chip { justify-content: space-between; }

/* schedule/cjenik presentation (Phase C2a) */
.sched-controls { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-4); }
.sched-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.sched-lbl { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .05em; text-transform: uppercase; color: var(--color-muted); min-width: 54px; }
.chip-count { background: var(--brand-primary); color: #fff; border-radius: var(--radius-pill); padding: 2px 11px; font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.td-block { margin-bottom: var(--space-5); }
.td-head { display: flex; align-items: center; gap: 8px; margin-bottom: var(--space-2); }
.sched-table th { font-size: var(--fs-xs); }
.sched-table .mid-hint { color: var(--color-muted); font-size: var(--fs-xs); }

/* compare/diff (C2b) — vizualni diff redaka */
.sched-table tr.diff-added td { background: #dcfce7; }
.sched-table tr.diff-removed td { background: #fee2e2; text-decoration: line-through; color: #991B1B; }
.sched-table tr.diff-changed td { background: #fef3c7; }
.diff-legend { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--color-muted); }
.diff-legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.diff-legend .sw-rem { background: #fee2e2; border: 1px solid #fca5a5; }
.diff-legend .sw-add { background: #dcfce7; border: 1px solid #86efac; }
.diff-legend .sw-chg { background: #fef3c7; border: 1px solid #fde68a; }

/* ── LD-3: kartica plovidbenog reda (prototipski grid) ── */
.sched-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); overflow: hidden; }
.sched-card .sched-head { display: flex; flex-direction: column; gap: 12px; padding: 14px 22px; border-bottom: 1px solid #eef2f6; }
.sched-card .sched-row { margin: 0; }
.sched-card .chip-count { background: #f1f5f9; color: #475569; font-weight: var(--fw-semibold); }
.view-toggle { margin-left: auto; }
.edit-hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; border-bottom: 1px solid #eef2f6; background: #fbfcfe; }
.edit-hint > span { font-size: 12px; color: var(--color-muted); display: inline-flex; align-items: center; gap: 6px; }
.btn-edit-hint { border: 1px solid var(--color-border); background: #fff; color: var(--color-text); font-family: inherit; font-size: 13px; font-weight: var(--fw-semibold); padding: 6px 12px; border-radius: var(--radius-control); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.btn-edit-hint:hover { background: #eff6ff; border-color: var(--brand-primary); color: var(--brand-primary); }
.btn-edit-hint.warn { border-color: #fcd34d; background: #fffbeb; color: #b45309; }
.btn-edit-hint.warn:hover { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.sched-bodywrap { padding: 0; }

.sched-grid-wrap { overflow-x: auto; }
.sched-grid { min-width: 760px; }
.sg-head, .sg-row { display: grid; grid-template-columns: 56px 96px minmax(110px,1fr) 130px minmax(120px,1.3fr) minmax(120px,1.5fr) 104px 92px; align-items: center; }
.sg-head { border-bottom: 1px solid var(--color-border); }
.sg-head > div { font-size: 11px; font-weight: var(--fw-semibold); letter-spacing: .04em; text-transform: uppercase; color: #94a3b8; padding: 11px 14px; }
.sg-head > .sg-first { padding-left: 22px; }
.sg-head > .sg-last { padding-right: 18px; }
.sg-row { border-top: 1px solid #f1f5f9; }
.sg-row > div { padding: 13px 14px; font-size: 13px; color: #334155; }
.sg-row .sg-id { padding-left: 22px; font-family: var(--font-mono); font-size: 12px; color: #94a3b8; }
.sg-row .sg-pol { font-family: var(--font-mono); font-weight: var(--fw-semibold); color: #0f172a; }
.sg-row .sg-luka { font-size: 13.5px; color: #334155; }
.sg-row .sg-traj { font-family: var(--font-mono); font-size: 13px; color: #475569; white-space: nowrap; }
.sg-row .sg-brod, .sg-row .sg-nap, .sg-row .sg-razlika { color: #94a3b8; }
.sg-row .sg-chat { padding-right: 18px; }
.sg-chat-btn { border: none; background: transparent; color: #94a3b8; cursor: pointer; font-size: 18px; line-height: 1; padding: 4px; border-radius: 6px; display: inline-flex; }
.sg-chat-btn:hover { background: #eff6ff; color: var(--brand-primary); }
.sg-empty { grid-column: 1 / -1; padding: 28px 22px; text-align: center; color: var(--color-muted); font-size: 13px; }
.sg-row.diff-added { background: #f0fdf4; }
.sg-row.diff-removed { background: #fef7f7; }
.sg-row.diff-removed .sg-pol { text-decoration: line-through; color: #dc2626; }
.sg-row .sg-brod .mdi { color: #94a3b8; font-size: 15px; margin-right: 2px; }
.sg-row .sg-brod { color: #334155; }
.sg-row .sg-nap { color: #475569; }
.sg-diff { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; }
.sg-diff.add { color: #16a34a; }
.sg-diff.rem { color: #dc2626; text-decoration: line-through; }

.sched-lock { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fef3c7; color: #92400e; padding: 11px 22px; font-size: 13px; font-weight: var(--fw-semibold); border-top: 1px solid #fde68a; }
.sched-lock > span { display: inline-flex; align-items: center; gap: 8px; }
.sched-card .ro-banner { margin: 0; border-radius: 0; }
.classic-edit-bar { margin-bottom: 12px; }

.cjenik-matrix th { font-size: var(--fs-xs); }
.cjenik-matrix .cj-group td { background: var(--color-surface); font-weight: var(--fw-bold); color: var(--brand-primary); text-transform: uppercase; letter-spacing: .04em; font-size: var(--fs-xs); }
.cjenik-matrix td.eur { white-space: nowrap; }
.cj-cell-btn { background: none; border: none; font-family: var(--font-mono); font-size: var(--fs-base); color: var(--color-text); cursor: pointer; padding: 2px 4px; border-radius: var(--radius-badge); }
.cj-cell-btn:hover { background: var(--color-info-bg); color: var(--brand-primary); }
.cj-del-btn { background: none; border: none; color: var(--color-muted); cursor: pointer; font-size: 14px; padding: 0 2px; opacity: .5; }
.cj-del-btn:hover { color: var(--color-danger-text); opacity: 1; }

/* ── LD-4: Komunikacija thread ── */
.kom-wrap { margin: calc(-1 * var(--space-4)); display: flex; flex-direction: column; }
.kom-thread { padding: 18px; display: flex; flex-direction: column; gap: 14px; max-height: 430px; overflow: auto; }
.kom-daysep { text-align: center; }
.kom-daysep span { display: inline-block; font-size: 11px; font-weight: 500; color: #94a3b8; background: #f1f5f9; padding: 5px 12px; border-radius: 20px; }

.ksys { display: flex; gap: 10px; align-items: flex-start; }
.ksys-av { flex: none; width: 30px; height: 30px; border-radius: 8px; background: #0f2740; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.ksys-text { font-size: 12.5px; color: #64748b; line-height: 1.5; padding-top: 3px; }
.ksys-text strong { color: #334155; font-weight: 600; }
.ksys-time { color: #94a3b8; }

.kmsg { display: flex; gap: 10px; align-items: flex-start; }
.kmsg.own { flex-direction: row-reverse; }
.kmsg-av { flex: none; width: 34px; height: 34px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.kmsg-main { min-width: 0; max-width: 80%; }
.kmsg.own .kmsg-main { margin-left: auto; }
.kmsg-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 3px; }
.kmsg.own .kmsg-head { flex-direction: row-reverse; }
.kmsg-name { font-size: 13px; font-weight: 600; color: #0f172a; }
.kmsg-time { font-size: 11px; color: #94a3b8; }
.kmsg-bubble { position: relative; background: #f1f5f9; border-radius: 4px 12px 12px 12px; padding: 11px 14px; font-size: 13px; color: #334155; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.kmsg.own .kmsg-bubble { background: var(--brand-primary); color: #fff; border-radius: 12px 4px 12px 12px; }
.kmsg-del { position: absolute; top: 2px; right: 4px; border: none; background: transparent; color: inherit; opacity: 0; cursor: pointer; font-size: 15px; line-height: 1; padding: 0; }
.kmsg:hover .kmsg-del { opacity: .5; }
.kmsg-del:hover { opacity: 1; }

.kom-foot { padding: 14px 18px; border-top: 1px solid #eef2f6; }
.kom-composer { border: 1px solid #cbd5e1; border-radius: 10px; overflow: hidden; }
.kc-toolbar { display: flex; gap: 4px; padding: 7px 10px; border-bottom: 1px solid #eef2f6; background: #f8fafc; color: #94a3b8; }
.kc-tool { border: none; background: transparent; color: #94a3b8; font-family: inherit; font-size: 13px; padding: 2px 6px; border-radius: 5px; cursor: pointer; }
.kc-tool:hover { background: #eef2f6; color: #475569; }
.kom-composer textarea { display: block; width: 100%; border: none; padding: 11px 13px; font-family: inherit; font-size: 13.5px; color: #0f172a; resize: vertical; }
.kom-composer textarea:focus { outline: none; }
.kom-send { display: flex; justify-content: flex-end; margin-top: 10px; }
.btn-send { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-primary); color: #fff; border: none; padding: 9px 18px; border-radius: 9px; font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.btn-send:hover { background: var(--brand-primary-hover); }

/* ── LD-4: Dnevnik timeline ── */
.dn-timeline { display: flex; flex-direction: column; }
.dn-ev { display: flex; gap: 12px; }
.dn-rail { flex: none; width: 12px; position: relative; display: flex; justify-content: center; }
.dn-rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: #eef2f6; }
.dn-ev:first-child .dn-rail::before { top: 8px; }
.dn-ev:last-child .dn-rail::before { bottom: auto; height: 8px; }
.dn-node { position: relative; z-index: 1; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-primary); margin-top: 6px; box-shadow: 0 0 0 3px #fff; }
.dn-card { flex: 1; min-width: 0; padding-bottom: 16px; }
.dn-hd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.dn-actor2 { font-size: 13px; font-weight: 700; color: #0f172a; }
.dn-chip { font-size: 11px; font-weight: 600; color: #64748b; background: #f1f5f9; padding: 2px 8px; border-radius: 6px; }
.dn-when { margin-left: auto; font-size: 11.5px; color: #94a3b8; }
.dn-act { font-size: 12.5px; color: #334155; line-height: 1.55; margin-top: 3px; }
.dn-detail { margin-top: 6px; background: #f8fafc; border: 1px solid #eef2f6; border-radius: 8px; padding: 9px 12px; font-size: 12px; color: #475569; }
.dn-empty { color: #94a3b8; font-size: 13px; padding: 20px 8px; text-align: center; }

/* ═══════════ Top-nav chrome (handoff 1:1) ═══════════ */
.appwrap { min-height: 100vh; display: flex; flex-direction: column; }
.topnav { height: 64px; background: #fff; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-6); position: sticky; top: 0; z-index: 20; }
.topnav-left { display: flex; align-items: center; gap: var(--space-4); }
.logo-tile { width: 36px; height: 36px; border-radius: 9px; background: var(--color-text); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.logo-tile .mdi { font-size: 20px; }
.brand-label { display: flex; flex-direction: column; line-height: 1.15; }
.brand-label .b1 { font-size: 15px; font-weight: 700; color: var(--color-text); letter-spacing: -.01em; }
.brand-label .b2 { font-size: 12px; color: var(--color-faint); }
.topnav-links { display: flex; align-items: center; gap: 4px; margin-left: var(--space-4); padding-left: var(--space-4); border-left: 1px solid var(--color-border); }
.topnav-link { border: none; background: none; font-family: inherit; font-size: var(--fs-base); font-weight: 600; color: var(--color-muted); padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: var(--transition); }
.topnav-link:hover { color: var(--color-text); }
.topnav-link.active { background: var(--primary-tint); color: var(--brand-primary); }
.topnav-right { display: flex; align-items: center; gap: var(--space-3); }
.topnav-right .user { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.topnav-right .user .name { font-weight: 700; font-size: var(--fs-base); color: var(--color-text); }
.topnav-right .user .role { font-size: var(--fs-xs); color: var(--color-muted); text-transform: uppercase; letter-spacing: .05em; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-tint); color: var(--brand-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.topnav .logout { background: #fff; border: 1px solid var(--color-border-input); color: var(--color-muted); width: 36px; height: 36px; border-radius: 9px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.topnav .logout:hover { background: var(--color-surface); color: var(--color-text); }
.topnav .logout .mdi { font-size: 18px; }
/* Puna širina (Mladen): dashboard + line-detail ispunjavaju viewport; zadržan 32px bočni padding (override prototipovog 1320px centriranja). */
.main { grid-area: auto; flex: 1; padding: var(--space-6) var(--space-8); width: 100%; }

/* ═══════════ Postavke (settings screen) ═══════════ */
.settings-grid { display: grid; grid-template-columns: 240px 1fr; gap: var(--space-6); align-items: start; }
.settings-sections { display: flex; flex-direction: column; gap: 2px; }
.set-section { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: none; background: none; border-radius: 9px; font-family: inherit; font-size: var(--fs-base); font-weight: 600; color: var(--color-text-secondary); cursor: pointer; text-align: left; width: 100%; }
.set-section .mdi { font-size: 18px; color: var(--color-muted); }
.set-section:hover { background: var(--color-surface); }
.set-section.active { background: var(--primary-tint); color: var(--brand-primary); }
.set-section.active .mdi { color: var(--brand-primary); }
.settings-content .hero { background: #fff; color: var(--color-text); border: 1px solid var(--color-border); box-shadow: none; }
.settings-content .hero h1 { color: var(--color-text); }
.settings-content .hero p { opacity: 1; color: var(--color-muted); }
@media (max-width: 760px) { .settings-grid { grid-template-columns: 1fr; } }

/* ═══════════ Dashboard 1:1 refinements (Screen 1) ═══════════ */
.dash-head h1 { font-size: 32px; }
/* KPI: veliki broj u boji statusa + tile s točkom */
.kpi { padding: 20px 22px; }
.kpi .value { font-size: 32px; line-height: 1; }
.kpi-dot { position: absolute; top: 18px; right: 18px; width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.kpi-dot-i { width: 9px; height: 9px; border-radius: 50%; }
.kpi .label { margin-top: 12px; }

/* D: aktivni filter-banner */
.filter-banner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); border: 1px solid; border-radius: var(--radius-card); padding: 16px 22px; margin-top: var(--space-5); }
.fb-eyebrow { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.fb-status { font-size: 22px; font-weight: var(--fw-bold); letter-spacing: .01em; margin-top: 2px; }
.filter-banner .btn-ghost { background: #fff; }

/* E: list-card s naslovom, count badge i pretragom */
.list-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); }
/* "Ovo sve sticky": stranica ne skrola — skrola SAMO tijelo tablice u svom
   području (visina mu se računa u JS-u), pa naslov/godina/KPI/filteri ostaju
   vidljivi, a zaglavlje kolona je sticky na vrhu tog područja. */
.list-card { overflow: visible; }
.list-card .table-wrap { overflow: auto; }
.list-card .table thead th { position: sticky; top: 0; z-index: 5; box-shadow: 0 1px 0 var(--color-border); }
.list-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 16px 22px; border-bottom: 1px solid var(--color-border-divider); flex-wrap: wrap; }
.lc-title { font-size: var(--fs-lg); font-weight: var(--fw-bold); display: flex; align-items: center; gap: 10px; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--radius-pill); background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-muted); font-size: 12px; font-weight: var(--fw-bold); }
.lc-search { position: relative; }
.lc-search .mdi { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--color-faint); font-size: 17px; }
.lc-search input { width: 280px; max-width: 60vw; padding-left: 34px; }

/* G: ID kao mono pill */
.id-pill { display: inline-block; padding: 3px 9px; border-radius: var(--radius-control); background: var(--color-surface); border: 1px solid var(--color-border); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--color-text-secondary); }

/* A: top-nav identitet (Prijavljen kao + pill + avatar) */
.topnav-right .identity { display: flex; align-items: center; gap: 10px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; padding: 6px 12px; }
.topnav-right .id-label { font-size: 12.5px; color: var(--color-muted); }
.id-pill-box { display: flex; flex-direction: column; line-height: 1.15; background: #fff; border: 1px solid var(--color-border); border-radius: 8px; padding: 4px 10px; }
.id-pill-box .io-org { font-size: 13px; font-weight: var(--fw-bold); color: var(--color-text); }
.id-pill-box .io-sub { font-size: 11px; color: var(--color-muted); }
.topnav-right .avatar { background: var(--color-text); color: #fff; }
.topnav-right .user .role { text-transform: none; }

/* ═══════════ Dashboard pass 2 — table row fidelity ═══════════ */
.list-card .table td { padding: 16px 16px; }
.rel-cell { font-weight: 600; color: var(--color-text); max-width: 240px; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
.lc-filters { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.lc-sel { width: auto; padding: 8px 10px; font-size: 13px; }
.akt-cell { font-size: 13px; color: var(--color-faint); white-space: nowrap; }
.gradovi-chips { gap: 5px; }
.gradovi-chips .chip { background: #eef2f6; border: 1px solid #e2e8f0; color: #475569; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
/* unseen-changes badge (renders only kad postoji stvarni signal — trenutno se ne prikazuje) */
.change-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 700; margin-left: 8px; }
.row-akcija { padding: 16px 22px; text-align: right; white-space: nowrap; }
.row-advance, .row-open { display: inline-flex; align-items: center; vertical-align: middle; background: #fff; border: 1px solid var(--color-border-input); border-radius: 8px; cursor: pointer; font-family: inherit; }
.row-advance { gap: 6px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; color: #475569; margin-right: 7px; }
.row-advance:hover { background: var(--color-surface); border-color: #94a3b8; }
.row-advance .mdi { font-size: 14px; }
.row-open { gap: 7px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--brand-primary); }
.row-open:hover { background: var(--primary-tint); border-color: var(--color-border-focus); }
.row-open .mdi { font-size: 15px; }
.vd-line-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; }
.logo-tile { background: #0f2740; }

/* ═══════════ LD-1: line-detail sub-header + version controls + action bar ═══════════ */
.vd-header { margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-8)) var(--space-5); padding: 18px 32px; background: #fff; border-bottom: 1px solid var(--color-border); gap: var(--space-6); flex-wrap: wrap; }
.ld-back { width: 38px; height: 38px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--color-border-input); background: #fff; border-radius: 9px; color: #475569; cursor: pointer; }
.ld-back:hover { background: var(--color-surface); }
.ld-back .mdi { font-size: 18px; }
.vd-title-row { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.vd-title-row h1 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.vd-subtitle { font-size: 12.5px; color: var(--color-faint); margin-top: 5px; }
.ver-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 20px; border: 1px solid transparent; }

.ld-vercontrols { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.vc-group { display: flex; align-items: center; gap: 10px; }
.vc-divider { padding-left: 18px; border-left: 1px solid var(--color-border); }
.vc-label { font-size: 12.5px; color: var(--color-muted); font-weight: 500; }
.vc-select { width: auto; padding: 7px 32px 7px 12px; font-size: 13px; font-weight: 600; color: var(--color-text); }
.vc-cmp-label { font-size: 13px; font-weight: 600; color: var(--color-text-secondary); white-space: nowrap; }
.switch { width: 42px; height: 24px; border-radius: 20px; padding: 2px; border: none; display: inline-flex; align-items: center; cursor: pointer; background: var(--color-border-input); transition: background var(--transition); }
.switch.on { background: var(--brand-primary); justify-content: flex-end; }
.switch-knob { width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); }

/* ── LD-10: Suglasnosti tab ── */
.cs-panel { display: flex; flex-direction: column; gap: 14px; }
.cs-head { margin-bottom: -2px; }
.cs-title { font-size: 13.5px; font-weight: 700; color: #0f172a; }
.cs-subtext { font-size: 12px; color: #64748b; margin-top: 3px; line-height: 1.4; }
.cs-legal { display: flex; align-items: flex-start; gap: 10px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 12px 14px; }
.cs-legal .mdi { color: #1d4ed8; font-size: 18px; flex: none; margin-top: 1px; }
.cs-legal span { font-size: 11.5px; color: #1e3a8a; line-height: 1.5; }
.cs-sub { font-size: 11.5px; color: #94a3b8; margin-top: 2px; }
.cs-sub.signed { color: #64748b; }
.cs-late { color: #b91c1c; font-weight: 600; }
.cs-wait-h { color: #94a3b8; }
.cs-prog-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.cs-prog-lbl { font-weight: 600; color: #0f172a; }
.cs-prog { height: 8px; border-radius: 6px; background: #e2e8f0; overflow: hidden; }
.cs-prog-fill { height: 100%; background: var(--brand-primary); border-radius: 6px; transition: width var(--transition); }
.cs-reminder { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; color: #475569; padding: 10px 12px; background: #f8fafc; border: 1px solid #eef2f6; border-radius: 10px; }
.cs-reminder .mdi { color: #94a3b8; }
.cs-list { display: flex; flex-direction: column; gap: 10px; }
.cs-row { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border: 1px solid var(--color-border); border-radius: 11px; }
.cs-av { flex: none; width: 36px; height: 36px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.cs-main { min-width: 0; flex: 1; }
.cs-name { font-size: 13px; font-weight: 600; color: #0f172a; }
.cs-role { font-size: 11.5px; color: #94a3b8; }
.cs-hash { font-size: 11px; color: #94a3b8; font-family: var(--font-mono); margin-top: 2px; }
.cs-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.cs-badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cs-badge.ok { background: #dcfce7; color: #166534; }
.cs-badge.wait { background: #fef3c7; color: #92400e; }
.cs-remind { border: none; background: transparent; color: var(--brand-primary); font-family: inherit; font-size: 11.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 0; }
.cs-remind.sent { color: #16a34a; cursor: default; }
.cs-gate { display: flex; align-items: center; gap: 8px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; padding: 11px 13px; border-radius: 10px; font-size: 12.5px; }
.cs-allsigned { display: flex; align-items: center; gap: 8px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; padding: 11px 13px; border-radius: 10px; font-size: 13px; font-weight: 600; }
.cs-sign-btn { width: 100%; padding: 13px; background: var(--brand-primary); color: #fff; border: none; border-radius: 10px; font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.cs-sign-btn:hover { background: var(--brand-primary-hover); }

/* ── LD-11: Objava tab ── */
.ob-panel { display: flex; flex-direction: column; }
.ob-title { font-size: 13.5px; font-weight: 700; color: #0f172a; }
.ob-subtext { font-size: 12px; color: #64748b; margin-top: 3px; line-height: 1.45; margin-bottom: 15px; }
.ob-daterow { display: flex; gap: 10px; }
.ob-lbl { display: block; font-size: 11px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.ob-daterow input { width: 100%; border: 1px solid #cbd5e1; border-radius: 9px; padding: 9px 11px; font-size: 13.5px; color: #0f172a; font-family: inherit; }
.ob-daterow input:focus { outline: none; border-color: var(--brand-primary); }
.ob-info { display: flex; align-items: center; gap: 9px; margin-top: 13px; padding: 11px 13px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; font-size: 12.5px; color: #1e3a8a; font-weight: 600; line-height: 1.4; }
.ob-info .mdi { color: #1d4ed8; font-size: 16px; flex: none; }
.ob-stk-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #94a3b8; margin: 18px 0 10px; }
.ob-list { display: flex; flex-direction: column; gap: 10px; }
.ob-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--color-border); border-radius: 11px; }
.ob-av { flex: none; width: 34px; height: 34px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.ob-main { flex: 1; min-width: 0; }
.ob-name { font-size: 13px; font-weight: 600; color: #0f172a; }
.ob-role { font-size: 11.5px; color: #94a3b8; }
.ob-actions { display: flex; align-items: center; gap: 12px; margin-top: 5px; flex-wrap: wrap; }
.ob-agree { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: #16a34a; background: none; border: none; cursor: pointer; padding: 0; font-family: inherit; }
.ob-propose { font-size: 11.5px; font-weight: 600; color: var(--brand-primary); background: none; border: none; cursor: pointer; padding: 0; text-decoration: underline; font-family: inherit; }
.ob-badge { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.ob-badge.ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.ob-badge.wait { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.ob-note { margin-top: 14px; display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; border-radius: 10px; font-size: 12.5px; line-height: 1.45; }
.ob-note.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-weight: 600; }
.ob-note.wait { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.ob-note .mdi { flex: none; }

/* ── LD-13: Dokumenti tab ── */
.doc-drop { border: 1.5px dashed #cbd5e1; border-radius: 12px; padding: 28px 18px; text-align: center; background: #f8fafc; cursor: pointer; margin-bottom: 18px; transition: border-color var(--transition), background var(--transition); }
.doc-drop:hover, .doc-drop.over { border-color: var(--brand-primary); background: #eff6ff; }
.doc-drop-icon { width: 42px; height: 42px; border-radius: 11px; background: #e0e7ff; color: var(--brand-primary); display: flex; align-items: center; justify-content: center; font-size: 22px; margin: 0 auto 12px; }
.doc-drop-title { font-size: 13.5px; font-weight: 600; color: #334155; }
.doc-drop-sub { font-size: 12px; color: #94a3b8; margin-top: 5px; }
.doc-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #94a3b8; margin-bottom: 10px; }
.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--color-border); border-radius: 10px; }
.doc-row:hover { background: #f8fafc; }
.doc-tile { flex: none; width: 34px; height: 34px; border-radius: 8px; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.doc-pdf  { background: #fee2e2; color: #dc2626; }
.doc-docx { background: #dbeafe; color: #2563eb; }
.doc-xlsx { background: #dcfce7; color: #16a34a; }
.doc-main { min-width: 0; flex: 1; }
.doc-name { font-size: 13px; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta { font-size: 11.5px; color: #94a3b8; }
.doc-actions { display: flex; gap: 6px; flex: none; }
.doc-dl, .doc-del { width: 32px; height: 32px; border: 1px solid var(--color-border); background: #fff; border-radius: 7px; color: #64748b; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.doc-dl:hover { color: var(--brand-primary); border-color: #93c5fd; }
.doc-del:hover { color: #dc2626; border-color: #fca5a5; }

/* PIN / Certilia modal */
.pin-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pin-icon { flex: none; width: 42px; height: 42px; border-radius: 11px; background: #eff6ff; color: var(--brand-primary); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.pin-title { font-size: 16px; font-weight: 700; color: #0f172a; }
.pin-sub { font-size: 12px; color: #94a3b8; }
.pin-methods { width: 100%; margin-bottom: 14px; }
.pin-methods .seg-btn { flex: 1; }
.pin-note { font-size: 12px; color: #94a3b8; margin-top: 8px; }
.pin-mob { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pin-mob-state { font-size: 12.5px; }

.ld-bar-note { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--color-faint); }
.ld-bar-note .mdi { font-size: 16px; }
.ld-bar-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bar-btn-outline, .bar-btn-warning, .bar-btn-success, .bar-btn-req, .bar-btn-nab { display: inline-flex; align-items: center; gap: 7px; font-family: inherit; font-weight: 600; font-size: 13.5px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; }
.bar-btn-outline { padding: 10px 17px; background: #fff; border-color: var(--color-border-input); color: var(--color-text-secondary); }
.bar-btn-outline:hover:not(:disabled) { background: var(--color-surface); }
.bar-btn-warning { padding: 10px 17px; background: #fffbeb; border-color: #fcd34d; color: #b45309; }
.bar-btn-warning:hover:not(:disabled) { background: #fef3c7; }
.bar-btn-success { padding: 10px 20px; background: #16a34a; color: #fff; box-shadow: 0 1px 2px rgba(22,163,74,.35); }
.bar-btn-success:hover:not(:disabled) { background: #15803d; }
.bar-btn-req { padding: 11px 22px; background: #7c3aed; color: #fff; box-shadow: 0 1px 2px rgba(124,58,237,.35); }
.bar-btn-req:hover:not(:disabled) { background: #6d28d9; }
.bar-btn-nab { padding: 11px 22px; background: #d97706; color: #fff; box-shadow: 0 1px 2px rgba(217,119,6,.35); }
.bar-btn-nab:hover:not(:disabled) { background: #b45309; }
.bar-btn-outline:disabled, .bar-btn-warning:disabled, .bar-btn-success:disabled, .bar-btn-req:disabled, .bar-btn-nab:disabled { opacity: .55; cursor: not-allowed; }

/* ═══════════ LD-2: season-readiness card ═══════════ */
.sr-card { background: #fff; border: 1px solid var(--color-border); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 18px 22px; margin-bottom: var(--space-4); }
.sr-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.sr-subs { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.sr-sub { display: flex; flex-direction: column; gap: 7px; padding: 11px 15px; border: 1px solid var(--color-border); border-radius: 11px; min-width: 158px; }
.sr-name { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--color-faint); }
.sr-statusrow { display: flex; align-items: center; gap: 10px; }
.sr-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; white-space: nowrap; border: 1px solid transparent; }
.sr-chip .mdi { font-size: 14px; }
.sr-chip.ok { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.sr-chip.wait { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.sr-mark { background: none; border: none; padding: 0; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--brand-primary); text-decoration: underline; cursor: pointer; }
.sr-unmark { background: none; border: none; padding: 0 2px; color: var(--color-faint); cursor: pointer; font-size: 12px; }
.sr-unmark:hover { color: var(--color-danger-text); }
.sr-arrow { display: flex; align-items: center; color: var(--color-border-input); }
.sr-arrow .mdi { font-size: 20px; }
.sr-merge { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: none; border-radius: 9px; font-family: inherit; font-size: 13.5px; font-weight: 600; color: #fff; background: var(--brand-primary); cursor: pointer; }
.sr-merge .mdi { font-size: 16px; }
.sr-merge.done { background: #0d9488; cursor: default; }
.sr-merge.off { background: #f1f5f9; color: var(--color-faint); border: 1px solid var(--color-border); cursor: not-allowed; }
.sr-hint { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--color-border-faint); font-size: 12.5px; color: var(--color-muted); }
.sr-hint .mdi { font-size: 16px; }
.sr-hint.teal { color: #0d9488; }
.sr-hint.green { color: #16a34a; }
.sr-hint.amber { color: #d97706; }

/* === DEMO VIEW-AS (remove later) === */
.viewas-sel { width: auto; padding: 7px 32px 7px 12px; font-size: 13px; font-weight: 600; color: var(--color-text); border: 1px solid var(--color-border-input); background: #fff; border-radius: 8px; }
.demo-chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; background: #fef3c7; color: #92400e; border: 1px solid #fde68a; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; }
/* === /DEMO VIEW-AS === */
