@font-face {
  font-family: "Artisan Maker";
  src: url("/font/Artisan%20Maker.otf") format("opentype");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #11100e;
  --panel: #191816;
  --panel-soft: #201f1c;
  --paper: #f4f0e9;
  --muted: #9c9991;
  --muted-dark: #68665f;
  --orange: #fca710;
  --line: rgba(244, 240, 233, .12);
  font-family: "Artisan Maker", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--ink); color: var(--paper); }
body::after { position: fixed; inset: 0; z-index: 20; pointer-events: none; content: ""; opacity: .13; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.23'/%3E%3C/svg%3E"); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.brand-mark { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid rgba(252,167,16,.72); color: var(--paper); font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.brand-mark span { color: var(--orange); }
.brand-light { color: var(--muted); font-weight: 500; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--orange); font-family: "Artisan Maker", sans-serif; font-size: 11px; letter-spacing: .13em; }
.eyebrow-line { display: inline-block; width: 19px; height: 1px; background: var(--orange); }
.button { display: inline-flex; min-height: 47px; align-items: center; justify-content: center; gap: 14px; padding: 0 19px; border: 1px solid transparent; font-size: 12px; font-weight: 700; transition: background .2s, color .2s, border-color .2s; }
.button-primary { background: var(--orange); color: #15120b; }
.button-primary:hover { background: #ffbd3d; }
.button-secondary { border-color: var(--line); background: transparent; color: var(--paper); }
.button-secondary:hover { border-color: var(--orange); }
.button:disabled { cursor: wait; opacity: .6; }
.button-wide { width: 100%; }
.auth-page { display: grid; min-height: 100vh; place-items: center; }
.auth-shell { display: flex; width: min(100%, 440px); min-height: 100vh; flex-direction: column; justify-content: center; padding: 34px 32px; }
.auth-shell > .brand { justify-content: center; }
.auth-card { width: 100%; max-width: 380px; margin: 0 auto; padding: 38px 0; }
.auth-card > .eyebrow { justify-content: center; margin-bottom: 24px; }
.auth-card h1, .welcome-row h1, .barista-heading h1 { margin: 0; font-size: clamp(42px, 5vw, 59px); font-weight: 600; letter-spacing: -.01em; line-height: 1.04; }
.auth-card h1, .auth-description { text-align: center; }
.auth-card h1 span, .barista-heading h1 span { color: var(--orange); }
.auth-description { margin: 16px 0 26px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.role-option { padding: 12px 0; color: var(--muted); font-size: 11px; text-align: center; }
.role-active { border-bottom: 1px solid var(--orange); color: var(--paper); }
.field { display: block; margin-bottom: 15px; color: #c8c4bc; font-size: 10px; font-weight: 600; }
.field input, .manual-entry input { width: 100%; height: 45px; margin-top: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 0; outline: none; background: #171614; color: var(--paper); font-size: 12px; }
.field input:focus, .manual-entry input:focus { border-color: var(--orange); }
.field input::placeholder, .manual-entry input::placeholder { color: #68665f; }
.auth-card form .button { margin-top: 8px; }
.form-message { min-height: 16px; margin: 11px 0 0; color: #ff8e72; font-size: 11px; line-height: 1.5; }
.form-message-success { color: #a7cf87; }
.auth-footer { margin: 16px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.text-button { padding: 0; border: 0; background: none; color: var(--orange); font-size: inherit; font-weight: 600; }
.auth-bottom { display: none; }
.auth-art { position: relative; display: flex; min-height: 100vh; overflow: hidden; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 49%, #393024 0%, #211d17 38%, #151411 76%); }
.art-grain { position: absolute; inset: 0; background: linear-gradient(135deg, transparent 40%, rgba(252,167,16,.045)); }
.art-ring { position: absolute; top: 50%; left: 50%; width: min(57vw, 670px); aspect-ratio: 1; border: 1px solid rgba(244,240,233,.08); border-radius: 50%; transform: translate(-50%,-50%); }
.art-ring-two { width: min(42vw, 495px); border-color: rgba(244,240,233,.07); }
.art-copy { position: absolute; z-index: 2; top: 12%; left: 12%; }
.art-copy > span, .art-caption { color: #a7a093; font-family: "Artisan Maker", sans-serif; font-size: 11px; letter-spacing: .12em; }
.art-copy h2 { margin: 22px 0 12px; font-size: clamp(34px, 4vw, 51px); font-weight: 500; letter-spacing: -.01em; line-height: .98; }
.art-copy p { color: #b7b0a5; font-size: 12px; line-height: 1.7; }
.art-caption { position: absolute; right: 12%; bottom: 11%; }
.coffee-cup { position: relative; width: 248px; height: 245px; margin: 90px 0 0 50px; filter: drop-shadow(0 22px 40px rgba(0,0,0,.4)); }
.cup-body { position: absolute; top: 55px; left: 38px; z-index: 2; display: grid; width: 172px; height: 125px; place-items: center; border-radius: 12px 12px 43px 43px; background: linear-gradient(110deg, #f8f2e7, #d8cbb8); color: #40382f; font-size: 24px; font-weight: 700; }
.cup-body::before { position: absolute; top: -8px; left: -5px; width: 182px; height: 17px; border-radius: 50%; background: #fffaf0; content: ""; }
.cup-handle { position: absolute; top: 75px; right: 8px; width: 58px; height: 60px; border: 12px solid #dfd3c2; border-left: 0; border-radius: 0 40px 40px 0; }
.cup-saucer { position: absolute; bottom: 44px; left: 15px; width: 215px; height: 27px; border-radius: 50%; background: linear-gradient(#e9dfd0,#b8aa96); }
.cup-steam { position: absolute; top: -24px; left: 100px; width: 38px; height: 65px; border-left: 2px solid rgba(244,240,233,.27); border-radius: 50%; transform: rotate(12deg); }
.cup-steam::after { position: absolute; top: 2px; left: 25px; width: 34px; height: 55px; border-left: 2px solid rgba(244,240,233,.2); border-radius: 50%; content: ""; }
.topbar { position: relative; z-index: 25; display: flex; height: 64px; align-items: center; justify-content: space-between; padding: 0 max(22px, calc((100% - 950px) / 2)); border-bottom: 1px solid var(--line); background: var(--ink); }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.user-greeting { color: #c8c4bc; font-size: 11px; }
.logout-button { padding: 7px 0 7px 12px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 10px; }
.logout-button span { margin-left: 5px; color: var(--orange); }
.user-main, .barista-main { width: min(100% - 40px, 950px); margin: 0 auto; padding: 52px 0 38px; }
.welcome-row { display: flex; align-items: center; justify-content: center; margin-bottom: 28px; text-align: center; }
.welcome-row .eyebrow, .barista-heading .eyebrow { justify-content: center; margin-bottom: 17px; }
.welcome-row h1 { font-size: clamp(34px, 5vw, 48px); }
.welcome-row h1 span:not(.orange-dot) { color: var(--orange); }
.orange-dot { color: var(--orange); }
.welcome-row p, .barista-heading p { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.progress-stat { display: flex; align-items: flex-end; gap: 9px; padding-bottom: 5px; }
.progress-stat strong { color: var(--orange); font-size: 38px; font-weight: 500; letter-spacing: -.01em; line-height: .9; }
.progress-stat span { padding-bottom: 3px; color: var(--muted); font-family: "Artisan Maker", sans-serif; font-size: 10px; letter-spacing: .11em; }
.cards-list { display: grid; justify-items: center; gap: 24px; }
.card-entry { width: min(100%, 560px); }
.loyalty-card { position: relative; display: grid; width: 100%; aspect-ratio: 1.586 / 1; overflow: hidden; place-items: center; border: 1px solid rgba(244,240,233,.17); border-radius: 18px; background: linear-gradient(135deg, #25221d, #171614 76%); }
.card-redeemed { border-color: rgba(252,167,16,.45); }
.card-status { position: absolute; z-index: 1; top: 18px; right: 20px; display: inline-flex; align-items: center; gap: 8px; color: #c8c4bc; font-size: 11px; }
.status-mark { position: relative; width: 12px; height: 12px; flex: 0 0 12px; border: 1px solid #9c9991; border-radius: 50%; }
.is-claimed .status-mark { border-color: var(--orange); background: var(--orange); }
.is-claimed .status-mark::after { position: absolute; top: 1px; left: 3px; width: 3px; height: 6px; border: solid var(--ink); border-width: 0 1.5px 1.5px 0; content: ""; transform: rotate(45deg); }
.card-pattern { position: absolute; top: 50%; left: 50%; z-index: 0; display: grid; width: max-content; grid-auto-rows: max-content; gap: 18px; opacity: .12; pointer-events: none; transform: translate(-50%, -50%) rotate(30deg); }
.card-pattern span { display: block; color: rgba(244,240,233,.4); font-size: clamp(32px, 6vw, 46px); letter-spacing: .06em; line-height: 1; white-space: nowrap; }
.card-content { position: relative; z-index: 1; display: grid; width: 100%; justify-items: center; gap: 15px; padding: 38px 18px 14px; }
.card-face-copy { display: grid; gap: 5px; text-align: center; }
.card-face-copy span { color: #c8c4bc; font-size: 14px; letter-spacing: .02em; text-transform: lowercase; }
.card-face-copy strong { font-size: clamp(22px, 5vw, 30px); font-weight: 500; letter-spacing: .01em; }
.slot-grid { display: grid; width: min(86%, 300px); grid-template-columns: repeat(4, 1fr); justify-items: center; gap: 9px 12px; }
.stamp-slot { display: grid; width: 38px; height: 38px; place-items: center; padding: 0; border: 1px solid rgba(244,240,233,.34); border-radius: 50%; background: rgba(17,16,14,.18); transition: background .2s, border-color .2s, transform .2s; }
.stamp-slot:disabled { cursor: default; }
.stamp-slot.slot-filled { border-color: var(--orange); background: var(--orange); }
.stamp-slot.slot-next { border-color: var(--orange); cursor: pointer; }
.stamp-slot.slot-next:hover { background: rgba(252,167,16,.25); transform: scale(1.08); }
.slot-check { width: 8px; height: 13px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.card-action { display: flex; justify-content: center; margin-top: 12px; }
.claim-button { min-height: 40px; padding: 0 18px; border-radius: 6px; font-size: 11px; }
.user-goodbye { margin: 32px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.user-note, .barista-footnote { display: flex; align-items: center; gap: 9px; margin-top: 24px; color: var(--muted); font-size: 10px; }
.note-icon, .barista-footnote span { color: var(--orange); }
.barista-badge { padding: 5px 8px; border: 1px solid rgba(252,167,16,.35); color: var(--orange); font-family: "Artisan Maker", sans-serif; font-size: 10px; letter-spacing: .1em; }
.barista-main { width: min(100% - 40px, 640px); padding-top: 48px; }
.barista-heading { text-align: center; }
.barista-heading h1 { font-size: clamp(38px, 6vw, 56px); }
.barista-heading p { max-width: 490px; margin-right: auto; margin-left: auto; line-height: 1.6; }
.scanner-panel { margin-top: 28px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #171614; }
.scanner-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.scanner-label { color: var(--orange); font-family: "Artisan Maker", sans-serif; font-size: 10px; letter-spacing: .13em; }
.scanner-header h2 { margin: 8px 0 0; font-size: 16px; font-weight: 500; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: #a8a39a; font-family: "Artisan Maker", sans-serif; font-size: 10px; }
.live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px rgba(252,167,16,.55); }
.scanner-viewport { position: relative; display: grid; min-height: 290px; overflow: hidden; place-items: center; background: #0e0d0b; }
.scanner-viewport video { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.scanner-placeholder { position: absolute; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; color: #716e67; font-family: "Artisan Maker", sans-serif; font-size: 10px; letter-spacing: .11em; }
.scan-icon { color: var(--orange); font-size: 44px; line-height: 1; }
.scan-frame { position: absolute; z-index: 2; width: 175px; height: 175px; border: 1px solid rgba(252,167,16,.55); pointer-events: none; }
.scan-frame i { position: absolute; width: 15px; height: 15px; border-color: var(--orange); border-style: solid; }
.scan-frame i:nth-child(1) { top: -1px; left: -1px; border-width: 2px 0 0 2px; }.scan-frame i:nth-child(2) { top: -1px; right: -1px; border-width: 2px 2px 0 0; }.scan-frame i:nth-child(3) { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }.scan-frame i:nth-child(4) { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.scan-line { position: absolute; top: 50%; right: 8px; left: 8px; height: 1px; background: rgba(252,167,16,.58); box-shadow: 0 0 10px rgba(252,167,16,.5); }
.scanner-actions { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.camera-status { color: var(--muted); font-size: 10px; }
.manual-entry { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.manual-entry > span { color: var(--muted); font-family: "Artisan Maker", sans-serif; font-size: 10px; letter-spacing: .12em; }
.manual-entry form { display: flex; gap: 9px; }
.manual-entry input { min-width: 0; flex: 1; margin-top: 10px; }
.manual-entry .button { min-height: 45px; margin-top: 10px; }
.verify-result { display: flex; align-items: center; gap: 13px; margin-top: 17px; padding: 14px; border: 1px solid rgba(252,167,16,.28); background: rgba(252,167,16,.06); }
.result-check { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 50%; background: var(--orange); color: var(--ink); font-weight: 800; }
.verify-result strong { font-size: 12px; }.verify-result p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.barista-footnote { justify-content: center; margin-top: 17px; font-size: 11px; }
.modal { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(0,0,0,.76); backdrop-filter: blur(4px); }
.modal-card { position: relative; z-index: 1; width: min(100%, 360px); padding: 28px; border: 1px solid var(--line); background: #1b1916; text-align: center; }
.modal-close { position: absolute; top: 9px; right: 13px; border: 0; background: transparent; color: var(--muted); font-size: 24px; }
.modal-card .eyebrow { justify-content: center; }
.modal-card h2 { margin: 13px 0 7px; font-size: 25px; letter-spacing: .01em; }
.modal-card > p { margin: 0 auto 17px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.qr-frame { display: grid; width: 212px; height: 212px; margin: 0 auto 12px; place-items: center; background: #fff; }
.qr-frame img { width: 196px; height: 196px; }
.qr-expiry { display: block; margin-bottom: 15px; color: var(--muted); font-family: "Artisan Maker", sans-serif; font-size: 10px; letter-spacing: .13em; }
.toast { position: fixed; z-index: 40; right: 22px; bottom: 22px; max-width: min(90vw, 380px); padding: 13px 17px; border: 1px solid rgba(252,167,16,.35); background: #211e18; color: var(--paper); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; }
.toast-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 840px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-shell { min-height: 100vh; }
  .auth-art { display: none; }
  .auth-card { margin: auto; }
}
@media (max-width: 600px) {
  .auth-shell { padding: 24px 23px; }
  .auth-card { padding: 28px 0; }
  .topbar { height: 62px; padding: 0 18px; }
  .topbar-right { gap: 10px; }
  .user-greeting { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-main, .barista-main { width: min(100% - 30px, 950px); padding-top: 37px; }
  .welcome-row { align-items: center; gap: 15px; }
  .barista-main { padding-top: 34px; }
  .card-status { top: 13px; right: 14px; font-size: 10px; }
  .card-content { gap: 12px; padding: 35px 12px 12px; }
  .slot-grid { width: min(92%, 260px); gap: 7px; }
  .stamp-slot { width: 34px; height: 34px; }
  .loyalty-card { border-radius: 14px; }
  .scanner-panel { padding: 16px; }
  .scanner-viewport { min-height: 250px; }
  .scanner-actions { align-items: flex-start; flex-direction: column; gap: 9px; }
  .manual-entry form { flex-direction: column; gap: 0; }
  .manual-entry .button { width: 100%; }
  .barista-footnote { align-items: flex-start; line-height: 1.5; }
}
