/* Panel prodavca. Koristi iste tokene kao pay.css. */
.app { max-width: 960px; margin: 0 auto; display: grid; gap: 20px; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.logo { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.logo span { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.nav a, .nav button { font: inherit; font-size: 14px; color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button:hover { color: var(--ink); background: var(--line); }
.nav a[aria-current="page"] { color: var(--primary); font-weight: 600; }
.nav form { margin: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 16px; min-width: 0; }
.card h1 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.card h2 { margin: 0; font-size: 16px; }
.card p { margin: 0; }
.muted { color: var(--muted); font-size: 14px; }
.narrow { max-width: 420px; margin: 0 auto; width: 100%; }
.narrow .logo { justify-self: start; }

.form { display: grid; gap: 14px; }
.form .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .form .grid2 { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0; }
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.field .help { font-size: 12px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 3px; }
.code-input { font-family: var(--mono) !important; font-size: 22px !important; letter-spacing: 0.3em; text-align: center; }

.btn { font: inherit; font-size: 15px; font-weight: 600; border-radius: 9px; border: 1px solid var(--primary); background: var(--primary); color: var(--on-primary); padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.btn:hover { opacity: 0.92; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row form { margin: 0; }

.alert { border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.alert.error { background: #fdecea; color: #8c1d18; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.info { background: var(--wait-soft); color: var(--wait); }
@media (prefers-color-scheme: dark) { .alert.error { background: #3a1715; color: #ffb4ab; } }

.filters { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.filters a { font-size: 14px; color: var(--muted); text-decoration: none; padding: 8px 10px; border-bottom: 2px solid transparent; }
.filters a[aria-current="true"] { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.list { display: grid; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.item:first-child { border-top: 0; }
.item:hover { background: color-mix(in srgb, var(--primary) 4%, transparent); }
.item .title { font-weight: 600; overflow-wrap: anywhere; }
.item .sub { font-size: 13px; color: var(--muted); }
.item .amt { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
@media (max-width: 520px) { .item { grid-template-columns: minmax(0, 1fr) auto; } .item .status { grid-column: 1 / -1; justify-self: start; } }
.empty { padding: 24px 4px; color: var(--muted); }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-family: var(--mono); font-size: 13px; }
.secret { font-family: var(--mono); font-size: 14px; background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; padding: 12px; overflow-wrap: anywhere; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-family: var(--mono); font-size: 16px; }
.codes li { list-style: none; background: var(--bg); border-radius: 8px; padding: 8px 10px; text-align: center; }
.codes { padding: 0; margin: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
@media (max-width: 760px) { .split { grid-template-columns: minmax(0, 1fr); } }
.qr-small { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; text-align: center; margin: 0; }
.qr-small svg { width: 100%; max-width: 220px; height: auto; display: block; margin: 0 auto; }
.qr-small figcaption { font: 11px var(--mono); letter-spacing: 0.08em; color: #1b2422; }
.section-list { display: grid; gap: 16px; }
.table-wrap { overflow-x: auto; }
table.simple { border-collapse: collapse; width: 100%; font-size: 14px; }
table.simple th, table.simple td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.simple th { color: var(--muted); font-weight: 600; }
.foot { font-size: 12px; color: var(--muted); text-align: center; }
.foot a { color: inherit; }
.between { justify-content: space-between; }
.steps-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.form-card { max-width: 560px; width: 100%; justify-self: center; }
hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
details summary { cursor: pointer; }
pre.secret { white-space: pre-wrap; margin: 8px 0 0; max-height: 320px; overflow: auto; }
.choice { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0; display: grid; gap: 10px; }
.choice legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 4px; }

/* Admin */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tile { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 2px; }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 12px; color: var(--muted); }
.split2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.split2 h2 { margin-bottom: 10px; }
.bar-row { display: grid; grid-template-columns: 48px 1fr 32px; gap: 8px; align-items: center; font-size: 13px; padding: 2px 0; }
.bar { width: 100%; height: 8px; display: block; }
.bar-bg { fill: var(--line); }
.bar-fill { fill: var(--primary); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
