/**
 * M Ghaffar Graphics - Executive Studio Admin & Client Portal Design System
 * World-Class SaaS Aesthetic: Sky Light Blue & Executive Slate Navy
 * Palette: Sky Light Blue (#0084ff, #0284c7, #38bdf8), Slate (#0f172a, #334155, #64748b), Surface (#ffffff, #f8fafc)
 */

:root {
  --primary: #0284c7;
  --primary-light: #38bdf8;
  --primary-dark: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.18);
  --primary-soft: #e0f2fe;
  --primary-gradient: linear-gradient(135deg, #0284c7 0%, #0084ff 100%);
  
  --dark-navy: #0b192e;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;
  
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --border: #e2e8f0;
  --border-focus: #0284c7;
  --text: #0f172a;
  --text-muted: #64748b;
  
  --success: #059669;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  
  --sidebar-width: 278px;
  --sidebar-collapsed-width: 76px;
  --topbar-height: 72px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;
  
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 6px -1px rgba(15, 23, 42, 0.05), 0 1px 3px -1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 6px 18px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 32px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 24px rgba(2, 132, 199, 0.22);
  
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==============================================================================
   RESET & BASE TYPOGRAPHY
   ============================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ==============================================================================
   EXECUTIVE SIDEBAR
   ============================================================================== */
.admin-sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  color: var(--slate-700);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: var(--transition);
}

.admin-sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

/* Sidebar Brand Header */
.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 0.85rem;
  background: #ffffff;
  flex-shrink: 0;
}

.brand-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  flex-shrink: 0;
}

.brand-circle .m-let,
.brand-circle .g-let {
  color: #ffffff !important;
}

.brand-meta {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  overflow: hidden;
  transition: var(--transition);
}

.admin-sidebar.collapsed .brand-meta {
  display: none;
}

.brand-meta strong {
  font-size: 1rem;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.brand-meta span {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

/* Sidebar Quick Search */
.sidebar-search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.9rem 1rem 0.3rem;
  padding: 0.55rem 0.85rem;
  background: var(--slate-50);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--slate-400);
  transition: var(--transition);
}

.sidebar-search:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  color: var(--primary);
}

.sidebar-search input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--slate-900);
  font-size: 0.84rem;
  font-weight: 500;
  outline: none;
}

.sidebar-search input::placeholder {
  color: var(--slate-400);
  font-size: 0.82rem;
}

.sidebar-search .search-shortcut {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--slate-400);
  background: var(--slate-200);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
}

.admin-sidebar.collapsed .sidebar-search {
  display: none;
}

/* Navigation List */
.sidebar-nav {
  list-style: none;
  padding: 0.5rem 0.8rem 1.5rem;
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--slate-200) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--slate-200);
  border-radius: 999px;
}

/* Organized Category Headers */
.nav-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-400);
  padding: 1.1rem 0.65rem 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-label::after {
  content: '';
  flex-grow: 1;
  height: 1px;
  background: var(--slate-100);
  margin-left: 0.6rem;
}

.admin-sidebar.collapsed .nav-label {
  display: none;
}

.nav-item {
  margin-bottom: 0.2rem;
  width: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.62rem 0.8rem;
  color: var(--slate-600);
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  min-height: 42px;
}

.nav-link:hover {
  background: var(--slate-50);
  color: var(--slate-900);
  transform: translateX(2px);
}

.nav-link.active {
  background: var(--primary-soft) !important;
  color: var(--primary-dark) !important;
  font-weight: 700;
  box-shadow: inset 3.5px 0 0 var(--primary);
}

.nav-link.active i {
  color: var(--primary) !important;
}

.nav-link i {
  font-size: 1.05rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  color: var(--slate-400);
  transition: var(--transition);
}

.nav-link:hover i {
  color: var(--primary);
}

.link-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-sidebar.collapsed .link-text {
  display: none;
}

/* Status Badges */
.badge-count {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary-dark);
  line-height: 1.2;
  white-space: nowrap;
  margin-left: auto;
}

.badge-count.danger,
.badge-count[style*="background:#dc2626"],
.badge-count[style*="background:#ef4444"] {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca;
}

.badge-count[style*="background:#25d366"] {
  background: #f0fdf4 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0;
}

.admin-sidebar.collapsed .badge-count {
  display: none;
}

/* Sidebar Bottom Footer Card */
.sidebar-bottom {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--slate-50);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.sidebar-bottom .nav-link {
  min-height: 38px;
  padding: 0.45rem 0.7rem;
  color: var(--primary) !important;
  font-weight: 700;
  font-size: 0.82rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.sidebar-bottom .nav-link:hover {
  background: var(--primary-soft);
  border-color: var(--primary-light);
  transform: none;
}

/* ==============================================================================
   MAIN CONTENT & TOPBAR
   ============================================================================== */
.admin-main {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  background: var(--bg);
}

.admin-main.expanded {
  margin-left: var(--sidebar-collapsed-width);
}

/* Modern Topbar */
.admin-topbar {
  height: var(--topbar-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.8rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-width: 0;
}

.sidebar-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--slate-50);
  border: 1px solid var(--border);
  color: var(--slate-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-light);
}

/* Topbar Breadcrumb */
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-breadcrumb .bc-root {
  color: var(--slate-500);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.topbar-breadcrumb .bc-sep {
  font-size: 0.7rem;
  color: var(--slate-300);
}

.topbar-breadcrumb .bc-current {
  color: var(--slate-900);
  font-weight: 800;
  font-size: 1.05rem;
}

.topbar-title h2 {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--slate-900);
  letter-spacing: -0.01em;
  margin: 0;
}

/* Topbar Right Suite Controls */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Live Status & Pixel Chips */
.topbar-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25);
  animation: liveDotPulse 2s infinite;
}

.topbar-pixel-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid #bae6fd;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Administrator Profile Pill */
.topbar-admin-profile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.3rem 0.65rem 0.3rem 0.4rem;
  background: var(--slate-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  margin-left: 0.4rem;
}

.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary-light);
}

.topbar-admin-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.topbar-admin-info strong {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--slate-900);
}

.topbar-admin-info small {
  font-size: 0.68rem;
  color: var(--primary);
  font-weight: 700;
}

.btn-topbar-logout {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--slate-200);
  color: var(--slate-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: var(--transition);
}

.btn-topbar-logout:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* ==============================================================================
   PANELS, CARDS & CANVAS
   ============================================================================== */
.admin-body {
  padding: 2rem 2.2rem 3.5rem;
  min-width: 0;
  max-width: 1560px;
  width: 100%;
  margin: 0 auto;
}

.panel-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.04);
  padding: 2rem;
  margin-bottom: 2.2rem;
  transition: var(--transition);
}

.panel-card:hover {
  border-color: #cbd5e1;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--slate-100);
}

.panel-header h3 {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--slate-900);
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.panel-header h3 i {
  color: var(--primary);
  font-size: 1.15rem;
}

.panel-header p {
  font-size: 0.88rem;
  color: var(--slate-500);
  line-height: 1.6;
  margin-top: 0.35rem;
  max-width: 780px;
}

/* Alert Notification Banners */
.alert-banner {
  border-radius: 12px;
  padding: 1rem 1.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.8rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.alert-banner.success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.alert-banner.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ==============================================================================
   SUB-NAVIGATION & TABS (Modern SaaS Tabs)
   ============================================================================== */
.settings-subnav,
.subpage-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0.35rem;
  background: var(--slate-100);
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.subnav-btn {
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.6rem 1.15rem;
  border-radius: 8px;
  color: var(--slate-600);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.subnav-btn:hover {
  color: var(--slate-900);
  background: rgba(255, 255, 255, 0.6);
}

.subnav-btn.active {
  color: var(--primary-dark) !important;
  background: #ffffff !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.subnav-btn i {
  font-size: 0.95rem;
  color: var(--primary);
}

/* ==============================================================================
   METRICS GRID & STAT PODIUMS
   ============================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.4rem;
  margin-bottom: 2.2rem;
}

.metric-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
  transition: var(--transition);
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: #38bdf8;
  box-shadow: 0 10px 24px -4px rgba(2, 132, 199, 0.12);
}

.metric-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.metric-icon.blue,
.metric-icon.sky,
.metric-icon.purple {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%) !important;
  color: #0284c7 !important;
}

.metric-icon.green {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #059669;
}

.metric-icon.amber {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #d97706;
}

.metric-icon.red {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #dc2626;
}

.metric-val strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--slate-900);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.metric-val span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}

/* ==============================================================================
   THEME STYLES PRESETS ENGINE (TAB=THEMES)
   ============================================================================== */
.theme-preset-card {
  border: 2px solid var(--border);
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
  transition: var(--transition);
  position: relative;
}

.theme-preset-card:hover {
  transform: translateY(-4px);
  border-color: #38bdf8;
  box-shadow: 0 12px 28px -4px rgba(2, 132, 199, 0.14);
}

.theme-preset-card.selected,
.theme-preset-card:has(input[type="radio"]:checked) {
  border-color: #0284c7 !important;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%) !important;
  box-shadow: 0 12px 28px -4px rgba(2, 132, 199, 0.2), 0 0 0 1px #0284c7 !important;
}

.theme-tag-pill {
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

.theme-palette-swatches {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  padding-top: 0.9rem;
  margin-top: 0.9rem;
  border-top: 1px solid var(--slate-100);
}

.theme-swatch-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.theme-swatch-dot:hover {
  transform: scale(1.18);
}

/* ==============================================================================
   FORM CONTROLS & INPUTS
   ============================================================================== */
.form-grid {
  display: grid;
  gap: 1.4rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--slate-700);
}

.form-control {
  background: #ffffff;
  color: var(--slate-900);
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  min-height: 44px;
  padding: 0.65rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
}

.form-control::placeholder {
  color: var(--slate-400);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  outline: none;
}

/* Custom UI Switches */
.switch-wrap,
.switch-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  padding: 1.1rem 1.4rem;
  background: var(--slate-50);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.switch-info h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.2rem;
}

.switch-info p {
  font-size: 0.82rem;
  color: var(--slate-500);
  margin: 0;
  line-height: 1.5;
}

.ui-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.ui-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ui-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--slate-300);
  transition: var(--transition);
  border-radius: 34px;
}

.ui-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: var(--transition);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ui-switch input:checked + .ui-slider {
  background-color: var(--primary);
}

.ui-switch input:checked + .ui-slider:before {
  transform: translateX(24px);
}

/* ==============================================================================
   BUTTONS & ACTIONS
   ============================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.65rem 1.35rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-gradient) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.32);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%) !important;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.42);
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--slate-700);
}

.btn-outline:hover {
  background: var(--slate-50);
  border-color: var(--slate-300);
  color: var(--slate-900);
}

.btn-danger {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.btn-danger:hover {
  background: #fee2e2;
  color: #991b1b;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  min-height: 36px;
}

/* ==============================================================================
   DATA TABLES & LISTS
   ============================================================================== */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.02);
}

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

th {
  background: var(--slate-50);
  color: var(--slate-600);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: var(--slate-800);
  border-bottom: 1px solid var(--slate-100);
  vertical-align: middle;
}

tr:hover td {
  background: #fbfdff;
}

/* ==============================================================================
   CLIENT PORTAL STYLES (CLIENT.PHP)
   ============================================================================== */
.client-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  background: #0b192e;
  color: #ffffff;
  z-index: 105;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
}

.client-sidebar-brand {
  min-height: var(--topbar-height);
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.client-sidebar-nav {
  padding: 1.2rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.client-nav-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.95rem;
  border-radius: 10px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--transition);
}

.client-nav-link i {
  width: 22px;
  text-align: center;
  font-size: 1.1rem;
}

.client-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.client-nav-link.active {
  color: #ffffff;
  background: var(--primary-gradient);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.client-sidebar-account {
  padding: 1.1rem 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}

.client-shell {
  margin-left: 260px;
  min-width: 0;
  padding: 2rem 2.5rem;
  max-width: 1500px;
}

.client-header {
  background: #ffffff;
  color: var(--slate-900);
  padding: 0.9rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.header-brand-title {
  color: var(--slate-900) !important;
  font-weight: 900;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 1.6rem;
  margin-bottom: 2rem;
}

/* ==============================================================================
   RESPONSIVE LAYOUT
   ============================================================================== */
@media (max-width: 1200px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .admin-main,
  .admin-main.expanded,
  .client-shell {
    margin-left: 0 !important;
    width: 100% !important;
  }
  
  .admin-sidebar {
    transform: translateX(-100%);
    width: min(290px, 85vw);
    box-shadow: 20px 0 50px rgba(15, 23, 42, 0.25);
  }
  
  .admin-sidebar.open {
    transform: translateX(0);
  }
  
  .client-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  
  .client-sidebar.open {
    transform: translateX(0);
  }
  
  .admin-body {
    padding: 1.2rem;
  }
  
  .admin-topbar {
    padding: 0.8rem 1.2rem;
    height: auto;
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  
  .topbar-right {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .metrics-grid,
  .dashboard-summary {
    grid-template-columns: 1fr;
  }
  .topbar-breadcrumb .bc-root,
  .topbar-breadcrumb .bc-sep:first-of-type {
    display: none;
  }
}
