:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --text: #14213d;
  --muted: #657083;
  --line: #e4e8f0;
  --primary: #f97316;
  --primary-dark: #c2410c;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --blue: #2563eb;
  --shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #fff7ed, #eef6ff); }
.auth-shell { width: min(980px, 100%); display: grid; grid-template-columns: 1fr 440px; gap: 20px; align-items: stretch; }
.auth-brand, .auth-card { background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 32px; }
.auth-brand { display: flex; flex-direction: column; justify-content: center; }
.brand-mark { width: 64px; height: 64px; border-radius: 16px; background: var(--primary); color: white; display: grid; place-items: center; font-weight: 800; font-size: 22px; }
.brand-mark.small { width: 36px; height: 36px; border-radius: 10px; font-size: 14px; }
.auth-brand h1 { font-size: 42px; margin: 20px 0 8px; }
.auth-brand p { color: var(--muted); font-size: 17px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: #111827; color: white; padding: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 22px; }
.nav-list { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 8px; color: #cbd5e1; }
.nav-link.active, .nav-link:hover { background: rgba(249,115,22,.16); color: #fff; }
.material-symbols-rounded { font-size: 20px; vertical-align: middle; }
.main-area { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; background: rgba(245,247,251,.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar h1 { margin: 2px 0 0; font-size: 24px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.hotel-select select, .field, .select, textarea { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: white; color: var(--text); width: 100%; }
.user-pill { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 8px 12px; color: var(--muted); white-space: nowrap; }
.content { padding: 24px; padding-bottom: 88px; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-title { margin: 0; font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.table-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--surface); display: grid; gap: 10px; min-height: 150px; }
.table-card.occupied { border-color: rgba(249,115,22,.4); background: #fff7ed; }
.table-card.available { border-color: rgba(22,163,74,.35); background: #f0fdf4; }
.table-number { font-size: 22px; font-weight: 800; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.badge.green { color: #166534; background: #dcfce7; }
.badge.orange { color: #9a3412; background: #ffedd5; }
.badge.blue { color: #1d4ed8; background: #dbeafe; }
.badge.red { color: #991b1b; background: #fee2e2; }

.btn, .icon-btn { border: 1px solid var(--line); background: white; color: var(--text); border-radius: 8px; padding: 10px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; }
.btn.primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn.danger { background: var(--red); color: white; border-color: var(--red); }
.btn.ghost { background: transparent; }
.btn.small { min-height: 32px; padding: 7px 9px; font-size: 12px; }
.icon-btn { width: 40px; padding: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid var(--line); background: white; }
.alert.error { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.alert.success { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }
.alert.info { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.empty-state { text-align: center; padding: 56px 18px; background: white; border: 1px dashed var(--line); border-radius: 12px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
.data-table { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.data-table th, .data-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { background: var(--surface-2); color: var(--muted); font-size: 12px; text-transform: uppercase; }

.menu-picker { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; align-items: start; }
.menu-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; max-height: 64vh; overflow: auto; padding-right: 4px; }
.menu-item { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 12px; text-align: left; display: grid; gap: 6px; }
.order-line { display: grid; grid-template-columns: 1fr 108px 80px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qty-control { display: flex; align-items: center; gap: 6px; }
.qty-control button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.totals { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 7px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 20px; font-weight: 800; }

.metric { display: grid; gap: 4px; }
.metric strong { font-size: 24px; }
.bar { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--primary); }

.print-area { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 18px; max-width: 420px; }
.mobile-nav { display: none; }

@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions { width: 100%; overflow: auto; }
  .grid.two, .grid.three, .grid.four, .menu-picker { grid-template-columns: 1fr; }
  .content { padding: 16px; padding-bottom: 92px; }
  .mobile-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr); background: white; border-top: 1px solid var(--line); }
  .mobile-nav a { display: grid; place-items: center; gap: 2px; padding: 8px 4px; color: var(--muted); }
  .mobile-nav a.active { color: var(--primary); }
  .mobile-nav small { font-size: 10px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .order-line { grid-template-columns: 1fr; }
}

@media print {
  body { background: white; }
  .sidebar, .topbar, .mobile-nav, .no-print, .actions { display: none !important; }
  .app-shell { display: block; }
  .content { padding: 0; }
  .card, .print-area { border: 0; box-shadow: none; }
}
