:root {
  color-scheme: dark;
  --bg: #100f0d;
  --surface: #191714;
  --surface-2: #211e19;
  --line: rgba(255,255,255,.09);
  --text: #f6f1e8;
  --muted: #9f988d;
  --copper: #d28a50;
  --copper-bright: #f0ad70;
  --green: #71b48d;
  --red: #e77867;
  --shadow: 0 24px 70px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; font-family: Inter, "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; }
.ambient { position: fixed; width: 520px; height: 520px; border-radius: 50%; filter: blur(110px); pointer-events: none; opacity: .16; }
.ambient-one { top: -280px; left: -220px; background: #d67d39; }
.ambient-two { right: -300px; bottom: -320px; background: #80613f; }
.brand-row, .brand, .staff-header, .staff-header-actions, .staff-intro, .request-title-row, .request-actions { display: flex; align-items: center; }
.brand-row { justify-content: space-between; }
.brand { gap: 10px; color: var(--text); font-size: 14px; font-weight: 750; letter-spacing: .18em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(240,173,112,.55); border-radius: 50%; color: var(--copper-bright); font-family: Georgia, serif; font-size: 18px; letter-spacing: 0; }
.table-pill, .connection-pill { border: 1px solid var(--line); background: rgba(255,255,255,.035); border-radius: 99px; }
.table-pill { padding: 10px 14px; color: #d6cfc3; font-size: 13px; }
.eyebrow { margin: 0 0 12px; color: var(--copper-bright); font-size: 12px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }

.guest-page { overflow-x: hidden; }
.guest-shell { position: relative; z-index: 1; width: min(100%, 560px); min-height: 100vh; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom)); }
.guest-hero { padding: clamp(58px, 12vh, 110px) 2px 34px; }
.guest-hero h1 { max-width: 430px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 10vw, 64px); font-weight: 400; line-height: .98; letter-spacing: -.035em; }
.guest-lead { max-width: 420px; margin: 22px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.guest-actions { display: grid; gap: 13px; }
.service-button { width: 100%; min-height: 100px; display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 22px; color: var(--text); background: rgba(31,29,25,.86); box-shadow: 0 18px 42px rgba(0,0,0,.18); text-align: left; cursor: pointer; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.service-button:hover { transform: translateY(-2px); border-color: rgba(240,173,112,.35); background: #24201b; }
.service-button:active { transform: scale(.985); }
.service-button:disabled { cursor: wait; opacity: .65; }
.service-button-primary { background: linear-gradient(135deg, #9e5f31, #c77d42); border-color: transparent; }
.service-button-primary:hover { background: linear-gradient(135deg, #aa6838, #d58a4c); }
.service-icon { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.13); border-radius: 16px; background: rgba(0,0,0,.13); }
.service-icon svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service-copy { display: grid; gap: 7px; }
.service-copy strong { font-size: 17px; font-weight: 700; }
.service-copy small { color: rgba(255,255,255,.58); font-size: 13px; }
.service-button-primary .service-copy small { color: rgba(255,255,255,.72); }
.service-arrow { padding-right: 5px; font-size: 24px; opacity: .55; }
.guest-status { display: grid; grid-template-columns: 42px 1fr; gap: 13px; margin-top: 16px; padding: 16px; border: 1px solid rgba(113,180,141,.25); border-radius: 17px; background: rgba(48,93,67,.2); }
.status-check { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #dff6e8; background: #477d5e; font-weight: 800; }
.guest-status strong { display: block; margin: 1px 0 5px; }
.guest-status p { margin: 0; color: #a9b9ae; font-size: 13px; line-height: 1.45; }
.guest-status.error { border-color: rgba(231,120,103,.3); background: rgba(114,44,36,.2); }
.guest-status.error .status-check { color: #fff0ed; background: #944f45; }
.guest-footer { margin-top: 24px; padding: 0 12px; color: #6e6961; font-size: 12px; line-height: 1.5; text-align: center; }

.login-page { display: grid; place-items: center; padding: 24px; }
.login-card { position: relative; z-index: 1; width: min(100%, 430px); padding: 38px; border: 1px solid var(--line); border-radius: 28px; background: rgba(25,23,20,.94); box-shadow: var(--shadow); }
.brand-centered { margin-bottom: 54px; }
.login-card h1 { margin: 0; font-family: Georgia, serif; font-size: 42px; font-weight: 400; }
.login-lead { margin: 12px 0 30px; color: var(--muted); line-height: 1.5; }
.login-form { display: grid; gap: 11px; }
.login-form label { color: #d3cdc4; font-size: 13px; font-weight: 650; }
.password-field { display: flex; border: 1px solid var(--line); border-radius: 14px; background: #100f0d; overflow: hidden; }
.password-field:focus-within { border-color: rgba(240,173,112,.55); box-shadow: 0 0 0 3px rgba(210,138,80,.09); }
.password-field input { min-width: 0; flex: 1; padding: 15px 16px; border: 0; outline: 0; color: var(--text); background: transparent; }
.password-field button { padding: 0 15px; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.login-submit { margin-top: 8px; padding: 15px; border: 0; border-radius: 14px; color: #1b120b; background: var(--copper-bright); font-weight: 800; cursor: pointer; }
.login-submit:disabled { opacity: .6; }
.form-error { margin: 3px 0 0; color: #f59a8b; font-size: 13px; }

.staff-page { min-height: 100vh; background: #0f0e0c; }
.staff-header { position: sticky; z-index: 10; top: 0; justify-content: space-between; min-height: 72px; padding: 0 clamp(18px, 4vw, 52px); border-bottom: 1px solid var(--line); background: rgba(15,14,12,.9); backdrop-filter: blur(18px); }
.staff-header-actions { gap: 10px; }
.connection-pill { display: flex; align-items: center; gap: 8px; padding: 9px 12px; color: var(--muted); font-size: 12px; }
.connection-pill i { width: 7px; height: 7px; border-radius: 50%; background: #bd8458; }
.connection-pill.online i { background: var(--green); box-shadow: 0 0 0 4px rgba(113,180,141,.1); }
.sound-button, .text-button { border: 1px solid var(--line); background: transparent; cursor: pointer; }
.sound-button { min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 11px; color: var(--copper-bright); animation: soundAttention 1.8s ease-in-out infinite; }
.sound-button.active { border-color: rgba(113,180,141,.35); color: #b9e4c9; background: rgba(113,180,141,.1); animation: none; }
.sound-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sound-button span { font-size: 12px; font-weight: 750; }
@keyframes soundAttention { 50% { border-color: rgba(240,173,112,.55); box-shadow: 0 0 0 5px rgba(210,138,80,.08); } }
.text-button { padding: 10px 13px; border-radius: 11px; color: var(--muted); }
.staff-shell { width: min(100% - 36px, 1080px); margin: 0 auto; padding: 52px 0 90px; }
.staff-intro { justify-content: space-between; }
.staff-intro h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(36px, 5vw, 54px); font-weight: 400; letter-spacing: -.025em; }
.queue-counter { display: flex; align-items: baseline; gap: 8px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.queue-counter strong { color: var(--copper-bright); font-size: 26px; }
.queue-counter span { color: var(--muted); font-size: 13px; }
.staff-tabs { display: flex; gap: 4px; width: max-content; margin: 38px 0 18px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.staff-tab { padding: 10px 17px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; }
.staff-tab.active { color: var(--text); background: #302b24; }
.request-list { display: grid; gap: 10px; }
.request-card { display: grid; grid-template-columns: 98px 1fr auto; align-items: center; gap: 22px; min-height: 112px; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--copper); border-radius: 18px; background: var(--surface); box-shadow: 0 10px 30px rgba(0,0,0,.14); }
.request-card.new { animation: requestPulse 1.4s ease-in-out infinite; }
.request-card.accepted { border-left-color: var(--green); opacity: .88; }
.request-card.done { border-left-color: #53504a; opacity: .62; }
.request-card.is-new { animation: cardIn .4s ease both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(-8px); } }
@keyframes requestPulse { 50% { border-color: rgba(240,173,112,.55); box-shadow: 0 0 0 5px rgba(210,138,80,.07), 0 14px 40px rgba(0,0,0,.28); } }
.request-number { display: grid; place-items: center; align-content: center; height: 76px; border-radius: 14px; background: #27231e; }
.request-number span { color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.request-number strong { font-family: Georgia, serif; font-size: 34px; font-weight: 400; }
.request-title-row { gap: 10px; }
.request-details h2 { margin: 0; font-size: 17px; }
.request-time { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.request-badge { padding: 5px 8px; border-radius: 99px; color: #e9b688; background: rgba(210,138,80,.12); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.request-card.accepted .request-badge { color: #a8d7ba; background: rgba(113,180,141,.12); }
.request-card.done .request-badge { color: #a5a19a; background: rgba(255,255,255,.06); }
.request-actions { gap: 8px; }
.request-actions button { min-width: 105px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 11px; background: transparent; cursor: pointer; }
.request-accept { color: #d6d0c7; }
.request-done { color: #17110c; border-color: transparent !important; background: var(--copper-bright) !important; font-weight: 750; }
.request-card.accepted .request-accept, .request-card.done .request-actions { display: none; }
.empty-state { padding: 78px 20px; border: 1px dashed var(--line); border-radius: 20px; color: var(--muted); text-align: center; }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 17px; border-radius: 50%; color: #a8d7ba; background: rgba(113,180,141,.1); font-size: 24px; }
.empty-state h2 { margin: 0; color: var(--text); font-size: 18px; }
.empty-state p { margin: 8px 0 0; font-size: 14px; }
.toast { position: fixed; z-index: 30; right: 22px; bottom: 22px; max-width: 360px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 13px; background: #29251f; box-shadow: var(--shadow); }
.urgent-alert { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(7,6,5,.82); backdrop-filter: blur(8px); }
.urgent-alert::before { content: ""; position: absolute; inset: 0; border: 8px solid rgba(240,173,112,.7); pointer-events: none; animation: urgentFrame .9s ease-in-out infinite; }
.urgent-alert-panel { position: relative; width: min(100%, 560px); padding: clamp(28px, 6vw, 54px); border: 2px solid var(--copper-bright); border-radius: 28px; background: linear-gradient(145deg, #2b2118, #171411); box-shadow: 0 35px 110px rgba(0,0,0,.72), 0 0 70px rgba(210,138,80,.16); text-align: center; }
.urgent-eyebrow { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0 0 20px; color: var(--copper-bright); font-size: 13px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.urgent-eyebrow span { width: 10px; height: 10px; border-radius: 50%; background: #ff765f; box-shadow: 0 0 0 7px rgba(255,118,95,.12); animation: urgentDot .7s ease-in-out infinite; }
.urgent-table { color: #d4cbc0; font-size: clamp(22px, 4vw, 30px); }
.urgent-table strong { display: block; margin-top: -4px; font-family: Georgia, serif; font-size: clamp(92px, 22vw, 150px); font-weight: 400; line-height: 1; }
.urgent-alert h2 { margin: 15px 0 10px; font-size: clamp(25px, 5vw, 38px); }
.urgent-hint, .urgent-remaining { color: var(--muted); line-height: 1.5; }
.urgent-remaining { margin: 8px 0 0; color: #e8b88f; font-weight: 700; }
.urgent-actions { display: flex; gap: 10px; margin-top: 28px; }
.urgent-actions button { flex: 1; min-height: 54px; padding: 12px 16px; border-radius: 14px; font-weight: 800; cursor: pointer; }
.urgent-sound { border: 1px solid var(--line); color: var(--copper-bright); background: transparent; }
.urgent-accept { border: 0; color: #1d130c; background: var(--copper-bright); }
@keyframes urgentFrame { 50% { border-color: rgba(255,118,95,.9); box-shadow: inset 0 0 50px rgba(255,118,95,.12); } }
@keyframes urgentDot { 50% { opacity: .35; transform: scale(.75); } }

@media (max-width: 720px) {
  .connection-pill span { display: none; }
  .staff-header { padding: 0 14px; }
  .staff-header .brand > span:last-child { display: none; }
  .sound-button span { display: none; }
  .sound-button { width: 40px; justify-content: center; padding: 0; }
  .staff-shell { width: min(100% - 24px, 1080px); padding-top: 32px; }
  .staff-intro { align-items: flex-end; }
  .queue-counter { padding: 12px; }
  .queue-counter span { display: none; }
  .request-card { grid-template-columns: 72px 1fr; gap: 14px; padding: 13px; }
  .request-number { height: 68px; }
  .request-actions { grid-column: 1 / -1; }
  .request-actions button { flex: 1; }
  .urgent-actions { flex-direction: column-reverse; }
}

@media (max-width: 420px) {
  .guest-shell { padding-left: 16px; padding-right: 16px; }
  .guest-hero { padding-top: 54px; }
  .service-button { grid-template-columns: 52px 1fr; gap: 13px; padding: 15px; }
  .service-icon { width: 52px; height: 52px; }
  .service-arrow { display: none; }
  .login-card { padding: 28px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
