/* ============================================================
   Shafique Academy — Modern Glassmorphism Admin Panel CSS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg:          #080b11;
  --surface:     rgba(17, 24, 39, 0.55);
  --surface-hover: rgba(28, 38, 59, 0.7);
  --surface-solid: #0f1524;
  --sidebar:     #05080e;
  --sidebar-border: rgba(255, 255, 255, 0.04);
  --sidebar-tx:  #94a3b8;
  --sidebar-2:   rgba(255, 255, 255, 0.06);
  --primary:     #6366f1; /* Indigo */
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
  --accent:      #a855f7; /* Purple */
  --text:        #f8fafc;
  --text-secondary: #94a3b8;
  --muted:       #475569;
  --border:      rgba(255, 255, 255, 0.07);
  --border-focus: #6366f1;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 8px 32px 0 rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.03);
  --shadow-lg:   0 24px 70px rgba(0, 0, 0, 0.7);
  --transition:  all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg:    rgba(17, 24, 39, 0.45);
  --glass-border: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] {
  --bg:          #f6f8fa;
  --surface:     rgba(255, 255, 255, 0.7);
  --surface-hover: rgba(255, 255, 255, 0.95);
  --surface-solid: #ffffff;
  --sidebar:     #ffffff;
  --sidebar-border: rgba(15, 23, 42, 0.06);
  --sidebar-tx:  #475569;
  --sidebar-2:   #f1f5f9;
  --primary:     #4f46e5;
  --primary-hover: #3730a3;
  --primary-glow: rgba(79, 70, 229, 0.15);
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  --accent:      #9333ea;
  --text:        #0f172a;
  --text-secondary: #475569;
  --muted:       #94a3b8;
  --border:      rgba(15, 23, 42, 0.08);
  --border-focus: #4f46e5;
  --glass-bg:    rgba(255, 255, 255, 0.7);
  --glass-border: rgba(15, 23, 42, 0.06);
  --shadow:      0 8px 32px rgba(15, 23, 42, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  --shadow-lg:   0 24px 70px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] body {
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(79, 70, 229, 0.07) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(147, 51, 234, 0.05) 0px, transparent 50%),
    radial-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px);
}

/* Light Theme Element Overrides */
[data-theme="light"] .topbar {
  background: rgba(246, 248, 250, 0.8);
}

[data-theme="light"] .topbar-title {
  background: linear-gradient(to right, #0f172a 40%, rgba(15, 23, 42, 0.75));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hamburger span {
  background-color: var(--text);
}

[data-theme="light"] .search input {
  color: var(--text);
}

[data-theme="light"] .icon-btn:hover {
  background: rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .data-table .num {
  color: var(--text);
}

[data-theme="light"] .data-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.015);
}

[data-theme="light"] .auth-card h1,
[data-theme="light"] .field label,
[data-theme="light"] .input-wrap input {
  color: var(--text);
}

/* ── Comprehensive light mode fixes ───────────────────────── */

/* Text hardcoded to #fff that is invisible on a light background */
[data-theme="light"] .stat-value               { color: var(--text); }
[data-theme="light"] .panel-card-header h2      { color: var(--text); }
[data-theme="light"] .user-name                 { color: var(--text); }

/* Topbar search — dark glass becomes visible border on light bg */
[data-theme="light"] .search {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .search:focus-within {
  background: rgba(15, 23, 42, 0.06);
  box-shadow: 0 0 12px rgba(79, 70, 229, 0.1);
}

/* Icon buttons — near-invisible white glass becomes visible */
[data-theme="light"] .icon-btn {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
  color: var(--text-secondary);
}
[data-theme="light"] .icon-btn:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

/* User chip in topbar */
[data-theme="light"] .user-chip {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .user-chip:hover {
  background: rgba(15, 23, 42, 0.07);
  border-color: rgba(15, 23, 42, 0.15);
}

/* Table header row */
[data-theme="light"] .data-table th {
  background: rgba(15, 23, 42, 0.025);
}

/* Badges — white-on-white glow becomes a subtle tint */
[data-theme="light"] .badge {
  background: rgba(15, 23, 42, 0.05);
}

/* Card hover borders & shadows */
[data-theme="light"] .panel-card:hover {
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.07);
}
[data-theme="light"] .stat-card:hover {
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08), 0 0 15px rgba(79, 70, 229, 0.06);
}
[data-theme="light"] .pf-card:hover {
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.07);
}

/* Theme Toggle Icons */
#sun-icon { display: none !important; }
#moon-icon { display: inline-block !important; }

[data-theme="dark"] #sun-icon { display: inline-block !important; }
[data-theme="dark"] #moon-icon { display: none !important; }
[data-theme="light"] #sun-icon { display: none !important; }
[data-theme="light"] #moon-icon { display: inline-block !important; }



* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.1) 0px, transparent 50%),
    radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 24px 24px;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
}
::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.ic {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke-width: 2;
}

/* ---------- Layout ---------- */
.layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Sidebar Drawer */
.sidebar {
  width: 260px;
  background: var(--sidebar);
  border-right: 1px solid var(--sidebar-border);
  color: var(--sidebar-tx);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  height: 100vh;
  z-index: 50;
  transition: var(--transition);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 28px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-gradient);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 0 20px var(--primary-glow);
  position: relative;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0));
  z-index: 1;
  pointer-events: none;
}

.brand-mark.lg {
  width: 60px;
  height: 60px;
  font-size: 24px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

.brand-text {
  color: var(--text);
  font-weight: 500;
  line-height: 1.25;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.brand-text strong {
  font-weight: 800;
  color: var(--primary);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

/* Nav Link Styles */
.nav-section {
  margin: 20px 10px 8px;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  transition: opacity 0.25s ease, visibility 0.25s ease, margin 0.25s ease, height 0.25s ease;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-tx);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
}

.nav-link span {
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nav-link .ic {
  opacity: .7;
  transition: var(--transition);
}

.nav-link:hover {
  background: var(--sidebar-2);
  color: var(--text);
}

.nav-link:hover .ic {
  opacity: 1;
  transform: translateX(2px);
}

.nav-link.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--text);
  font-weight: 600;
}

.nav-link.active .ic {
  opacity: 1;
  color: var(--primary);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--sidebar-border);
  margin-top: 12px;
}

.nav-link.logout:hover {
  background: rgba(244, 63, 94, 0.12);
  color: #f43f5e;
}

.nav-link.logout:hover .ic {
  color: #f43f5e;
  transform: translateX(-2px);
}

/* Mobile Drawer Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.6);
  backdrop-filter: blur(4px);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* ---------- Main Container ---------- */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: 260px; /* Offset for sidebar */
  transition: var(--transition);
}

/* ---------- Topbar ---------- */
.topbar {
  min-height: 80px;
  background: rgba(8, 11, 17, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left {
  display: flex;
  flex-direction: column;
}

.topbar-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #fff 40%, rgba(255,255,255,0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topbar-sub {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 13px;
}

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

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 9px 16px;
  color: var(--text-secondary);
  transition: var(--transition);
  max-width: 240px;
}

.search:focus-within {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-focus);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}

.search input {
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  width: 160px;
  color: #fff;
}

.search input::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.icon-btn .dot {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
  animation: pulse 1.8s infinite;
}

/* Mobile Sidebar Toggle Hamburger Button */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 60;
  margin-right: 16px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background-color: #fff;
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

/* User profile widget in header */
.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px;
  border-radius: 30px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.user-chip:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

.user-meta {
  text-align: right;
  line-height: 1.3;
}

.user-name {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}

.user-role {
  font-size: 11px;
  color: var(--text-secondary);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
  font-size: 14px;
}

/* ---------- Content Grid ---------- */
.content {
  padding: 32px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Stat Cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.08);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  position: relative;
}

.stat-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  opacity: 0.15;
  background: currentColor;
}

.stat-icon .ic {
  width: 24px;
  height: 24px;
}

.stat-body {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
  font-weight: 500;
}

/* Stat Icon Color Tones (Vibrant CSS-based neon glow) */
.tone-blue   { color: #3b82f6; }
.tone-violet { color: #a855f7; }
.tone-teal   { color: #14b8a6; }
.tone-amber  { color: #f59e0b; }
.tone-rose   { color: #f43f5e; }
.tone-green  { color: #10b981; }

/* ---------- Panel Card ---------- */
.panel-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  margin-bottom: 32px;
}

.panel-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.panel-card-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-card-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.link-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.link-more:hover {
  color: #818cf8;
  text-decoration: underline;
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  width: 100%;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th, .data-table td {
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.01);
  font-weight: 700;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

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

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #fff;
}

.data-table .muted {
  color: var(--text-secondary);
}

.data-table .empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 64px 28px;
}

.empty-ic {
  width: 48px;
  height: 48px;
  opacity: .35;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.data-table .empty p {
  margin-top: 8px;
  font-weight: 500;
}

.mono {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Badges (Sleek Modern Aesthetics) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  position: relative;
  background: rgba(255,255,255,0.04);
  color: #94a3b8;
}

/* Badge colors mapping */
.badge::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 99px;
  opacity: 0.12;
  background: currentColor;
}

/* order status */
.st-pending    { color: #f59e0b; }
.st-confirmed  { color: #3b82f6; }
.st-processing { color: #8b5cf6; }
.st-shipped    { color: #06b6d4; }
.st-delivered,
.st-completed  { color: #10b981; }
.st-cancelled  { color: #ef4444; }
.st-refunded   { color: #64748b; }

/* payment status */
.pay-paid           { color: #10b981; }
.pay-unpaid         { color: #f59e0b; }
.pay-partially_paid { color: #8b5cf6; }
.pay-failed         { color: #ef4444; }
.pay-refunded       { color: #64748b; }

/* ---------- Authentication Screens (Moved to modern layout block) ---------- */

/* Password Reveal Toggle */
.password-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
  outline: none;
}

.password-toggle:hover {
  color: var(--text);
  transform: scale(1.08);
}

.input-wrap input[type="password"],
.input-wrap input[type="text"] {
  padding-right: 44px;
}

.auth-form .field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 13px;
  color: #fff;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-ic {
  position: absolute;
  left: 14px;
  color: var(--text-secondary);
  width: 18px;
  height: 18px;
  pointer-events: none;
  transition: var(--transition);
}

/* Premium Form Controls Styling */
.form-input,
.input-wrap input,
.input-wrap select,
.input-wrap textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
  font-family: inherit;
  box-sizing: border-box;
}

/* Adjust padding if there is a leading icon */
.input-wrap .input-ic ~ input,
.input-wrap .input-ic ~ select,
.input-wrap .input-ic ~ textarea,
.input-wrap .input-ic ~ .form-input {
  padding-left: 44px;
}

.form-input::placeholder,
.input-wrap input::placeholder,
.input-wrap textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

.form-input:focus,
.input-wrap input:focus,
.input-wrap select:focus,
.input-wrap textarea:focus {
  border-color: var(--border-focus);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.input-wrap input:focus + .input-ic,
.input-wrap .form-input:focus + .input-ic {
  color: var(--primary);
}

/* Light Theme overrides for all premium form controls */
[data-theme="light"] .form-input,
[data-theme="light"] .input-wrap input,
[data-theme="light"] .input-wrap select,
[data-theme="light"] .input-wrap textarea {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

[data-theme="light"] .form-input:focus,
[data-theme="light"] .input-wrap input:focus,
[data-theme="light"] .input-wrap select:focus,
[data-theme="light"] .input-wrap textarea:focus {
  background-color: #fff;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Select element specific styling for custom dropdown arrows */
select.form-input,
.input-wrap select,
.dt-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

[data-theme="light"] select.form-input,
[data-theme="light"] .input-wrap select,
[data-theme="light"] .dt-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

/* Style the native option dropdown rows to match the theme background & text colors */
select.form-input option,
.input-wrap select option,
.dt-select option {
  background-color: var(--surface-solid);
  color: var(--text);
  padding: 10px;
}

.field-error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 6px;
  display: block;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
  box-shadow: 0 4px 20px var(--primary-glow);
  position: relative;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0));
  opacity: 0.8;
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ============================================================
   Form Cards (pf-*) — shared by product form, adjustment form, etc.
   ============================================================ */
.pf-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
  transition: var(--transition);
}
.pf-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.pf-card-head-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}
.pf-card-head-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background: currentColor;
  opacity: .14;
}
.pf-card-head-icon .ic { width: 17px; height: 17px; }
.pf-card-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.pf-card-body { padding: 24px; }

.pf-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pf-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
}
.pf-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.pf-error {
  font-size: 12px;
  color: #ef4444;
  font-weight: 500;
  margin: 0;
}
.pf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pf-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 600px) {
  .pf-grid-2, .pf-grid-3 { grid-template-columns: 1fr; }
}

/* Toggle switch */
.pf-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.pf-toggle:last-of-type { border-bottom: none; padding-bottom: 0; }
.pf-toggle input[type="checkbox"] { display: none; }
.pf-toggle-track {
  width: 40px;
  height: 22px;
  border-radius: 99px;
  background: var(--border);
  border: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
  transition: var(--transition);
}
.pf-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: var(--transition);
}
.pf-toggle input:checked ~ .pf-toggle-track { background: var(--primary); border-color: var(--primary); }
.pf-toggle input:checked ~ .pf-toggle-track::after { left: 21px; background: #fff; }
.pf-toggle-info strong { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.pf-toggle-info span   { font-size: 11px; color: var(--text-secondary); }

/* Secondary / Cancel action button */
.btn-cancel {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--glass-bg);
  color: var(--text);
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-cancel:hover {
  border-color: var(--border-focus);
  color: var(--text);
}

/* Primary save / submit action button */
.btn-save {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 24px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 16px var(--primary-glow);
  transition: var(--transition);
  white-space: nowrap;
}
.btn-save:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert p {
  margin: 0;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 12px;
  margin: 28px 0 0;
}

.auth-footer .ic {
  width: 14px;
  height: 14px;
}

/* ---------- Keyframes ---------- */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(244, 63, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0);
  }
}

/* ============================================================
   Shafique Academy — Modern Authentication Layout
   ============================================================ */

.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.05) 0px, transparent 50%);
  padding: 24px;
  position: relative;
  overflow-x: hidden;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Auth Shell / Container */
.auth-shell {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  width: 100%;
  max-width: 1100px;
  min-height: 640px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08), 
              0 0 0 1px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  position: relative;
  z-index: 10;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Left: Form side */
.auth-form-side {
  padding: 56px 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

/* Logo Header */
.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.brand-logo-svg {
  width: 32px;
  height: 32px;
  color: #2563eb;
}

.brand-text-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

/* Form Headings */
.auth-card h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 32px;
  line-height: 1.5;
}

/* Alerts */
.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #ef4444;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 500;
}

/* Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap input {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
}

.input-wrap input:hover {
  border-color: #cbd5e1;
}

.input-wrap input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

/* Password Toggle */
.password-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 2;
}

.password-toggle:hover {
  color: #64748b;
}

.password-toggle .ic {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.field-error {
  color: #ef4444;
  font-size: 12px;
  font-weight: 500;
  margin-top: 2px;
}

/* Helper Row: Remember Me & Forgot Password */
.auth-helper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  margin-top: 4px;
}

.remember-me-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #64748b;
  user-select: none;
  font-weight: 500;
}

.remember-checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  background: #ffffff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.remember-checkbox:checked {
  background: #2563eb;
  border-color: #2563eb;
}

.remember-checkbox:checked::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  position: absolute;
  top: 1px;
}

.forgot-link {
  color: #2563eb;
  font-weight: 600;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Submit Button */
.btn-primary-mock {
  width: 100%;
  padding: 13px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: #2563eb;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  margin-top: 8px;
}

.btn-primary-mock:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
}

.btn-primary-mock:active {
  transform: translateY(0);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 28px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider:not(:empty)::before {
  margin-right: 12px;
}

.auth-divider:not(:empty)::after {
  margin-left: 12px;
}

/* Social Buttons */
.social-login-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.social-svg {
  width: 18px;
  height: 18px;
}

/* Footer / Register Link */
.auth-register-text {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.auth-register-text a {
  color: #2563eb;
  font-weight: 600;
  transition: color 0.2s ease;
}

.auth-register-text a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Right: Brand Side */
.auth-aside {
  background: #2563eb;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

/* Abstract overlay circles on Brand sidebar */
.auth-aside::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 400px;
  height: 400px;
  border: 45px solid rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  pointer-events: none;
}

.auth-aside::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 300px;
  height: 300px;
  border: 30px solid rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  pointer-events: none;
}

.auth-aside-inner {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.auth-aside h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.auth-aside p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  line-height: 1.5;
}

/* Mock Dashboard Wrap */
.mock-dashboard-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Mock Dashboard Frame */
.mock-dashboard {
  width: 100%;
  max-width: 420px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mock-sidebar {
  display: flex;
  gap: 5px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.mock-main {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Top Row Cards */
.mock-top-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mock-top-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.mock-top-card.accent-card {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.mock-card-title {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 700;
  margin-bottom: 4px;
}

.mock-card-val {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.mock-card-sub {
  font-size: 7.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

/* Middle Section Layout */
.mock-mid-section {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 10px;
}

.mock-chart-card,
.mock-ring-card,
.mock-table-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
}

/* Sales Overview Bar Chart */
.mock-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 48px;
  padding-top: 8px;
  gap: 4px;
}

.mock-chart-bar {
  flex: 1;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
}

.mock-chart-bar.highlight {
  background: #ffffff;
}

/* Ring / Circular Chart */
.mock-ring-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 48px;
  padding-top: 2px;
}

.mock-svg-ring {
  width: 44px;
  height: 44px;
  transform: rotate(-90deg);
}

.mock-ring-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mock-ring-val {
  font-size: 8px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.mock-ring-lbl {
  font-size: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

/* Table Card */
.mock-table-rows {
  display: flex;
  flex-direction: column;
  margin-top: 6px;
}

.mock-table-row {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr 1.2fr 1.5fr;
  font-size: 7.5px;
  color: rgba(255, 255, 255, 0.8);
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  align-items: center;
}

.mock-table-row:last-child {
  border-bottom: none;
}

.mock-table-row.header-row {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  padding-top: 0;
}

.status-badge {
  font-size: 6.5px;
  font-weight: 600;
  padding: 1.5px 4px;
  border-radius: 4px;
  text-align: center;
  width: fit-content;
}

.status-badge.success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.status-badge.pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

/* Outer Viewport Footers */
.outer-auth-footer {
  margin-top: 24px;
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.outer-auth-footer a {
  color: #2563eb;
  font-weight: 600;
  transition: color 0.2s ease;
}

.outer-auth-footer a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* ---------- Responsive Layout Breakpoints ---------- */

/* Desktop & Medium Screens (Hide Mobile Hamburger) */
@media (min-width: 1025px) {
  .sidebar-overlay {
    display: none !important;
  }
}

/* Tablet Layout (1024px and below) */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .main {
    margin-left: 0;
  }
  
  .hamburger {
    display: flex;
  }
  
  .topbar {
    padding: 16px 24px;
  }
  
  .content {
    padding: 24px;
  }
  
  /* Sidebar show drawer */
  .layout.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6);
  }
  
  .layout.sidebar-open .sidebar-overlay {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
  
  /* Hamburger Open State */
  .layout.sidebar-open .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(2px, 2px);
  }
  
  .layout.sidebar-open .hamburger span:nth-child(2) {
    opacity: 0;
  }
  
  .layout.sidebar-open .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(0, -1px);
  }
}

/* Mobile Screens (860px and below) */
@media (max-width: 860px) {
  .search {
    display: none; /* Hide topbar search to save space */
  }
  
  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 450px;
    min-height: auto;
  }
  
  .auth-aside {
    display: none;
  }
  
  .auth-form-side {
    padding: 40px 24px;
  }
}

/* Tiny Mobile Screens (480px and below) */
@media (max-width: 480px) {
  .topbar-sub, .user-meta {
    display: none; /* Save header space */
  }
  
  .topbar {
    min-height: 70px;
    padding: 12px 16px;
  }
  
  .content {
    padding: 16px;
  }
  
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .stat-card {
    padding: 18px;
  }
  
  .panel-card-header {
    padding: 16px 20px;
  }
  
  .data-table th, .data-table td {
    padding: 12px 18px;
  }
}

/* Desktop Sidebar Collapsed State styling */
@media (min-width: 1025px) {
  .sidebar-collapsed .sidebar {
    width: 80px;
    padding: 24px 14px;
  }
  
  .sidebar-collapsed .main {
    margin-left: 80px;
  }
  
  .sidebar-collapsed .sidebar .brand {
    padding: 4px 0 28px;
    justify-content: center;
    gap: 0;
  }
  
  .sidebar-collapsed .sidebar .brand-text {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    pointer-events: none;
    width: 0;
    height: 0;
    overflow: hidden;
  }
  
  .sidebar-collapsed .sidebar .nav-section {
    height: 1px;
    background: var(--border);
    margin: 16px 4px;
    text-indent: -9999px;
    overflow: hidden;
    opacity: 0.5;
  }
  
  .sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
  }
  
  .sidebar-collapsed .sidebar .nav-link span {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    pointer-events: none;
    width: 0;
    height: 0;
    overflow: hidden;
  }
  
  .sidebar-collapsed .sidebar .nav-link::before {
    display: none;
  }
  
  .sidebar-collapsed .sidebar .nav-link:hover .ic {
    transform: scale(1.15);
  }
}

/* ============================================================
   Sub-tabs (section navigation) + API Data Table
   ============================================================ */
.sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: var(--transition);
}

.sub-tab .ic {
  width: 17px;
  height: 17px;
}

.sub-tab:hover {
  color: var(--text);
}

.sub-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ---------- Data Table Toolbar ---------- */
.dt-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.dt-select {
  background-color: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 99px;
  padding: 9px 36px 9px 16px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.dt-select:hover { border-color: var(--border-focus); }
.dt-select:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--primary-glow); }

.dt-add {
  width: auto;
  margin: 0 0 0 auto;
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dt-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---------- Sortable Headers ---------- */
.data-table th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: color 0.15s ease;
}

.data-table th.sortable:hover { color: var(--text); }

.data-table th.sortable::after {
  content: '⇅';
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.35;
}

.data-table th.sortable.num::after { margin-left: 6px; }
.data-table th.sortable.sort-asc::after  { content: '↑'; opacity: 1; color: var(--primary); }
.data-table th.sortable.sort-desc::after { content: '↓'; opacity: 1; color: var(--primary); }

/* ---------- Footer / Pagination ---------- */
.dt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

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

.dt-pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dt-page-btn {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.dt-page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.dt-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.dt-page-info {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 0 6px;
}

/* ---------- Loading Skeleton ---------- */
.skeleton-row td { padding: 14px 28px; }

.skeleton-bar {
  display: block;
  height: 16px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.09) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 200% 100%;
  animation: dt-shimmer 1.4s ease-in-out infinite;
}

[data-theme="light"] .skeleton-bar {
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.04) 25%,
    rgba(15, 23, 42, 0.08) 50%,
    rgba(15, 23, 42, 0.04) 75%
  );
  background-size: 200% 100%;
}

@keyframes dt-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 768px) {
  .dt-add { margin-left: 0; width: 100%; justify-content: center; }
}

/* ============================================================
   Dashboard v2 — ds-* Component Styles
   ============================================================ */

/* ── Overview Banner ── */
.ds-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 22px 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.ds-overview::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: var(--radius) var(--radius) 0 0;
}

.ds-overview-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.ds-overview-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.ds-overview-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.ds-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ── KPI Grid (6 cards in 3×2) ── */
.ds-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.ds-kpi-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.ds-kpi-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 14px 40px rgba(0,0,0,0.5), 0 0 20px rgba(99,102,241,0.06);
}

[data-theme="light"] .ds-kpi-card:hover {
  border-color: rgba(15,23,42,0.12);
  box-shadow: 0 14px 40px rgba(15,23,42,0.08);
}

/* Colored top accent bar scoped to KPI cards only */
.ds-kpi-card.ds-tone-blue   { border-top: 3px solid #3b82f6; }
.ds-kpi-card.ds-tone-violet { border-top: 3px solid #a855f7; }
.ds-kpi-card.ds-tone-teal   { border-top: 3px solid #14b8a6; }
.ds-kpi-card.ds-tone-amber  { border-top: 3px solid #f59e0b; }
.ds-kpi-card.ds-tone-rose   { border-top: 3px solid #f43f5e; }
.ds-kpi-card.ds-tone-green  { border-top: 3px solid #10b981; }

/* KPI icon — tinted per tone */
.ds-kpi-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ds-tone-blue   .ds-kpi-icon { background: rgba(59,130,246,0.12); color: #3b82f6; }
.ds-tone-violet .ds-kpi-icon { background: rgba(168,85,247,0.12); color: #a855f7; }
.ds-tone-teal   .ds-kpi-icon { background: rgba(20,184,166,0.12); color: #14b8a6; }
.ds-tone-amber  .ds-kpi-icon { background: rgba(245,158,11,0.12); color: #f59e0b; }
.ds-tone-rose   .ds-kpi-icon { background: rgba(244,63,94,0.12);  color: #f43f5e; }
.ds-tone-green  .ds-kpi-icon { background: rgba(16,185,129,0.12); color: #10b981; }

.ds-kpi-icon .ic { width: 24px; height: 24px; }

.ds-kpi-body { flex: 1; min-width: 0; }

.ds-kpi-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

.ds-kpi-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  font-weight: 500;
}

/* Subtle background glow bubble (decorative) */
.ds-kpi-card::after {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0.05;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.ds-kpi-card.ds-tone-blue::after   { background: #3b82f6; }
.ds-kpi-card.ds-tone-violet::after { background: #a855f7; }
.ds-kpi-card.ds-tone-teal::after   { background: #14b8a6; }
.ds-kpi-card.ds-tone-amber::after  { background: #f59e0b; }
.ds-kpi-card.ds-tone-rose::after   { background: #f43f5e; }
.ds-kpi-card.ds-tone-green::after  { background: #10b981; }

.ds-kpi-card:hover::after { opacity: 0.1; transform: scale(1.4); }

/* ── Today's Activity Row (4 cards) ── */
.ds-today-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.ds-today-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.ds-today-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

[data-theme="light"] .ds-today-card:hover {
  border-color: rgba(15,23,42,0.12);
  box-shadow: 0 10px 30px rgba(15,23,42,0.07);
}

.ds-today-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ds-tone-blue   .ds-today-icon { background: rgba(59,130,246,0.12); color: #3b82f6; }
.ds-tone-violet .ds-today-icon { background: rgba(168,85,247,0.12); color: #a855f7; }
.ds-tone-amber  .ds-today-icon { background: rgba(245,158,11,0.12); color: #f59e0b; }
.ds-tone-green  .ds-today-icon { background: rgba(16,185,129,0.12); color: #10b981; }

.ds-today-icon .ic { width: 20px; height: 20px; }

.ds-today-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ds-today-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-weight: 700;
}

.ds-today-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}

.ds-today-value.warn { color: #f59e0b; }

[data-theme="light"] .ds-kpi-value,
[data-theme="light"] .ds-today-value { color: var(--text); }

/* ── Customer avatar in orders table ── */
.ds-cust {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ds-cust-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(99,102,241,0.2);
}

/* ── Responsive breakpoints for ds-* ── */
@media (max-width: 1200px) {
  .ds-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 960px) {
  .ds-kpi-grid   { grid-template-columns: repeat(2, 1fr); }
  .ds-today-grid { grid-template-columns: repeat(2, 1fr); }
  .ds-overview   { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 600px) {
  .ds-kpi-grid   { grid-template-columns: 1fr 1fr; gap: 14px; }
  .ds-today-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ds-kpi-value  { font-size: 26px; }
}

@media (max-width: 420px) {
  .ds-kpi-grid   { grid-template-columns: 1fr; }
  .ds-today-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Dashboard — Charts & Quick Stats
   ============================================================ */

/* ── Quick Stats Row ── */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.quick-stat {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: var(--transition);
}

.quick-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .quick-stat:hover {
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.quick-stat-info { flex: 1; min-width: 0; }

.quick-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 6px;
  white-space: nowrap;
}

.quick-stat-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}

.quick-stat-value.warn   { color: #f59e0b; }
.quick-stat-value.danger { color: #ef4444; }

.quick-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  position: relative;
}

.quick-stat-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: currentColor;
  opacity: .13;
}

.quick-stat-icon .ic { width: 20px; height: 20px; }

/* ── Chart Grid Layouts ── */
.chart-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.chart-row-equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

/* ── Chart Body ── */
.chart-body {
  padding: 20px 24px 28px;
  height: 280px;
  position: relative;
}

.chart-body--donut {
  height: 300px;
}

/* ── Panel Card Subtitle ── */
.panel-card-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 3px;
}

/* ── Light theme quick stat overrides ── */
[data-theme="light"] .quick-stat-value { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .chart-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .chart-row-equal {
    grid-template-columns: 1fr;
  }
  .quick-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .quick-stats {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
  }
  .chart-body {
    height: 220px;
  }
}
