:root {
  --bg: #090b0e;
  --panel: #101318;
  --panel-2: #151920;
  --panel-3: #1a1f27;
  --border: rgba(255,255,255,.08);
  --text: #f5f7fa;
  --muted: #9099a6;
  --accent: #ffb000;
  --accent-2: #ffd166;
  --danger: #ff5d67;
  --success: #52d273;
  --shadow: 0 24px 70px rgba(0,0,0,.42);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(255,176,0,.075), transparent 25%),
    radial-gradient(circle at 80% 0%, rgba(255,255,255,.03), transparent 28%),
    var(--bg);
}

button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  background: linear-gradient(180deg, rgba(21,25,32,.97), rgba(13,16,21,.99));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-login { margin-bottom: 30px; }

.logo-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  font-size: 18px;
  font-weight: 900;
  color: #111;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 10px 24px rgba(255,176,0,.18);
}

.logo-mark.small { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
.brand-name { font-weight: 800; letter-spacing: -.03em; }
.brand-subtitle { color: var(--muted); font-size: 12px; margin-top: 2px; }

.login-copy h1, .section-heading h2, .cart-header h2, .modal-heading h3 {
  margin: 0;
  letter-spacing: -.04em;
}

.login-copy h1 { font-size: 28px; }
.login-copy p { color: var(--muted); line-height: 1.5; margin: 9px 0 23px; }

label {
  display: block;
  font-size: 12px;
  color: #c5cad1;
  margin-bottom: 7px;
  font-weight: 700;
}

.password-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

input {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.035);
  color: var(--text);
  border-radius: 11px;
  padding: 11px 12px;
  outline: none;
  transition: .18s ease;
}

input:focus {
  border-color: rgba(255,176,0,.65);
  box-shadow: 0 0 0 3px rgba(255,176,0,.1);
}

.icon-btn, .ghost-btn, .secondary-btn {
  border: 1px solid var(--border);
  color: #d8dce2;
  background: rgba(255,255,255,.035);
  border-radius: 10px;
  padding: 9px 12px;
}

.primary-btn, .checkout-btn {
  width: 100%;
  border: 0;
  color: #111;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
}

.primary-btn { margin-top: 12px; }
.error-text { min-height: 18px; margin-top: 7px; color: var(--danger); font-size: 12px; }
.login-footer { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); color: #727b87; font-size: 11px; text-align: center; }

.topbar {
  height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(9,11,14,.82);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-actions { display: flex; gap: 8px; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  min-height: calc(100vh - 64px);
}

.menu-panel { padding: 20px 22px; min-width: 0; }

.section-heading, .cart-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.eyebrow { color: var(--accent); font-weight: 800; font-size: 10px; letter-spacing: .13em; }
.section-heading h2, .cart-header h2 { font-size: 24px; margin-top: 3px; }
.search-wrap { width: min(260px, 40vw); }

.category-tabs { display: flex; gap: 7px; margin: 16px 0 12px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.025);
  color: #aeb5bf;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
}
.tab.active {
  background: rgba(255,176,0,.12);
  border-color: rgba(255,176,0,.28);
  color: var(--accent-2);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
}

.menu-card {
  text-align: left;
  min-height: 76px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(24,29,37,.92), rgba(17,21,27,.96));
  border-radius: 13px;
  padding: 10px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .14s ease, border-color .14s ease;
}

.menu-card:hover { transform: translateY(-1px); border-color: rgba(255,176,0,.3); }
.menu-card-name { font-weight: 800; line-height: 1.15; font-size: 12px; }
.menu-card-category { color: var(--muted); font-size: 9px; margin-top: 3px; }
.menu-card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { color: var(--accent-2); font-weight: 800; font-size: 13px; }
.add-chip {
  width: 21px; height: 21px; border-radius: 7px; display: grid; place-items: center;
  background: rgba(255,176,0,.12); color: var(--accent-2); font-weight: 900; font-size: 13px;
}

.cart-panel {
  border-left: 1px solid var(--border);
  background: rgba(13,16,21,.78);
  padding: 20px 17px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
}

.order-badge {
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255,255,255,.03);
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.cart-empty {
  flex: 1;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: var(--muted);
}

.empty-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border); font-size: 22px;
}
.cart-empty h3 { color: #d9dde3; margin: 0 0 5px; font-size: 15px; }
.cart-empty p { margin: 0; font-size: 11px; }

.cart-items { flex: 1; overflow-y: auto; padding: 10px 1px; }

.cart-item {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.cart-item-name { font-weight: 700; font-size: 12px; }
.cart-item-price { color: var(--muted); font-size: 10px; margin-top: 3px; }

.qty-row { display: flex; align-items: center; gap: 5px; }
.qty-btn, .remove-btn {
  width: 25px; height: 25px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255,255,255,.035);
  font-weight: 800;
  padding: 0;
}
.qty-value { min-width: 16px; text-align: center; font-weight: 800; font-size: 11px; }

.meal-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  padding: 7px 8px;
  border-radius: 9px;
  background: rgba(255,176,0,.055);
  border: 1px solid rgba(255,176,0,.12);
}

.meal-copy { font-size: 10px; color: #cbd0d7; }
.meal-copy strong { color: var(--accent-2); }
.meal-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.meal-option {
  border: 0;
  background: rgba(255,255,255,.025);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
}
.meal-option.active { background: var(--accent); color: #111; }

.cart-summary { border-top: 1px solid var(--border); padding-top: 12px; }
.summary-row, .summary-total { display: flex; align-items: center; justify-content: space-between; }
.summary-row { color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.summary-row strong { color: #dfe3e8; }

.discount-box {
  margin: 10px 0 0;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255,255,255,.022);
}

.discount-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.discount-title { font-size: 10px; color: #d6dbe2; font-weight: 800; }
.discount-presets, .custom-discount-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.custom-discount-row { margin-top: 6px; }

.discount-btn {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,.035);
  color: #dce1e7;
  font-weight: 700;
  font-size: 10px;
  padding: 6px 7px;
}
.discount-btn:hover { border-color: rgba(255,176,0,.28); background: rgba(255,176,0,.07); }
.discount-btn span { color: var(--accent-2); }
.discount-btn.active { border-color: rgba(255,176,0,.42); background: rgba(255,176,0,.12); color: var(--accent-2); }
.discount-btn.custom { color: var(--muted); }

.tiny-link { border: 0; background: transparent; color: var(--accent-2); font-size: 9px; font-weight: 800; padding: 0; }
.discount-applied { margin-top: 8px; margin-bottom: 0; }
.discount-applied strong { color: var(--success); }

.summary-total {
  margin: 12px 0;
  padding-top: 11px;
  border-top: 1px solid var(--border);
  font-weight: 800;
}
.summary-total strong { color: var(--accent-2); font-size: 24px; letter-spacing: -.04em; }

.checkout-btn:disabled { opacity: .35; cursor: default; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(9px);
}

.modal-card {
  width: min(400px, 100%);
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(22,27,34,.99), rgba(13,16,21,.99));
  box-shadow: var(--shadow);
}

.modal-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.modal-heading h3 { margin-top: 4px; font-size: 20px; }
.modal-close { font-size: 20px; line-height: 1; padding: 4px 9px; }
.modal-copy { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 12px 0 16px; }
.discount-entry { display: flex; align-items: center; gap: 7px; }
.discount-entry > span { color: var(--muted); font-weight: 800; }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 11px 13px;
  background: #171c23;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 11px;
  font-weight: 700;
  font-size: 12px;
  z-index: 150;
}

@media (min-width: 1450px) {
  .menu-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
}

@media (max-width: 1100px) {
  .menu-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .cart-panel {
    position: relative;
    top: 0;
    height: auto;
    min-height: 420px;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .menu-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 600px) {
  .topbar { padding: 0 12px; }
  .menu-panel { padding: 16px 12px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .search-wrap { width: 100%; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .secondary-btn { display: none; }
  .brand-subtitle { display: none; }
}
