/* Termini: topli mekani serif u naslovima (Fraunces) + prijateljski citljiv tekst (Figtree); Damir odabrao 23.10.2026. (opcija A).
   Jedini smjeli element je kartica vjernosti (bakreni zigovi); sve ostalo je mirno. */
@import url('/assets/fonts/fonts.css');

:root {
  --plum: #7d1d58;        /* glavna: gumbi, odabrano */
  --plum-deep: #5e1342;
  --plum-tint: #f1e4ee;
  --ink: #2b1a2e;         /* tekst */
  --ink-soft: #66576a;
  --paper: #f3f1f6;       /* pozadina */
  --surface: #ffffff;
  --line: #ddd6e3;
  --copper: #b8612a;      /* tinta zigova */
  --copper-tint: #f6e9df;
  --mint: #1d6f5c;        /* potvrde */
  --mint-tint: #e1f0ea;
  --error: #a3271c;
  --error-tint: #fbe9e7;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --text: 'Figtree', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --r-sm: 8px;
  --r-md: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: only light; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.5 var(--text); }
a { color: var(--plum); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }

h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 2rem; line-height: 1.1; margin: .4rem 0 1rem; }
h2 { font-size: 1.35rem; line-height: 1.2; margin: 2rem 0 .7rem; }
h3 { font-size: 1rem; font-weight: 700; margin: 1.2rem 0 .4rem; }
p { margin: .6rem 0; }

.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 56px; }
.wrap.wide { max-width: 1240px; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
.center { text-align: center; }

/* zaglavlje: ime salona je naslov stranice */
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top .bar { max-width: 1240px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 14px; }
.brand { font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--ink); text-decoration: none; line-height: 1.1; }
.brand .dot { display: none; }
.back { flex: 0 0 auto; width: 44px; height: 44px; margin: -6px 0 -6px -10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--plum); }
.back:hover { background: var(--plum-tint); }
.back svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.top nav { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.top nav a, .top .who button { font: 600 .95rem/1 var(--text); padding: 9px 11px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.top nav a:hover, .top .who button:hover { background: var(--plum-tint); }
.top nav a.on { color: var(--plum); box-shadow: inset 0 -3px 0 var(--plum); border-radius: 0; }
.top nav svg { display: none; }
.top nav a.add span::before { content: "+ "; }
.top .who { display: flex; align-items: center; gap: 2px; }
.top .who a.me { font: 600 .95rem/1 var(--text); color: var(--ink); text-decoration: none; padding: 9px 8px; border-radius: var(--r-sm); }
.top .who a.me:hover { background: var(--plum-tint); }
.top .who form { margin: 0; }
.top .who button { color: var(--ink-soft); font-weight: 400; }
.demo-ribbon { background: var(--ink); color: #fff; text-align: center; font-size: .82rem; padding: 6px 12px; }

/* poruke */
.flash { margin: 16px 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--mint-tint); color: var(--mint); font-weight: 600; border-left: 4px solid var(--mint); }
.flash.err { background: var(--error-tint); color: var(--error); border-left-color: var(--error); }
.notice { margin: 14px 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--copper-tint); border-left: 4px solid var(--copper); }

/* povrsine: obican odjeljak je ravan; podignuti su samo "predmeti" (kartica vjernosti, listic termina) */
.card { margin: 10px 0; padding: 4px 0; }
.card.flat { padding: 0; }
.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; margin: 12px 0; position: relative; }
.ticket::before, .ticket::after { content: ""; position: absolute; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); }
.ticket::before { left: -9px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -9px; clip-path: inset(0 50% 0 0); }

.steps { display: flex; gap: 6px; margin: 18px 0 4px; }
.steps span { flex: 1; height: 3px; border-radius: 3px; background: var(--line); }
.steps span.on { background: var(--plum); }

/* gumbi i polja: dodir min 48 px */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; min-height: 52px; border-radius: var(--r-md); border: 2px solid var(--plum); background: var(--plum); color: #fff; font: 700 1.02rem/1.1 var(--text); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--plum-deep); border-color: var(--plum-deep); }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--plum); }
.btn.ghost:hover { background: var(--plum-tint); }
.btn.small { padding: 8px 14px; min-height: 42px; font-size: .95rem; }
.btn.ok { background: var(--mint); border-color: var(--mint); }
.btn.ok:hover { background: #15574a; border-color: #15574a; }
.btn.danger { background: transparent; color: var(--error); border-color: #e6b3ad; }
.btn.danger:hover { background: var(--error-tint); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
label { display: block; font-weight: 700; font-size: .95rem; margin: 14px 0 6px; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; padding: 13px 14px; border: 1.5px solid #cbc1d2; border-radius: var(--r-sm); font: 400 1.05rem/1.3 var(--text); background: var(--surface); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--plum-tint); border-color: var(--plum); }
textarea { min-height: 80px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 8px 0; }
.check input { width: 22px; height: 22px; accent-color: var(--plum); }

/* usluge: popis s linijama, kao cjenik na zidu salona */
.svc { display: flex; align-items: center; gap: 14px; padding: 15px 4px; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: 1.05rem; }
.svc:first-of-type { border-top: 1px solid var(--line); }
.svc input { width: 24px; height: 24px; accent-color: var(--plum); flex: 0 0 auto; }
.svc .name { flex: 1; }
.svc .dur { color: var(--ink-soft); font-weight: 400; font-size: .95rem; white-space: nowrap; }
.svc:has(input:checked) { color: var(--plum); }
.svc:has(input:checked) .dur { color: var(--plum); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { margin: 0; padding: 11px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 600; position: relative; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill:has(input:checked) { border-color: var(--plum); background: var(--plum); color: #fff; }
.pill:has(input:focus-visible) { outline: 3px solid var(--plum); outline-offset: 2px; }

/* dani i vremena */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; }
.day { flex: 0 0 66px; text-align: center; padding: 9px 4px 8px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-decoration: none; color: var(--ink); scroll-snap-align: start; }
.day b { display: block; font: 600 1.45rem/1.1 var(--display); margin: 2px 0; }
.day small { color: var(--ink-soft); font-size: .78rem; display: block; }
.day.on { border-color: var(--plum); background: var(--plum); color: #fff; }
.day.on small { color: #f3d6e8; }
.day.none { opacity: .4; pointer-events: none; background: transparent; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.time { text-align: center; padding: 13px 0; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.time:hover { border-color: var(--plum); color: var(--plum); }

/* sazetak i termini */
.sum { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.sum dt { color: var(--ink-soft); }
.sum dd { margin: 0; font-weight: 700; }
.nowrap { white-space: nowrap; }
.appt-line { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.appt-line:first-child { border-top: 0; }
.appt-line .when { min-width: 64px; font: 600 1.35rem/1.05 var(--display); font-variant-numeric: lining-nums; }
.appt-line .when .small { font: 400 .85rem/1.3 var(--text); }
.badge { display: inline-block; font-size: .8rem; padding: 2px 9px; border-radius: 999px; background: var(--line); color: var(--ink); font-weight: 700; vertical-align: 2px; }
.badge.booked { background: var(--plum-tint); color: var(--plum); }
.badge.arrived { background: var(--mint-tint); color: var(--mint); }
.badge.done { background: #e4e9f2; color: #2e4a75; }
.badge.no_show { background: var(--error-tint); color: var(--error); }
.badge.cancelled { background: #ece9ee; color: #857b88; text-decoration: line-through; }

/* KARTICA VJERNOSTI: jedini "glasni" element */
.loyal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px 16px; margin: 12px 0; box-shadow: 0 1px 0 var(--line), 0 10px 24px -14px rgba(43, 26, 46, .35); }
.loyal-card .lc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.loyal-card .lc-head b { font: 600 1.15rem/1.15 var(--display); }
.loyal-card .lc-head span { font-size: .9rem; color: var(--ink-soft); white-space: nowrap; }
.loyal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 6px 0; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed #cdbfd3; display: flex; align-items: center; justify-content: center; color: #b3a6b8; font-size: .85rem; font-variant-numeric: tabular-nums; }
.stamp.on { border: 2.5px solid var(--copper); color: var(--copper); background: radial-gradient(circle, transparent 58%, rgba(184, 97, 42, .08) 60%); transform: rotate(var(--rot, -8deg)); }
.stamp.on .mono { font: 700 1.35rem/1 var(--display); }
.stamp.free svg { width: 46%; height: 46%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.stamp.free { border: 2px solid var(--mint); color: var(--mint); background: var(--mint-tint); font-weight: 700; text-align: center; line-height: 1.05; padding: 4px; }
.loyal-card .lc-foot { margin: 10px 0 0; text-align: center; font-weight: 700; }
.loyal-card .lc-foot.free { color: var(--mint); }

.qrbox { background: #fff; border-radius: var(--r-md); padding: 10px; width: 220px; margin: 8px auto; border: 1px solid var(--line); }
.qrbox img { width: 100%; height: auto; display: block; }
.big-ok { padding: 18px 18px; border-radius: var(--r-md); background: var(--mint-tint); color: var(--mint); border-left: 5px solid var(--mint); }
.big-ok .t { font: 600 1.5rem/1.15 var(--display); }
.reward { text-align: center; padding: 16px; border-radius: var(--r-md); background: var(--mint); color: #fff; font: 600 1.3rem/1.2 var(--display); }

/* raspored dana */
.sched-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0 6px; }
.sched-head h1 { margin: 0 10px 0 0; font-size: 1.6rem; }
.sched { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: 56px; }
.lane { scroll-snap-align: start; }
/* mobitel: gumbi za osobe i popis "Svi"; na racunalu i tabletu skriveni (tamo su svi stupci) */
.chips, .agenda { display: none; }
.chips { flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.chips a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; min-height: 42px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; }
.chips a i { width: 10px; height: 10px; border-radius: 50%; }
.chips a small { font-weight: 400; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.chips a.on { border-color: var(--plum); background: var(--plum); color: #fff; }
.chips a.on small { color: #f3d6e8; }
.agenda .ag { display: flex; gap: 12px; padding: 11px 12px; margin: 0 0 8px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--plum); border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.agenda .ag .t { min-width: 54px; font: 600 1.1rem/1.15 var(--display); font-variant-numeric: tabular-nums; }
.agenda .ag .t small { display: block; font: 400 .8rem/1.3 var(--text); color: var(--ink-soft); }
.agenda .ag .w { font-size: .95rem; line-height: 1.35; }
.agenda .ag .w b { display: block; }
.agenda .ag .w small { color: var(--ink-soft); }
.agenda .ag.arrived { background: var(--mint-tint); }
.agenda .ag.no_show { background: var(--error-tint); }
/* Gumbi i jedan stupac kad stupci (130 px) ne stanu: mobitel uvijek, tablet od 6 osoba, racunalo od 10 (views/day.php .manyN). */
@media (max-width: 759px) {
  .chips { display: flex; }
  .agenda.show { display: block; }
  .sched.all { display: none; }
  .sched.one { overflow-x: visible; }
  .sched.one .sched-cols { grid-template-columns: 48px 1fr !important; }
  .sched.one .col-h:not(:first-child):not(.is-sel), .sched.one .lane:not(.is-sel) { display: none; }
}
@media (max-width: 1023px) {
  .many6 .chips { display: flex; }
  .many6 .agenda.show { display: block; }
  .many6 .sched.all { display: none; }
  .many6 .sched.one { overflow-x: visible; }
  .many6 .sched.one .sched-cols { grid-template-columns: 48px 1fr !important; }
  .many6 .sched.one .col-h:not(:first-child):not(.is-sel), .many6 .sched.one .lane:not(.is-sel) { display: none; }
}
@media (max-width: 1279px) {
  .many10 .chips { display: flex; }
  .many10 .agenda.show { display: block; }
  .many10 .sched.all { display: none; }
  .many10 .sched.one { overflow-x: visible; }
  .many10 .sched.one .sched-cols { grid-template-columns: 48px 1fr !important; }
  .many10 .sched.one .col-h:not(:first-child):not(.is-sel), .many10 .sched.one .lane:not(.is-sel) { display: none; }
}
.sched-cols { display: grid; min-width: 100%; }
.sched .col-h { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 10px 8px; border-bottom: 1px solid var(--line); font-weight: 700; display: flex; align-items: center; gap: 7px; }
.sched .col-h i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.lane { position: relative; border-left: 1px solid var(--line); }
.lane .off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(-45deg, #f6f4f8, #f6f4f8 7px, #eeeaf2 7px, #eeeaf2 14px); }
.lane .hr { position: absolute; left: 0; right: 0; border-top: 1px solid #efebf2; }
.axis { position: sticky; left: 0; z-index: 3; background: var(--surface); }
.sched .col-h:first-child { left: 0; z-index: 4; }
.axis span:first-child { transform: none; }
.axis span:last-child { transform: translateY(-100%); }
.axis span { position: absolute; right: 8px; font-size: .78rem; color: var(--ink-soft); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.blk { position: absolute; left: 4px; right: 4px; border-radius: 6px; padding: 5px 7px; font-size: .82rem; line-height: 1.25; overflow: hidden; text-decoration: none; color: var(--ink); border-left: 4px solid var(--plum); background: #faf4f8; box-shadow: inset 0 0 0 1px #eadfe7; }
.blk b { display: block; font-size: .86rem; }
.blk:hover { box-shadow: inset 0 0 0 1.5px var(--plum); }
.blk.arrived { background: var(--mint-tint); border-left-color: var(--mint); }
.blk.done { background: #eef1f6; border-left-color: #2e4a75; }
.blk.no_show { background: var(--error-tint); border-left-color: var(--error); opacity: .85; }
.now-line { position: absolute; left: 0; right: 0; border-top: 2px solid var(--copper); z-index: 2; }

/* tablice i tjedan */
table.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
table.list td, table.list th { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list th { font-size: .85rem; color: var(--ink-soft); font-weight: 700; }
.week { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.week .d { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; min-height: 96px; }
.week .d.today { border-color: var(--plum); box-shadow: inset 0 3px 0 var(--plum); }
.week .d h3 { margin: 0 0 6px; font: 600 1.05rem/1.2 var(--display); }
.week .d a { display: block; font-size: .86rem; text-decoration: none; color: var(--ink); padding: 4px 0; border-top: 1px solid #efebf2; }

/* tablet */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { padding: 22px 10px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface); text-align: center; font: 600 1.3rem/1.2 var(--display); cursor: pointer; }
.tile i { display: block; width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 10px; }
.tile.on { border-color: var(--plum); background: var(--plum-tint); }
.pin { font-size: 2rem; letter-spacing: .5em; text-align: center; }

details.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin: 10px 0; }
details.box summary { padding: 14px 16px; cursor: pointer; font-weight: 700; }
details.box > div { padding: 0 16px 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.hours { display: grid; grid-template-columns: 100px 1fr; gap: 6px 10px; align-items: center; }
.hours label { margin: 0; font-weight: 400; }

/* podnozje: potpis dD Tech + pravne stranice, kao na ostalim nasim sajtovima */
.foot { margin: 48px 0 0; padding: 16px 0 4px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: .82rem; color: var(--ink-soft); }
.foot a { color: var(--ink-soft); }
.foot a:hover { color: var(--plum); }
.salon-head { margin: 22px 0 6px; }
.salon-head .name { font: 600 2.4rem/1.02 var(--display); margin: 0; letter-spacing: -.015em; }
.salon-head .where { color: var(--ink-soft); margin: 6px 0 0; }

@media (min-width: 760px) {
  h1 { font-size: 2.3rem; }
  .grid2.md3 { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 759px) {
  .top .bar { flex-wrap: wrap; row-gap: 2px; }
  /* osoblje na mobitelu: donja traka s ikonama, palac je dohvaca */
  .top .who { margin-left: auto; }
  .top nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0; gap: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .top nav.tabs a { flex: 1 1 0; flex-direction: column; gap: 3px; padding: 6px 2px; font-size: .74rem; min-height: 52px; justify-content: center; color: var(--ink-soft); border-radius: var(--r-sm); }
  .top nav.tabs a.on { color: var(--plum); box-shadow: none; background: var(--plum-tint); }
  .top nav.tabs a.add span::before { content: ""; }
  .top nav.tabs svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .top nav.tabs a.add svg { background: var(--plum); color: #fff; border-radius: 50%; padding: 3px; width: 28px; height: 28px; stroke-width: 2.4; }
  body:has(nav.tabs) main { padding-bottom: 96px; }
  table.list.stack tr:first-child { display: none; }
  table.list.stack tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--line); }
  table.list.stack td { border: 0; padding: 4px 14px; }
  table.list.stack td:first-child { grid-column: 1 / -1; padding-top: 12px; font-weight: 700; }
  table.list.stack td:nth-child(2) { padding-bottom: 12px; }
  table.list.log tr:first-child { display: none; }
  table.list.log tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  table.list.log td { display: inline; padding: 0; border: 0; }
  table.list.log td:first-child { display: block; font-weight: 700; margin-bottom: 2px; }
  table.list.log td:nth-child(2)::after { content: " · "; }
  .grid2 { grid-template-columns: 1fr; }
}
/* app.js: stranica se mijenja bez ponovnog ucitavanja; dok odgovor kasni (>150 ms), tanka traka gore */
html.nav-busy, html.nav-busy * { cursor: progress; }
html.nav-busy body::before { content: ""; position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 100; background: linear-gradient(90deg, transparent, var(--plum), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: navbusy 0.9s linear infinite; }
@keyframes navbusy { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } html.nav-busy body::before { animation: none; background: var(--plum); opacity: .5; } }
@media print {
  .top, .noprint, .demo-ribbon { display: none !important; }
  body { background: #fff; }
}
