/* Azure Stock: the approved mock-up's look (26–27 Oct 2026). Ivory, ink and gold; Jost for headings and numbers, Inter Tight for text. */
:root {
  --ivory: #F6F3EE; --card: #FFFFFF; --ink: #0E1220; --night: #0B1020; --black: #07090F;
  --grey: #6B6A66; --grey-on-dark: #C8C4BB; --muted-dark: #A9A69E; --line: #E3DED6; --line2: #D6D0C5; --sand: #F1ECE3; --sand2: #F3E7CF;
  --gold: #C9A86A; --gold-text: #7D5F2C; --gold-deep: #5C4520;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  --jost: Jost, 'Futura', 'Century Gothic', system-ui, sans-serif;
  --sans: 'Inter Tight', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ivory); }
body { color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
#app { position: fixed; inset: 0; overflow: hidden; max-width: 560px; margin: 0 auto; background: var(--ivory); }
@media (min-width: 600px) { body { background: #E9E5DE; } #app { box-shadow: 0 0 0 1px var(--line); } }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .15s ease, opacity .15s ease, background-color .2s ease; }
button:active { transform: scale(.97); }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
a { color: var(--gold-text); }
.boot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.boot img { opacity: .9; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .5; } }

/* screens */
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; animation: scrIn .34s cubic-bezier(.2,.7,.2,1) both; }
.scr.still { animation: none; }
.scr.tabs { bottom: calc(76px + var(--safe-bottom)); }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex: 1; min-height: 0; }
.scroll::-webkit-scrollbar { display: none; }
.dark { background: var(--black); color: var(--ivory); }
.night { background: var(--night); color: var(--ivory); }
@keyframes scrIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.pad { padding-left: 24px; padding-right: 24px; }
.top { padding-top: calc(var(--safe-top) + 22px); }

/* type */
.eyebrow { font-family: var(--jost); font-size: 11px; font-weight: 500; letter-spacing: .2em; color: var(--gold-text); text-transform: uppercase; }
.dark .eyebrow, .night .eyebrow { color: var(--gold); }
.h1 { font-family: var(--jost); font-weight: 300; font-size: 34px; line-height: 1.1; letter-spacing: -.01em; margin: 8px 0 0; }
.h2 { font-family: var(--jost); font-weight: 300; font-size: 24px; line-height: 1.15; margin: 8px 0 0; }
.sub { color: var(--grey); font-size: 14px; margin-top: 8px; }
.small { font-size: 12px; color: var(--grey); }
.dark .small, .night .small { color: var(--grey-on-dark); }
.num { font-family: var(--jost); font-variant-numeric: tabular-nums; }

/* buttons: squared, never pills */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; border-radius: 6px; background: var(--ink); color: var(--ivory); font-weight: 600; font-size: 15px; }
.btn.line { background: transparent; color: var(--ink); border: 1px solid var(--line2); height: 50px; }
.btn.gold { background: var(--gold); color: var(--night); }
.btn.light { background: var(--ivory); color: var(--ink); }
.btn.ghost-dark { background: rgba(255,255,255,.1); color: var(--ivory); }
.btn.small { height: 44px; font-size: 14px; width: auto; padding: 0 16px; }
.btn.text { background: none; color: var(--gold-deep); height: 44px; }
.row-btns { display: flex; gap: 10px; }
.row-btns > * { flex: 1; }
.iconbtn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 22px; background: rgba(255,255,255,.08); flex: none; }
.iconbtn.light { background: var(--card); border: 1px solid var(--line); }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.card.night { background: var(--night); color: var(--ivory); border: 0; }
.note { display: flex; gap: 12px; padding: 14px 16px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.note.gold { background: var(--sand2); border: 0; color: #3D2E12; }
.note.gold .small { color: var(--gold-deep); }
.badge { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 4px; background: var(--sand2); color: var(--gold-deep); font-size: 11px; font-weight: 700; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); font-size: 12px; font-weight: 500; color: #3A3934; }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--gold); flex: none; }
.dot.ok { background: #5E8C61; }
.tick { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 12px; background: var(--gold); color: var(--night); flex: none; }
.spin { width: 20px; height: 20px; border-radius: 10px; border: 2px solid var(--line); border-top-color: var(--gold); animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 6px; border-radius: 3px; background: #EFEAE1; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--gold); transition: width .4s cubic-bezier(.2,.8,.2,1); }
.bar.thin { height: 4px; }
.bar.ink > i { background: var(--ink); }

/* lists */
.list > .li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.li .grow { flex: 1; min-width: 0; }
.li .title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .count { font-family: var(--jost); font-size: 19px; text-align: right; min-width: 58px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.li .count small { font-size: 13px; color: var(--grey); }
.stepper { width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--line2); display: flex; align-items: center; justify-content: center; flex: none; }
.stepper.ink { background: var(--ink); color: var(--ivory); border: 0; }
.sect { display: flex; justify-content: space-between; align-items: baseline; margin-top: 20px; }

/* home */
.brandbar { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img.crest { width: 64px; height: 35px; object-fit: contain; }
.brand .wm { height: 13px; width: auto; display: block; }
.brand .lbl { font-family: var(--jost); font-size: 10px; font-weight: 500; letter-spacing: .22em; color: var(--gold-text); margin-top: 4px; }
.hero-tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; width: 100%; height: 156px; padding: 22px; border-radius: 10px; background: var(--night); color: var(--ivory); text-align: left; overflow: hidden; }
.hero-tile .ring { position: absolute; border-radius: 50%; border: 1px solid rgba(201,168,106,.28); }
.hero-tile .ic { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 8px; background: var(--gold); color: var(--night); }
.hero-tile .t { font-family: var(--jost); font-size: 24px; }
.stage { padding: 4px 8px; border-radius: 4px; background: var(--sand); font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--gold-deep); white-space: nowrap; }

/* tab bar */
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: calc(76px + var(--safe-bottom)); padding: 6px 6px var(--safe-bottom); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: rgba(246,243,238,.96); border-top: 1px solid var(--line); z-index: 10; }
.tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--grey); font-size: 11px; font-weight: 600; }
.tabbar button[aria-current="page"] { color: var(--ink); }
.tabbar .count { position: absolute; top: 2px; left: 54%; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: var(--night); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tabbar .count.ink { background: var(--ink); color: var(--ivory); }

/* camera */
.cam { position: relative; overflow: hidden; border-radius: 14px; background: radial-gradient(110% 90% at 50% 45%, #262A35 0%, #0D0F16 75%); }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam .frame { position: absolute; }
.cam .frame span { position: absolute; width: 26px; height: 26px; border: 0 solid var(--gold); }
.cam .frame .a { left: 0; top: 0; border-left-width: 3px; border-top-width: 3px; border-top-left-radius: 7px; }
.cam .frame .b { right: 0; top: 0; border-right-width: 3px; border-top-width: 3px; border-top-right-radius: 7px; }
.cam .frame .c { left: 0; bottom: 0; border-left-width: 3px; border-bottom-width: 3px; border-bottom-left-radius: 7px; }
.cam .frame .d { right: 0; bottom: 0; border-right-width: 3px; border-bottom-width: 3px; border-bottom-right-radius: 7px; }
.cam .sweep { position: absolute; left: 6px; right: 6px; height: 2px; background: var(--gold); box-shadow: 0 0 12px 2px rgba(201,168,106,.6); animation: sweep 2.4s ease-in-out infinite alternate; }
@keyframes sweep { from { top: 12%; } to { top: 86%; } }
.cam .hint { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: 12px; color: var(--grey-on-dark); text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.cam .flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam .flash.go { animation: flash .5s ease-out; }
@keyframes flash { from { opacity: .85; } to { opacity: 0; } }
.cam .msg { position: absolute; inset: 0; z-index: 2; background: rgba(7,9,15,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; color: var(--grey-on-dark); font-size: 14px; }
.pill-hint { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 6px; background: rgba(7,9,15,.72); font-size: 13px; font-weight: 500; color: var(--ivory); }
.shutter { width: 80px; height: 80px; border-radius: 40px; border: 3px solid var(--ivory); display: flex; align-items: center; justify-content: center; }
.shutter i { width: 64px; height: 64px; border-radius: 32px; background: var(--ivory); }
.thumb { position: relative; width: 42px; height: 56px; border-radius: 3px; background: #F4F1EA center/cover no-repeat; box-shadow: 4px 4px 0 rgba(244,241,234,.35); }
.thumb b { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--gold); color: var(--night); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* scan panel */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 8px; background: rgba(255,255,255,.08); }
.seg button { height: 40px; border-radius: 6px; font-weight: 600; font-size: 14px; color: var(--grey-on-dark); }
.seg button[aria-pressed="true"] { background: var(--ivory); color: var(--ink); }
.panel { flex: 1; margin-top: 12px; border-radius: 18px 18px 0 0; background: var(--ivory); color: var(--ink); display: flex; flex-direction: column; min-height: 0; }
.last { padding: 14px 14px 14px 18px; border-radius: 10px; background: var(--night); color: var(--ivory); }
.last .amt { font-family: var(--jost); font-size: 30px; font-weight: 300; color: var(--gold); white-space: nowrap; }
.last.pop { animation: pop .36s cubic-bezier(.2,.8,.25,1.15); }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.reasons button { height: 40px; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); font-size: 13px; font-weight: 600; color: var(--ivory); }
.reasons button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--night); }
.empty { padding: 14px 18px; border-radius: 10px; border: 1px dashed var(--line2); color: var(--grey); font-size: 13px; }
.people { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 6px; background: rgba(255,255,255,.08); font-size: 12px; color: #D9D5CC; white-space: nowrap; }
.people i { width: 18px; height: 18px; border-radius: 9px; border: 2px solid var(--black); margin-left: -6px; display: inline-block; }
.people i:first-child { margin-left: 0; }
.foot { padding: 12px 20px calc(18px + var(--safe-bottom)); border-top: 1px solid var(--line); }

/* sheets */
.backdrop { position: absolute; inset: 0; z-index: 30; background: rgba(7,9,15,.55); animation: fade .25s ease both; width: 100%; border-radius: 0; }
.backdrop:active { transform: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 31; max-height: 92%; overflow-y: auto; padding: 10px 20px calc(24px + var(--safe-bottom)); border-radius: 18px 18px 0 0; background: var(--ivory); color: var(--ink); animation: sheetUp .36s cubic-bezier(.2,.8,.2,1) both; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line2); margin: 0 auto 16px; }
@keyframes sheetUp { from { transform: translateY(48px); opacity: 0; } to { transform: none; opacity: 1; } }
.option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); text-align: left; }
.option[aria-pressed="true"] { border: 2px solid var(--ink); }
.option .radio { width: 20px; height: 20px; border-radius: 10px; border: 1.5px solid #B9B4AA; flex: none; }
.option[aria-pressed="true"] .radio { border: 6px solid var(--ink); }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice { height: 48px; border-radius: 6px; border: 1px solid var(--line2); background: var(--card); font-family: var(--jost); font-size: 18px; }
.choice[aria-pressed="true"] { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.bottle { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 92px; padding-bottom: 10px; border-radius: 6px; border: 1px solid var(--line2); background: var(--card); font-size: 13px; font-weight: 600; }
.bottle .glass { position: relative; width: 22px; height: 46px; border: 1.5px solid var(--grey); border-radius: 5px 5px 4px 4px; overflow: hidden; }
.bottle .glass i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--gold); }

/* forms */
label.f { display: block; font-size: 13px; font-weight: 600; margin-top: 14px; }
.input { display: block; width: 100%; height: 52px; margin-top: 8px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line2); background: var(--card); font-size: 17px; color: var(--ink); }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--grey) 50%), linear-gradient(135deg, var(--grey) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; font-size: 16px; }
.err { margin-top: 10px; color: #8A2D1F; font-size: 13px; font-weight: 500; }
.toast { position: absolute; left: 16px; right: 16px; top: calc(var(--safe-top) + 12px); z-index: 50; padding: 14px 16px; border-radius: 10px; background: var(--night); color: var(--ivory); font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: sheetUp .3s cubic-bezier(.2,.8,.2,1) both; }

/* report table */
.rtable .rh, .rtable .rr { display: grid; grid-template-columns: minmax(0, 1fr) 38px 42px 42px 64px; gap: 6px; align-items: center; }
.rtable .rh { padding-bottom: 8px; border-bottom: 1px solid var(--line2); font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--grey); }
.rtable .rr { min-height: 52px; border-bottom: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; }
.rtable .r { text-align: right; }
.stat { padding: 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.stat .v { font-family: var(--jost); font-size: 26px; font-weight: 300; }
.stat.night { background: var(--night); color: var(--ivory); border: 0; }
.stat.night .v { color: var(--gold); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.cam .iconbtn { z-index: 3; }
.watermark { position: absolute; inset: 0; z-index: 25; pointer-events: none; background-repeat: repeat; background-size: 260px 150px; }
