:root {
  /* color-scheme: kaže pregledniku da stranica ima i svijetlu i tamnu temu, pa njegove
     ugrađene kontrole (strelice u poljima, padajući izbornik, klizač, scrollbar) prate sistemsku temu. */
  color-scheme: light dark;
  --bg: #f1f3ee;
  --surface: #ffffff;
  --surface-2: #e8eae2;
  --ink: #1b2420;
  --ink-soft: #5a655e;
  --ink-faint: #8b958c;
  --border: #dadcd2;
  --accent: #a97a2f;
  --accent-ink: #7a5620;
  --accent-soft: #f0e3ca;
  --good: #3f7d58;
  --good-soft: #e3efe6;
  --bad: #b0503f;
  --bad-soft: #f6e6e2;
  --neutral-chip: #46637a;
  --neutral-chip-soft: #e2ebef;
  --shadow: 0 1px 2px rgba(27, 36, 32, 0.06), 0 8px 24px -12px rgba(27, 36, 32, 0.18);
  --radius: 10px;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, ui-serif, serif;
  --font-body: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121613;
    --surface: #181f1a;
    --surface-2: #202920;
    --ink: #edeee7;
    --ink-soft: #a9b2a5;
    --ink-faint: #6f796f;
    --border: #2b332c;
    --accent: #d9a75a;
    --accent-ink: #f0d9ab;
    --accent-soft: #33291a;
    --good: #6cbf8e;
    --good-soft: #1c2c22;
    --bad: #d9836f;
    --bad-soft: #2e211e;
    --neutral-chip: #8fb2c9;
    --neutral-chip-soft: #1b262c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px -12px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;   /* ručno izabrana tema ima prednost nad sistemskom */
  --bg: #121613;
  --surface: #181f1a;
  --surface-2: #202920;
  --ink: #edeee7;
  --ink-soft: #a9b2a5;
  --ink-faint: #6f796f;
  --border: #2b332c;
  --accent: #d9a75a;
  --accent-ink: #f0d9ab;
  --accent-soft: #33291a;
  --good: #6cbf8e;
  --good-soft: #1c2c22;
  --bad: #d9836f;
  --bad-soft: #2e211e;
  --neutral-chip: #8fb2c9;
  --neutral-chip-soft: #1b262c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px -12px rgba(0, 0, 0, 0.5);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f3ee;
  --surface: #ffffff;
  --surface-2: #e8eae2;
  --ink: #1b2420;
  --ink-soft: #5a655e;
  --ink-faint: #8b958c;
  --border: #dadcd2;
  --accent: #a97a2f;
  --accent-ink: #7a5620;
  --accent-soft: #f0e3ca;
  --good: #3f7d58;
  --good-soft: #e3efe6;
  --bad: #b0503f;
  --bad-soft: #f6e6e2;
  --neutral-chip: #46637a;
  --neutral-chip-soft: #e2ebef;
  --shadow: 0 1px 2px rgba(27, 36, 32, 0.06), 0 8px 24px -12px rgba(27, 36, 32, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: clamp(20px, 4vw, 56px) 20px 64px;
}

.page {
  width: 100%;
  max-width: 980px;
}

header.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand .mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.brand .mark em {
  font-style: normal;
  color: var(--accent);
}

.brand .tagline {
  font-size: 0.82rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

header.masthead .currency-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

header.masthead select {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--ink);
}

/* Valuta + dugme za temu, jedno pored drugog (na uskom ekranu smiju preći u novi red) */
.masthead-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.theme-btn {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.theme-btn:hover { border-color: var(--accent); color: var(--ink); }
.theme-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- Prijava: dugme / email / odjava u zaglavlju --- */
.auth-area {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.auth-area [hidden] { display: none; }
.auth-user {
  font-size: 0.78rem;
  color: var(--ink-soft);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Izbor objekta (hotela) u zaglavlju, samo za prijavljene --- */
.hotel-area {
  display: flex;
  align-items: center;
  flex-wrap: wrap;          /* na uskom ekranu dugmad prelaze u novi red umjesto izlaska van ekrana */
  gap: 8px;
  min-width: 0;
}
@media (max-width: 600px) {
  .hotel-area select { max-width: 150px; }
}
.hotel-area[hidden] { display: none; }
.hotel-area select {
  max-width: 170px;
  text-overflow: ellipsis;
}

/* --- Prozor za prijavu/registraciju (<dialog>) --- */
.auth-dialog {
  width: min(380px, calc(100% - 32px));
  padding: 22px 24px 24px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.auth-dialog::backdrop { background: rgba(10, 14, 12, 0.5); }
.auth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.auth-head h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0;
}
.auth-close {
  font-size: 1.3rem;
  line-height: 1;
  background: none;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.auth-close:hover { color: var(--ink); }
.auth-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-modes { margin-bottom: 16px; }
.auth-field { margin-bottom: 12px; }
.auth-field[hidden] { display: none; }
.auth-field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 11px;
  color: var(--ink);
}
.auth-field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 8px;
  color: var(--ink);
}
.auth-field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-field .opt { font-weight: 400; color: var(--ink-faint); }
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hotel-intro {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.hotel-intro[hidden] { display: none; }
.dialog-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.dialog-actions .auth-submit { flex: 1; }
.dialog-actions [hidden] { display: none; }
.import-secondary {
  margin-top: 10px;
  flex-wrap: wrap;
}
.auth-field .hint {
  font-size: 0.76rem;
  color: var(--ink-faint);
  margin-top: 6px;
}
.auth-field .hint[hidden] { display: none; }
.auth-msg {
  min-height: 1.2em;
  margin: 4px 0 12px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ink-soft);
}
.auth-msg.error { color: var(--bad); }
.auth-msg.ok { color: var(--good); }
.auth-submit {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 7px;
  padding: 10px 12px;
  cursor: pointer;
}
.auth-submit:disabled { opacity: 0.55; cursor: default; }
.auth-modes[hidden] { display: none; }
.link-btn {
  display: block;
  margin: 12px auto 0;
  background: none;
  border: none;
  padding: 4px 6px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--accent-ink);
  text-decoration: underline;
  cursor: pointer;
  border-radius: 4px;
}
.link-btn[hidden] { display: none; }
.link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* --- Prozor "Moj nalog" --- */
.account-section {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
}
.account-section h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  margin: 0 0 8px;
}
.danger-zone h3 { color: var(--bad); }
.account-section[hidden], .hotel-intro[hidden] { display: none; }
.danger-zone .export-btn { margin-top: 2px; }
.auth-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
}

/* Uski ekran (mobitel, tablet): zaglavlje smije preći u više redova da valuta i tema ne izlaze van ekrana */
@media (max-width: 800px) {
  header.masthead { flex-wrap: wrap; row-gap: 12px; }
  .brand { flex-wrap: wrap; row-gap: 2px; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ledger {
  padding: 26px 26px 22px;
}

.ledger h2, .rate-card h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 18px;
  text-wrap: balance;
}

.field {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.field:first-of-type { padding-top: 0; }
.field:last-of-type { border-bottom: none; padding-bottom: 0; }

.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 10px;
  gap: 12px;
}

.field label .val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.86rem;
}

.field .hint {
  font-size: 0.76rem;
  color: var(--ink-faint);
  margin-top: 6px;
}

input[type="number"] {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 11px;
  color: var(--ink);
}
input[type="number"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: 4px;
}
input[type="range"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.row-inline {
  display: flex;
  gap: 14px;
  align-items: center;
}
.row-inline input[type="range"] { flex: 1; }
.row-inline input[type="number"] { width: 72px; flex: none; }

.segmented {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.segmented button, .toggle-pair button {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 4px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.segmented button[aria-pressed="true"], .toggle-pair button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.segmented button:focus-visible, .toggle-pair button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.toggle-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.toggle-pair button { padding: 11px 8px; font-size: 0.85rem; }

.price-prefix {
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-prefix span {
  font-family: var(--font-mono);
  color: var(--ink-faint);
  font-size: 0.95rem;
}

.minmax-row { gap: 12px; }

.minmax-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 11px;
}

.minmax-field .mm-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

.minmax-field input {
  border: none;
  background: transparent;
  padding: 9px 0;
}
/* Min/Max polje zauzima sav prostor u svojoj kutiji (poništava 72px pravilo iz .row-inline,
   koje ostaje samo za malo polje popunjenosti). min-width: 0 dozvoljava suženje na mobitelu. */
.minmax-row .minmax-field input[type="number"] {
  width: 100%;
  flex: 1;
  min-width: 0;
}
/* Na mobitelu dvije kutije jedna pored druge su preuske za 4 cifre — slažemo ih jednu ispod druge */
@media (max-width: 600px) {
  .minmax-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .minmax-row .minmax-field { flex: none; }
}
.minmax-field input:focus-visible { outline: none; }
.minmax-field:focus-within {
  border-color: var(--accent);
}

.rate-card {
  padding: 26px;
  position: relative;
  overflow: hidden;
}

.rate-card::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-ink);
  margin-bottom: 8px;
}

.price-display {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.4rem, 7vw, 3.1rem);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 6px;
  transition: opacity 0.2s ease;
}
.price-display .unit {
  font-size: 1.1rem;
  color: var(--ink-faint);
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .price-display, .verdict, .chip { transition: none !important; }
}

.delta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
}
.delta-chip.up { background: var(--good-soft); color: var(--good); }
.delta-chip.down { background: var(--bad-soft); color: var(--bad); }
.delta-chip.flat { background: var(--neutral-chip-soft); color: var(--neutral-chip); }

.clamp-note {
  margin-top: 10px;
  font-size: 0.76rem;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}
.clamp-note.warn { color: var(--bad); }

.divider-label {
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 8px;
}
.divider-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.factors {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.factors li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.84rem;
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: 7px;
}

.factors li .flabel {
  color: var(--ink-soft);
}

.factors li .fval {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.factors li .fval.pos { color: var(--good); }
.factors li .fval.neg { color: var(--bad); }
.factors li .fval.zero { color: var(--ink-faint); }

.verdict {
  font-family: var(--font-display);
  font-size: 0.98rem;
  line-height: 1.5;
  padding: 14px 16px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 7px 7px 0;
  color: var(--ink);
}
.verdict strong { color: var(--accent-ink); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.card-head h2 { margin: 0; }

.export-btn {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 7px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.export-btn:hover { background: var(--accent); color: #fff; }
.export-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.print-summary { display: none; }

/* --- Historija izračuna --- */
.history {
  margin-top: 22px;
  padding: 22px 26px;
}
.history h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}
.history-note {
  font-size: 0.76rem;
  color: var(--ink-faint);
  margin: 0 0 12px;
}
.history-note.warn { color: var(--bad); }
/* Status snimanja u bazu (samo za prijavljene) */
.cloud-status {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: -4px 0 12px;
}
.cloud-status[hidden] { display: none; }
.cloud-status.ok { color: var(--good); }
.cloud-status.error { color: var(--bad); }
.history-list li.history-empty .history-retry { margin-left: 8px; }
.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.history-list li {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 7px;
  font-size: 0.82rem;
}
.history-list .h-date {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.history-list .h-inputs { color: var(--ink-soft); }
.history-list .h-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent-ink);
  white-space: nowrap;
}
/* Zapis se može kliknuti da se vrati u kalkulator */
.history-list li.h-item {
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.history-list li.h-item:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.history-list li.h-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Kratko isticanje kartice s preporukom nakon učitavanja zapisa */
@keyframes loaded-flash {
  0%   { box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
  100% { box-shadow: 0 0 0 0 transparent, var(--shadow); }
}
.rate-card.flash { animation: loaded-flash 1.4s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .rate-card.flash { animation: none; outline: 2px solid var(--accent); }
  .history-list li.h-item { transition: none; }
}
.history-list li.history-empty {
  display: block;
  background: none;
  font-size: 0.84rem;
  color: var(--ink-faint);
  padding: 10px 0 2px;
}
/* Naslov historije + dva dugmeta: na uskom ekranu dugmad prelaze ispod naslova */
.history .card-head { flex-wrap: wrap; }
.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.export-btn.danger {
  color: var(--bad);
  background: var(--bad-soft);
  border-color: var(--bad);
}
.export-btn.danger:hover { background: var(--bad); color: #fff; }
.export-btn:disabled { opacity: 0.45; cursor: default; }
.export-btn.danger:disabled:hover { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 600px) {
  .history-list li { grid-template-columns: 1fr auto; }
  .history-list .h-date { grid-column: 1 / -1; }
}

footer.note {
  margin-top: 26px;
  font-size: 0.76rem;
  color: var(--ink-faint);
  text-align: center;
}

/* --- Stranica "Privatnost" (privatnost.html) --- */
.doc {
  padding: 26px clamp(18px, 4vw, 40px) 30px;
  line-height: 1.6;
  font-size: 0.95rem;
  max-width: 760px;
}
.doc h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 4px;
}
.doc h2 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin: 24px 0 6px;
}
.doc p, .doc ul { margin: 0 0 10px; }
.doc ul { padding-left: 1.3em; }
.doc li { margin-bottom: 4px; }
.doc-meta { color: var(--ink-faint); font-size: 0.82rem; }
.doc a, footer.note a { color: var(--accent-ink); }
.doc-back { margin-top: 24px; }
a.brand-link { text-decoration: none; }
a.back-link { text-decoration: none; display: inline-block; }
a.back-link:focus-visible, .doc a:focus-visible, footer.note a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media print {
  /* Print je uvijek svijetao, bez obzira na temu (sistemsku ili ručno izabranu).
     Isti selektori kao tamne teme, a ovaj blok dolazi kasnije u fajlu, pa pobjeđuje. */
  :root, :root[data-theme] {
    color-scheme: light;
    --bg: #f1f3ee;
    --surface: #ffffff;
    --surface-2: #e8eae2;
    --ink: #1b2420;
    --ink-soft: #5a655e;
    --ink-faint: #8b958c;
    --border: #dadcd2;
    --accent: #a97a2f;
    --accent-ink: #7a5620;
    --accent-soft: #f0e3ca;
    --good: #3f7d58;
    --good-soft: #e3efe6;
    --bad: #b0503f;
    --bad-soft: #f6e6e2;
    --neutral-chip: #46637a;
    --neutral-chip-soft: #e2ebef;
    --shadow: 0 1px 2px rgba(27, 36, 32, 0.06), 0 8px 24px -12px rgba(27, 36, 32, 0.18);
  }
  body { padding: 0; background: #fff; }
  .masthead .currency-field,
  .theme-btn,
  .auth-area,
  .hotel-area,
  .auth-dialog,
  .ledger,
  footer.note,
  .history,
  .export-btn,
  .rate-card::before { display: none !important; }
  .layout { grid-template-columns: 1fr; display: block; }
  .page { max-width: 100%; }
  .panel.rate-card {
    box-shadow: none;
    border-color: #ccc;
    padding: 0;
  }
  .print-summary {
    display: block;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #ccc;
    color: #333;
  }
  .print-summary .ps-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: #000;
    margin-bottom: 2px;
  }
  .print-summary .ps-date {
    font-size: 0.78rem;
    color: #666;
    margin-bottom: 12px;
  }
  .print-summary dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px 14px;
    margin: 0;
    font-size: 0.85rem;
  }
  .print-summary dt { font-weight: 600; color: #444; }
  .print-summary dd { margin: 0; font-variant-numeric: tabular-nums; }
}
