:root {
  color-scheme: dark;
  --bg: #08080a;
  --panel: rgb(21 21 24 / .92);
  --panel-2: #111114;
  --line: rgb(255 255 255 / .09);
  --text: #f6f5f0;
  --muted: #97969d;
  --gold: #e7bd28;
  --gold-2: #ffd95b;
  --green: #57c98c;
  --red: #f16d76;
  --blue: #77a7ff;
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background:
  radial-gradient(circle at 92% 2%, rgb(231 189 40 / .12), transparent 28rem),
  radial-gradient(circle at 30% 110%, rgb(231 189 40 / .05), transparent 32rem), var(--bg); }
button,input,select,textarea { font: inherit; }
button,a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 9px; color: var(--gold); font-size: 11px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 13px var(--gold); vertical-align: 1px; }
.money { font-variant-numeric: tabular-nums; }
.btn { min-height: 44px; padding: 0 17px; border: 1px solid var(--line); border-radius: 13px; background: rgb(255 255 255 / .035); color: var(--text); font-weight: 690; cursor: pointer; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.btn:hover { transform: translateY(-1px); border-color: rgb(231 189 40 / .35); background: rgb(231 189 40 / .08); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { border-color: #e7bd28; background: linear-gradient(135deg,#f3ce48,#c99306); color: #171306; box-shadow: 0 12px 32px rgb(231 189 40 / .16); }
.btn-primary:hover { background: linear-gradient(135deg,#ffe174,#daa510); }
.btn-danger { color: #ffc5c9; border-color: rgb(241 109 118 / .25); }
.icon-btn { display: grid; width: 44px; height: 44px; place-items: center; padding: 0; }
.field { display: grid; gap: 8px; }
.field label { color: #c7c5cb; font-size: 12px; font-weight: 650; }
.field input,.field select,.field textarea { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: rgb(255 255 255 / .035); color: var(--text); }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus,.field select:focus,.field textarea:focus { border-color: rgb(231 189 40 / .65); box-shadow: 0 0 0 3px rgb(231 189 40 / .08); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.form-grid .full { grid-column: 1/-1; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg,rgb(231 189 40 / .025),transparent 45%),var(--panel); box-shadow: 0 24px 70px rgb(0 0 0 / .18); backdrop-filter: blur(18px); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.card-head h2,.card-head h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.card-body { padding: 22px; }
.toast { position: fixed; right: 22px; top: 22px; z-index: 200; max-width: min(390px,calc(100vw - 32px)); padding: 14px 17px; border: 1px solid var(--line); border-radius: 14px; background: #1b1b1f; box-shadow: 0 24px 70px rgb(0 0 0 / .42); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgb(241 109 118 / .35); color: #ffcbd0; }

/* Login */
.login-shell { min-height: 100svh; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(360px,.95fr); padding: 18px; }
.login-story { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: calc(100svh - 36px); padding: clamp(32px,5vw,76px); border: 1px solid var(--line); border-radius: 30px; background:
  linear-gradient(145deg,rgb(231 189 40 / .13),transparent 44%),
  repeating-linear-gradient(135deg,transparent 0 34px,rgb(255 255 255 / .018) 34px 35px),#111114; }
.login-story::after { content: ''; position: absolute; width: 440px; height: 440px; right: -170px; bottom: -180px; border: 60px solid rgb(231 189 40 / .12); border-radius: 50%; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 790; letter-spacing: -.04em; }
.brand-mark { display: grid; width: 41px; height: 41px; place-items: center; border: 1px solid rgb(231 189 40 / .35); border-radius: 13px; background: rgb(231 189 40 / .12); color: var(--gold-2); }
.login-copy { position: relative; z-index: 1; max-width: 720px; }
.login-copy h1 { max-width: 13ch; margin: 0; font-size: clamp(42px,6.5vw,94px); line-height: .98; letter-spacing: -.07em; }
.login-copy h1 span { color: var(--gold); }
.login-copy p { max-width: 55ch; color: #a9a7ae; font-size: clamp(16px,1.3vw,20px); line-height: 1.65; }
.login-points { display: flex; flex-wrap: wrap; gap: 9px; }
.login-points span { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgb(255 255 255 / .025); color: #c0bec5; font-size: 12px; }
.login-panel { display: grid; place-items: center; padding: 32px; }
.login-box { width: min(450px,100%); }
.login-box h2 { margin: 30px 0 8px; font-size: 34px; letter-spacing: -.05em; }
.login-box > p { margin: 0 0 28px; color: var(--muted); line-height: 1.6; }
.login-box form { display: grid; gap: 16px; }
.login-box .btn { width: 100%; margin-top: 4px; }
.login-foot { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); color: #77767e; font-size: 12px; line-height: 1.6; }

/* App shell */
.app-shell { min-height: 100svh; display: grid; grid-template-columns: 274px minmax(0,1fr); }
.sidebar { position: fixed; inset: 12px auto 12px 12px; z-index: 80; display: flex; width: 250px; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: rgb(14 14 17 / .94); box-shadow: 0 24px 80px rgb(0 0 0 / .38); backdrop-filter: blur(24px); }
.sidebar-brand { height: 86px; display: flex; align-items: center; padding: 0 22px; border-bottom: 1px solid var(--line); }
.nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.nav-label { margin: 18px 12px 8px; color: #68676f; font-size: 10px; font-weight: 760; letter-spacing: .16em; text-transform: uppercase; }
.nav button { position: relative; display: flex; width: 100%; min-height: 45px; align-items: center; gap: 12px; padding: 0 13px; border: 1px solid transparent; border-radius: 14px; background: transparent; color: #96949d; cursor: pointer; text-align: left; transition: .18s ease; }
.nav button:hover { background: rgb(255 255 255 / .035); color: #e6e4e9; }
.nav button.active { border-color: rgb(231 189 40 / .2); background: linear-gradient(90deg,rgb(231 189 40 / .16),rgb(231 189 40 / .025)); color: #fff; }
.nav button.active::before { content: ''; position: absolute; inset-block: 9px; left: -13px; width: 3px; border-radius: 9px; background: var(--gold); box-shadow: 0 0 15px var(--gold); }
.nav-icon { width: 22px; color: #77757f; text-align: center; font-size: 17px; }
.nav button.active .nav-icon { color: var(--gold); }
.sidebar-user { margin: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 17px; background: rgb(255 255 255 / .03); }
.sidebar-user strong,.sidebar-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: 13px; }
.sidebar-user span { margin-top: 3px; color: #77757f; font-size: 11px; }
.content-shell { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 12px; z-index: 60; display: flex; height: 70px; align-items: center; gap: 14px; margin: 12px 14px 0 0; padding: 0 18px; border: 1px solid var(--line); border-radius: 20px; background: rgb(10 10 12 / .78); backdrop-filter: blur(22px); }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title strong,.topbar-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title strong { font-size: 13px; }
.topbar-title span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.mobile-menu { display: none; }
.main { width: min(1510px,100%); margin-inline: auto; padding: 34px 28px 46px 16px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin: 0 0 28px; }
.page-head h1 { margin: 0; font-size: clamp(34px,4.5vw,58px); line-height: 1; letter-spacing: -.065em; }
.page-head p:not(.eyebrow) { max-width: 650px; margin: 12px 0 0; color: var(--muted); line-height: 1.6; }
.page-actions { display: flex; gap: 9px; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.metric { position: relative; overflow: hidden; min-height: 150px; padding: 21px; }
.metric::after { content: ''; position: absolute; width: 90px; height: 90px; right: -40px; top: -45px; border: 25px solid rgb(231 189 40 / .05); border-radius: 50%; }
.metric-label { display: block; color: #8c8b92; font-size: 10px; font-weight: 780; letter-spacing: .11em; text-transform: uppercase; }
.metric strong { display: block; margin-top: 19px; font-size: clamp(27px,3vw,40px); letter-spacing: -.055em; }
.metric small { display: block; margin-top: 8px; color: #79787f; font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(290px,.55fr); gap: 14px; margin-top: 14px; }
.chart { display: flex; height: 210px; align-items: end; gap: 9px; padding-top: 20px; }
.chart-col { flex: 1; min-width: 0; text-align: center; }
.chart-bar-wrap { position: relative; height: 155px; display: flex; align-items: end; justify-content: center; }
.chart-bar { width: min(38px,70%); min-height: 4px; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg,var(--gold-2),#a87700); box-shadow: 0 0 22px rgb(231 189 40 / .12); animation: grow .7s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.chart-col span { display: block; margin-top: 9px; color: #74737a; font-size: 10px; }
@keyframes grow { from { transform: scaleY(0); opacity: .3; } }
.next-list { display: grid; gap: 10px; }
.next-item { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgb(255 255 255 / .022); }
.next-time { color: var(--gold); font-size: 12px; font-weight: 760; }
.next-item strong,.next-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-item strong { font-size: 12px; }
.next-item span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.empty { display: grid; min-height: 180px; place-items: center; color: var(--muted); text-align: center; }
.empty strong { display: block; color: #d5d3d9; }
.empty p { max-width: 38ch; font-size: 13px; line-height: 1.6; }

/* Tables and day agenda */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .field { min-width: 220px; }
.toolbar .spacer { flex: 1; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th,td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: #77767e; background: rgb(255 255 255 / .02); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
td { font-size: 12px; }
tbody tr:hover { background: rgb(231 189 40 / .025); }
.badge { display: inline-flex; align-items: center; min-height: 27px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; color: #aaa8b0; background: rgb(255 255 255 / .025); font-size: 10px; font-weight: 700; }
.badge.green { color: #9ce5bd; border-color: rgb(87 201 140 / .24); background: rgb(87 201 140 / .08); }
.badge.red { color: #ffbbc0; border-color: rgb(241 109 118 / .24); background: rgb(241 109 118 / .08); }
.badge.gold { color: #ffe68a; border-color: rgb(231 189 40 / .25); background: rgb(231 189 40 / .08); }
.row-actions { display: flex; gap: 7px; }
.row-actions .btn { min-height: 34px; padding: 0 10px; border-radius: 10px; font-size: 10px; }
.agenda-list { display: grid; gap: 10px; }
.agenda-item { display: grid; grid-template-columns: 70px 5px minmax(0,1fr) auto; gap: 15px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: rgb(255 255 255 / .02); }
.agenda-hour { color: var(--gold); font-weight: 770; }
.agenda-color { align-self: stretch; border-radius: 99px; background: var(--item-color,var(--gold)); }
.agenda-copy strong,.agenda-copy span { display: block; }
.agenda-copy strong { font-size: 13px; }
.agenda-copy span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.catalog-grid,.inventory-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.catalog-item,.inventory-item { padding: 20px; }
.catalog-item h3,.inventory-item h3 { margin: 0; font-size: 16px; }
.catalog-item p,.inventory-item p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.catalog-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.stock-value { display: block; margin-top: 16px; font-size: 29px; font-weight: 780; letter-spacing: -.05em; }
.stock-low { color: #ffadad; }
.report-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.ranking { display: grid; gap: 8px; }
.rank-row { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rank-row b { color: var(--gold); font-size: 11px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / .68); backdrop-filter: blur(8px); }
.modal { width: min(680px,100%); max-height: min(800px,92vh); overflow-y: auto; border: 1px solid var(--line); border-radius: 24px; background: #151518; box-shadow: 0 30px 100px rgb(0 0 0 / .6); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal form { padding: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

/* Public booking */
.booking-body { background:
  radial-gradient(circle at 50% -15%,rgb(231 189 40 / .16),transparent 35rem),
  repeating-linear-gradient(135deg,transparent 0 42px,rgb(255 255 255 / .012) 42px 43px),var(--bg); }
.booking-shell { width: min(1080px,100%); margin: 0 auto; padding: 28px 18px 60px; }
.booking-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 44px; }
.booking-head small { color: var(--muted); }
.booking-hero { max-width: 760px; margin: 0 auto 32px; text-align: center; }
.booking-hero h1 { margin: 0; font-size: clamp(40px,7vw,76px); line-height: 1; letter-spacing: -.07em; }
.booking-hero h1 span { color: var(--gold); }
.booking-hero p { color: var(--muted); line-height: 1.7; }
.booking-card { max-width: 780px; margin: auto; }
.steps { display: flex; gap: 6px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.step { flex: 1; height: 4px; border-radius: 99px; background: rgb(255 255 255 / .08); }
.step.active { background: var(--gold); box-shadow: 0 0 12px rgb(231 189 40 / .35); }
.choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.choice { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: rgb(255 255 255 / .025); cursor: pointer; text-align: left; }
.choice:hover,.choice.selected { border-color: rgb(231 189 40 / .45); background: rgb(231 189 40 / .08); }
.choice strong,.choice span { display: block; }
.choice span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.slots { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.slot { min-height: 42px; border: 1px solid var(--line); border-radius: 12px; background: rgb(255 255 255 / .025); cursor: pointer; }
.slot.selected { border-color: var(--gold); background: rgb(231 189 40 / .12); color: var(--gold-2); }
.booking-success { padding: 40px 24px; text-align: center; }
.booking-success .success-icon { display: grid; width: 72px; height: 72px; margin: auto; place-items: center; border-radius: 50%; background: rgb(87 201 140 / .12); color: #8ce2b3; font-size: 32px; }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .catalog-grid,.inventory-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .login-shell { display: block; padding: 10px; }
  .login-story { min-height: 330px; padding: 28px; border-radius: 24px; }
  .login-copy h1 { font-size: 46px; }
  .login-copy p,.login-points { display: none; }
  .login-panel { padding: 34px 18px; }
  .app-shell { display: block; }
  .sidebar { inset: 10px auto 10px 10px; width: min(310px,calc(100vw - 20px)); transform: translateX(calc(-100% - 20px)); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 70; background: rgb(0 0 0 / .6); backdrop-filter: blur(4px); }
  .content-shell { display: block; }
  .topbar { top: 8px; height: 62px; margin: 8px; border-radius: 17px; }
  .mobile-menu { display: grid; }
  .main { padding: 28px 14px 36px; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .page-head h1 { font-size: 39px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .metrics,.catalog-grid,.inventory-grid,.report-grid,.form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .metric { min-height: 130px; }
  .agenda-item { grid-template-columns: 52px 4px minmax(0,1fr); }
  .agenda-item > .row-actions { grid-column: 3; flex-wrap: wrap; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar .field { min-width: 0; }
  .toolbar .spacer { display: none; }
  .toolbar .btn { width: 100%; }
  .booking-head { margin-bottom: 34px; }
  .choices { grid-template-columns: 1fr; }
  .slots { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .booking-card .card-body { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
