/* CaféOS — Dark Professional UI v1.1 */
:root {
  --bg-base:      #0f1117;
  --bg-surface:   #161b26;
  --bg-card:      #1c2333;
  --bg-elevated:  #212840;
  --bg-hover:     #252d42;
  --border:       #2a3347;
  --border-light: #323d52;
  --text-primary:   #f0f2f8;
  --text-secondary: #8b95b0;
  --text-muted:     #5a6480;
  --accent:       #f97316;
  --accent-light: #ff9a4d;
  --accent-dark:  #e05b02;
  --accent-glow:  rgba(249,115,22,0.15);
  --green:     #22c55e;  --green-bg:  rgba(34,197,94,0.12);
  --red:       #ef4444;  --red-bg:    rgba(239,68,68,0.12);
  --yellow:    #f59e0b;  --yellow-bg: rgba(245,158,11,0.12);
  --blue:      #3b82f6;  --blue-bg:   rgba(59,130,246,0.12);
  --purple:    #a855f7;  --purple-bg: rgba(168,85,247,0.12);
  --cyan:      #06b6d4;  --cyan-bg:   rgba(6,182,212,0.12);
  --sidebar-w: 220px;
  --topbar-h:  56px;
  --radius:    10px;
  --radius-lg: 14px;
  --shadow:    0 4px 24px rgba(0,0,0,0.35);
  --transition: 0.18s cubic-bezier(0.4,0,0.2,1);
  --font-main: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body { font-family: var(--font-main); background: var(--bg-base); color: var(--text-primary); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ===== APP LAYOUT ===== */
.app-body {
  display: flex;
  min-height: 100vh;
  overflow-y: auto;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  max-width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform var(--transition);
  overflow: hidden;
}
.sidebar-header {
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--topbar-h);
  flex-shrink: 0;
}
.logo-wrap { display: flex; align-items: center; gap: 8px; overflow: hidden; }
.logo-icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.logo-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; white-space: nowrap; }
.logo-biz  { font-size: 0.68rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.sidebar-close { display: none; background: none; border: none; color: var(--text-muted); font-size: 1rem; padding: 4px 8px; border-radius: 6px; flex-shrink: 0; }

.sidebar-nav {
  flex: 1;
  padding: 8px 6px;
  overflow-y: auto;
  overflow-x: hidden;
}
.nav-section-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 12px 8px 4px;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.84rem;
  transition: all var(--transition);
  margin-bottom: 1px;
  border: 1px solid transparent;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item i { width: 16px; text-align: center; font-size: 0.88rem; flex-shrink: 0; }
.nav-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent-glow); color: var(--accent); border-color: rgba(249,115,22,0.2); }
.nav-item .badge { background: var(--accent); color: #fff; font-size: 0.6rem; font-weight: 700; padding: 1px 5px; border-radius: 8px; flex-shrink: 0; }

.sidebar-footer {
  padding: 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.user-chip { display: flex; align-items: center; gap: 8px; padding: 7px; border-radius: 8px; background: var(--bg-card); min-width: 0; }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 0.78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.65rem; color: var(--text-muted); text-transform: capitalize; }
.logout-btn { color: var(--text-muted); padding: 4px; border-radius: 6px; flex-shrink: 0; }
.logout-btn:hover { color: var(--red); }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 199; }

/* ===== MAIN CONTENT ===== */
.main-content { overflow-y: auto !important;
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  width: calc(100% - var(--sidebar-w));
}

.top-bar {
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}
.menu-toggle { display: none; background: none; border: none; color: var(--text-secondary); font-size: 1.1rem; padding: 6px; border-radius: 7px; }
.top-bar-title { font-size: 0.95rem; font-weight: 600; flex: 1; }
.top-bar-actions { display: flex; align-items: center; gap: 8px; }
.trial-badge { background: var(--yellow-bg); color: var(--yellow); padding: 3px 9px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; border: 1px solid rgba(245,158,11,0.25); white-space: nowrap; }
.notif-bell { position: relative; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 7px; cursor: pointer; color: var(--text-secondary); }
.notif-bell:hover { background: var(--bg-hover); color: var(--text-primary); }
.notif-dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; background: var(--red); border-radius: 50%; border: 2px solid var(--bg-surface); }

.page-content { padding: 16px; flex: 1; overflow-y: auto; }

/* ===== CARDS ===== */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-title { font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.card-sm { padding: 12px 14px; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }

/* ===== STAT GRID ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; align-items: center; gap: 12px; transition: all var(--transition); }
.stat-card:hover { border-color: var(--border-light); transform: translateY(-1px); }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.stat-icon.green  { background: var(--green-bg);   color: var(--green); }
.stat-icon.orange { background: var(--accent-glow); color: var(--accent); }
.stat-icon.blue   { background: var(--blue-bg);    color: var(--blue); }
.stat-icon.red    { background: var(--red-bg);     color: var(--red); }
.stat-icon.purple { background: var(--purple-bg);  color: var(--purple); }
.stat-icon.yellow { background: var(--yellow-bg);  color: var(--yellow); }
.stat-icon.cyan   { background: var(--cyan-bg);    color: var(--cyan); }
.stat-info .stat-value  { font-size: 1.4rem; font-weight: 700; line-height: 1.2; }
.stat-info .stat-label  { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.stat-info .stat-change { font-size: 0.7rem; margin-top: 3px; }
.stat-change.up   { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 7px; font-weight: 500; font-size: 0.82rem; border: none; cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #16a34a; }
.btn-danger  { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--yellow); color: #000; }
.btn-info    { background: var(--blue); color: #fff; }
.btn-ghost   { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-light); }
.btn-sm  { padding: 4px 10px; font-size: 0.76rem; }
.btn-lg  { padding: 11px 22px; font-size: 0.92rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 14px; }
.form-label { display: block; margin-bottom: 5px; font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); }
.form-control { width: 100%; background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-primary); padding: 8px 11px; border-radius: 7px; font-size: 0.85rem; transition: border-color var(--transition); outline: none; }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%235a6480' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
textarea.form-control { resize: vertical; min-height: 72px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg-elevated); }
th { padding: 10px 12px; text-align: left; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); white-space: nowrap; }
td { padding: 10px 12px; border-top: 1px solid var(--border); font-size: 0.83rem; }
tbody tr:hover { background: var(--bg-hover); }
.table-actions { display: flex; gap: 5px; }

/* ===== BADGES ===== */
.badge-pill { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; }
.badge-green  { background: var(--green-bg);   color: var(--green); }
.badge-red    { background: var(--red-bg);     color: var(--red); }
.badge-yellow { background: var(--yellow-bg);  color: var(--yellow); }
.badge-blue   { background: var(--blue-bg);    color: var(--blue); }
.badge-purple { background: var(--purple-bg);  color: var(--purple); }
.badge-orange { background: var(--accent-glow);color: var(--accent); }
.badge-gray   { background: rgba(255,255,255,0.07); color: var(--text-muted); }
.badge-cyan   { background: var(--cyan-bg);    color: var(--cyan); }

/* ===== ALERTS ===== */
.alert { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 0.84rem; }
.alert-danger  { background: var(--red-bg);    border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }
.alert-success { background: var(--green-bg);  border: 1px solid rgba(34,197,94,0.3);  color: #86efac; }
.alert-warning { background: var(--yellow-bg); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }
.alert-info    { background: var(--blue-bg);   border: 1px solid rgba(59,130,246,0.3); color: #93c5fd; }

/* ===== MODALS ===== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.72); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(4px); animation: fadeIn 0.15s ease; }
.modal { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-lg); width: 100%; max-width: 540px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.5); animation: slideUp 0.2s ease; }
.modal-sm { max-width: 360px; }
.modal-lg { max-width: 780px; }
.modal-xl { max-width: 1060px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-title { font-size: 0.95rem; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 0.95rem; padding: 4px 7px; border-radius: 5px; }
.modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }
.modal-body { padding: 18px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0; }

/* ===== TOAST ===== */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 7px; }
.toast { background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: 9px; padding: 11px 14px; display: flex; align-items: center; gap: 9px; min-width: 260px; max-width: 360px; box-shadow: var(--shadow); animation: slideInRight 0.25s ease; font-size: 0.83rem; }
.toast.toast-success { border-left: 3px solid var(--green); }
.toast.toast-error   { border-left: 3px solid var(--red); }
.toast.toast-warning { border-left: 3px solid var(--yellow); }
.toast.toast-info    { border-left: 3px solid var(--blue); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast-text { flex: 1; }
.toast-close { color: var(--text-muted); background: none; border: none; padding: 2px; cursor: pointer; }

/* ===== POS LAYOUT ===== */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  height: calc(100vh - var(--topbar-h));
  overflow: hidden;
  margin: -16px;
}
.pos-menu { display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid var(--border); background: var(--bg-base); }
.pos-cart { display: flex; flex-direction: column; background: var(--bg-surface); overflow: hidden; }

.pos-search-bar { padding: 10px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.pos-search { display: flex; align-items: center; gap: 8px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 7px; padding: 0 10px; }
.pos-search input { flex: 1; background: none; border: none; color: var(--text-primary); padding: 8px 0; outline: none; font-size: 0.85rem; }
.pos-search i { color: var(--text-muted); font-size: 0.85rem; }

.category-tabs { display: flex; gap: 5px; padding: 8px 10px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; flex-shrink: 0; }
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab { padding: 5px 12px; border-radius: 20px; font-size: 0.76rem; font-weight: 500; cursor: pointer; white-space: nowrap; background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-secondary); transition: all var(--transition); flex-shrink: 0; }
.cat-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.cat-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; padding: 10px; overflow-y: auto; flex: 1; align-content: start; }
.menu-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; cursor: pointer; transition: all var(--transition); position: relative; user-select: none; }
.menu-card:hover { border-color: var(--accent); background: var(--bg-hover); transform: translateY(-1px); }
.menu-card:active { transform: scale(0.95); }
.menu-card.unavailable { opacity: 0.4; pointer-events: none; }
.menu-card-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 5px; margin-bottom: 7px; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.menu-card-name { font-size: 0.78rem; font-weight: 500; line-height: 1.3; margin-bottom: 4px; }
.menu-card-price { font-size: 0.86rem; font-weight: 700; color: var(--accent); }
.veg-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 1.5px solid; flex-shrink: 0; }
.veg-dot.veg     { background: var(--green);  border-color: var(--green); }
.veg-dot.non-veg { background: var(--red);    border-color: var(--red); }
.veg-dot.egg     { background: var(--yellow); border-color: var(--yellow); }
.veg-dot.vegan   { background: #86efac;       border-color: #86efac; }
.menu-card-meta { display: flex; align-items: center; gap: 5px; margin-top: 3px; }

/* Cart */
.cart-header { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cart-header h3 { flex: 1; font-size: 0.9rem; font-weight: 600; }
.cart-table-info { display: flex; align-items: center; gap: 5px; font-size: 0.75rem; color: var(--text-muted); background: var(--bg-card); padding: 3px 8px; border-radius: 5px; }
.cart-items { flex: 1; overflow-y: auto; padding: 6px 8px; }
.cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 180px; gap: 7px; color: var(--text-muted); }
.cart-empty i { font-size: 2.2rem; opacity: 0.25; }
.cart-item { display: flex; align-items: flex-start; gap: 7px; padding: 8px 6px; border-radius: 7px; border-bottom: 1px solid var(--border); }
.cart-item:hover { background: var(--bg-hover); }
.cart-item-name { flex: 1; font-size: 0.8rem; font-weight: 500; }
.cart-item-variant { font-size: 0.7rem; color: var(--text-muted); }
.cart-item-price { font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.qty-control { display: flex; align-items: center; gap: 5px; }
.qty-btn { width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-primary); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.88rem; transition: all var(--transition); }
.qty-btn:hover { background: var(--accent); border-color: var(--accent); }
.qty-val { min-width: 20px; text-align: center; font-weight: 600; font-size: 0.85rem; }
.cart-item-del { color: var(--text-muted); background: none; border: none; padding: 3px; border-radius: 4px; cursor: pointer; }
.cart-item-del:hover { color: var(--red); background: var(--red-bg); }
.cart-totals { padding: 10px 14px; border-top: 1px solid var(--border); flex-shrink: 0; }
.cart-total-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 0.8rem; color: var(--text-secondary); }
.cart-total-row.grand { font-size: 1rem; font-weight: 700; color: var(--text-primary); padding-top: 7px; border-top: 1px solid var(--border); margin-top: 3px; }
.cart-total-row.discount { color: var(--green); }
.cart-actions { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 7px; flex-shrink: 0; }
.cart-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.btn-pay { background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: white; justify-content: center; font-size: 0.95rem; font-weight: 600; padding: 11px; border-radius: 9px; border: none; cursor: pointer; transition: all var(--transition); width: 100%; display: flex; align-items: center; gap: 8px; }
.btn-pay:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(249,115,22,0.4); }

/* Table grid */
.table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(75px, 1fr)); gap: 7px; padding: 10px; }
.table-btn { aspect-ratio: 1; border-radius: 9px; border: 2px solid var(--border); background: var(--bg-card); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 0.73rem; font-weight: 600; transition: all var(--transition); }
.table-btn.occupied { border-color: var(--accent); background: var(--accent-glow); color: var(--accent); }
.table-btn.reserved { border-color: var(--blue); background: var(--blue-bg); color: var(--blue); }
.table-btn.cleaning { border-color: var(--yellow); background: var(--yellow-bg); color: var(--yellow); }
.table-btn:hover { transform: scale(1.05); }
.table-btn i { font-size: 1.1rem; }

/* ===== KDS ===== */
.kds-layout { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.kds-ticket { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.kds-ticket-header { padding: 9px 12px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--border); }
.kds-ticket.urgent .kds-ticket-header { background: var(--red-bg); }
.kds-ticket.normal .kds-ticket-header { background: var(--yellow-bg); }
.kds-ticket.new    .kds-ticket-header { background: var(--accent-glow); }
.kds-order-num { font-weight: 700; font-size: 0.92rem; }
.kds-table { font-size: 0.75rem; color: var(--text-muted); }
.kds-time { font-size: 0.72rem; font-weight: 600; font-family: var(--font-mono); }
.kds-items { padding: 9px 12px; }
.kds-item { display: flex; align-items: center; gap: 7px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.kds-item:last-child { border: none; }
.kds-item-qty { font-size: 0.95rem; font-weight: 700; color: var(--accent); min-width: 26px; }
.kds-item-name { flex: 1; font-size: 0.82rem; }
.kds-item-done { background: none; border: 1px solid var(--border); color: var(--text-muted); padding: 2px 7px; border-radius: 5px; font-size: 0.72rem; cursor: pointer; }
.kds-item-done:hover { background: var(--green); border-color: var(--green); color: white; }
.kds-item.done .kds-item-name { text-decoration: line-through; color: var(--text-muted); }
.kds-footer { padding: 8px 12px; border-top: 1px solid var(--border); display: flex; gap: 5px; }

/* ===== DASHBOARD ===== */
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.table-floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.floor-table { aspect-ratio: 1; border-radius: 10px; border: 2px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; transition: all var(--transition); font-size: 0.75rem; font-weight: 600; }
.floor-table.available { background: var(--bg-card); color: var(--text-muted); }
.floor-table.occupied  { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }
.floor-table.reserved  { background: var(--blue-bg); border-color: var(--blue); color: var(--blue); }
.floor-table i { font-size: 1.3rem; }

/* ===== UTILS ===== */
.d-flex { display: flex; } .align-center { align-items: center; } .justify-between { justify-content: space-between; } .justify-center { justify-content: center; }
.gap-1{gap:4px;} .gap-2{gap:8px;} .gap-3{gap:12px;} .gap-4{gap:16px;}
.mt-1{margin-top:4px;} .mt-2{margin-top:8px;} .mt-3{margin-top:12px;} .mt-4{margin-top:16px;}
.mb-1{margin-bottom:4px;} .mb-2{margin-bottom:8px;} .mb-3{margin-bottom:12px;}
.p-4{padding:16px;} .text-center{text-align:center;} .text-right{text-align:right;}
.text-muted{color:var(--text-muted);font-size:0.82rem;} .text-success{color:var(--green);} .text-danger{color:var(--red);} .text-warning{color:var(--yellow);} .text-info{color:var(--blue);}
.fw-bold{font-weight:700;} .fs-sm{font-size:0.76rem;}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;}
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;}

/* ===== LANDING PAGE ===== */
.landing { background: var(--bg-base); min-height: 100vh; }
.landing-nav { position: sticky; top: 0; z-index: 100; background: rgba(15,17,23,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 0 5%; display: flex; align-items: center; height: 60px; gap: 20px; }
.landing-nav .brand { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin-right: auto; }
.landing-nav a { color: var(--text-secondary); font-size: 0.86rem; font-weight: 500; transition: color var(--transition); }
.landing-nav a:hover { color: var(--text-primary); }
.hero { padding: 70px 5% 70px; text-align: center; background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(249,115,22,0.1) 0%, transparent 70%); }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-glow); border: 1px solid rgba(249,115,22,0.3); color: var(--accent); padding: 4px 12px; border-radius: 20px; font-size: 0.76rem; font-weight: 600; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 16px; }
.hero h1 span { background: linear-gradient(135deg, var(--accent), var(--accent-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 32px; line-height: 1.7; }
.hero-ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary { background: var(--accent); color: white; padding: 13px 28px; font-size: 0.95rem; font-weight: 600; border-radius: 9px; border: none; cursor: pointer; transition: all var(--transition); display: inline-flex; align-items: center; gap: 6px; }
.btn-hero-primary:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(249,115,22,0.4); }
.btn-hero-ghost { background: transparent; color: var(--text-primary); padding: 13px 28px; font-size: 0.95rem; font-weight: 500; border-radius: 9px; border: 1px solid var(--border-light); cursor: pointer; transition: all var(--transition); display: inline-flex; align-items: center; gap: 6px; }
.btn-hero-ghost:hover { background: var(--bg-card); }
.features-section { padding: 70px 5%; }
.section-header { text-align: center; margin-bottom: 44px; }
.section-header h2 { font-size: 1.9rem; font-weight: 700; margin-bottom: 10px; }
.section-header p { color: var(--text-secondary); font-size: 0.95rem; max-width: 520px; margin: 0 auto; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.feature-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; transition: all var(--transition); }
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(249,115,22,0.1); }
.feature-card .icon { font-size: 1.8rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; }
.feature-badge { display: inline-block; background: var(--accent-glow); color: var(--accent); font-size: 0.6rem; font-weight: 700; padding: 1px 6px; border-radius: 3px; margin-left: 4px; vertical-align: middle; }
.pricing-section { padding: 70px 5%; background: var(--bg-surface); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 900px; margin: 0 auto; }
.pricing-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 26px; text-align: center; transition: all var(--transition); position: relative; overflow: hidden; }
.pricing-card.popular { border-color: var(--accent); }
.pricing-card.popular::before { content: 'POPULAR'; position: absolute; top: 12px; right: -24px; background: var(--accent); color: white; font-size: 0.58rem; font-weight: 700; padding: 3px 30px; transform: rotate(45deg); letter-spacing: 0.05em; }
.pricing-card:hover { transform: translateY(-3px); box-shadow: 0 10px 35px rgba(0,0,0,0.3); }
.pricing-plan { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 6px; }
.pricing-price { font-size: 2.5rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.pricing-price sup { font-size: 1.1rem; font-weight: 600; vertical-align: top; margin-top: 5px; display: inline-block; }
.pricing-price sub { font-size: 0.85rem; font-weight: 400; color: var(--text-muted); }
.pricing-desc { font-size: 0.78rem; color: var(--text-muted); margin: 8px 0 18px; }
.pricing-features { text-align: left; margin-bottom: 20px; }
.pricing-feature { display: flex; align-items: center; gap: 7px; padding: 5px 0; font-size: 0.8rem; border-bottom: 1px solid var(--border); }
.pricing-feature:last-child { border: none; }
.testimonials { padding: 70px 5%; }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.testimonial-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.testimonial-stars { color: var(--yellow); margin-bottom: 10px; font-size: 0.85rem; }
.testimonial-text { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 14px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 9px; }
.testimonial-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.testimonial-name { font-size: 0.82rem; font-weight: 600; }
.testimonial-biz  { font-size: 0.72rem; color: var(--text-muted); }
.compare-table { max-width: 860px; margin: 0 auto; overflow-x: auto; }
.compare-table .check { color: var(--green); }
.compare-table .cross { color: var(--red); opacity: 0.5; }
.compare-table .highlight { background: rgba(249,115,22,0.04) !important; }
.compare-table thead th { background: var(--bg-elevated); }
.compare-table .us { color: var(--accent); font-weight: 700; }
.footer-landing { padding: 36px 5% 20px; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); font-size: 0.8rem; }

/* ===== AUTH ===== */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(249,115,22,0.07) 0%, transparent 70%); }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; width: 100%; max-width: 420px; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo .icon { font-size: 2.8rem; }
.auth-logo h1 { font-size: 1.5rem; font-weight: 800; margin-top: 6px; }
.auth-logo p { color: var(--text-muted); font-size: 0.82rem; margin-top: 4px; }
.auth-footer { text-align: center; margin-top: 18px; font-size: 0.8rem; color: var(--text-muted); }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--text-muted); font-size: 0.78rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ===== TOGGLE SWITCH ===== */
.toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.toggle-switch input { display: none; }
.toggle-slider { position: absolute; inset: 0; background: var(--border-light); border-radius: 20px; cursor: pointer; transition: 0.2s; }
.toggle-slider::before { content: ''; position: absolute; width: 14px; height: 14px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.2s; }
.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }

/* ===== MISC ===== */
.confirm-icon { font-size: 2.8rem; color: var(--yellow); margin-bottom: 10px; }
.offline-bar { position: fixed; top: 0; left: 0; right: 0; background: var(--yellow); color: #000; text-align: center; padding: 5px; font-size: 0.8rem; font-weight: 600; z-index: 9999; display: flex; align-items: center; justify-content: center; gap: 7px; }
.pulse-anim { animation: pulse 2s infinite; }
.spin { animation: spin 1s linear infinite; display: inline-block; }
.fade-in { animation: fadeIn 0.3s ease; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn      { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp     { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight{ from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse       { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin        { to { transform: rotate(360deg); } }
@keyframes blink       { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,0.5); }
  .sidebar-overlay.visible { display: block; }
  .sidebar-close { display: flex; align-items: center; }
  .main-content { overflow-y: auto !important; margin-left: 0; width: 100%; }
  .menu-toggle { display: flex; }
  .pos-layout { grid-template-columns: 1fr; height: auto; margin: -16px; }
  .pos-cart { position: fixed; bottom: 0; left: 0; right: 0; z-index: 150; max-height: 60vh; border-top: 2px solid var(--accent); transform: translateY(100%); transition: transform var(--transition); }
  .pos-cart.open { transform: translateY(0); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .page-content { padding: 10px; }
  .grid-2, .form-row { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.7rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .landing-nav a:not(.btn) { display: none; }
}

/* ============================================================
   MOBILE UI FIX — Complete responsive overhaul
   Targets: phones (< 600px) and tablets (< 900px)
   ============================================================ */

/* ---- SIDEBAR MOBILE ---- */
@media (max-width: 900px) {
  /* Sidebar hidden by default, slides in */
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    z-index: 300;
    width: 260px;
    min-width: 260px;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.5);
  }
  .sidebar-close {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
  }
  .sidebar-overlay.visible {
    display: block;
  }

  /* Main content full width */
  .main-content { overflow-y: auto !important;
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Show hamburger menu button */
  .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
  }

  /* Top bar adjustments */
  .top-bar {
    padding: 0 10px;
    gap: 6px;
  }
  .top-bar-title {
    font-size: .82rem;
  }
  .trial-badge {
    font-size: .65rem;
    padding: 2px 6px;
  }
  .top-bar-actions {
    gap: 5px;
  }
  .top-bar-actions .btn {
    padding: 5px 8px;
    font-size: .72rem;
  }

  /* Page content padding */
  .page-content {
    padding: 10px;
  }

  /* Stat grid — 2 columns on tablet */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .stat-card {
    padding: 12px;
  }
  .stat-info .stat-value {
    font-size: 1.15rem;
  }

  /* Grid layouts */
  .grid-2, .form-row { grid-template-columns: 1fr !important; }
  .grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .dashboard-grid { grid-template-columns: 1fr !important; }

  /* Tables — horizontal scroll */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    min-width: 500px;
  }
  th, td {
    padding: 8px 10px;
    font-size: .78rem;
  }

  /* Cards */
  .card {
    padding: 14px;
  }

  /* Modal — full screen on mobile */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    max-width: 100%;
    width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
  }
  .modal-sm, .modal-lg, .modal-xl {
    max-width: 100%;
  }

  /* POS Layout */
  .pos-wrap {
    grid-template-columns: 1fr !important;
    height: auto !important;
    margin: -10px !important;
  }
  .pos-left {
    height: calc(100vh - 170px);
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .pos-right {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s cubic-bezier(.4,0,.2,1);
    border-top: 2px solid var(--accent);
    border-radius: 16px 16px 0 0;
    background: var(--bg-surface);
  }
  .pos-right.open {
    max-height: 75vh;
    overflow-y: auto;
  }
  .menu-items {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
    padding: 8px;
  }
  .mcard {
    padding: 8px;
  }
  .mcard-img {
    font-size: 1.4rem;
  }
  .mcard-name {
    font-size: .72rem;
  }
  .mcard-price {
    font-size: .78rem;
  }
  .mob-fab {
    display: flex !important;
  }
  .category-tabs, .cats {
    padding: 6px 8px;
    gap: 4px;
  }
  .cat-tab, .cat {
    padding: 4px 10px;
    font-size: .72rem;
  }

  /* KDS layout */
  .kds-layout {
    grid-template-columns: 1fr !important;
  }

  /* Landing page */
  .hero {
    padding: 40px 5% 30px;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: .88rem;
  }
  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }
  .btn-hero-primary, .btn-hero-ghost {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
  .hero-stats {
    gap: 16px;
  }
  .hstat-val {
    font-size: 1.4rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .testimonials-grid, .testi-scroll {
    grid-template-columns: 1fr;
  }
  .compare-table-wrap {
    overflow-x: auto;
  }
  .landing-nav a:not(.btn) {
    display: none;
  }
  .footer-landing {
    padding: 20px 5% 12px;
  }

  /* GST tabs — scrollable */
  [style*="display:flex;gap:4px;margin-bottom:16px;border-bottom"] {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .gst-tab {
    padding: 8px 10px;
    font-size: .75rem;
    white-space: nowrap;
  }

  /* Storefront */
  .sf-wrap {
    grid-template-columns: 1fr !important;
    padding: 12px !important;
  }
  .sf-item {
    padding: 10px;
  }
  .sf-img {
    width: 60px;
    height: 60px;
  }
}

/* ---- PHONES ONLY (< 600px) ---- */
@media (max-width: 600px) {
  /* Stat grid — single column */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px;
  }
  .stat-card {
    padding: 10px;
  }
  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .stat-info .stat-value {
    font-size: 1rem;
  }
  .stat-info .stat-label {
    font-size: .62rem;
  }

  /* Top bar */
  .top-bar-title {
    font-size: .78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
  }

  /* Page content tighter */
  .page-content {
    padding: 8px;
  }

  /* Cards */
  .card {
    padding: 12px;
    border-radius: 10px;
  }
  .card-header {
    margin-bottom: 10px;
  }
  .card-title {
    font-size: .82rem;
  }

  /* Buttons */
  .btn {
    padding: 6px 10px;
    font-size: .78rem;
  }
  .btn-lg {
    padding: 10px 18px;
    font-size: .88rem;
  }

  /* Grid — always single column */
  .grid-2, .grid-3, .grid-4, .form-row {
    grid-template-columns: 1fr !important;
  }

  /* Table actions wrap */
  .table-actions {
    flex-wrap: wrap;
    gap: 3px;
  }
  .table-actions .btn {
    padding: 4px 7px;
    font-size: .7rem;
  }

  /* Modal body padding */
  .modal-body {
    padding: 14px;
  }
  .modal-header {
    padding: 12px 14px;
  }
  .modal-footer {
    padding: 10px 14px;
    flex-wrap: wrap;
  }

  /* Form */
  .form-control {
    font-size: .84rem;
    padding: 7px 10px;
  }
  .form-group {
    margin-bottom: 10px;
  }

  /* POS specific */
  .menu-items {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }
  .otype {
    padding: 5px 8px;
    gap: 3px;
  }
  .obtn {
    font-size: .65rem;
    padding: 4px;
  }
  .cart-top h3 {
    font-size: .82rem;
  }
  .pay-btn {
    padding: 10px;
    font-size: .88rem;
  }
  .pm-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .pm {
    padding: 9px 5px;
    font-size: .72rem;
  }
  .pm i {
    font-size: 1rem;
  }

  /* Bill view */
  .bill {
    border-radius: 0;
  }

  /* Fab */
  .mob-fab {
    bottom: 10px;
    padding: 9px 18px;
    font-size: .82rem;
  }

  /* Landing */
  .hero h1 {
    font-size: 1.5rem;
  }
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    text-align: center;
  }
  .pricing-card {
    padding: 20px;
  }
  .addon-grid {
    grid-template-columns: 1fr;
  }

  /* Feedback form */
  .stars {
    gap: 6px;
  }
  .star {
    font-size: 1.6rem;
  }

  /* Track page */
  .status-track {
    gap: 0;
  }
  .step-lbl {
    font-size: .58rem;
    max-width: 44px;
  }

  /* Notif bell hidden on very small screens */
  .notif-bell {
    display: none;
  }
}

/* ---- TOUCH IMPROVEMENTS (all mobile) ---- */
@media (hover: none) and (pointer: coarse) {
  /* Larger tap targets */
  .nav-item {
    padding: 10px 10px;
    min-height: 44px;
  }
  .btn {
    min-height: 38px;
  }
  .qbtn {
    width: 28px;
    height: 28px;
  }
  .mcard {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(249,115,22,.2);
  }
  .mcard:active {
    transform: scale(.93);
    background: var(--bg-hover);
  }
  /* Remove hover effects that don't make sense on touch */
  .stat-card:hover,
  .feature-card:hover,
  .pricing-card:hover {
    transform: none;
  }
}

/* ============================================================
   UI UPGRADE: Light Mode + Bigger Fonts + Theme Toggle
   ============================================================ */

/* Light mode variables */
:root[data-theme="light"] {
  --bg-base:       #f1f5f9;
  --bg-surface:    #ffffff;
  --bg-elevated:   #f8fafc;
  --bg-hover:      #f1f5f9;
  --bg-active:     #e2e8f0;
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;
  --text-primary:  #0f172a;
  --text-secondary:#334155;
  --text-muted:    #64748b;
  --text-disabled: #94a3b8;
  --accent:        #f97316;
  --accent-hover:  #ea6c0a;
  --accent-glow:   rgba(249,115,22,.08);
  --green:         #16a34a;
  --green-bg:      rgba(22,163,74,.1);
  --red:           #dc2626;
  --red-bg:        rgba(220,38,38,.1);
  --blue:          #2563eb;
  --blue-bg:       rgba(37,99,235,.1);
  --yellow:        #d97706;
  --yellow-bg:     rgba(217,119,6,.1);
  --sidebar-bg:    #1e293b;
  --sidebar-text:  #94a3b8;
  --sidebar-active:#ffffff;
  --sidebar-hover: rgba(255,255,255,.08);
  --shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg:     0 4px 20px rgba(0,0,0,.1);
}

/* Bigger base font sizes */
:root {
  --font-size-base: 15px;
  --font-size-sm:   13px;
  --font-size-xs:   12px;
  --font-size-lg:   17px;
  --font-size-xl:   20px;
}

body {
  font-size: var(--font-size-base) !important;
}

/* Scale up key text elements */
.nav-item span        { font-size: 13.5px !important; }
.card-title           { font-size: 1rem !important; }
.stat-value           { font-size: 1.6rem !important; }
.stat-label           { font-size: .78rem !important; }
.form-label           { font-size: .88rem !important; }
.form-control         { font-size: .9rem !important; }
.btn                  { font-size: .84rem !important; }
.modal-title          { font-size: 1.05rem !important; }
th                    { font-size: .82rem !important; }
td                    { font-size: .84rem !important; }
.mcard-name           { font-size: .8rem !important; }
.mcard-price          { font-size: .86rem !important; }
.badge-pill           { font-size: .72rem !important; }
h1                    { font-size: 1.5rem !important; }
h2                    { font-size: 1.25rem !important; }
h3                    { font-size: 1.1rem !important; }
p                     { font-size: .9rem !important; }

/* Light mode body */
[data-theme="light"] body,
[data-theme="light"] .main-content  { background: var(--bg-base) !important; color: var(--text-primary) !important; }
[data-theme="light"] .card          { background: var(--bg-surface) !important; border-color: var(--border) !important; color: var(--text-primary) !important; }
[data-theme="light"] .modal         { background: var(--bg-surface) !important; border-color: var(--border) !important; }
[data-theme="light"] .modal-header  { border-color: var(--border) !important; }
[data-theme="light"] .modal-footer  { border-color: var(--border) !important; }
[data-theme="light"] .form-control  { background: var(--bg-elevated) !important; border-color: var(--border-strong) !important; color: var(--text-primary) !important; }
[data-theme="light"] .form-control:focus { border-color: var(--accent) !important; }
[data-theme="light"] .table-wrap    { background: var(--bg-surface) !important; }
[data-theme="light"] table          { background: transparent !important; }
[data-theme="light"] thead tr       { background: var(--bg-elevated) !important; border-color: var(--border) !important; }
[data-theme="light"] tbody tr       { border-color: var(--border) !important; }
[data-theme="light"] tbody tr:hover { background: var(--bg-hover) !important; }
[data-theme="light"] th, [data-theme="light"] td { color: var(--text-primary) !important; }
[data-theme="light"] .stat-card     { background: var(--bg-surface) !important; border-color: var(--border) !important; }
[data-theme="light"] .top-bar       { background: var(--bg-surface) !important; border-color: var(--border) !important; }
[data-theme="light"] .btn-ghost     { background: var(--bg-elevated) !important; border-color: var(--border) !important; color: var(--text-secondary) !important; }
[data-theme="light"] .btn-ghost:hover { background: var(--bg-active) !important; }
[data-theme="light"] .page-content  { background: var(--bg-base) !important; }
[data-theme="light"] .pos-left      { background: var(--bg-surface) !important; border-color: var(--border) !important; }
[data-theme="light"] .pos-right     { background: var(--bg-surface) !important; border-color: var(--border) !important; }
[data-theme="light"] .mcard         { background: var(--bg-elevated) !important; border-color: var(--border) !important; }
[data-theme="light"] .mcard:hover   { background: var(--bg-active) !important; }
[data-theme="light"] .cat-tab       { background: var(--bg-elevated) !important; color: var(--text-secondary) !important; }
[data-theme="light"] .cat-tab.active { background: var(--accent) !important; color: #fff !important; }
[data-theme="light"] select         { background: var(--bg-elevated) !important; color: var(--text-primary) !important; }
[data-theme="light"] .form-hint     { color: var(--text-muted) !important; }
[data-theme="light"] .modal-backdrop { background: rgba(0,0,0,.4) !important; }
[data-theme="light"] .nav-section-label { color: var(--sidebar-text) !important; }

/* Theme toggle button */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all .2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ============================================================
   UI UPGRADE: Light Mode + Bigger Fonts + Theme Toggle
   ============================================================ */

/* Light mode variables */
:root[data-theme="light"] {
  --bg-base:       #f1f5f9;
  --bg-surface:    #ffffff;
  --bg-elevated:   #f8fafc;
  --bg-hover:      #f1f5f9;
  --bg-active:     #e2e8f0;
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;
  --text-primary:  #0f172a;
  --text-secondary:#334155;
  --text-muted:    #64748b;
  --text-disabled: #94a3b8;
  --accent:        #f97316;
  --accent-hover:  #ea6c0a;
  --accent-glow:   rgba(249,115,22,.08);
  --green:         #16a34a;
  --green-bg:      rgba(22,163,74,.1);
  --red:           #dc2626;
  --red-bg:        rgba(220,38,38,.1);
  --blue:          #2563eb;
  --blue-bg:       rgba(37,99,235,.1);
  --yellow:        #d97706;
  --yellow-bg:     rgba(217,119,6,.1);
  --sidebar-bg:    #1e293b;
  --sidebar-text:  #94a3b8;
  --sidebar-active:#ffffff;
  --sidebar-hover: rgba(255,255,255,.08);
  --shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg:     0 4px 20px rgba(0,0,0,.1);
}

/* Bigger base font sizes */
:root {
  --font-size-base: 15px;
  --font-size-sm:   13px;
  --font-size-xs:   12px;
  --font-size-lg:   17px;
  --font-size-xl:   20px;
}

body {
  font-size: var(--font-size-base) !important;
}

/* Scale up key text elements */
.nav-item span        { font-size: 13.5px !important; }
.card-title           { font-size: 1rem !important; }
.stat-value           { font-size: 1.6rem !important; }
.stat-label           { font-size: .78rem !important; }
.form-label           { font-size: .88rem !important; }
.form-control         { font-size: .9rem !important; }
.btn                  { font-size: .84rem !important; }
.modal-title          { font-size: 1.05rem !important; }
th                    { font-size: .82rem !important; }
td                    { font-size: .84rem !important; }
.mcard-name           { font-size: .8rem !important; }
.mcard-price          { font-size: .86rem !important; }
.badge-pill           { font-size: .72rem !important; }
h1                    { font-size: 1.5rem !important; }
h2                    { font-size: 1.25rem !important; }
h3                    { font-size: 1.1rem !important; }
p                     { font-size: .9rem !important; }

/* Light mode body */
[data-theme="light"] body,
[data-theme="light"] .main-content  { background: var(--bg-base) !important; color: var(--text-primary) !important; }
[data-theme="light"] .card          { background: var(--bg-surface) !important; border-color: var(--border) !important; color: var(--text-primary) !important; }
[data-theme="light"] .modal         { background: var(--bg-surface) !important; border-color: var(--border) !important; }
[data-theme="light"] .modal-header  { border-color: var(--border) !important; }
[data-theme="light"] .modal-footer  { border-color: var(--border) !important; }
[data-theme="light"] .form-control  { background: var(--bg-elevated) !important; border-color: var(--border-strong) !important; color: var(--text-primary) !important; }
[data-theme="light"] .form-control:focus { border-color: var(--accent) !important; }
[data-theme="light"] .table-wrap    { background: var(--bg-surface) !important; }
[data-theme="light"] table          { background: transparent !important; }
[data-theme="light"] thead tr       { background: var(--bg-elevated) !important; border-color: var(--border) !important; }
[data-theme="light"] tbody tr       { border-color: var(--border) !important; }
[data-theme="light"] tbody tr:hover { background: var(--bg-hover) !important; }
[data-theme="light"] th, [data-theme="light"] td { color: var(--text-primary) !important; }
[data-theme="light"] .stat-card     { background: var(--bg-surface) !important; border-color: var(--border) !important; }
[data-theme="light"] .top-bar       { background: var(--bg-surface) !important; border-color: var(--border) !important; }
[data-theme="light"] .btn-ghost     { background: var(--bg-elevated) !important; border-color: var(--border) !important; color: var(--text-secondary) !important; }
[data-theme="light"] .btn-ghost:hover { background: var(--bg-active) !important; }
[data-theme="light"] .page-content  { background: var(--bg-base) !important; }
[data-theme="light"] .pos-left      { background: var(--bg-surface) !important; border-color: var(--border) !important; }
[data-theme="light"] .pos-right     { background: var(--bg-surface) !important; border-color: var(--border) !important; }
[data-theme="light"] .mcard         { background: var(--bg-elevated) !important; border-color: var(--border) !important; }
[data-theme="light"] .mcard:hover   { background: var(--bg-active) !important; }
[data-theme="light"] .cat-tab       { background: var(--bg-elevated) !important; color: var(--text-secondary) !important; }
[data-theme="light"] .cat-tab.active { background: var(--accent) !important; color: #fff !important; }
[data-theme="light"] select         { background: var(--bg-elevated) !important; color: var(--text-primary) !important; }
[data-theme="light"] .form-hint     { color: var(--text-muted) !important; }
[data-theme="light"] .modal-backdrop { background: rgba(0,0,0,.4) !important; }
[data-theme="light"] .nav-section-label { color: var(--sidebar-text) !important; }

/* Theme toggle button */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all .2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── MOBILE BILLING FIX ── */
@media (max-width:900px){
  .modal-backdrop{z-index:500!important;position:fixed!important;inset:0!important;align-items:flex-end!important;justify-content:center!important;padding:0!important;}
  .modal{width:100%!important;max-width:100%!important;max-height:90vh!important;border-radius:18px 18px 0 0!important;overflow-y:auto!important;margin:0!important;}
  .pm-grid{grid-template-columns:repeat(3,1fr)!important;gap:8px!important;}
  .pm{padding:10px 6px!important;font-size:.72rem!important;}
  .mob-fab{display:flex!important;position:fixed!important;bottom:16px!important;left:50%!important;transform:translateX(-50%)!important;z-index:200!important;background:var(--accent)!important;color:#fff!important;border:none!important;border-radius:50px!important;padding:12px 24px!important;font-size:.88rem!important;font-weight:700!important;cursor:pointer!important;box-shadow:0 4px 20px rgba(249,115,22,.5)!important;gap:8px!important;align-items:center!important;white-space:nowrap!important;}
  #cartPanel{position:fixed!important;bottom:0!important;left:0!important;right:0!important;z-index:250!important;max-height:0!important;overflow:hidden!important;transition:max-height .35s cubic-bezier(.4,0,.2,1)!important;border-radius:18px 18px 0 0!important;background:var(--bg-surface)!important;border-top:2px solid var(--accent)!important;}
  #cartPanel.open{max-height:80vh!important;overflow-y:auto!important;}
  .pay-btn{width:100%!important;padding:13px!important;font-size:.95rem!important;font-weight:700!important;}
}
@media (max-width:600px){
  .modal-header{padding:14px 16px!important;}
  .modal-body{padding:14px 16px!important;}
  .modal-footer{padding:12px 16px!important;flex-wrap:wrap!important;gap:8px!important;}
  .modal-footer .btn{flex:1!important;justify-content:center!important;}
}


/* Scroll fix */
.main-content,.page-content{overflow-y:auto!important;height:auto!important;}
.app-body{overflow:hidden!important;}
.sidebar{overflow-y:auto!important;}
/* v1783920946 */

/* SCROLL FIX v3 */
html,body{height:100%;overflow:hidden;}
.app-body{display:flex;height:100vh;overflow:hidden;}
.sidebar{height:100vh;overflow-y:auto;overflow-x:hidden;flex-shrink:0;}
.main-content{flex:1;height:100vh;overflow-y:auto;overflow-x:hidden;}
.page-content{padding:16px;min-height:0;}

/* LIGHT THEME FIXES */
[data-theme="light"] .nav-item{color:#374151!important;}
[data-theme="light"] .nav-item i{color:#374151!important;}
[data-theme="light"] .nav-item:hover,[data-theme="light"] .nav-item.active{background:rgba(249,115,22,.1)!important;color:#f97316!important;}
[data-theme="light"] .nav-item:hover i,[data-theme="light"] .nav-item.active i{color:#f97316!important;}
[data-theme="light"] .nav-section-label{color:#9ca3af!important;}
[data-theme="light"] .sidebar{background:#fff!important;border-right:1px solid #e5e7eb!important;}
[data-theme="light"] .top-bar{background:#fff!important;border-bottom:1px solid #e5e7eb!important;}
[data-theme="light"] .logo-name{color:#111827!important;}
[data-theme="light"] .logo-biz{color:#6b7280!important;}
[data-theme="light"] .stat-card{background:#fff!important;border:1px solid #e5e7eb!important;}
[data-theme="light"] .stat-value{color:#111827!important;}
[data-theme="light"] .stat-label{color:#6b7280!important;}
[data-theme="light"] .card{background:#fff!important;border:1px solid #e5e7eb!important;}
[data-theme="light"] .card-title{color:#111827!important;}
[data-theme="light"] table th{background:#f9fafb!important;color:#374151!important;}
[data-theme="light"] table td{color:#1f2937!important;}
[data-theme="light"] .btn-ghost{color:#374151!important;border-color:#d1d5db!important;}
[data-theme="light"] .form-control{background:#fff!important;border-color:#d1d5db!important;color:#1f2937!important;}
[data-theme="light"] .page-title,[data-theme="light"] h2,[data-theme="light"] h3{color:#111827!important;}
[data-theme="light"] .text-muted,[data-theme="light"] .form-hint{color:#6b7280!important;}
[data-theme="light"] .main-content{background:#f9fafb!important;}
[data-theme="light"] .modal{background:#fff!important;}
[data-theme="light"] .badge-pill{border:1px solid currentColor;}

/* ── POS TABLE SELECTOR FIX ── */
.table-btn{color:var(--text-primary)!important;background:var(--bg-elevated)!important;border:2px solid var(--border)!important;}
.table-btn i{color:var(--text-secondary)!important;font-size:1.4rem!important;}
.table-btn .t-name{color:var(--text-primary)!important;font-weight:700!important;font-size:.8rem!important;display:block!important;}
.table-btn .t-status,.table-btn .t-amt{color:var(--text-muted)!important;font-size:.68rem!important;display:block!important;}
.table-btn:hover{border-color:var(--accent)!important;background:rgba(249,115,22,.08)!important;}
.table-btn.occupied,.table-btn.busy{border-color:var(--accent)!important;background:rgba(249,115,22,.12)!important;}
.table-btn.occupied i,.table-btn.busy i{color:var(--accent)!important;}
.table-btn.occupied .t-name,.table-btn.busy .t-name{color:var(--accent)!important;}
.table-btn.occupied .t-amt,.table-btn.busy .t-amt{color:var(--accent)!important;font-weight:700!important;}
.table-btn.reserved{border-color:#3b82f6!important;background:rgba(59,130,246,.1)!important;}
.table-btn.reserved i,.table-btn.reserved .t-name{color:#3b82f6!important;}
.table-btn.cleaning{border-color:#d97706!important;background:rgba(217,119,6,.1)!important;}
[data-theme="light"] .table-btn{background:#f8fafc!important;border-color:#e2e8f0!important;}
[data-theme="light"] .table-btn .t-name{color:#1e293b!important;}
[data-theme="light"] .table-btn i{color:#475569!important;}
[data-theme="light"] .table-btn.occupied,.table-btn.busy{background:rgba(249,115,22,.1)!important;}

/* ── MODAL LIGHT THEME FIX ── */
[data-theme="light"] .modal-backdrop{background:rgba(0,0,0,.45)!important;}
[data-theme="light"] .modal{background:#fff!important;color:#1e293b!important;}
[data-theme="light"] .modal-title{color:#111827!important;}
[data-theme="light"] .modal-close{color:#6b7280!important;}
[data-theme="light"] select.form-control option{background:#fff!important;color:#1e293b!important;}
