:root {
  --ink: #2B1720;
  --muted: #6B5560;
  --accent: #9F3A62;
  --accent-dark: #7F2D4D;
  --accent-soft: #F6E4EB;
  --line: #E8D3DB;
  --bg: #FAF3F5;
  --white: #FFFFFF;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

h1 { margin: 0; font-size: 34px; line-height: 1.15; letter-spacing: -0.02em; }
.muted { color: var(--muted); }

/* Zaglavlje i podnožje unutrašnjih strana */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 48px; background: var(--white); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.header-link { font-size: 15px; font-weight: 500; color: var(--muted); }

.page { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 40px 48px 64px; display: flex; flex-direction: column; gap: 16px; }
.back { font-size: 15px; font-weight: 500; text-decoration: none; }

.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 48px; background: var(--white); border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { text-decoration: none; }

/* Početna: izgleda kao aplikacija, tri pločice, bez headera i footera */
.home {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 48px; padding: 48px 32px;
}
.home-head { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.home-head h1 { font-size: 32px; font-weight: 700; }
.home-head p { margin: 0; font-size: 17px; color: var(--muted); }
.brand-mark-lg { width: 56px; height: 56px; border-radius: 16px; }
.brand-mark-lg svg { width: 30px; height: 30px; }

.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; width: 100%; max-width: 1080px; }
.tile {
  flex: 1 1 300px; max-width: 340px; min-height: 280px; padding: 32px 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  background: var(--white); border: 2px solid var(--line); border-radius: 28px;
  color: var(--ink); text-decoration: none; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(159, 58, 98, .18); border-color: var(--accent); color: var(--ink); }
.tile:active { transform: translateY(-1px); }
.tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.tile-icon {
  width: 84px; height: 84px; border-radius: 24px; background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.tile-title { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.tile-text { font-size: 15px; line-height: 1.4; color: var(--muted); }

@media (max-width: 640px) {
  .site-header, .site-footer { padding: 16px 20px; }
  .page { padding: 24px 20px 48px; }
  h1 { font-size: 28px; }
}

/* Admin i forme */
h2 { margin: 24px 0 8px; font-size: 22px; letter-spacing: -0.01em; }
.admin-nav { display: flex; gap: 20px; }
.admin-nav a { text-decoration: none; font-weight: 500; color: var(--muted); }
.admin-nav a:hover { color: var(--accent); }
.inline { display: inline; margin: 0; }
.center-card { margin: auto; width: 100%; max-width: 420px; padding: 32px 24px; }
.center-card h1 { margin-bottom: 20px; }

.form { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.form-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; flex-direction: row; max-width: none; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.form-row > label { flex: 1 1 180px; }
input, select { height: 44px; padding: 0 12px; border: 1px solid #CBB0BB; border-radius: 12px; font: inherit; font-size: 16px; color: var(--ink); background: var(--white); width: 100%; }
input:focus-visible, select:focus-visible { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }
.check { flex-direction: row !important; align-items: center; gap: 8px !important; flex: 0 0 auto !important; font-weight: 500 !important; }
.days { border: 1px solid var(--line); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 16px; }
.days legend { font-size: 14px; font-weight: 600; padding: 0 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-ghost { background: var(--accent-soft); color: var(--accent-dark); }
.btn-ghost:hover { background: var(--line); color: var(--accent-dark); }
.btn-link { background: none; color: var(--muted); padding: 0; min-height: 0; font-weight: 500; }
.btn-link:hover { background: none; color: var(--accent); }

.table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 15px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: var(--accent-soft); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-dark); }
.table tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 8px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); }

.alert { padding: 12px 16px; border-radius: 12px; font-size: 15px; }
.alert-ok { background: #E6F4EA; color: #1E5B2F; }
.alert-error { background: #FBE4E8; color: #8A1F3A; }

.stats { display: flex; flex-wrap: wrap; gap: 16px; }
.stat { flex: 1 1 200px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; }
.stat-value { font-size: 36px; font-weight: 700; color: var(--accent); }
.stat-label { color: var(--muted); }

@media (max-width: 760px) { .table { display: block; overflow-x: auto; } }

/* Forma za slanje */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card legend { font-weight: 700; font-size: 17px; padding: 0 8px; color: var(--accent-dark); }
.send-form { max-width: 820px; }
.map { height: 300px; border-radius: 12px; border: 1px solid var(--line); z-index: 0; }
.small { font-size: 14px; margin: 0; }
.field-error { color: #8A1F3A; font-size: 13px; font-weight: 500; }
.btn-wide { width: 100%; max-width: 820px; }
.summary dl { margin: 0; display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; }
.summary dt { color: var(--muted); font-weight: 500; }
.summary dd { margin: 0; font-weight: 500; }
@media (max-width: 640px) { .summary dl { grid-template-columns: 1fr; gap: 2px; } .summary dd { margin-bottom: 10px; } }

/* Prijava i pošiljke kupca */
.narrow { max-width: 420px; }
.code-input { font-size: 28px; letter-spacing: .5em; text-align: center; height: 60px; }
.pin { font-size: 22px; letter-spacing: .2em; color: var(--accent-dark); }
.timeline { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* Push i prijava odobravanjem */
[hidden] { display: none !important; }
.match-number { font-size: 72px; font-weight: 700; color: var(--accent); letter-spacing: .05em; text-align: center; background: var(--white); border: 2px solid var(--line); border-radius: 24px; padding: 16px; max-width: 280px; }
.choices { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-choice { min-width: 96px; min-height: 64px; font-size: 28px; }
.btn-choice-no { width: 100%; }
.push-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

/* Dostavljači */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.consent { font-size: 15px; }
.link-box { margin-top: 8px; font-family: ui-monospace, monospace; font-size: 13px; }

/* Ture i stajanja */
.tight { margin-top: 0; }
.tour-list { display: flex; flex-direction: column; gap: 12px; }
.tour-card { text-decoration: none; color: var(--ink); gap: 4px; }
.tour-card:hover { border-color: var(--accent); color: var(--ink); }
.tour-title { font-weight: 700; font-size: 18px; }
.stops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.stop { gap: 8px; }
.stop-done { opacity: .6; }
.stop-next { border: 2px solid var(--accent); }
.stop-head { display: flex; align-items: center; gap: 10px; }
.stop-no { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.stop-links { display: flex; flex-wrap: wrap; gap: 16px; font-weight: 500; }
.stop-form { margin-top: 4px; }
.actions .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Katalog i korpa */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.vendor-card { text-decoration: none; color: var(--ink); gap: 6px; transition: border-color .15s, box-shadow .15s; }
.vendor-card:hover { border-color: var(--accent); box-shadow: 0 8px 22px rgba(159, 58, 98, .14); }
.qty { width: 80px; }

/* Admin: period, pažnja, pretraga */
.tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.attention{margin:0 0 16px;padding-left:20px;display:flex;flex-direction:column;gap:6px}
.form-inline{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 16px}
.form-inline input,.form-inline select{height:40px;padding:0 12px;border:1px solid #9A7B88;border-radius:10px;font:inherit}

/* Admin: bočni meni kao na skicama */
.admin-body { display: block; }
.admin-shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.admin-side {
  flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 4px;
  padding: 24px 16px; background: #2B1720; color: #fff;
}
.admin-side-brand {
  display: flex; align-items: center; gap: 10px; padding: 0 8px 20px;
  color: #fff; font-size: 17px; font-weight: 700; text-decoration: none;
}
.admin-side-brand:hover { color: #fff; }
.side-mark { width: 32px; height: 32px; border-radius: 9px; }
.side-mark svg { width: 18px; height: 18px; }
.admin-side-link {
  display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none;
  color: #E3C9D4; font: inherit; font-size: 15px; text-align: left; text-decoration: none; cursor: pointer;
}
.admin-side-link:hover { background: #4A2A38; color: #fff; }
.admin-side-link.is-active { background: #4A2A38; color: #fff; font-weight: 600; }
.admin-side-link:focus-visible, .admin-side-brand:focus-visible { outline: 3px solid #F6E4EB; outline-offset: 2px; }
.admin-side-out { margin: auto 0 0; padding-top: 16px; }
.admin-main {
  flex: 999 1 560px; min-width: 0; padding: 32px 40px 48px;
  display: flex; flex-direction: column; gap: 16px;
}
@media (max-width: 760px) {
  .admin-side { max-width: none; flex-basis: 100%; flex-direction: row; flex-wrap: wrap; padding: 12px; }
  .admin-side-brand { width: 100%; padding-bottom: 8px; }
  .admin-side-link { width: auto; }
  .admin-side-out { margin: 0; padding: 0; }
  .admin-main { padding: 20px 16px 40px; }
}

/* Kartice za izbor veličine paketa i polaska */
.pick-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pick-cards { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.pick-card {
  flex: 1 1 200px; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; text-align: left;
  background: var(--white); border: 2px solid var(--line); border-radius: 14px; font: inherit; color: var(--ink); cursor: pointer;
}
.pick-card:hover { border-color: var(--accent); }
.pick-card.is-picked { border-color: var(--accent); background: var(--accent-soft); }
.pick-card.is-full { opacity: .6; cursor: not-allowed; }
.pick-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pick-card span:not(.pick-row):not(.pick-bar):not(.pick-chip) { font-weight: 400; color: var(--muted); font-size: 14px; }
.pick-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pick-chip { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-ok { background: #E3F4EA; color: #14663B; }
.chip-wait { background: #FEF3E2; color: #8A4B08; }
.chip-full { background: #F0E6EA; color: #6B5560; }
.pick-bar { display: block; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.pick-bar span { display: block; height: 100%; background: var(--accent); }
.pick-note { font-size: 13px; color: var(--muted); }

/* Logo */
.brand-logo { height: 40px; width: auto; display: block; }
.home-logo { width: min(100%, 460px); height: auto; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.admin-side-brand { background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; color: var(--ink); }
.admin-side-brand:hover { color: var(--ink); }
.admin-side-brand .brand-logo { height: 32px; }

.home-top { position: absolute; top: 20px; right: 32px; display: flex; gap: 20px; }
.home-top a { font-weight: 600; text-decoration: none; padding: 8px 16px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); }
.home-top a:hover { border-color: var(--accent); }
