/* =====================================================================
   FALAH POS SAAS — Design System
   Themeable via CSS custom properties (Settings → Theme Customization).
   Dark / Light mode via <html data-theme="dark">
   ===================================================================== */

:root {
  --primary:        #2563eb;
  --primary-600:    #1d4ed8;
  --primary-50:     #eff6ff;
  --success:        #16a34a;
  --warning:        #f59e0b;
  --danger:         #dc2626;
  --info:           #0891b2;
  --purple:         #7c3aed;

  --bg:             #f4f6fb;
  --bg-2:           #eef2f9;
  --surface:        #ffffff;
  --surface-2:      #f8fafc;
  --surface-3:      #f1f5f9;
  --text:           #0f172a;
  --text-2:         #475569;
  --muted:          #64748b;
  --border:         #e2e8f0;
  --border-strong:  #cbd5e1;

  --sidebar-bg:     #0f172a;
  --sidebar-text:   #cbd5e1;
  --sidebar-hover:  #1e293b;
  --sidebar-active: var(--primary);

  --radius:         12px;
  --radius-sm:      8px;
  --shadow:         0 1px 2px rgba(15,23,42,.06), 0 4px 12px rgba(15,23,42,.05);
  --shadow-lg:      0 10px 40px rgba(15,23,42,.12);
  --sidebar-w:      256px;
  --topbar-h:       62px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --transition:     .18s ease;
}

[data-theme="dark"] {
  --bg:             #0b1120;
  --bg-2:           #0f172a;
  --surface:        #111c31;
  --surface-2:      #16233b;
  --surface-3:      #1c2b47;
  --text:           #e6edf7;
  --text-2:         #b4c1d3;
  --muted:          #8fa0b8;
  --border:         #22314e;
  --border-strong:  #2e4065;
  --primary-50:     #13233f;
  --sidebar-bg:     #0b1120;
  --shadow:         0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-600); }
h1,h2,h3,h4,h5 { margin: 0 0 .5em; font-weight: 650; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.text-right { text-align: right; } .text-center { text-align: center; }
.mt-1{margin-top:6px}.mt-2{margin-top:12px}.mt-3{margin-top:18px}.mt-4{margin-top:26px}
.mb-1{margin-bottom:6px}.mb-2{margin-bottom:12px}.mb-3{margin-bottom:18px}
.d-flex{display:flex}.gap-1{gap:6px}.gap-2{gap:12px}.gap-3{gap:18px}
.align-center{align-items:center}.justify-between{justify-content:space-between}
.flex-1{flex:1}.wrap{flex-wrap:wrap}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.hide{display:none!important}
[dir="rtl"] .sidebar { right: 0; left: auto; }

/* ----------------------------- Layout ------------------------------ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--sidebar-bg); color: var(--sidebar-text);
  position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column;
  transition: width var(--transition); z-index: 40; overflow: hidden;
}
.sidebar.collapsed { width: 68px; }
.sidebar.collapsed .nav-label, .sidebar.collapsed .brand-name, .sidebar.collapsed .nav-group-title, .sidebar.collapsed .sb-footer span { display: none; }
.brand {
  height: var(--topbar-h); display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.07); flex-shrink: 0;
}
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), var(--purple));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; flex-shrink: 0;
}
.brand-name { font-weight: 700; color: #fff; font-size: 15px; white-space: nowrap; }
.brand-sub { display: block; font-size: 10px; color: var(--muted); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }

.nav { flex: 1; overflow-y: auto; padding: 10px 8px 20px; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
.nav-group-title {
  font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #64748b;
  padding: 14px 12px 6px; font-weight: 700;
}
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--sidebar-text); font-size: 13.5px; font-weight: 500; margin-bottom: 2px;
  transition: background var(--transition), color var(--transition); position: relative; white-space: nowrap;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; }
.nav-item .icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .9; }
.nav-item .badge-count { margin-left: auto; background: var(--danger); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 20px; font-weight: 700; }
.nav-item .caret { margin-left: auto; transition: transform var(--transition); width: 14px; height: 14px; }
.nav-item.open .caret { transform: rotate(90deg); }
.nav-sub { display: none; padding-left: 30px; }
.nav-sub.open { display: block; }
.nav-sub a { display: block; padding: 6px 10px; font-size: 12.5px; color: #94a3b8; border-radius: 6px; }
.nav-sub a:hover, .nav-sub a.active { color: #fff; background: var(--sidebar-hover); }
.sb-footer { padding: 10px; border-top: 1px solid rgba(255,255,255,.07); font-size: 11px; color: #64748b; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; transition: margin-left var(--transition); }
.sidebar.collapsed ~ .main { margin-left: 68px; }

.topbar {
  height: var(--topbar-h); background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 18px; position: sticky; top: 0; z-index: 30;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); display: grid; place-items: center; cursor: pointer; transition: var(--transition);
  position: relative; flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.searchbar {
  flex: 1; max-width: 420px; position: relative;
}
.searchbar input {
  width: 100%; padding: 8px 12px 8px 34px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface-2); color: var(--text); font-size: 13px; font-family: var(--font);
}
.searchbar input:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.searchbar svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.search-results {
  position: absolute; top: 42px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 380px; overflow-y: auto; display: none; z-index: 50;
}
.search-results.open { display: block; }
.search-results a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border); }
.search-results a:hover { background: var(--surface-2); }
.search-results .sr-type { font-size: 10px; text-transform: uppercase; color: var(--muted); margin-left: auto; letter-spacing: .05em; }

.content { padding: 20px 24px 60px; flex: 1; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 2px; }
.page-desc { color: var(--muted); font-size: 13px; margin: 0; }

/* ---------------------------- Components --------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head {
  padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card-head h3 { margin: 0; font-size: 15px; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 13px; font-weight: 550; cursor: pointer; font-family: var(--font);
  transition: var(--transition); white-space: nowrap; text-decoration: none; line-height: 1.2;
}
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.94); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); color: #fff; }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-outline { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-lg { padding: 11px 20px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn-icon { padding: 7px; width: 32px; height: 32px; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 650; letter-spacing: .01em; white-space: nowrap;
}
.badge-primary { background: var(--primary-50); color: var(--primary); }
.badge-success { background: rgba(22,163,74,.13); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.15); color: #b45309; }
.badge-danger  { background: rgba(220,38,38,.12); color: var(--danger); }
.badge-info    { background: rgba(8,145,178,.13); color: var(--info); }
.badge-purple  { background: rgba(124,58,237,.13); color: var(--purple); }
.badge-muted   { background: var(--surface-3); color: var(--muted); }
[data-theme="dark"] .badge-warning { color: #fbbf24; }

table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 10px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--border); background: var(--surface-2);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }
.table .thumb { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; border: 1px solid var(--border); }
.table-responsive { overflow-x: auto; }
.table-sm td, .table-sm th { padding: 7px 10px; }
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--text); }

.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field label .req { color: var(--danger); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], input[type=tel], input[type=url], input[type=color], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text); font-size: 13.5px; font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
textarea { min-height: 88px; resize: vertical; }
input[type=color] { padding: 3px; height: 38px; }
select { cursor: pointer; }
.hint { font-size: 11.5px; color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch-text { font-size: 13px; font-weight: 500; color: var(--text); }
.switch .switch-text { margin-left: 2px; }
.switch input { display: none; }
.switch .slider {
  width: 40px; height: 22px; background: var(--border-strong); border-radius: 20px; position: relative; transition: var(--transition); flex-shrink: 0;
}
.switch .slider::after {
  content: ''; position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 50%;
  top: 2px; left: 2px; transition: var(--transition); box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::after { transform: translateX(18px); }

.alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; border: 1px solid transparent; display: flex; gap: 9px; align-items: flex-start; }
.alert-success { background: rgba(22,163,74,.1); color: #15803d; border-color: rgba(22,163,74,.25); }
.alert-danger  { background: rgba(220,38,38,.09); color: var(--danger); border-color: rgba(220,38,38,.25); }
.alert-warning { background: rgba(245,158,11,.11); color: #b45309; border-color: rgba(245,158,11,.3); }
.alert-info    { background: rgba(8,145,178,.09); color: var(--info); border-color: rgba(8,145,178,.25); }
[data-theme="dark"] .alert-success { color: #4ade80; } [data-theme="dark"] .alert-warning { color: #fbbf24; }
[data-theme="dark"] .alert-danger { color: #f87171; } [data-theme="dark"] .alert-info { color: #38bdf8; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 16px; box-shadow: var(--shadow); display: flex; align-items: flex-start; gap: 13px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.stat-icon svg { width: 19px; height: 19px; }
.stat-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; }
.stat-value { font-size: 21px; font-weight: 750; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.bg-primary-soft { background: rgba(37,99,235,.11); color: var(--primary); }
.bg-success-soft { background: rgba(22,163,74,.12); color: var(--success); }
.bg-warning-soft { background: rgba(245,158,11,.14); color: #d97706; }
.bg-danger-soft  { background: rgba(220,38,38,.11); color: var(--danger); }
.bg-info-soft    { background: rgba(8,145,178,.12); color: var(--info); }
.bg-purple-soft  { background: rgba(124,58,237,.12); color: var(--purple); }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty svg { width: 42px; height: 42px; opacity: .35; margin-bottom: 10px; }

.pagination { display: flex; gap: 5px; align-items: center; justify-content: center; padding: 14px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 32px; height: 32px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 12.5px; color: var(--text-2); background: var(--surface);
}
.pagination a:hover { background: var(--surface-3); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 650; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { padding: 7px 10px; width: auto; min-width: 130px; font-size: 13px; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 6px; z-index: 60; display: none;
}
.dropdown-menu.open { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border-radius: 7px;
  font-size: 13px; color: var(--text); background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--font);
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-3); }
.dropdown-menu hr { border: none; border-top: 1px solid var(--border); margin: 5px 0; }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0;
  text-transform: uppercase;
}
.avatar-lg { width: 46px; height: 46px; font-size: 15px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal.open { display: flex; }
.modal-box { background: var(--surface); border-radius: var(--radius); width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-head { padding: 15px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 18px; }
.modal-foot { padding: 13px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* Toast */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 9px; z-index: 200; }
.toast {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm); padding: 11px 15px; box-shadow: var(--shadow-lg); font-size: 13px;
  min-width: 240px; max-width: 360px; animation: slideIn .25s ease;
}
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

/* Tabs */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; font-size: 13px; font-weight: 550; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Timeline / activity */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding: 7px 0; font-size: 13px; }
.timeline-item::before {
  content: ''; position: absolute; left: -23px; top: 13px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--surface);
}

.progress { height: 7px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.progress > div { height: 100%; border-radius: 6px; background: var(--primary); transition: width .4s ease; }

/* POS specific */
.pos { display: grid; grid-template-columns: 1fr 400px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .pos { grid-template-columns: 1fr; } }
.pos-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 11px; max-height: 68vh; overflow-y: auto; padding: 12px; }
.pos-product {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; cursor: pointer;
  background: var(--surface); transition: var(--transition); position: relative;
}
.pos-product:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.pos-product.out { opacity: .5; cursor: not-allowed; }
.pos-product img { width: 100%; height: 82px; object-fit: cover; border-radius: 8px; background: var(--surface-3); }
.pos-product .pp-name { font-size: 12.5px; font-weight: 600; margin-top: 7px; line-height: 1.3; height: 32px; overflow: hidden; }
.pos-product .pp-price { font-size: 14px; font-weight: 750; color: var(--primary); margin-top: 3px; }
.pos-product .pp-stock { position: absolute; top: 8px; right: 8px; font-size: 10px; padding: 1px 6px; border-radius: 20px; background: var(--surface-3); color: var(--muted); font-weight: 650; }
.cart-list { max-height: 40vh; overflow-y: auto; }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.cart-item .ci-name { font-size: 13px; font-weight: 600; flex: 1; min-width: 0; }
.qty-ctrl { display: flex; align-items: center; gap: 5px; }
.qty-ctrl button { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 14px; line-height: 1; color: var(--text); }
.qty-ctrl button:hover { background: var(--surface-3); }
.qty-ctrl input { width: 48px; text-align: center; padding: 4px; }
.totals-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13.5px; }
.totals-row.grand { font-size: 19px; font-weight: 750; border-top: 1px solid var(--border); margin-top: 7px; padding-top: 11px; }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.pay-method {
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 5px; text-align: center; cursor: pointer;
  font-size: 11.5px; font-weight: 600; background: var(--surface); transition: var(--transition);
}
.pay-method:hover { border-color: var(--primary); }
.pay-method.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Receipt (thermal 80mm) */
.receipt { width: 80mm; margin: 0 auto; background: #fff; color: #000; padding: 8mm; font-size: 12px; font-family: 'Courier New', monospace; }
.receipt h2 { font-size: 15px; margin: 0 0 3px; }
.receipt .r-center { text-align: center; }
.receipt table { width: 100%; border-collapse: collapse; margin: 7px 0; font-size: 11.5px; }
.receipt th { text-align: left; border-bottom: 1px dashed #999; padding: 3px 0; }
.receipt td { padding: 2px 0; }
.receipt .r-total { border-top: 1px dashed #999; margin-top: 5px; padding-top: 5px; }
@media print {
  .no-print, .sidebar, .topbar { display: none !important; }
  .main { margin: 0 !important; } .content { padding: 0 !important; }
  body { background: #fff; }
  .receipt { width: 100%; box-shadow: none; }
}

/* Landing page */
.landing-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid #e9eef6; }
[data-theme="dark"] .landing-nav { background: rgba(11,17,32,.92); border-color: var(--border); }
.hero { padding: 78px 0 60px; background: linear-gradient(160deg, #eef4ff 0%, #f9fbff 45%, #ffffff 100%); text-align: center; }
[data-theme="dark"] .hero { background: linear-gradient(160deg, #101c33 0%, #0b1120 60%); }
.hero h1 { font-size: 42px; line-height: 1.12; letter-spacing: -.03em; max-width: 780px; margin: 0 auto 16px; }
.hero p.lead { font-size: 17px; color: var(--muted); max-width: 620px; margin: 0 auto 26px; }
.hero-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 22px; }
.section { padding: 62px 0; }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-size: 30px; letter-spacing: -.02em; }
.section-title p { color: var(--muted); font-size: 15px; max-width: 560px; margin: 6px auto 0; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 16px; }
.feat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: var(--transition); }
.feat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.feat-card .fi { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 12px; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; max-width: 860px; margin: 0 auto; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px; text-align: center; position: relative; transition: var(--transition); }
.price-card.popular { border-color: var(--primary); box-shadow: 0 8px 30px rgba(37,99,235,.16); transform: scale(1.02); }
.price-card .pc-amount { font-size: 36px; font-weight: 800; letter-spacing: -.03em; }
.price-card ul { list-style: none; padding: 0; margin: 18px 0; text-align: left; }
.price-card li { padding: 6px 0 6px 24px; position: relative; font-size: 13.5px; color: var(--text-2); }
.price-card li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.landing-footer { background: #0f172a; color: #94a3b8; padding: 44px 0 26px; margin-top: 30px; }
.landing-footer a { color: #cbd5e1; }
.landing-footer h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }

/* Auth pages */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }
.auth-side { background: linear-gradient(150deg, #1e3a8a, #4f46e5 55%, #7c3aed); color: #fff; padding: 54px; display: flex; flex-direction: column; justify-content: center; }
.auth-side h1 { font-size: 32px; margin-bottom: 14px; }
.auth-side ul { list-style: none; padding: 0; margin-top: 22px; }
.auth-side li { padding: 7px 0 7px 26px; position: relative; opacity: .93; font-size: 14px; }
.auth-side li::before { content: '✓'; position: absolute; left: 0; font-weight: 800; }
.auth-main { display: grid; place-items: center; padding: 40px 22px; background: var(--bg); }
.auth-box { width: 100%; max-width: 420px; }
.auth-box .card { padding: 28px; }

/* Charts */
.chart { width: 100%; height: 220px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }

/* Misc */
.kbd { font-family: monospace; background: var(--surface-3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 11px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; background: var(--surface-3); font-size: 11.5px; font-weight: 600; }
.trial-bar { background: linear-gradient(90deg, #f59e0b, #f97316); color: #fff; padding: 9px 18px; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 14px; }
.trial-bar a { color: #fff; text-decoration: underline; font-weight: 700; }
.whatsapp-float {
  position: fixed; bottom: 22px; right: 22px; width: 52px; height: 52px; border-radius: 50%;
  background: #25D366; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(37,211,102,.4); z-index: 90;
}
.whatsapp-float svg { width: 27px; height: 27px; color: #fff; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); width: var(--sidebar-w); }
  .main { margin-left: 0 !important; }
  .content { padding: 14px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 30px; }
}

/* ---------- public menu (responsive) ---------- */
.landing-nav { position: relative; }
.landing-nav .container { display: flex; align-items: center; gap: 18px; height: 62px; }
.landing-nav .brand-name { color: var(--text); }
.nav-links { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--text-2); font-size: 14px; font-weight: 550; }
.nav-links a:hover { color: var(--primary); }
.nav-burger {
  display: none; margin-left: auto; width: 40px; height: 40px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); border-radius: 10px; color: var(--text); cursor: pointer;
}
.nav-burger:hover { background: var(--surface-3); }
@media (max-width: 820px) {
  .nav-burger { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 62px; left: 0; right: 0; z-index: 60;
    flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(15,23,42,.14); padding: 6px 16px 14px;
    max-height: calc(100vh - 62px); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 4px; font-size: 15px; border-top: 1px solid var(--border); }
  .nav-links a.btn { margin-top: 10px; justify-content: center; border-top: 0; padding: 10px 14px; }
  .nav-links a.btn + a.btn { margin-top: 8px; }
}
@media (max-width: 480px) {
  .landing-nav .container { height: 56px; }
  .nav-links { top: 56px; }
}
