/* ==========================================================================
   RAJESH FRAMING - GRAPHURA SAAS EXECUTIVE DASHBOARD STYLESHEET
   Reference: Modern Clean SaaS Architecture (Graphura Studio OS)
   Elevated: Visual Depth, Dynamic Micro-Animations, Glassmorphism & High-Contrast
   ========================================================================== */

:root, [data-theme="light"] {
  /* Graphura Light Luxury SaaS Palette */
  --bg-canvas: #F8FAFC;
  --bg-sidebar: #FFFFFF;
  --bg-topbar: rgba(255, 255, 255, 0.88);
  --bg-card: #FFFFFF;
  --bg-card-subtle: #F8FAFC;
  --bg-hover: #F1F5F9;
  
  --border-subtle: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-dark: #94A3B8;
  
  --primary: #1665D8;
  --primary-hover: #1253B3;
  --primary-light: #EFF6FF;
  --primary-border: #BFDBFE;
  --primary-gradient: linear-gradient(135deg, #1665D8 0%, #0F49B8 100%);
  --primary-glow: 0 4px 14px rgba(22, 101, 216, 0.32);
  
  --text-main: #0F172A;
  --text-secondary: #334155;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  
  /* Status Colors (Graphura Badges) */
  --badge-green-bg: #ECFDF3;
  --badge-green-text: #027A48;
  --badge-green-border: #ABEFC6;
  --badge-green-dot: #10B981;
  
  --badge-blue-bg: #EFF8FF;
  --badge-blue-text: #175CD3;
  --badge-blue-border: #B2DDFF;
  --badge-blue-dot: #3B82F6;
  
  --badge-amber-bg: #FFFAEB;
  --badge-amber-text: #B54708;
  --badge-amber-border: #FEDF89;
  --badge-amber-dot: #F59E0B;
  
  --badge-red-bg: #FEF3F2;
  --badge-red-text: #B42318;
  --badge-red-border: #FECDCA;
  --badge-red-dot: #EF4444;
  
  --badge-purple-bg: #F9F5FF;
  --badge-purple-text: #6941C6;
  --badge-purple-border: #E9D7FE;
  --badge-purple-dot: #8B5CF6;
  
  /* Multi-tier Elevations */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-card: 0 2px 6px rgba(15, 23, 42, 0.04), 0 4px 14px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 12px 28px -4px rgba(15, 23, 42, 0.09), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-modal: 0 24px 64px -12px rgba(15, 23, 42, 0.22);
  
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
}

[data-theme="dark"] {
  /* Graphura Executive Midnight Dark Palette */
  --bg-canvas: #090D16;
  --bg-sidebar: #0E1424;
  --bg-topbar: rgba(14, 20, 36, 0.88);
  --bg-card: #131B2E;
  --bg-card-subtle: #172238;
  --bg-hover: #1C2942;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-dark: rgba(255, 255, 255, 0.25);
  
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: rgba(37, 99, 235, 0.16);
  --primary-border: rgba(37, 99, 235, 0.35);
  --primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  --primary-glow: 0 4px 18px rgba(37, 99, 235, 0.45);
  
  --text-main: #F8FAFC;
  --text-secondary: #E2E8F0;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  
  --badge-green-bg: rgba(16, 185, 129, 0.14);
  --badge-green-text: #34D399;
  --badge-green-border: rgba(16, 185, 129, 0.32);
  --badge-green-dot: #34D399;
  
  --badge-blue-bg: rgba(37, 99, 235, 0.15);
  --badge-blue-text: #60A5FA;
  --badge-blue-border: rgba(37, 99, 235, 0.32);
  --badge-blue-dot: #60A5FA;
  
  --badge-amber-bg: rgba(245, 158, 11, 0.14);
  --badge-amber-text: #FBBF24;
  --badge-amber-border: rgba(245, 158, 11, 0.32);
  --badge-amber-dot: #FBBF24;
  
  --badge-red-bg: rgba(239, 68, 68, 0.14);
  --badge-red-text: #F87171;
  --badge-red-border: rgba(239, 68, 68, 0.32);
  --badge-red-dot: #F87171;
  
  --badge-purple-bg: rgba(139, 92, 246, 0.14);
  --badge-purple-text: #A78BFA;
  --badge-purple-border: rgba(139, 92, 246, 0.32);
  --badge-purple-dot: #A78BFA;
  
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.55);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.8);
}

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

body.admin-dashboard-body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  background-image: 
    radial-gradient(circle at 5% 5%, rgba(22, 101, 216, 0.035) 0%, transparent 40%),
    radial-gradient(circle at 95% 5%, rgba(16, 185, 129, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 50% 95%, rgba(99, 102, 241, 0.025) 0%, transparent 40%);
  background-attachment: fixed;
  font-family: var(--font-body);
  color: var(--text-main);
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

[data-theme="dark"] body.admin-dashboard-body,
body.admin-dashboard-body[data-theme="dark"] {
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 90% 10%, rgba(16, 185, 129, 0.05) 0%, transparent 45%);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR (GRAPHURA EXECUTIVE ARCHITECTURE)
   ========================================================================== */
.admin-sidebar {
  width: 250px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
}

/* Brand Header */
.sidebar-header {
  padding: 22px 18px 16px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.sidebar-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(245, 130, 32, 0.35));
  flex-shrink: 0;
}

.sidebar-brand-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-name {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text-main);
  line-height: 1.1;
}

.sidebar-brand-name span {
  color: #F58220;
  margin-left: 2px;
}

.sidebar-brand-sub {
  font-size: 0.65rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  margin-top: 3px;
}

/* Quick Search in Sidebar */
.sidebar-search-box {
  margin: 6px 14px 16px;
  position: relative;
  display: flex;
  align-items: center;
}

.sidebar-search-box svg {
  position: absolute;
  left: 11px;
  color: var(--text-subtle);
  pointer-events: none;
}

.sidebar-search-box input {
  width: 100%;
  padding: 8px 34px 8px 32px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-main);
  font-family: var(--font-body);
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-search-box input:focus {
  background: var(--bg-sidebar);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.sidebar-kbd {
  position: absolute;
  right: 8px;
  padding: 2px 5px;
  font-size: 0.62rem;
  font-family: inherit;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  pointer-events: none;
}

/* Navigation Links */
.sidebar-nav {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-subtle);
  padding: 12px 10px 4px;
  font-weight: 700;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 9px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.sidebar-link svg {
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.18s ease;
  flex-shrink: 0;
}

.sidebar-link:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  transform: translateX(2px);
}

.sidebar-link:hover svg {
  color: var(--text-main);
  transform: scale(1.08);
}

/* Active Link: Vibrant Solid Blue (Graphura Reference Image) */
.sidebar-link.active {
  background: var(--primary-gradient);
  color: #FFFFFF;
  box-shadow: var(--primary-glow);
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3.5px;
  background: #FFFFFF;
  border-radius: 0 3px 3px 0;
}

.sidebar-link.active svg {
  color: #FFFFFF;
}

.sidebar-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9999px;
}

[data-theme="light"] .sidebar-link:not(.active) .sidebar-badge {
  background: #F1F5F9;
  color: #334155;
  border: 1px solid var(--border-subtle);
}

[data-theme="dark"] .sidebar-link:not(.active) .sidebar-badge {
  background: var(--bg-hover);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* Sidebar Footer Profile */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-sidebar);
}

.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: 0 2px 6px rgba(22, 101, 216, 0.25);
  flex-shrink: 0;
}

.admin-meta {
  display: flex;
  flex-direction: column;
}

.admin-meta-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.admin-meta-role {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.btn-sidebar-logout {
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 7px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-sidebar-logout:hover {
  background: var(--badge-red-bg);
  color: var(--badge-red-text);
  transform: scale(1.05);
}

/* ==========================================================================
   TOPBAR HEADER (GRAPHURA WITH GLASS EFFECT)
   ========================================================================== */
.admin-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: transparent;
}

.admin-topbar {
  background: var(--bg-topbar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-toggle-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px;
  color: var(--text-main);
  cursor: pointer;
}

.topbar-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.topbar-breadcrumb {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}

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

/* Theme Toggle Button */
.btn-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-theme-toggle:hover {
  background: var(--border-subtle);
  transform: translateY(-1px);
}

/* Server Status Chip */
.server-status-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  background: var(--badge-green-bg);
  border: 1px solid var(--badge-green-border);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--badge-green-text);
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.08);
}

.status-pulse-dot {
  position: relative;
  width: 7px;
  height: 7px;
  background: #10B981;
  border-radius: 50%;
}

.status-pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #10B981;
  animation: radarPulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes radarPulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Icon Buttons (Notification Bell) */
.btn-topbar-icon {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.btn-topbar-icon:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  transform: translateY(-1px);
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: #EF4444;
  border-radius: 50%;
  border: 1.5px solid var(--bg-sidebar);
}

.header-profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-hover);
  border: 1.5px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.header-profile-avatar:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

.btn-view-site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xs);
}

.btn-view-site:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--border-dark);
  transform: translateY(-1px);
}

/* ==========================================================================
   MAIN DASHBOARD CONTENT WRAPPER
   ========================================================================== */
.admin-content {
  padding: 24px 32px 48px;
  flex-grow: 1;
}

.admin-container {
  max-width: 1520px;
  margin: 0 auto;
  width: 100%;
}

.dashboard-view-panel {
  display: none;
  animation: panelFade 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dashboard-view-panel.active {
  display: block;
}

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

/* ==========================================================================
   PAGE SUBHEADER WITH ACTION BUTTONS (GRAPHURA)
   ========================================================================== */
.page-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.subheader-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.subheader-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-sub-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-body);
}

.btn-sub-action.outline {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
}

.btn-sub-action.outline:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--border-dark);
  transform: translateY(-1px);
}

.btn-sub-action.primary {
  background: var(--primary-gradient);
  border: 1px solid var(--primary);
  color: #FFFFFF;
  box-shadow: var(--primary-glow);
}

.btn-sub-action.primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(22, 101, 216, 0.4);
}

.btn-sub-action:active {
  transform: scale(0.97);
}

/* ==========================================================================
   4-SEGMENT CONNECTED METRIC BAR (ELEVATED GRAPHURA SAAS)
   ========================================================================== */
.metric-segment-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.metric-segment {
  padding: 22px 26px;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

.metric-segment:last-child {
  border-right: none;
}

.metric-segment:hover {
  background: rgba(22, 101, 216, 0.02);
  box-shadow: inset 0 3px 0 0 var(--primary);
}

.metric-segment-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-label-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-icon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.metric-icon-dot.blue { background: #3B82F6; box-shadow: 0 0 8px rgba(59, 130, 246, 0.5); }
.metric-icon-dot.amber { background: #F59E0B; box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
.metric-icon-dot.green { background: #10B981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.metric-icon-dot.purple { background: #8B5CF6; box-shadow: 0 0 8px rgba(139, 92, 246, 0.5); }

.metric-segment-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.metric-segment-dots {
  color: var(--text-subtle);
  font-size: 1rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.metric-segment-dots:hover {
  color: var(--text-main);
}

.metric-segment-val {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 8px 0 10px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* Trend Pill Badges */
.metric-segment-tag {
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  padding: 2px 9px;
  border-radius: 9999px;
}

.metric-segment-tag.positive {
  background: var(--badge-green-bg);
  color: var(--badge-green-text);
  border: 1px solid var(--badge-green-border);
}

.metric-segment-tag.in-progress {
  background: var(--badge-blue-bg);
  color: var(--badge-blue-text);
  border: 1px solid var(--badge-blue-border);
}

.metric-segment-tag.negative {
  background: var(--badge-red-bg);
  color: var(--badge-red-text);
  border: 1px solid var(--badge-red-border);
}

.metric-segment-tag.neutral {
  background: var(--bg-hover);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   SECTION TITLE BAR WITH FILTERS & SEARCH
   ========================================================================== */
.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 14px;
}

.section-title-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.02em;
}

.section-title-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.15s ease;
}

.btn-text-link:hover {
  text-decoration: underline;
  transform: translateX(2px);
}

.section-filters-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Pill Tabs Filter (All, New, Processing, Completed, Cancelled) */
.pill-tabs-group {
  display: inline-flex;
  background: var(--bg-hover);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  gap: 3px;
}

.pill-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-body);
}

.pill-tab-btn:hover {
  color: var(--text-main);
}

.pill-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

/* Search Box */
.graphura-search-input {
  position: relative;
  display: flex;
  align-items: center;
}

.graphura-search-input svg {
  position: absolute;
  left: 11px;
  color: var(--text-subtle);
  pointer-events: none;
}

.graphura-search-input input {
  padding: 8px 12px 8px 34px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-main);
  font-family: var(--font-body);
  width: 230px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xs);
}

.graphura-search-input input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  width: 270px;
}

/* Sort Dropdown */
.graphura-sort-select {
  padding: 8px 30px 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-body);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.graphura-sort-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ==========================================================================
   ORDER CARD ROWS ARCHITECTURE (GRAPHURA SAAS SIGNATURE)
   ========================================================================== */
.order-cards-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.order-empty-state {
  background: var(--bg-card);
  border: 1px dashed var(--border-medium);
  border-radius: 14px;
  padding: 56px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.order-card-row {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease;
  overflow: hidden;
  position: relative;
}

.order-card-row:hover {
  transform: translateY(-2px);
  border-color: rgba(22, 101, 216, 0.35);
  box-shadow: var(--shadow-hover);
}

/* Top 7-Column Grid */
.order-card-body {
  display: grid;
  grid-template-columns: 58px 145px 185px 190px 150px 175px 1fr;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
}

/* Thumbnail Wrap */
.order-thumb-wrap {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-hover);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}

.order-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.order-card-row:hover .order-thumb-img {
  transform: scale(1.08);
}

.order-col-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.col-field-label {
  font-size: 0.72rem;
  color: var(--text-subtle);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.order-id-num {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.order-id-num:hover {
  color: var(--primary);
}

.order-timestamp {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}

.cust-name-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cust-phone-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
}

.cust-phone-text a {
  color: inherit;
  text-decoration: none;
}

.cust-phone-text a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.prod-name-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prod-qty-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  background: var(--bg-hover);
  width: fit-content;
  padding: 1px 7px;
  border-radius: 9999px;
  font-weight: 600;
}

.sub-meta-text {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.order-amount-text {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text-main);
  text-align: right;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}

/* Status Badges with Glowing Dot Indicators */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  width: fit-content;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-pill.paid,
.status-pill.delivered,
.status-pill.connected,
.status-pill.active {
  background: var(--badge-green-bg);
  color: var(--badge-green-text);
  border: 1px solid var(--badge-green-border);
}
.status-pill.paid .status-dot,
.status-pill.delivered .status-dot,
.status-pill.connected .status-dot,
.status-pill.active .status-dot {
  background: var(--badge-green-dot);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.status-pill.shipped,
.status-pill.in-progress,
.status-pill.inquiry {
  background: var(--badge-blue-bg);
  color: var(--badge-blue-text);
  border: 1px solid var(--badge-blue-border);
}
.status-pill.shipped .status-dot,
.status-pill.in-progress .status-dot,
.status-pill.inquiry .status-dot {
  background: var(--badge-blue-dot);
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
}

.status-pill.pending,
.status-pill.processing,
.status-pill.contacted {
  background: var(--badge-amber-bg);
  color: var(--badge-amber-text);
  border: 1px solid var(--badge-amber-border);
}
.status-pill.pending .status-dot,
.status-pill.processing .status-dot,
.status-pill.contacted .status-dot {
  background: var(--badge-amber-dot);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.status-pill.cancelled,
.status-pill.closed {
  background: var(--badge-red-bg);
  color: var(--badge-red-text);
  border: 1px solid var(--badge-red-border);
}
.status-pill.cancelled .status-dot,
.status-pill.closed .status-dot {
  background: var(--badge-red-dot);
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.status-pill.purple {
  background: var(--badge-purple-bg);
  color: var(--badge-purple-text);
  border: 1px solid var(--badge-purple-border);
}
.status-pill.purple .status-dot {
  background: var(--badge-purple-dot);
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.6);
}

/* Bottom Footer Bar of Each Order Card */
.order-card-footer {
  padding: 12px 22px;
  border-top: 1px solid var(--border-subtle);
  border-left: 3.5px solid var(--primary);
  background: var(--bg-card-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  transition: background-color 0.2s ease;
}

.order-note-block {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-note-icon {
  font-size: 0.85rem;
  color: var(--primary);
  flex-shrink: 0;
}

.order-note-label {
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.4px;
}

.order-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.btn-card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-body);
  text-decoration: none;
}

/* Light Mode Action Buttons */
[data-theme="light"] .btn-card-action.accept {
  background: #ECFDF3;
  color: #027A48;
  border: 1px solid #ABEFC6;
}
[data-theme="light"] .btn-card-action.accept:hover {
  background: #D1FADF;
  border-color: #6CE9A6;
  transform: translateY(-1px);
}

[data-theme="light"] .btn-card-action.update {
  background: #FFFAEB;
  color: #B54708;
  border: 1px solid #FEDF89;
}
[data-theme="light"] .btn-card-action.update:hover {
  background: #FEF0C7;
  border-color: #FDB022;
  transform: translateY(-1px);
}

[data-theme="light"] .btn-card-action.invoice {
  background: #EFF8FF;
  color: #175CD3;
  border: 1px solid #B2DDFF;
}
[data-theme="light"] .btn-card-action.invoice:hover {
  background: #D1E9FF;
  border-color: #84CAFF;
  transform: translateY(-1px);
}

[data-theme="light"] .btn-card-action.cancel {
  background: #FEF3F2;
  color: #B42318;
  border: 1px solid #FECDCA;
}
[data-theme="light"] .btn-card-action.cancel:hover {
  background: #FEE4E2;
  border-color: #FDA29B;
  transform: translateY(-1px);
}

/* Dark Mode Action Buttons: Glowing Translucent Glass */
[data-theme="dark"] .btn-card-action.accept {
  background: rgba(16, 185, 129, 0.14);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.32);
}
[data-theme="dark"] .btn-card-action.accept:hover {
  background: rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-card-action.update {
  background: rgba(245, 158, 11, 0.14);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.32);
}
[data-theme="dark"] .btn-card-action.update:hover {
  background: rgba(245, 158, 11, 0.25);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-card-action.invoice {
  background: rgba(37, 99, 235, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(37, 99, 235, 0.32);
}
[data-theme="dark"] .btn-card-action.invoice:hover {
  background: rgba(37, 99, 235, 0.28);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-card-action.cancel {
  background: rgba(239, 68, 68, 0.12);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.28);
}
[data-theme="dark"] .btn-card-action.cancel:hover {
  background: rgba(239, 68, 68, 0.22);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.btn-card-action:active {
  transform: scale(0.96);
}

/* ==========================================================================
   PAGINATION (GRAPHURA)
   ========================================================================== */
.graphura-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 24px;
}

.page-arrow, .page-num {
  min-width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
}

.page-arrow:hover:not(:disabled),
.page-num:hover:not(.active) {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--border-medium);
}

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

.page-num.active {
  background: var(--primary-gradient);
  border-color: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--primary-glow);
}

.page-dots {
  color: var(--text-subtle);
  padding: 0 4px;
  font-size: 0.8rem;
}

/* ==========================================================================
   TABLE CARD WRAPPER (FOR LEADS, PRODUCTS, MESSAGES)
   ========================================================================== */
.graphura-card-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

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

.graphura-table th {
  padding: 14px 20px;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  white-space: nowrap;
}

.graphura-table td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.86rem;
  color: var(--text-main);
  vertical-align: middle;
  background: var(--bg-card);
  transition: background-color 0.15s ease;
}

.graphura-table tr:hover td {
  background: var(--bg-hover);
}

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

/* Leads Avatar Circle (Graphura Image 3) */
.lead-cust-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lead-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.lead-avatar-circle.pink { background: #FEE4E2; color: #B42318; border: 1px solid #FECDCA; }
.lead-avatar-circle.blue { background: #D1E9FF; color: #175CD3; border: 1px solid #B2DDFF; }
.lead-avatar-circle.purple { background: #E9D7FE; color: #6941C6; border: 1px solid #D6BBFB; }
.lead-avatar-circle.green { background: #D1FADF; color: #027A48; border: 1px solid #A6F4C5; }

[data-theme="dark"] .lead-avatar-circle.pink { background: rgba(239, 68, 68, 0.2); color: #FCA5A5; border-color: rgba(239, 68, 68, 0.4); }
[data-theme="dark"] .lead-avatar-circle.blue { background: rgba(37, 99, 235, 0.2); color: #93C5FD; border-color: rgba(37, 99, 235, 0.4); }
[data-theme="dark"] .lead-avatar-circle.purple { background: rgba(139, 92, 246, 0.2); color: #C4B5FD; border-color: rgba(139, 92, 246, 0.4); }
[data-theme="dark"] .lead-avatar-circle.green { background: rgba(16, 185, 129, 0.2); color: #6EE7B7; border-color: rgba(16, 185, 129, 0.4); }

.lead-cust-info {
  display: flex;
  flex-direction: column;
}

.lead-cust-name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.88rem;
}

.lead-cust-email {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Action Icon Buttons in Table */
.table-action-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-table-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}

.btn-table-icon.edit:hover {
  background: var(--badge-green-bg);
  border-color: var(--badge-green-border);
  color: var(--badge-green-text);
  transform: translateY(-1px);
}

.btn-table-icon.chat:hover {
  background: var(--badge-blue-bg);
  border-color: var(--badge-blue-border);
  color: var(--badge-blue-text);
  transform: translateY(-1px);
}

.btn-table-icon.delete:hover {
  background: var(--badge-red-bg);
  border-color: var(--badge-red-border);
  color: var(--badge-red-text);
  transform: translateY(-1px);
}

/* ==========================================================================
   SETTINGS & CARDS
   ========================================================================== */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.graphura-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}

.graphura-card-pad {
  padding: 30px;
}

.settings-box-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.settings-box-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 22px;
}

.setting-row {
  margin-bottom: 18px;
}

.setting-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.setting-input,
.setting-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.88rem;
  font-family: var(--font-body);
  outline: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xs);
}

.setting-input:focus,
.setting-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ==========================================================================
   MODALS ARCHITECTURE
   ========================================================================== */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal-overlay.open {
  display: flex;
}

.admin-modal {
  background: var(--bg-card);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.admin-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-modal-title {
  font-size: 1.18rem;
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.admin-modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.admin-modal-close:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

.admin-modal-body {
  padding: 24px;
  overflow-y: auto;
}

.admin-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-card-subtle);
}

/* ==========================================================================
   TOAST NOTIFICATION COMPONENT
   ========================================================================== */
.admin-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.admin-toast {
  pointer-events: auto;
  min-width: 320px;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: var(--shadow-modal);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.admin-toast.fade-out {
  opacity: 0;
  transform: translateY(12px) scale(0.95);
}

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

.admin-toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.admin-toast.success .admin-toast-icon { background: var(--badge-green-bg); color: var(--badge-green-text); }
.admin-toast.info .admin-toast-icon { background: var(--badge-blue-bg); color: var(--badge-blue-text); }
.admin-toast.warning .admin-toast-icon { background: var(--badge-amber-bg); color: var(--badge-amber-text); }
.admin-toast.danger .admin-toast-icon { background: var(--badge-red-bg); color: var(--badge-red-text); }

.admin-toast-content {
  flex-grow: 1;
}

.admin-toast-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.admin-toast-msg {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.admin-toast-close {
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s ease;
}

.admin-toast-close:hover {
  color: var(--text-main);
}

/* ==========================================================================
   RESPONSIVE DESIGN (ZERO HORIZONTAL SCROLL)
   ========================================================================== */
@media (max-width: 1200px) {
  .metric-segment-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-segment:nth-child(2) {
    border-right: none;
  }
  .metric-segment:nth-child(1),
  .metric-segment:nth-child(2) {
    border-bottom: 1px solid var(--border-subtle);
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .order-card-body {
    grid-template-columns: 56px 130px 150px 160px 130px 140px 1fr;
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .order-card-body {
    grid-template-columns: 52px 1fr 1fr;
    gap: 12px;
  }
  .order-amount-text {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    position: fixed;
    left: -250px;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.35);
  }
  .admin-sidebar.open {
    transform: translateX(250px);
  }
  .sidebar-toggle-btn {
    display: flex;
  }
  .admin-content {
    padding: 16px;
  }
  .metric-segment-bar {
    grid-template-columns: 1fr;
  }
  .metric-segment {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .metric-segment:last-child {
    border-bottom: none;
  }
}

/* ==========================================================================
   ADMIN PORTAL LOGIN PAGE STYLES
   ========================================================================== */
body.admin-login-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: #070B14;
  font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
  color: #F8FAFC;
  position: relative;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-ambient-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: 0;
}

.login-glow-orb {
  position: fixed;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 380px;
  background: radial-gradient(circle, rgba(200, 155, 60, 0.16) 0%, rgba(22, 101, 216, 0.08) 50%, transparent 75%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  padding: 24px 16px;
  margin: auto;
}

.login-card {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 44px 38px 36px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.65), 0 0 45px rgba(200, 155, 60, 0.08);
}

.login-brand-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 6px;
}

.login-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid #C89B3C;
  background: rgba(200, 155, 60, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C89B3C;
}

.login-brand-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.login-brand-name {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #FFFFFF;
}

.login-brand-name span {
  color: #C89B3C;
}

.login-portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(200, 155, 60, 0.12);
  border: 1px solid rgba(200, 155, 60, 0.3);
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #E5B558;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin: 12px 0 10px;
}

.login-portal-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.login-title {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 1.85rem;
  font-weight: 800;
  color: #FFFFFF;
  margin: 4px 0 8px;
  line-height: 1.2;
}

.login-subtitle {
  font-size: 0.88rem;
  color: #94A3B8;
  line-height: 1.5;
  margin: 0;
}

.login-alert {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: none;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}

.login-alert.danger,
.login-alert.error {
  display: flex;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
}

.login-alert.success {
  display: flex;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6EE7B7;
}

.login-alert.info {
  display: flex;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93C5FD;
}

.login-form-group {
  margin-bottom: 20px;
  text-align: left;
}

.login-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #E2E8F0;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  color: #94A3B8;
  pointer-events: none;
  display: block;
  flex-shrink: 0;
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 12px 42px 12px 42px;
  background: rgba(30, 41, 59, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #FFFFFF;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.login-input::placeholder {
  color: #64748B;
  font-weight: 400;
}

.login-input:focus {
  border-color: #C89B3C;
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 0 0 4px rgba(200, 155, 60, 0.18);
}

.login-input:focus + .login-input-icon,
.login-input-wrap:focus-within .login-input-icon {
  color: #C89B3C;
}

.login-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.login-password-toggle:hover {
  color: #FFFFFF;
}

.login-password-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.btn-admin-gold {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #D4AF37 0%, #AA8010 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(200, 155, 60, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.btn-admin-gold:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 8px 24px rgba(200, 155, 60, 0.48);
  filter: brightness(1.04);
}

.btn-admin-gold:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-admin-outline {
  width: 100%;
  height: 44px;
  background: transparent;
  color: #94A3B8;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.btn-admin-outline:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.admin-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: adminSpin 0.7s linear infinite;
  display: inline-block;
}

@keyframes adminSpin {
  to { transform: rotate(360deg); }
}

.otp-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 18px 0 22px;
}

.otp-box {
  width: 48px;
  height: 56px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  outline: none;
  font-family: monospace;
  transition: all 0.2s ease;
}

.otp-box:focus {
  border-color: #C89B3C;
  box-shadow: 0 0 0 4px rgba(200, 155, 60, 0.22);
  background: rgba(30, 41, 59, 0.95);
  transform: translateY(-1px);
}

.otp-resend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #94A3B8;
  margin-bottom: 20px;
  padding: 0 4px;
}

.otp-resend-btn {
  background: none;
  border: none;
  color: #C89B3C;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0;
  font-family: inherit;
  transition: color 0.15s ease;
}

.otp-resend-btn:hover:not(:disabled) {
  text-decoration: underline;
  color: #E5B558;
}

.otp-resend-btn:disabled {
  color: #64748B;
  cursor: not-allowed;
  text-decoration: none;
}

/* ==========================================================================
   GRAPHURA FLOATING TOAST NOTIFICATION SYSTEM
   ========================================================================== */
.admin-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 420px;
  width: calc(100% - 48px);
}

.admin-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toastSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .admin-toast {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.admin-toast.hide {
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.admin-toast-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-toast.success {
  border-left: 4px solid #10B981;
}
.admin-toast.success .admin-toast-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.admin-toast.danger,
.admin-toast.error {
  border-left: 4px solid #EF4444;
}
.admin-toast.danger .admin-toast-icon,
.admin-toast.error .admin-toast-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.admin-toast.warning {
  border-left: 4px solid #F59E0B;
}
.admin-toast.warning .admin-toast-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
}

.admin-toast.info {
  border-left: 4px solid #3B82F6;
}
.admin-toast.info .admin-toast-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
}

.admin-toast-content {
  flex: 1;
  min-width: 0;
}

.admin-toast-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
  line-height: 1.3;
}

.admin-toast-desc {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.45;
  word-break: break-word;
}

.admin-toast-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s ease;
  margin-left: 4px;
}

.admin-toast-close:hover {
  color: var(--text-main);
}

