/* =============================================================
   ROOT POS SAAS — Design System
   Font: Rubik (Arabic) | Clean Split-Panel Auth Style
   RTL | Dark Mode | Responsive
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* ======================== CSS Variables ======================== */
:root {
  --primary:        #1a1a2e;
  --accent:         #00b894;
  --accent-hover:   #00a381;
  --accent-light:   rgba(0, 184, 148, 0.12);
  --bg:             #fafafa;
  --bg-card:        #ffffff;
  --bg-secondary:   #f5f5f5;
  --border:         #f0f0f0;
  --border-hover:   #00b894;
  --text:           #1a1a2e;
  --text-secondary: #6b7280;
  --text-muted:     #9ca3af;
  --shadow:         0 2px 12px rgba(0,0,0,.06);
  --shadow-hover:   0 8px 24px rgba(0,0,0,.12);
  --radius:         16px;
  --radius-sm:      10px;
  --radius-xs:      6px;
  --sidebar-w:      260px;
  --sidebar-bg:     #1a1a2e;
  --sidebar-text:   rgba(255,255,255,.85);
  --sidebar-active: #00b894;
  --topbar-h:       60px;
  --transition:     .2s ease;
  --font:           'Rubik', 'Rubik Arabic', sans-serif;
  --danger:         #ef4444;
  --warning:        #f59e0b;
  --success:        #10b981;
  --info:           #3b82f6;
}

[data-theme="dark"] {
  --primary:        #0d0d1a;
  --bg:             #0f0f1a;
  --bg-card:        #1a1a2e;
  --bg-secondary:   #242436;
  --border:         #2d2d45;
  --border-hover:   #00b894;
  --text:           #e8e8f0;
  --text-secondary: #9090a8;
  --text-muted:     #6060788;
  --shadow:         0 2px 12px rgba(0,0,0,.3);
  --shadow-hover:   0 8px 24px rgba(0,0,0,.4);
  --sidebar-bg:     #0d0d1a;
}

/* ======================== Base Reset ======================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 15px;
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

/* ======================== Layout ======================== */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ======================== Sidebar ======================== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--transition), transform var(--transition);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.sidebar-brand {
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand .brand-logo {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-brand .brand-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .3px;
}

.sidebar-brand .brand-sub {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  font-weight: 400;
}

/* Topbar user + wallet info */
.sidebar-topinfo {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-balance {
  font-size: 19px;
  font-weight: 700;
  color: var(--accent);
  direction: ltr;
  text-align: right;
}

.sidebar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-icon-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  border: none;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.sidebar-icon-btn:hover { background: rgba(255,255,255,.15); color: #fff; }
.sidebar-icon-btn .badge-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  border-radius: 50%; background: #ef4444;
  border: 1.5px solid var(--sidebar-bg);
}

/* Nav Groups */
.sidebar-nav { padding: 10px 0; flex: 1; }

.nav-group-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 14px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: rgba(255,255,255,.7);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  text-decoration: none;
}

.nav-item i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }

.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
}

.nav-item.active {
  color: #fff;
  background: rgba(0,184,148,.15);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  right: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 3px 0 0 3px;
}

.nav-item.active i { color: var(--accent); }

/* Collapsible sub-nav */
.nav-group { border-radius: 0; }

.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 18px;
  color: rgba(255,255,255,.7);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.nav-group-header:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-group-header .nav-group-left { display: flex; align-items: center; gap: 10px; }
.nav-group-header i { width: 18px; text-align: center; font-size: 14px; }
.nav-group-chevron { font-size: 10px; transition: transform var(--transition); }
.nav-group.open .nav-group-chevron { transform: rotate(90deg); }

.nav-sub {
  display: none;
  padding-right: 46px;
}
.nav-group.open .nav-sub { display: block; }

.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 0;
  color: rgba(255,255,255,.55);
  font-size: 13px;
  text-decoration: none;
  transition: color var(--transition);
  border-right: 2px solid rgba(255,255,255,.08);
}
.nav-sub-item:hover { color: rgba(255,255,255,.9); }
.nav-sub-item.active {
  color: var(--accent);
  border-right-color: var(--accent);
}

/* Sidebar footer */
.sidebar-footer {
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}

.sidebar-user-name { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.3; }
.sidebar-user-role { font-size: 11px; color: rgba(255,255,255,.4); }

/* ======================== Main Content ======================== */
.main-content {
  margin-right: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  transition: margin var(--transition);
}

/* ======================== Topbar ======================== */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0; z-index: 900;
  box-shadow: var(--shadow);
}

.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.topbar-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary);
}
.topbar-breadcrumb a { color: var(--accent); }

.page-content {
  padding: 24px;
  flex: 1;
}

/* ======================== Cards ======================== */
.card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.card:hover { border-color: var(--border-hover); }

.card-body { padding: 20px; }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; font-size: 15px;
}

/* Stat Cards */
.stat-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
  cursor: default;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}
.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-info { flex: 1; }
.stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Quick Action Cards */
.quick-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.quick-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  color: var(--text);
}
.quick-card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.quick-card-title { font-size: 14px; font-weight: 600; }
.quick-card-sub { font-size: 12px; color: var(--text-secondary); }

/* ======================== Tables ======================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
}

table.rtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--bg-card);
}

table.rtable thead tr {
  background: var(--bg-secondary);
}

table.rtable th {
  padding: 12px 16px;
  text-align: right;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}

table.rtable td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.rtable tbody tr:last-child td { border-bottom: none; }

table.rtable tbody tr:hover { background: var(--bg-secondary); }

/* ======================== Forms ======================== */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-control, .form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  direction: rtl;
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control { min-height: 100px; resize: vertical; }

.form-group { margin-bottom: 18px; }

.input-group {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.input-group .form-control {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  flex: 1;
}
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ======================== Buttons ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.btn-dark {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-dark:hover { background: #2d2d50; color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.btn-warning {
  background: var(--warning);
  color: #fff;
  border-color: var(--warning);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-icon { padding: 9px; min-width: 38px; }
.btn-block { width: 100%; }

.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ======================== Badges ======================== */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.badge-success  { background: rgba(16,185,129,.15); color: #059669; }
.badge-warning  { background: rgba(245,158,11,.15);  color: #d97706; }
.badge-danger   { background: rgba(239,68,68,.15);   color: #dc2626; }
.badge-info     { background: rgba(59,130,246,.15);  color: #2563eb; }
.badge-secondary{ background: var(--bg-secondary);   color: var(--text-secondary); }
.badge-primary  { background: var(--accent-light);   color: var(--accent); }
.badge-premium  { background: linear-gradient(135deg,#f59e0b,#ef4444); color: #fff; }

/* ======================== Modals ======================== */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: modalIn .25s ease;
}

@keyframes modalIn {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 15px;
}

.modal-body { padding: 20px; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.modal-close {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-secondary);
  border: none; cursor: pointer; border-radius: 8px;
  color: var(--text-secondary); font-size: 16px;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--danger); color: #fff; }

/* ======================== Alerts ======================== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 10px;
  border: 1.5px solid transparent;
}
.alert-success { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.25); color: #065f46; }
.alert-danger   { background: rgba(239,68,68,.1);  border-color: rgba(239,68,68,.25);  color: #991b1b; }
.alert-warning  { background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.25); color: #92400e; }
.alert-info     { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.25); color: #1e3a8a; }

[data-theme="dark"] .alert-success { color: #6ee7b7; }
[data-theme="dark"] .alert-danger  { color: #fca5a5; }
[data-theme="dark"] .alert-warning { color: #fcd34d; }
[data-theme="dark"] .alert-info    { color: #93c5fd; }

/* ======================== Tabs ======================== */
.tabs {
  display: flex; gap: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 4px;
  border: 1.5px solid var(--border);
  flex-wrap: wrap;
}

.tab-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  font-size: 13px; font-weight: 500;
  cursor: pointer; border: none; background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); background: rgba(0,0,0,.04); }
.tab-btn.active {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
  box-shadow: var(--shadow);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ======================== Search & Filter Bar ======================== */
.filter-bar {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.filter-bar .form-control,
.filter-bar .form-select { width: auto; flex: 1; min-width: 160px; }

/* ======================== Toasts ======================== */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  display: flex; align-items: center; gap: 10px;
  min-width: 280px;
  pointer-events: all;
  animation: toastIn .3s ease;
}
@keyframes toastIn {
  from { transform: translateX(-20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.toast-success { border-right: 4px solid var(--success); }
.toast-danger  { border-right: 4px solid var(--danger); }
.toast-warning { border-right: 4px solid var(--warning); }
.toast-info    { border-right: 4px solid var(--info); }

/* ======================== Auth Pages ======================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.auth-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}

.auth-card-header {
  padding: 32px 32px 24px;
  text-align: center;
}

.auth-logo {
  width: 56px; height: 56px;
  background: var(--primary);
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: var(--accent);
  margin-bottom: 16px;
}

.auth-title {
  font-size: 22px; font-weight: 800; color: var(--text);
  margin-bottom: 4px;
}

.auth-subtitle { font-size: 13px; color: var(--text-secondary); }

.auth-card-body { padding: 0 32px 32px; }

.auth-divider {
  text-align: center;
  position: relative;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%; right: 0; left: 0;
  height: 1px;
  background: var(--border);
}
.auth-divider span {
  position: relative;
  background: var(--bg-card);
  padding: 0 12px;
}

/* ======================== Landing Page ======================== */
.landing { font-size: 15px; }

.landing-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
  transition: all var(--transition);
}

[data-theme="dark"] .landing-nav { background: rgba(26,26,46,.92); }

.landing-nav-logo { display: flex; align-items: center; gap: 12px; }
.landing-nav-logo .logo-box {
  width: 38px; height: 38px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 18px; font-weight: 800;
}
.landing-nav-logo .logo-text { font-size: 18px; font-weight: 800; color: var(--text); }
.landing-nav-logo .logo-sub { font-size: 10px; color: var(--text-muted); }

.landing-nav-links { display: flex; gap: 28px; list-style: none; }
.landing-nav-links a { font-size: 14px; font-weight: 500; color: var(--text-secondary); transition: color var(--transition); }
.landing-nav-links a:hover { color: var(--accent); }

.landing-hero {
  padding: 80px 5% 60px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0,184,148,.04) 0%, transparent 60%);
}

.landing-hero h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--primary) 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .landing-hero h1 {
  background: linear-gradient(135deg, #e8e8f0 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-hero p {
  font-size: 18px; color: var(--text-secondary); max-width: 600px; margin: 0 auto 36px;
}

.pricing-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all var(--transition);
}
.pricing-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.pricing-card.popular {
  border-color: var(--accent);
  position: relative;
}
.pricing-card.popular::before {
  content: 'الأكثر شيوعاً';
  position: absolute; top: -12px; right: 50%; transform: translateX(50%);
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 4px 14px; border-radius: 20px;
}

.pricing-price {
  font-size: 42px; font-weight: 800; color: var(--text); line-height: 1;
  margin: 16px 0 4px;
}
.pricing-period { font-size: 12px; color: var(--text-muted); }
.pricing-features { list-style: none; margin: 24px 0; display: flex; flex-direction: column; gap: 10px; }
.pricing-features li {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-secondary);
}
.pricing-features li::before {
  content: '✓';
  color: var(--accent); font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}

/* ======================== POS Screen ======================== */
.pos-layout {
  display: flex;
  height: calc(100vh - var(--topbar-h));
  overflow: hidden;
}

.pos-products {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg);
}

.pos-cart {
  width: 380px;
  background: var(--bg-card);
  border-right: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.pos-search {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pos-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.pos-product-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.pos-product-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.pos-product-card:active { transform: scale(.96); }

.pos-product-img {
  width: 64px; height: 64px;
  border-radius: 10px;
  object-fit: cover;
  margin: 0 auto 10px;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}

.pos-product-name { font-size: 13px; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.pos-product-price { font-size: 15px; font-weight: 700; color: var(--accent); }
.pos-product-stock { font-size: 11px; color: var(--text-muted); }

/* Cart */
.pos-cart-items { flex: 1; overflow-y: auto; padding: 12px; }
.pos-cart-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.pos-cart-item-info { flex: 1; min-width: 0; }
.pos-cart-item-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-cart-item-price { font-size: 12px; color: var(--text-secondary); }

.qty-control {
  display: flex; align-items: center; gap: 6px;
}
.qty-btn {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  cursor: pointer; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  color: var(--text);
}
.qty-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.qty-val { font-size: 14px; font-weight: 700; min-width: 28px; text-align: center; }

.pos-cart-footer {
  padding: 14px;
  border-top: 1.5px solid var(--border);
}

.pos-totals { margin-bottom: 14px; }
.pos-total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; font-size: 13.5px;
}
.pos-total-row.grand {
  font-size: 18px; font-weight: 800;
  border-top: 2px solid var(--border);
  padding-top: 12px; margin-top: 6px;
}

.payment-methods {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 8px; margin-bottom: 10px;
}

.pay-btn {
  padding: 10px 4px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--bg-card); color: var(--text);
  cursor: pointer; transition: all var(--transition);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.pay-btn:hover { border-color: var(--accent); color: var(--accent); }
.pay-btn.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.pay-btn i { font-size: 16px; }

/* ======================== Dropdowns ======================== */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 180px;
  z-index: 1000;
  display: none;
  overflow: hidden;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; font-size: 13.5px;
  color: var(--text); cursor: pointer;
  transition: background var(--transition);
  border: none; background: none; width: 100%; text-align: right;
}
.dropdown-item:hover { background: var(--bg-secondary); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ======================== Empty State ======================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.empty-state-icon { font-size: 52px; margin-bottom: 16px; opacity: .35; }
.empty-state h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.empty-state p { font-size: 13.5px; }

/* ======================== Avatar ======================== */
.avatar {
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
  background: var(--accent-light); color: var(--accent);
}
.avatar-sm  { width: 32px; height: 32px; font-size: 12px; }
.avatar-md  { width: 42px; height: 42px; font-size: 15px; }
.avatar-lg  { width: 56px; height: 56px; font-size: 20px; }

/* ======================== Misc ======================== */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

.text-accent  { color: var(--accent) !important; }
.text-danger  { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }

.fw-bold   { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.w-100 { width: 100%; }
.text-center { text-align: center; }
.text-end { text-align: left; }
.float-start { float: right; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

/* ======================== How It Works Tooltip ======================== */
.how-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  font-size: 12.5px; font-weight: 600;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary); cursor: pointer;
  transition: all var(--transition);
}
.how-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ======================== Scrollbar ======================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ======================== Spinner ======================== */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ======================== Responsive ======================== */
@media (max-width: 1024px) {
  :root { --sidebar-w: 220px; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-right: 0; }
  .page-content { padding: 16px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .pos-layout { flex-direction: column-reverse; }
  .pos-cart { width: 100%; height: 55vh; border-right: none; border-top: 1.5px solid var(--border); }
  .pos-products { height: 45vh; }
  .landing-hero h1 { font-size: 32px; }
}

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .payment-methods { grid-template-columns: 1fr 1fr; }
  .auth-card-header, .auth-card-body { padding-left: 20px; padding-right: 20px; }
}
