/* ===================================================================
   QuickKitchen — Dashboard styles
   =================================================================== */
:root {
  --bg:        #0e0f12;
  --bg-2:      #16181d;
  --bg-3:      #1d2027;
  --line:      #2a2e37;
  --text:      #e8eaed;
  --text-2:    #9aa0ab;
  --text-3:    #6b707b;
  --accent:    #f5a623;
  --accent-2:  #42c891;
  --danger:    #e74c3c;
  --radius:    12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- buttons ---------- */
.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  transition: all .15s;
  color: var(--text);
  background: var(--bg-3);
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #1a1300; }
.btn-ghost   { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-3); }
.btn-block   { width: 100%; }
.btn-sm      { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- login ---------- */
.login-view {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, #1a1d24 0%, var(--bg) 60%);
}
.login-box {
  width: 360px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.login-logo { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.login-logo::first-letter { color: var(--accent); }
.login-sub  { color: var(--text-2); font-size: 14px; margin: 4px 0 26px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: var(--accent); }
.login-error { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 10px; }

/* ---------- app shell ---------- */
.app-view { display: flex; height: 100vh; }

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 22px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent); color: #1a1300;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.brand-name { font-weight: 700; font-size: 15px; }
.brand-tenant { font-size: 12px; color: var(--text-2); }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: none;
  color: var(--text-2); font-family: inherit; font-size: 15px; font-weight: 500;
  padding: 11px 12px; border-radius: 10px; cursor: pointer; text-align: left;
  transition: all .12s;
}
.nav-item:hover { background: var(--bg-3); color: var(--text); }
.nav-item.active { background: var(--bg-3); color: var(--text); font-weight: 600; }

.sidebar-footer { border-top: 1px solid var(--line); padding-top: 14px; }
.user-email { font-size: 12px; color: var(--text-3); margin-bottom: 10px; word-break: break-all; }

.main { flex: 1; overflow-y: auto; }
.tab-panel { display: none; padding: 28px 34px; }
.tab-panel.active { display: block; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.panel-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.panel-head-actions { display: flex; align-items: center; gap: 14px; }
.hint { font-size: 13px; color: var(--text-3); }

/* ---------- menu ---------- */
.menu-body { display: flex; flex-direction: column; gap: 26px; }
.cat-block { }
.cat-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--accent); margin-bottom: 12px;
}
.item-row {
  display: grid;
  grid-template-columns: 1fr 130px 110px;
  align-items: center;
  gap: 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 8px;
}
.item-row.unavail { opacity: .55; }
.item-name { font-weight: 600; font-size: 15px; }
.item-name input {
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  color: var(--text); font-family: inherit; font-weight: 600; font-size: 15px;
  padding: 4px 6px; width: 100%;
}
.item-name input:hover { border-color: var(--line); }
.item-name input:focus { border-color: var(--accent); background: var(--bg); outline: none; }
.item-sku { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.price-field { display: flex; align-items: center; gap: 4px; }
.price-field .cur { color: var(--text-2); font-size: 14px; }
.price-field input {
  width: 90px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font-family: inherit; font-size: 15px; padding: 8px 10px; outline: none;
}
.price-field input:focus { border-color: var(--accent); }

/* toggle */
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.toggle input { display: none; }
.toggle .track {
  width: 42px; height: 24px; border-radius: 99px; background: var(--bg-3);
  border: 1px solid var(--line); position: relative; transition: background .15s;
}
.toggle .track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--text-3);
  transition: all .15s;
}
.toggle input:checked + .track { background: var(--accent-2); border-color: var(--accent-2); }
.toggle input:checked + .track::after { left: 20px; background: #fff; }
.toggle .lbl { font-size: 13px; color: var(--text-2); width: 56px; }

/* ---------- orders ---------- */
.orders-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.order-card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.order-card.status-NEW { border-left: 4px solid var(--accent); }
.order-card.status-IN_PROGRESS { border-left: 4px solid #4a90e2; }
.order-card.status-READY { border-left: 4px solid var(--accent-2); }
.order-top { display: flex; justify-content: space-between; align-items: baseline; }
.order-ref { font-size: 18px; font-weight: 800; }
.order-time { font-size: 12px; color: var(--text-3); }
.order-meta { font-size: 12px; color: var(--text-2); }
.order-items { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.oi { font-size: 14px; }
.oi-name { font-weight: 600; }
.oi-mods { font-size: 12px; color: var(--text-2); margin-left: 4px; }
.order-total { font-weight: 700; font-size: 15px; margin-top: 4px; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--bg-3); color: var(--text-2); text-transform: uppercase; letter-spacing: .5px; }

.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.live-dot.on { background: var(--accent-2); box-shadow: 0 0 0 0 rgba(66,200,145,.7); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(66,200,145,.6); }
  70% { box-shadow: 0 0 0 8px rgba(66,200,145,0); }
  100% { box-shadow: 0 0 0 0 rgba(66,200,145,0); }
}

/* ---------- settings ---------- */
.settings-body { max-width: 560px; display: flex; flex-direction: column; gap: 18px; }
.setting-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.setting-card h3 { font-size: 15px; margin-bottom: 14px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.setting-row label { color: var(--text-2); font-size: 14px; }

/* ---------- misc ---------- */
.loading { color: var(--text-3); padding: 40px 0; text-align: center; }
.placeholder { text-align: center; padding: 80px 20px; color: var(--text-2); }
.placeholder-icon { font-size: 56px; margin-bottom: 12px; }
.placeholder h2 { color: var(--text); margin-bottom: 8px; }
.muted { color: var(--text-3); font-size: 13px; }

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  padding: 12px 22px; border-radius: 10px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok  { border-color: var(--accent-2); }
.toast.err { border-color: var(--danger); }
