/* ══════════════════════════════════════════════════════════════════════
   EULEX Base Portal — stylesheet.
   Preslikava eulex-www dizajn sustav (eulex-www/_ai/DESIGN.md +
   src/styles/global.css "SHARED THEME" fence): paper/ink/surface/selected,
   Sentient za sav tekst, Azeret Mono SAMO za labele/gumbe/nav/metapodatke
   (uppercase, tracking 0.1em, weight 500), radijusi 6/8/12, nula sjena.
   Tokene mijenjati samo zajedno s eulex-www.
   ══════════════════════════════════════════════════════════════════════ */

/* Self-hostani fontovi (varijabilni woff2 iz dizajn handoffa). Fontshare
   link u index.html ostaje kao fallback, ali api.fontshare.com za
   azeret-mono@5 vraća samo Sentient (provjereno 2026-09-12), pa bez ovoga
   mono labeli padaju na sistemski font kod korisnika bez lokalno
   instaliranog Azeret Mona. */
@font-face { font-family: "Azeret Mono"; src: url("fonts/AzeretMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Sentient"; src: url("fonts/Sentient-Variable.woff2") format("woff2"); font-weight: 200 700; font-style: normal; font-display: swap; }

:root {
  --background: #FFFCF5;          /* Paper */
  --foreground: #32270D;          /* Ink */
  --card: #F7F3E9;                /* Surface */
  --card-foreground: #32270D;
  --primary: #32270D;
  --primary-foreground: #FFFCF5;
  --secondary: #F7F3E9;
  --secondary-foreground: #32270D;
  --muted: #F7F3E9;
  --muted-foreground: #6F6249;    /* ink-family mid-tone, ≥4.5:1 na paperu */
  --accent: #F7F3E9;
  --action: #65ECFF;              /* cyan — jedan pravi CTA po stranici */
  --action-foreground: #32270D;
  --destructive: #D34300;
  --success: #4D7C0F;
  --warning: #B45309;
  --border: #DDD6C6;              /* Selected — hairline granice, divideri */
  --input: #978D7D;               /* granica polja za unos (WCAG 1.4.11) */
  --ring: #32270D;
  --brand: #BDFF32;               /* lime — samo ilustrativno / tick */
  --highlight: #FF96FF;           /* magenta — "New" značka */
  --surface-elevated: #FFFFFF;    /* Blank — samo polja za unos */
  --chart-1: #BDFF32; --chart-2: #FF96FF; --chart-3: #65ECFF; --chart-4: #32270D; --chart-5: #DDD6C6;

  --radius-sm: 6px;   /* gumbi */
  --radius-md: 8px;   /* polja */
  --radius-lg: 12px;  /* kartice */
  --radius-xl: 16px;

  --font-sans: "Sentient", ui-serif, Georgia, serif;
  --font-mono: "Azeret Mono", ui-monospace, "SF Mono", monospace;

  --text-headline-xl: 2.875rem;
  --text-headline-lg: 1.75rem;
  --text-headline-md: 1.4375rem;
  --text-body-lg: 1.3125rem;
  --text-body-md: 1.125rem;
  --text-body-sm: 0.875rem;
}

/* ── reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html { font-family: var(--font-sans); -webkit-font-smoothing: antialiased; font-size: 17px; }  /* Max: app renderira na 17px rootu (spec §6.4), www ostaje 16px */
body {
  margin: 0; background: var(--background); color: var(--foreground);
  font-family: var(--font-sans); font-size: 1rem; line-height: 1.4;
  min-height: 100vh;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
code, pre, .key-mono, .mono { font-family: var(--font-mono); }
svg[stroke-linejoin="round"][fill="none"] { stroke-width: 1.25; }

/* Azeret Mono label tier — jedini način na koji se mono koristi u sučelju. */
.label, button, nav a, .btn, .chip, .pill, .nav-item, .seg button, .lang-toggle button,
.stat-label, .table-head, .eyebrow, .copy-btn, .link-btn, .danger-btn, .docs-link, .field label {
  font-family: var(--font-mono); font-weight: 400; font-size: 0.75rem;
  line-height: 1.1; letter-spacing: 0.1em; text-transform: uppercase;
}
/* Tehnički podaci (ključevi, brojke, kod) — mono bez uppercase-a. */
.key-mono, .code-block, .num, .endpoint-url, .cov-scope { font-family: var(--font-mono); font-weight: 400; letter-spacing: 0; text-transform: none; }

:focus-visible { outline: 2px solid color-mix(in oklch, var(--ring) 50%, transparent); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ── app shell — 1:1 Max AppSidebar.tsx (Tailwind rem @ 17px root) ──── */
.app { display: flex; height: 100dvh; background: var(--background); }
.sidebar {
  width: var(--sidebar-w, 256px); flex-shrink: 0; height: 100dvh; display: flex; flex-direction: column;     /* Max: inline width = sidebarWidth (default 256px, drag 208–480) */
  background: var(--muted); position: relative; z-index: 40; transition: width .3s;        /* bg-muted, bez border-r */
}
.sidebar-top { height: 5rem; display: flex; align-items: center; justify-content: space-between; padding: 0 0.625rem; flex-shrink: 0; }  /* h-20 px-2.5 */
.sidebar-top .brand { padding: 0 0.625rem; display: flex; align-items: center; line-height: 1; }   /* inner px-2.5 */
.brand img { width: 8rem; height: auto; display: block; object-fit: contain; }              /* w-32 h-auto */
.brand:hover { opacity: .8; }
.icon-btn { width: 2.25rem; height: 2.25rem; padding: 0.625rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 0.375rem; color: var(--foreground); transition: background-color .15s; }  /* h-9 w-9 p-2.5 rounded-md */
.icon-btn:hover { background: var(--accent); }
.icon-btn svg { width: 1rem; height: 1rem; }                                                 /* h-4 w-4 */
.side-heading { display: none; }                                                             /* Max nema natpis iznad nav-a */
.side-nav { display: flex; flex-direction: column; }
.nav-row { padding: 0.25rem 0.625rem; }                                                      /* py-1 px-2.5 */
.nav-item {
  width: 100%; height: 2.25rem; display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.625rem; border-radius: 0.375rem;  /* h-9 gap-3 px-2.5 py-2 rounded-md */
  color: var(--foreground); text-align: left; white-space: nowrap; overflow: hidden; transition: background-color .15s;
  font-size: 0.875rem;
}
.nav-item span { font-size: 0.875rem; font-weight: 400; letter-spacing: 0.1em; }            /* text-sm font-medium (mono uppercase iz button pravila) */
.nav-item:hover { background: var(--accent); }
.nav-item.active { background: var(--secondary); }
.nav-item svg { width: 1rem; height: 1rem; flex-shrink: 0; color: var(--foreground); }      /* h-4 w-4 */

.sidebar-bottom { margin-top: auto; position: relative; }
.sidebar-docs { padding: 0.25rem 0.625rem 0.5rem; }   /* Documentation dolje lijevo iznad računa, kao Claude platform */
.account-btn { width: 100%; display: flex; align-items: center; padding: 1rem 0.875rem; border-top: 1px solid var(--border); text-align: left; transition: background-color .15s; text-transform: none; letter-spacing: 0; }  /* px-3.5 py-4 border-t */
.account-btn:hover, .account-btn[aria-expanded="true"] { background: var(--accent); }
.avatar {
  width: 1.75rem; height: 1.75rem; border-radius: 9999px; background: var(--primary); color: var(--primary-foreground);   /* h-7 w-7 */
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500;                     /* text-sm font-medium font-serif */
}
.account-text { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; flex: 1; padding-left: 0.75rem; }   /* pl-3 gap-0.5 */
.account-name { font-family: var(--font-mono); font-weight: 400; font-size: 0.875rem; line-height: 1; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }  /* text-sm font-medium leading-none */
.account-plan { font-family: var(--font-mono); font-weight: 400; font-size: 12px; line-height: 1; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); }   /* text-[12px] leading-none */
.account-chevron { color: color-mix(in oklch, var(--muted-foreground) 70%, transparent); display: inline-flex; margin-left: 0.5rem; }
.account-chevron svg { width: 1rem; height: 1rem; }
.account-menu {
  position: absolute; bottom: 100%; left: 0; margin: 0.25rem; width: 15.5rem; z-index: 50;                 /* m-1 w-62 */
  background: var(--surface-elevated); border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.25rem;   /* rounded-lg p-1 */
  display: flex; flex-direction: column; gap: 2px;
}
.menu-item { width: 100%; display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 0.375rem; color: var(--foreground); text-align: left; white-space: nowrap; font-family: var(--font-mono); font-weight: 400; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }  /* px-4 py-2 rounded-md */
.menu-item:hover { background: var(--accent); text-decoration: none; }
.menu-item svg { width: 1rem; height: 1rem; }
.menu-item svg:last-child:not(:first-child) { margin-left: auto; color: var(--muted-foreground); }
.menu-lang { cursor: default; }
.menu-lang:hover { background: transparent; }
.menu-lang .lang-toggle { margin-left: auto; gap: 4px; }
.menu-lang .lang-toggle button { padding: 4px 8px; font-size: 0.6875rem; }

/* collapsed (desktop) — samo ikone, Max w-14 */
.app.sidebar-collapsed .sidebar { width: 3.5rem; }
.app.sidebar-collapsed .brand, .app.sidebar-collapsed .nav-item span,
.app.sidebar-collapsed .account-text, .app.sidebar-collapsed .account-chevron { display: none; }
.app.sidebar-collapsed .sidebar-top { justify-content: center; padding: 0; }
.app.sidebar-collapsed .nav-item { justify-content: center; padding: 0.5rem; }
.app.sidebar-collapsed .account-btn { justify-content: center; padding: 1rem 0; }
.app.sidebar-collapsed .account-menu { left: 3.5rem; bottom: 0.5rem; }

.sidebar-resize { position: absolute; right: 0; top: 0; height: 100%; width: 4px; cursor: col-resize; transition: background-color .15s; }   /* Max: w-1 cursor-col-resize hover:bg-border */
.sidebar-resize:hover, .app.resizing .sidebar-resize { background: var(--border); }
.app.resizing .sidebar { transition: none; }
.app.resizing, .app.resizing * { user-select: none; cursor: col-resize; }
.app.sidebar-collapsed .sidebar-resize { display: none; }
.sidebar-scrim { position: fixed; inset: 0; background: color-mix(in oklch, var(--foreground) 30%, transparent); z-index: 39; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100dvh; }
.mobile-header { display: none; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }   /* px-4 py-3 border-b */
.mobile-logo { width: 6rem; height: auto; }
.main { flex: 1; overflow-y: auto; scrollbar-gutter: stable; min-height: 0; }

/* ── layout sadržaja (kao Max stranice: naslov gore lijevo) ──────────── */
.content { max-width: 1200px; margin: 0; padding: 1.5rem 2rem 4rem; display: flex; flex-direction: column; gap: 2.25rem; }

/* ── layout ────────────────────────────────────────────────────────── */
.panel { display: flex; flex-direction: column; gap: 24px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-title { font-family: var(--font-sans); font-size: var(--text-headline-lg); font-weight: 400; line-height: 1.1; letter-spacing: 0; margin: 0 0 12px; }
.page-title em { font-style: italic; }
.page-desc { font-size: var(--text-body-md); line-height: 1.4; max-width: 44rem; }
.section-title { font-family: var(--font-sans); font-size: var(--text-headline-md); font-weight: 400; line-height: 1.1; margin: 0; }
.eyebrow { color: var(--muted-foreground); display: block; margin-bottom: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack-4 { display: flex; flex-direction: column; gap: 16px; }
.muted { color: var(--muted-foreground); }
.cell-muted { font-size: var(--text-body-sm); color: var(--muted-foreground); }
.empty-note { color: var(--muted-foreground); font-size: var(--text-body-sm); margin: 8px 0; }
.modal-note { font-size: var(--text-body-sm); color: var(--muted-foreground); margin: 0; }
.modal-note a, .cell-muted a, .page-desc a { text-decoration: underline; text-underline-offset: 3px; }

/* ── gumbi (DESIGN.md: 6px, mono label, ink/paper, surface/ink, action cyan) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid transparent;
  white-space: nowrap; transition: background-color .15s, color .15s, opacity .15s; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: color-mix(in oklch, var(--primary) 80%, transparent); }
.btn-action { background: var(--action); color: var(--action-foreground); }
.btn-action:hover { background: color-mix(in oklch, var(--action) 90%, transparent); }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-secondary:hover { background: color-mix(in oklch, var(--secondary) 80%, var(--border)); }
.btn-outline { background: var(--background); color: var(--foreground); border-color: var(--border); }
.btn-outline:hover { background: var(--muted); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--muted); }
.link-btn { color: color-mix(in oklch, var(--foreground) 60%, transparent); display: inline-flex; align-items: center; gap: 6px; }
.link-btn:hover { color: var(--foreground); }
.danger-btn { color: var(--destructive); }
.danger-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--background); color: var(--foreground);
}
.copy-btn:hover { background: var(--muted); }

/* chips (pill, border Selected, paper; aktivno Selected) */
.chip, .lang-toggle button, .seg button {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 9999px;
  border: 1px solid var(--border); background: var(--background); color: var(--foreground); white-space: nowrap;
}
.chip-muted { color: color-mix(in oklch, var(--foreground) 55%, transparent); }
.chip-img { width: 14px; height: 14px; object-fit: contain; }
.lang-toggle { display: flex; gap: 6px; }
.lang-toggle button.active, .seg button.active { background: var(--border); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-small button { padding: 6px 10px; }

/* pills / značke */
.pill { display: inline-flex; align-items: center; padding: 3px 6px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--muted); color: var(--muted-foreground); font-size: 0.6875rem; }
.pill-blue, .pill-new { border-color: color-mix(in oklch, var(--highlight) 40%, transparent); background: color-mix(in oklch, var(--highlight) 10%, transparent); color: var(--highlight); }
.pill-dark { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.pill-mono { text-transform: none; letter-spacing: 0; font-weight: 400; background: var(--background); color: var(--foreground); }

/* status (točka + label) — kao matrix-table na eulex.ai/base */
.status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-weight: 400; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.status .dot { width: 8px; height: 8px; border-radius: 9999px; display: inline-block; flex-shrink: 0; }
.status.active .dot { background: var(--brand); }
.status.desk .dot { background: var(--foreground); }
.status.soon .dot { border: 1px solid var(--muted-foreground); }
.status.soon { color: var(--muted-foreground); }
.status.revoked { color: var(--muted-foreground); } .status.revoked .dot { background: var(--border); }

/* ── kartice (Surface na Paperu, 24px, 12px radius, hairline) ─────── */
.card { background: var(--card); color: var(--card-foreground); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.card-paper { background: var(--background); }
.card-subtle { background: var(--card); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 10px; }
.stat-label { color: var(--muted-foreground); }
.stat-value { font-family: var(--font-sans); font-size: var(--text-headline-lg); line-height: 1.1; }
.stat-sub { font-size: var(--text-body-sm); color: var(--muted-foreground); }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.two-col-even { grid-template-columns: 1fr 1fr; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.list-row:first-child { border-top: 0; }
.cell-name { font-size: 1rem; }
.current-plan-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ── tablice (ui/table: hairline redovi, mono head) ────────────────── */
.table { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--background); }
.table-scroll { overflow-x: auto; }
.table-scroll .table { min-width: 720px; }
.table-head, .table-row { display: grid; gap: 12px; align-items: center; padding: 12px 20px; }
.table-head { background: var(--muted); border-bottom: 1px solid var(--border); color: var(--muted-foreground); min-height: 40px; }
.table-row { border-bottom: 1px solid var(--border); font-size: 0.9375rem; transition: background-color .15s; }
.table-row:hover { background: color-mix(in oklch, var(--muted) 50%, transparent); }
.table-row:last-child { border-bottom: 0; }
.table-row.revoked { opacity: .5; }
.table-row.muted-row { color: var(--muted-foreground); }
.cols-keys { grid-template-columns: 1.3fr 1.5fr 0.8fr 0.9fr 0.9fr 0.6fr; }
.cols-usage { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.cols-cov { grid-template-columns: 2.2fr repeat(5, 1fr) 1.6fr; }
.cols-cov > span:not(:first-child):not(:last-child) { text-align: center; }
.cov { display: inline-flex; align-items: center; justify-content: center; }
.cov.tick .dot, .cov.tick { }
.cov-dot { width: 8px; height: 8px; border-radius: 9999px; display: inline-block; }
.cov.tick .cov-dot { background: var(--brand); }
.cov.pending .cov-dot { border: 1px solid var(--muted-foreground); }
.cov.na { color: color-mix(in oklch, var(--muted-foreground) 50%, transparent); font-family: var(--font-mono); font-size: var(--text-body-sm); }
.cov-name { display: inline-flex; align-items: center; gap: 8px; }
.cov-flag { font-size: 1rem; line-height: 1; }
.cov-flag.juri-flag-img { width: 16px; height: 16px; }
.key-mono { font-size: 0.8125rem; }
.num { font-variant-numeric: tabular-nums; }

/* ── jurisdikcije ──────────────────────────────────────────────────── */
.legend-row { display: flex; gap: 20px; flex-wrap: wrap; }
.juri-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.juri-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px; }
.juri-card.soon { opacity: .6; }
.juri-left { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.juri-flag { font-size: 1.5rem; line-height: 1; }
.juri-flag-img { width: 24px; height: 24px; object-fit: contain; margin-top: 2px; }
.juri-name { font-size: var(--text-body-md); }
.juri-caption { font-size: var(--text-body-sm); color: var(--muted-foreground); margin-top: 4px; }
.juri-hint { color: var(--foreground); }
.juri-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── mjerači i graf ────────────────────────────────────────────────── */
.usage-card { display: flex; flex-direction: column; gap: 16px; }
.meter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.meter { display: flex; flex-direction: column; gap: 8px; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--text-body-sm); color: var(--muted-foreground); }
.meter-head .key-mono { color: var(--foreground); }
.meter-bar { height: 6px; background: var(--border); border-radius: 9999px; overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: var(--primary); border-radius: 9999px; transition: width .3s; }
.meter-fill.warn { background: var(--warning); }
.meter-fill.over { background: var(--destructive); }

.chart-card { display: flex; flex-direction: column; gap: 16px; }
.chart-wrap { position: relative; }
.usage-chart { width: 100%; height: auto; display: block; }
.usage-chart .grid { stroke: var(--border); stroke-width: 1; }
.usage-chart .ylab, .usage-chart .xlab { font-family: var(--font-mono); font-size: 11px; fill: var(--muted-foreground); }
.usage-chart .bar { fill: var(--chart-4); transition: fill .1s; }
.usage-chart .bar.hover { fill: color-mix(in oklch, var(--chart-4) 70%, var(--border)); }
.usage-chart .hit { cursor: crosshair; }
.chart-tip {
  position: absolute; transform: translate(-50%, calc(-100% - 8px)); pointer-events: none; z-index: 5;
  background: var(--surface-elevated); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: var(--text-body-sm); white-space: nowrap;
}
.chart-tip b { font-weight: 700; }

.bar-table { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: flex; flex-direction: column; gap: 6px; }
.bar-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 0.9375rem; }
.bar-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row-val { white-space: nowrap; font-family: var(--font-mono); font-size: 0.8125rem; }
.bar-row-track { height: 6px; background: var(--border); border-radius: 9999px; overflow: hidden; }
.bar-row-fill { height: 100%; background: var(--primary); border-radius: 9999px; }
.bar-row-sub { font-size: 0.75rem; }
.table-details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.table-details > summary::-webkit-details-marker { display: none; }
.table-details > summary::before { content: "+"; font-family: var(--font-mono); }
.table-details[open] > summary::before { content: "−"; }

/* ── planovi ───────────────────────────────────────────────────────── */
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan-card { display: flex; flex-direction: column; gap: 16px; }
.plan-card.current, .plan-card.featured { box-shadow: 0 0 0 2px var(--highlight); }   /* ring-2 ring-highlight kao www pricing */
.plan-name { font-family: var(--font-sans); font-size: var(--text-headline-md); line-height: 1.1; }
.plan-desc { font-size: var(--text-body-sm); color: var(--muted-foreground); min-height: 2lh; display: block; margin-top: 6px; }
.plan-price { font-family: var(--font-sans); font-size: var(--text-headline-md); font-weight: 700; line-height: 1.1; }
.plan-price small { display: block; margin-top: 4px; font-size: var(--text-body-sm); font-weight: 400; color: var(--muted-foreground); }
.plan-sep { height: 1px; background: var(--border); }
.plan-quota { font-family: var(--font-mono); font-size: 0.75rem; color: var(--foreground); }
.feature-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 0.9375rem; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; }
.feature-list li.muted { color: var(--muted-foreground); }
.feature-list svg, .feature-list .tick { flex-shrink: 0; margin-top: 3px; }
.feature-list .tick { font-family: var(--font-mono); font-size: 0.75rem; }
.plan-cta { margin-top: auto; width: 100%; }

/* ── dokumentacija ─────────────────────────────────────────────────── */
.endpoint-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.endpoint-url { background: var(--surface-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 8px 12px; font-size: 0.875rem; }
.code-wrap { position: relative; }
.code-block {
  margin: 0; background: var(--surface-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px 56px 16px 16px; font-size: 0.8125rem; line-height: 1.5; white-space: pre-wrap; word-break: break-all; overflow-x: auto;
}
.code-copy { position: absolute; top: 12px; right: 12px; }
.tool-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-group { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--background); }
.tool-group-n { font-family: var(--font-mono); font-weight: 400; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); }
.tool-group-d { font-size: var(--text-body-sm); color: var(--foreground); }
.tool-group-list { font-size: 0.8125rem; line-height: 1.7; }
.tool-group-list code { background: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; font-size: 0.75rem; }
.example-list { display: flex; flex-direction: column; gap: 10px; }
.example-row { display: flex; align-items: baseline; gap: 12px; font-size: 1rem; font-style: italic; }
.link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.link-list li { display: flex; flex-direction: column; gap: 2px; }
.link-list a { font-family: var(--font-mono); font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 3px; }

/* ── polja i modal ─────────────────────────────────────────────────── */
.field label { display: block; color: var(--muted-foreground); margin-bottom: 8px; }
.input {
  width: 100%; height: 44px; padding: 8px 16px; font-family: var(--font-sans); font-size: var(--text-body-md);
  color: var(--foreground); background: var(--surface-elevated); border: 1px solid var(--input); border-radius: var(--radius-md);
  outline: none; transition: box-shadow .15s, border-color .15s;
}
.input::placeholder { color: var(--muted-foreground); }
.input:focus-visible { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 50%, transparent); outline: none; }
.modal-overlay { position: fixed; inset: 0; background: color-mix(in oklch, var(--foreground) 40%, transparent); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { position: relative; width: 520px; max-width: 100%; background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: var(--radius-sm); font-size: 18px; line-height: 1; color: var(--muted-foreground); display: inline-flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--muted); }
.modal-title { font-family: var(--font-sans); font-size: var(--text-headline-md); font-weight: 400; line-height: 1.1; margin: 0; }
.modal-desc { font-size: 1rem; line-height: 1.4; color: var(--muted-foreground); margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.key-box { background: var(--surface-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; font-family: var(--font-mono); font-size: 0.8125rem; word-break: break-all; line-height: 1.5; }
.warn-box { border: 1px solid var(--warning); border-radius: var(--radius-md); padding: 10px 14px; font-size: var(--text-body-sm); color: var(--warning); }
.login-err { color: var(--destructive); font-size: var(--text-body-sm); margin: 10px 0 0; }

/* ── login ─────────────────────────────────────────────────────────── */
.login-screen { display: flex; flex-direction: column; min-height: 100vh; }
.login-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 64px 16px; }
.login-card { width: 400px; max-width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.login-title { font-family: var(--font-sans); font-size: var(--text-headline-md); font-weight: 400; line-height: 1.1; margin: 0; }
.login-foot { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.login-foot a { font-family: var(--font-mono); font-weight: 400; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); }
.login-foot a:hover { color: var(--foreground); }

/* ── login header ──────────────────────────────────────────────────── */
.login-header { height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--border); }

/* ── footer (nekorišten u appu; ostavljen za login) ────────────────── */
.site-footer { border-top: 1px solid var(--border); margin-top: auto; }
.footer-inner { max-width: 80rem; margin: 0 auto; padding: 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner img { width: 96px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted-foreground); }
.footer-links a:hover { color: var(--foreground); }
.footer-copy { font-size: var(--text-body-sm); color: var(--muted-foreground); }

/* ── toast ─────────────────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: var(--primary-foreground); border-radius: var(--radius-sm); padding: 10px 14px;
  font-family: var(--font-mono); font-weight: 400; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60;
}
#toast.show { opacity: 1; }

/* ── responsive ────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-groups { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .3s; width: min(var(--sidebar-w, 256px), 85vw) !important; }
  .sidebar-resize { display: none; }
  .app.sidebar-open .sidebar { transform: none; }
  .app.sidebar-collapsed .sidebar { width: min(var(--sidebar-w, 256px), 85vw); }
  .app.sidebar-collapsed .brand, .app.sidebar-collapsed .nav-item span,
  .app.sidebar-collapsed .account-text, .app.sidebar-collapsed .account-chevron { display: initial; }
  .app.sidebar-collapsed .nav-item span { display: inline; }
  .app.sidebar-collapsed .account-text { display: flex; }
  .app.sidebar-collapsed .sidebar-top { justify-content: space-between; padding: 0 0.625rem; }
  .app.sidebar-collapsed .nav-item { justify-content: flex-start; padding: 0.5rem 0.625rem; }
  .mobile-header { display: flex; }
  .two-col, .two-col-even, .juri-grid, .meter-grid { grid-template-columns: 1fr; }
  .content { padding: 20px 16px 48px; }
}
@media (max-width: 600px) {
  .brand-product { display: none; }
  .plan-grid, .stat-grid, .tool-groups { grid-template-columns: 1fr; }
  .cols-keys { grid-template-columns: 1fr 1fr; }
  .cols-keys > :nth-child(3), .cols-keys > :nth-child(4) { display: none; }
  .modal { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) { .meter-fill, #toast, .btn, .nav-item { transition: none; } }

/* ── jurisdikcije: detalji (details/summary) ─────────────────────────── */
details.juri-card { display: block; padding: 0; }
.juri-summary { list-style: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px; cursor: pointer; }
.juri-summary::-webkit-details-marker { display: none; }
.juri-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.juri-toggle { font-family: var(--font-mono); font-weight: 400; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); }
.juri-toggle::after { content: " +"; }
details[open] .juri-toggle::after { content: " −"; }
.juri-body { border-top: 1px solid var(--border); padding: 20px 24px 24px; background: var(--background); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.jd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.jd-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.jd-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; font-size: var(--text-body-sm); align-items: baseline; }
.jd-k { font-family: var(--font-mono); font-weight: 400; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); }
.jd-block { display: flex; flex-direction: column; gap: 8px; }
.jd-list { margin: 0; padding-left: 18px; font-size: var(--text-body-sm); line-height: 1.5; display: flex; flex-direction: column; gap: 4px; }
.jd-examples { list-style: none; padding-left: 0; font-style: italic; }
.jd-numbers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.jd-num { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); }
.jd-num-v { font-family: var(--font-sans); font-size: var(--text-body-lg); line-height: 1.1; }
.jd-num-l { font-size: 0.75rem; color: var(--muted-foreground); }
.jd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.jd-chips code { background: var(--card); border: 1px solid var(--border); border-radius: 4px; padding: 2px 7px; font-size: 0.75rem; }
.jd-note { margin: 16px 0 0; font-size: var(--text-body-sm); line-height: 1.5; padding-top: 12px; border-top: 1px solid var(--border); }
.jd-note .jd-k { margin-right: 8px; }
.juri-body a { text-decoration: underline; text-underline-offset: 3px; }

/* ── dokumentacija: layout s TOC-om ──────────────────────────────────── */
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
.docs-toc { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; padding-right: 8px; }
.docs-toc-title { font-family: var(--font-mono); font-weight: 400; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 8px; }
.docs-toc a { font-family: var(--font-sans); font-size: var(--text-body-sm); padding: 5px 10px; border-left: 2px solid transparent; color: color-mix(in oklch, var(--foreground) 65%, transparent); text-transform: none; letter-spacing: 0; font-weight: 400; }
.docs-toc a:hover { color: var(--foreground); text-decoration: none; }
.docs-toc a.active { color: var(--foreground); border-left-color: var(--foreground); }
.docs-body { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.doc-section { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 24px; }
.doc-h3 { padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.doc-h4 { font-family: var(--font-sans); font-size: var(--text-body-md); font-weight: 700; margin: 6px 0 0; line-height: 1.2; }
.doc-p { font-size: 1rem; line-height: 1.5; max-width: 46rem; }
.doc-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 1rem; line-height: 1.5; max-width: 46rem; }
.doc-ol li::marker { font-family: var(--font-mono); font-size: 0.8125rem; }
.doc-p a, .doc-list a, .doc-note a, .doc-table a { text-decoration: underline; text-underline-offset: 3px; }
.doc-p code, .doc-list code, .doc-note code, .doc-table code { font-family: var(--font-mono); font-size: 0.8125rem; background: var(--card); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; text-transform: none; letter-spacing: 0; }
.doc-note { border-left: 3px solid var(--highlight); background: var(--card); padding: 12px 16px; border-radius: 0 var(--radius-md) var(--radius-md) 0; font-size: var(--text-body-sm); line-height: 1.5; max-width: 46rem; }
.doc-table { width: 100%; border-collapse: collapse; font-size: var(--text-body-sm); background: var(--background); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.doc-table th { font-family: var(--font-mono); font-weight: 400; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); text-align: left; padding: 10px 14px; background: var(--muted); border-bottom: 1px solid var(--border); }
.doc-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.45; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table tr.current td { background: color-mix(in oklch, var(--highlight) 10%, transparent); }
.doc-table td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.doc-toolgroup { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.doc-toolname { font-size: 0.875rem; background: none; border: 0; padding: 0; }
.doc-tooldesc { font-size: 0.8125rem; color: var(--muted-foreground); margin-top: 4px; max-width: 34rem; }
.doc-tools td:nth-child(1) { width: 46%; }
.doc-param { display: inline-flex; align-items: baseline; gap: 4px; margin: 0 8px 4px 0; white-space: nowrap; }
.doc-param code { border-style: dashed; }
.doc-param.req code { border-style: solid; border-color: var(--foreground); }
.doc-ptype { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--muted-foreground); }
.doc-clients { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; gap: 20px; }
  .docs-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 0; }
  .docs-toc-title { width: 100%; }
  .docs-toc a { border-left: 0; border: 1px solid var(--border); border-radius: 9999px; padding: 6px 10px; font-size: 0.8125rem; }
  .docs-toc a.active { background: var(--border); }
  .jd-grid { grid-template-columns: 1fr; }
  .juri-summary { flex-direction: column; }
  .juri-right { flex-direction: row; align-items: center; }
}

/* ══ Mjerilo sadržaja kao Max (Tailwind tierovi @ 17px root; odluka 2026-09-12:
   "ne sve ovako veliko"). Kasnija pravila pobjeđuju istu specifičnost gore. ══ */
.content { gap: 1.5rem; padding: 1.5rem 2rem 3rem; }
.panel { gap: 1.25rem; }
.page-title { font-size: 1.5rem; font-weight: 500; line-height: 1.2; margin: 0 0 0.375rem; }          /* text-2xl font-medium font-serif */
.page-desc { font-size: 0.875rem; line-height: 1.5; color: var(--muted-foreground); max-width: 40rem; }  /* text-sm text-muted-foreground */
.section-title { font-size: 1rem; font-weight: 500; line-height: 1.3; }                                 /* CardTitle: text-base font-medium */
.card { padding: 1.25rem 1.5rem; }
.stat { gap: 0.5rem; padding: 1rem 1.25rem; }
.stat-label, .table-head, .eyebrow { font-size: 0.75rem; }
.stat-value { font-size: 1.375rem; line-height: 1.2; }
.stat-sub { font-size: 0.8125rem; }
.stat-grid, .two-col, .juri-grid, .plan-grid, .tool-groups { gap: 0.875rem; }
.cell-muted, .empty-note, .modal-note, .meter-head, .bar-row-sub { font-size: 0.8125rem; }
.table-row { font-size: 0.875rem; padding: 0.75rem 1.25rem; }                                             /* text-sm */
.table-head { padding: 0.625rem 1.25rem; min-height: 2.25rem; }
.cell-name { font-size: 0.875rem; font-weight: 500; }
.list-row { padding: 0.625rem 0; }
.bar-row-head { font-size: 0.875rem; }
.key-mono { font-size: 0.75rem; }
.chip, .lang-toggle button, .seg button { padding: 0.375rem 0.75rem; font-size: 0.6875rem; }
.btn { height: 2.25rem; }                                                                                /* h-9 */
.status { font-size: 0.6875rem; }
.juri-name { font-size: 0.9375rem; font-weight: 500; }
.juri-caption, .jd-list, .jd-row, .jd-note { font-size: 0.8125rem; }
.jd-num-v { font-size: 1.125rem; }
.juri-summary { padding: 1rem 1.25rem; }
.juri-body { padding: 1rem 1.25rem 1.25rem; }
.plan-name { font-size: 1.0625rem; font-weight: 500; }
.plan-price { font-size: 1.25rem; }
.plan-desc, .feature-list { font-size: 0.8125rem; }
.plan-quota { font-size: 0.6875rem; }
.doc-h3 { font-size: 1.125rem; font-weight: 500; padding-bottom: 0.5rem; }
.doc-h4 { font-size: 0.9375rem; }
.doc-p, .doc-list { font-size: 0.875rem; line-height: 1.55; max-width: 42rem; }
.doc-note, .doc-table, .docs-toc a { font-size: 0.8125rem; }
.docs-body { gap: 2rem; }
.doc-tooldesc { font-size: 0.75rem; }
.tool-group-d, .link-list a { font-size: 0.8125rem; }
.example-row { font-size: 0.875rem; }
.code-block { font-size: 0.75rem; }
.endpoint-url { font-size: 0.8125rem; }
.modal-title { font-size: 1.25rem; font-weight: 500; }
.modal-desc { font-size: 0.875rem; }
.input { height: 2.5rem; font-size: 0.9375rem; }                                                          /* h-10 */
.usage-chart .ylab, .usage-chart .xlab { font-size: 10px; }
.login-title { font-size: 1.5rem; font-weight: 500; }
@media (max-width: 900px) { .content { padding: 1rem 1rem 3rem; } }
