/* ==========================================================================
   TUKIO ADVENTURES - EXECUTIVE ADMIN DASHBOARD STYLESHEET
   Matching reference screenshots:
   - Dark Navy Sidebar with grouped navigation & yellow notification pills
   - Top Header Bar with AI Assistant gold button, theme switcher & actions
   - Multi-row KPI Cards with soft tint icon boxes & active blue accents
   - Side-by-side status distribution panels
   - Interactive Analytics SVG Timeline chart, Donut chart & Data tables
   - Complete Light & Dark Theme system with persistence
   ========================================================================== */

:root,
body.theme-light {
  /* Page & Layout */
  --admin-bg: #f8fafc;
  --admin-sidebar-bg: #0b1329;
  --admin-sidebar-border: #162038;
  --admin-sidebar-text: #e2e8f0;
  --admin-sidebar-muted: #64748b;
  --admin-sidebar-hover: rgba(255, 255, 255, 0.05);
  --admin-sidebar-active: #151f38;
  --admin-sidebar-gold: #f59e0b;

  --admin-header-bg: #ffffff;
  --admin-header-border: #e2e8f0;

  /* Cards & Panels */
  --admin-card-bg: #ffffff;
  --admin-card-border: #e2e8f0;
  --admin-card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --admin-card-header: #ffffff;

  /* Typography */
  --admin-text-main: #0f172a;
  --admin-text-heading: #0f172a;
  --admin-text-muted: #64748b;
  --admin-text-faint: #94a3b8;

  /* Controls & Inputs */
  --admin-input-bg: #ffffff;
  --admin-input-border: #e2e8f0;
  --admin-input-focus: #3b82f6;

  /* Brand Buttons */
  --admin-btn-gold-bg: #d97706;
  --admin-btn-gold-hover: #b45309;
  --admin-btn-gold-text: #ffffff;

  --admin-btn-ghost-bg: #ffffff;
  --admin-btn-ghost-border: #e2e8f0;
  --admin-btn-ghost-text: #334155;
  --admin-btn-ghost-hover: #f1f5f9;

  /* Soft Tint Icon Boxes */
  --icon-box-beige-bg: #fef3c7;
  --icon-box-beige-color: #d97706;
  --icon-box-blue-bg: #e0f2fe;
  --icon-box-blue-color: #0284c7;
  --card-blue-active-border: #38bdf8;

  /* Tables */
  --table-header-bg: #f8fafc;
  --table-row-hover: #f8fafc;
  --table-border: #e2e8f0;

  /* Status Pills */
  --pill-blue-bg: #dbeafe;
  --pill-blue-text: #1d4ed8;
  --pill-yellow-bg: #fef3c7;
  --pill-yellow-text: #b45309;
  --pill-orange-bg: #ffedd5;
  --pill-orange-text: #c2410c;
  --pill-green-bg: #dcfce7;
  --pill-green-text: #15803d;
  --pill-red-bg: #fee2e2;
  --pill-red-text: #b91c1c;
  --pill-gray-bg: #f1f5f9;
  --pill-gray-text: #64748b;

  /* Dimensions */
  --sidebar-width: 250px;
  --header-height: 64px;
  --radius-card: 12px;
  --radius-input: 8px;
}

body.theme-dark {
  /* Page & Layout */
  --admin-bg: #0b0f19;
  --admin-sidebar-bg: #070c18;
  --admin-sidebar-border: #131c2e;
  --admin-sidebar-text: #e2e8f0;
  --admin-sidebar-muted: #64748b;
  --admin-sidebar-hover: rgba(255, 255, 255, 0.05);
  --admin-sidebar-active: #131d30;
  --admin-sidebar-gold: #fbbf24;

  --admin-header-bg: #0f172a;
  --admin-header-border: #1e293b;

  /* Cards & Panels */
  --admin-card-bg: #162032;
  --admin-card-border: #243247;
  --admin-card-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  --admin-card-header: #1b263b;

  /* Typography */
  --admin-text-main: #f8fafc;
  --admin-text-heading: #f8fafc;
  --admin-text-muted: #94a3b8;
  --admin-text-faint: #64748b;

  /* Controls & Inputs */
  --admin-input-bg: #1e293b;
  --admin-input-border: #334155;
  --admin-input-focus: #60a5fa;

  /* Brand Buttons */
  --admin-btn-gold-bg: #d97706;
  --admin-btn-gold-hover: #b45309;
  --admin-btn-gold-text: #ffffff;

  --admin-btn-ghost-bg: #1e293b;
  --admin-btn-ghost-border: #334155;
  --admin-btn-ghost-text: #e2e8f0;
  --admin-btn-ghost-hover: #273549;

  /* Soft Tint Icon Boxes */
  --icon-box-beige-bg: rgba(245, 158, 11, 0.15);
  --icon-box-beige-color: #fbbf24;
  --icon-box-blue-bg: rgba(56, 189, 248, 0.15);
  --icon-box-blue-color: #38bdf8;
  --card-blue-active-border: #0284c7;

  /* Tables */
  --table-header-bg: #1b263b;
  --table-row-hover: #1e293b;
  --table-border: #243247;

  /* Status Pills */
  --pill-blue-bg: rgba(30, 64, 175, 0.35);
  --pill-blue-text: #93c5fd;
  --pill-yellow-bg: rgba(180, 83, 9, 0.35);
  --pill-yellow-text: #fde047;
  --pill-orange-bg: rgba(194, 65, 12, 0.35);
  --pill-orange-text: #fdba74;
  --pill-green-bg: rgba(21, 128, 61, 0.35);
  --pill-green-text: #86efac;
  --pill-red-bg: rgba(185, 28, 28, 0.35);
  --pill-red-text: #fca5a5;
  --pill-gray-bg: rgba(100, 116, 139, 0.35);
  --pill-gray-text: #cbd5e1;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body.admin-app {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ==========================================================================
   AUTHENTICATION OVERLAY
   ========================================================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(15, 23, 42, 0.94), rgba(11, 19, 41, 0.98));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  overflow-y: auto;
}

.login-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Two-Sided Split Card Container */
.login-split-card,
.login-card {
  width: 100%;
  max-width: 980px;
  min-height: 580px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: loginCardSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginCardSlideUp {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Side 1: Form Card */
.login-side-form {
  padding: 2.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--admin-card-bg);
  position: relative;
  z-index: 2;
}

.login-header {
  margin-bottom: 1.75rem;
}

.login-brand-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.login-logo-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #0b1329;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #eab308;
  box-shadow: 0 4px 14px rgba(234, 179, 8, 0.22);
  flex-shrink: 0;
}

.login-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.login-brand-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.login-brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--admin-text-heading);
  letter-spacing: -0.01em;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: rgba(234, 179, 8, 0.15);
  color: #d97706;
  width: fit-content;
}

.login-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--admin-text-heading);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.login-subtitle {
  font-size: 0.88rem;
  color: var(--admin-text-muted);
  line-height: 1.5;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--admin-text-main);
  margin-bottom: 0.45rem;
}

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

.input-with-icon .input-icon {
  position: absolute;
  left: 0.95rem;
  color: var(--admin-text-muted);
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  padding: 0.75rem 0.95rem 0.75rem 2.75rem;
  background: var(--admin-input-bg);
  border: 1px solid var(--admin-input-border);
  border-radius: var(--radius-input);
  color: var(--admin-text-main);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.input-with-icon input:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18);
}

.btn-toggle-pw {
  position: absolute;
  right: 0.9rem;
  background: none;
  border: none;
  color: var(--admin-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
}

.btn-toggle-pw:hover {
  color: var(--admin-text-main);
}

.login-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--admin-text-muted);
}

.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.84rem;
}

.remember-label input[type="checkbox"] {
  accent-color: #d97706;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.btn-login {
  width: 100%;
  padding: 0.88rem 1.35rem;
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
  color: #0b1329;
  border: none;
  border-radius: var(--radius-input);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  box-shadow: 0 4px 14px rgba(202, 138, 4, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-login:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 18px rgba(202, 138, 4, 0.45);
  transform: translateY(-1px);
}

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

.login-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-input);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.login-footer {
  margin-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  color: var(--admin-text-faint);
}

/* Side 2: Experiential Retreat & Activity Card */
.login-side-media {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.75rem 2.25rem;
  color: #ffffff;
}

.login-media-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.login-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
  transition: transform 7s cubic-bezier(0.25, 1, 0.5, 1);
}

.login-split-card:hover .login-media-img {
  transform: scale(1.06);
}

.login-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 19, 41, 0.25) 0%,
    rgba(11, 19, 41, 0.65) 45%,
    rgba(11, 19, 41, 0.95) 100%
  );
}

.login-media-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.login-media-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  width: fit-content;
}

.login-tag-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.login-media-headline {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin: 0;
}

.login-media-subtext {
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  margin: 0;
}

.login-media-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.login-highlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #f1f5f9;
}

.login-highlight-pill svg {
  color: #eab308;
  flex-shrink: 0;
}

.login-media-quote {
  margin-top: 0.4rem;
  padding: 0.75rem 0.95rem;
  border-left: 3px solid #eab308;
  background: rgba(11, 19, 41, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 0 8px 8px 0;
}

.login-media-quote p {
  font-size: 0.82rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 0.25rem 0;
  line-height: 1.4;
}

.login-quote-author {
  font-size: 0.72rem;
  font-weight: 600;
  color: #eab308;
  letter-spacing: 0.02em;
}

/* Responsive Handling for Mobile & Tablets */
@media (max-width: 860px) {
  .login-split-card,
  .login-card {
    grid-template-columns: 1fr;
    max-width: 480px;
    min-height: auto;
  }

  .login-side-media {
    padding: 1.75rem 1.5rem;
    min-height: 180px;
    order: -1;
  }

  .login-media-headline {
    font-size: 1.25rem;
  }

  .login-media-subtext,
  .login-media-quote {
    display: none;
  }

  .login-side-form {
    padding: 2rem 1.75rem;
  }
}

@media (max-width: 480px) {
  .login-overlay {
    padding: 0.75rem;
  }

  .login-side-form {
    padding: 1.5rem 1.25rem;
  }

  .login-title {
    font-size: 1.3rem;
  }

  .login-side-media {
    min-height: 140px;
    padding: 1.25rem 1rem;
  }

  .login-media-highlights {
    display: none;
  }
}

/* ==========================================================================
   SIDEBAR NAVIGATION (Exact match to screenshot)
   ========================================================================== */
.admin-sidebar {
  width: var(--sidebar-width);
  background-color: var(--admin-sidebar-bg);
  border-right: 1px solid var(--admin-sidebar-border);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  user-select: none;
  transition: transform 0.3s ease;
}

/* Brand Header */
.sidebar-brand {
  padding: 1.2rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--admin-sidebar-border);
}

.sidebar-avatar-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1.5px solid #eab308;
  flex-shrink: 0;
}

.sidebar-avatar-logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

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

.sidebar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.sidebar-admin-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #eab308;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Navigation Scrollable Body */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 0.65rem 1.5rem 0.65rem;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

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

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--admin-sidebar-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 0.75rem 0.35rem 0.75rem;
  margin-top: 0.4rem;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-item {
  margin-bottom: 2px;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  color: var(--admin-sidebar-text);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s;
  position: relative;
}

.sidebar-item a:hover {
  background: var(--admin-sidebar-hover);
  color: #ffffff;
}

.sidebar-item.active a {
  background: var(--admin-sidebar-active);
  color: #ffffff;
  font-weight: 600;
}

.sidebar-item.active a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 3px;
  background: var(--admin-sidebar-gold);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.sidebar-item.active .nav-icon {
  opacity: 1;
  color: var(--admin-sidebar-gold);
}

.sidebar-item span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Yellow circular notification badge */
.nav-badge-pill {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  background: #eab308;
  color: #0b1329;
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Sidebar User Footer */
.sidebar-user-footer {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--admin-sidebar-border);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(0, 0, 0, 0.15);
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eab308;
  color: #0b1329;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-meta {
  flex: 1;
  overflow: hidden;
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 0.72rem;
  color: var(--admin-sidebar-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-logout-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   MAIN CONTENT & HEADER
   ========================================================================== */
.admin-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.admin-header {
  height: var(--header-height);
  background: var(--admin-header-bg);
  border-bottom: 1px solid var(--admin-header-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.25s, border-color 0.25s;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--admin-card-border);
  background: var(--admin-card-bg);
  color: var(--admin-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.nav-toggle-btn:hover {
  background: var(--admin-table-row-hover);
}

.header-title-box {
  display: flex;
  flex-direction: column;
}

.header-page-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--admin-text-heading);
  line-height: 1.2;
}

.header-page-subtitle {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
}

/* Right Header Toolbar */
.header-right-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}



/* Rounded Icon Buttons (Theme toggle & Refresh) */
.btn-icon-action {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--admin-btn-ghost-border);
  background: var(--admin-btn-ghost-bg);
  color: var(--admin-text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon-action:hover {
  background: var(--admin-btn-ghost-hover);
}

/* Outlined Ghost Action (View Website) */
.btn-ghost-action {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--admin-btn-ghost-border);
  background: var(--admin-btn-ghost-bg);
  color: var(--admin-btn-ghost-text);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ghost-action:hover {
  background: var(--admin-btn-ghost-hover);
}

.spin-animation {
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   ADMIN BODY & VIEW MANAGEMENT
   ========================================================================== */
.admin-body {
  flex: 1;
  padding: 1.5rem;
}

.admin-view {
  display: none;
  animation: fadeInView 0.25s ease-out;
}

.admin-view.active {
  display: block;
}

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

/* Page Header inside views */
.page-head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--admin-text-heading);
}

.section-desc {
  font-size: 0.82rem;
  color: var(--admin-text-muted);
}

.page-actions-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Standard Buttons */
.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-admin-primary {
  background: #2563eb;
  color: #ffffff;
}

.btn-admin-primary:hover {
  background: #1d4ed8;
}

.btn-admin-secondary {
  background: var(--admin-btn-ghost-bg);
  border: 1px solid var(--admin-btn-ghost-border);
  color: var(--admin-text-main);
}

.btn-admin-secondary:hover {
  background: var(--admin-btn-ghost-hover);
}

.btn-admin-gold {
  background: var(--admin-btn-gold-bg);
  color: #ffffff;
}

.btn-admin-gold:hover {
  background: var(--admin-btn-gold-hover);
}

/* ==========================================================================
   DASHBOARD 11 KPI CARDS GRID (Exact match to Screenshot 1)
   ========================================================================== */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: var(--radius-card);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--admin-card-shadow);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Active Blue Outline Accent (for Analytics summary cards) */
.kpi-card.kpi-card-blue-active {
  border: 1.5px solid var(--card-blue-active-border);
}

.kpi-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-beige {
  background: var(--icon-box-beige-bg);
  color: var(--icon-box-beige-color);
}

.icon-soft-blue {
  background: var(--icon-box-blue-bg);
  color: var(--icon-box-blue-color);
}

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

.kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--admin-text-heading);
  line-height: 1.2;
}

.kpi-label {
  font-size: 0.76rem;
  color: var(--admin-text-muted);
  font-weight: 500;
  margin-top: 0.15rem;
}

/* Analytics Top 2 KPI row */
.analytics-top-kpi-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 320px));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   CONTENT PANELS & CARDS
   ========================================================================== */
.content-panel-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--admin-card-shadow);
  overflow: hidden;
  transition: background-color 0.25s, border-color 0.25s;
}

.panel-card-head {
  padding: 1.15rem 1.25rem 0.75rem 1.25rem;
}

.panel-card-head-flex {
  padding: 1.15rem 1.25rem 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.panel-card-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--admin-text-heading);
}

.panel-card-desc {
  font-size: 0.76rem;
  color: var(--admin-text-muted);
}

.panel-card-body {
  padding: 1.15rem 1.25rem;
}

.dashboard-split-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* Status Distribution Breakdown List (Matches Screenshot 1) */
.status-distribution-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.status-dist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

body.theme-dark .status-dist-row {
  border-bottom-color: rgba(255, 255, 255, 0.03);
}

.status-dist-count {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--admin-text-heading);
}

/* Status Badges */
.status-badge-pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 600;
}

.pill-blue { background: var(--pill-blue-bg); color: var(--pill-blue-text); }
.pill-yellow { background: var(--pill-yellow-bg); color: var(--pill-yellow-text); }
.pill-orange { background: var(--pill-orange-bg); color: var(--pill-orange-text); }
.pill-green { background: var(--pill-green-bg); color: var(--pill-green-text); }
.pill-red { background: var(--pill-red-bg); color: var(--pill-red-text); }
.pill-gray { background: var(--pill-gray-bg); color: var(--pill-gray-text); }

/* ==========================================================================
   ANALYTICS TIMELINE & CHARTS (Matches Screenshot 2)
   ========================================================================== */
.analytics-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.chart-custom-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--admin-text-muted);
  font-weight: 500;
}

.legend-color-box {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.legend-gold { background: #d97706; }
.legend-blue { background: #3b82f6; }

.svg-timeline-container {
  width: 100%;
  height: 250px;
}

.admin-vector-chart {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Donut Chart */
.donut-chart-wrapper {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-stats-row {
  display: flex;
  justify-content: space-around;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--admin-card-border);
}

.donut-stat-item {
  text-align: center;
}

.donut-stat-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--admin-text-heading);
}

.donut-stat-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.74rem;
  color: var(--admin-text-muted);
}

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

.dot-pink { background: #ec4899; }
.dot-blue { background: #3b82f6; }
.dot-teal { background: #14b8a6; }

/* ==========================================================================
   ANALYTICS DATA TABLES & CONTROLS
   ========================================================================== */
.analytics-tables-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.pill-count-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 600;
}

body.theme-dark .pill-count-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.table-toolbar {
  padding: 0 1.25rem 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.table-search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 260px;
}

.table-search-box svg {
  position: absolute;
  left: 0.65rem;
  color: var(--admin-text-muted);
  pointer-events: none;
}

.table-search-box input {
  width: 100%;
  padding: 0.42rem 0.65rem 0.42rem 2.1rem;
  border: 1px solid var(--admin-input-border);
  background: var(--admin-input-bg);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--admin-text-main);
  outline: none;
}

.table-actions-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.rows-indicator {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
}

.btn-table-export {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--admin-btn-ghost-border);
  background: var(--admin-btn-ghost-bg);
  color: var(--admin-text-main);
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-table-export:hover {
  background: var(--admin-btn-ghost-hover);
}

.btn-table-danger {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-table-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.modern-admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

.modern-admin-table th {
  background: var(--table-header-bg);
  color: var(--admin-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--table-border);
  border-top: 1px solid var(--table-border);
}

.modern-admin-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--table-border);
  color: var(--admin-text-main);
  vertical-align: middle;
}

.modern-admin-table tr:hover td {
  background: var(--table-row-hover);
}

.flag-icon {
  margin-right: 0.35rem;
  font-size: 1rem;
}

.count-accent-green {
  color: #16a34a;
  font-weight: 700;
}

.click-cursor-icon {
  display: inline-flex;
  vertical-align: middle;
  color: #d97706;
  margin-right: 0.4rem;
}

.code-font {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--admin-text-muted);
}

.share-progress-wrapper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 120px;
}

/* ==========================================================================
   SKELETON LOADING SYSTEM & SHIMMER ANIMATION
   ========================================================================== */
@keyframes skeletonShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(226, 232, 240, 0.45) 25%,
    rgba(203, 213, 225, 0.85) 37%,
    rgba(226, 232, 240, 0.45) 63%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

[data-theme="dark"] .skeleton-shimmer,
.theme-dark .skeleton-shimmer {
  background: linear-gradient(
    90deg,
    rgba(30, 41, 59, 0.6) 25%,
    rgba(51, 65, 85, 0.85) 37%,
    rgba(30, 41, 59, 0.6) 63%
  );
  background-size: 200% 100%;
}

.skeleton-text {
  height: 0.85rem;
  border-radius: 4px;
  display: inline-block;
  vertical-align: middle;
}

.skeleton-box {
  border-radius: 6px;
  display: inline-block;
}

.skeleton-pill {
  width: 60px;
  height: 20px;
  border-radius: 9999px;
  display: inline-block;
}

.skeleton-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-block;
}

.skeleton-row td {
  padding: 0.95rem 1rem !important;
  vertical-align: middle;
}

/* Skeleton Grid Card for Blog / Gallery */
.skeleton-media-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--admin-card-shadow);
  display: flex;
  flex-direction: column;
}

.skeleton-media-thumb {
  width: 100%;
  height: 175px;
  display: block;
}

.skeleton-media-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.share-progress-bar {
  height: 6px;
  background: #d97706;
  border-radius: 9999px;
  flex: 1;
}

.share-pct-text {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--admin-text-muted);
  width: 32px;
}

/* ==========================================================================
   LEADS FILTER & GALLERY CONTROLS
   ========================================================================== */
.leads-filter-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.leads-filter-btn,
.gallery-filter-btn {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--admin-card-border);
  background: var(--admin-card-bg);
  color: var(--admin-text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.leads-filter-btn:hover,
.gallery-filter-btn:hover {
  background: var(--admin-table-row-hover);
  color: var(--admin-text-main);
}

.leads-filter-btn.active,
.gallery-filter-btn.active {
  background: var(--admin-btn-gold-bg);
  border-color: var(--admin-btn-gold-bg);
  color: #ffffff;
}

.gallery-category-filter {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.admin-media-card {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--admin-card-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.admin-media-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.admin-media-thumb-wrap {
  position: relative;
  width: 100%;
  height: 175px;
  background: #0B132B;
  overflow: hidden;
}

.admin-media-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.admin-media-card:hover .admin-media-thumb {
  transform: scale(1.03);
}

.admin-media-format-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(11, 19, 43, 0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-media-duration-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.admin-media-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.admin-media-cat-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  font-size: 0.74rem;
}

.admin-media-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--admin-text-heading);
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

.admin-media-caption {
  font-size: 0.82rem;
  color: var(--admin-text-muted);
  line-height: 1.45;
  margin-bottom: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-media-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--admin-card-border);
}

.admin-media-location {
  font-size: 0.74rem;
  color: var(--admin-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-media-btns {
  display: flex;
  gap: 0.4rem;
}

.btn-media-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.btn-media-edit {
  background: var(--admin-table-row-hover);
  color: var(--admin-text-main);
  border-color: var(--admin-card-border);
}

.btn-media-edit:hover {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

.btn-media-del {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-media-del:hover {
  background: #ef4444;
  color: #fff;
}

/* ==========================================================================
   EXECUTIVE MODAL ARCHITECTURE (Clean, Professional & Modern)
   ========================================================================== */
.admin-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 29, 0.76);
  backdrop-filter: blur(8px) saturate(180%);
  -webkit-backdrop-filter: blur(8px) saturate(180%);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  opacity: 0;
  visibility: hidden;
  overscroll-behavior: contain;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  width: 100%;
  max-width: 580px;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45),
              0 0 0 1px rgba(255, 255, 255, 0.06),
              0 2px 4px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 3.5rem);
  overflow: hidden;
  transform: scale(0.96) translateY(10px);
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-modal.active .modal-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-dialog-sm {
  max-width: 440px;
}

.modal-dialog-lg {
  max-width: 780px;
}

/* Modal Header */
.modal-header {
  padding: 1.25rem 1.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
  border-bottom: 1px solid var(--admin-card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.modal-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.modal-category-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #d97706;
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.25);
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  line-height: 1.3;
}

.modal-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--admin-text-heading);
  letter-spacing: -0.015em;
  margin: 0;
  line-height: 1.3;
}

.modal-subtitle {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Modal Close Button */
.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--admin-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
  transform: rotate(90deg);
}

.modal-close:focus-visible {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}

/* Modal Body & Forms */
.modal-body,
.modal-form {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  flex: 1;
}

.modal-body::-webkit-scrollbar,
.modal-form::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track,
.modal-form::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb,
.modal-form::-webkit-scrollbar-thumb {
  background: var(--admin-card-border);
  border-radius: 999px;
}

.modal-body::-webkit-scrollbar-thumb:hover,
.modal-form::-webkit-scrollbar-thumb:hover {
  background: var(--admin-text-muted);
}

/* Form Groups & Grid Rows */
.modal-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
}

.modal-form .form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-form .form-group label .label-optional {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--admin-text-muted);
}

.modal-form .form-group label .label-required {
  color: #d97706;
}

.modal-form input[type="text"],
.modal-form input[type="email"],
.modal-form input[type="password"],
.modal-form input[type="url"],
.modal-form input[type="number"],
.modal-form select,
.modal-form textarea {
  width: 100%;
  padding: 0.68rem 0.95rem;
  background: var(--admin-input-bg);
  border: 1px solid var(--admin-input-border);
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--admin-text-main);
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.modal-form input::placeholder,
.modal-form textarea::placeholder {
  color: var(--admin-text-muted);
  opacity: 0.75;
}

.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus {
  border-color: #d97706;
  background: var(--admin-card-bg);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.modal-form input[readonly] {
  background: rgba(0, 0, 0, 0.04);
  color: var(--admin-text-muted);
  border-style: dashed;
  cursor: not-allowed;
}

.modal-form textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.form-hint {
  font-size: 0.74rem;
  color: var(--admin-text-muted);
  line-height: 1.35;
  margin-top: 0.1rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Modal Footer */
.modal-footer {
  padding: 1.1rem 1.75rem;
  background: var(--admin-table-header-bg);
  border-top: 1px solid var(--admin-card-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.modal-footer .btn-admin-secondary {
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  color: var(--admin-text-main);
  padding: 0.65rem 1.25rem;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.86rem;
  transition: all 0.18s ease;
}

.modal-footer .btn-admin-secondary:hover {
  background: var(--admin-input-bg);
  border-color: var(--admin-text-muted);
  color: var(--admin-text-heading);
}

.modal-footer .btn-admin-primary {
  padding: 0.65rem 1.45rem;
  border-radius: 9px;
  font-weight: 700;
  font-size: 0.86rem;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.28);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-footer .btn-admin-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(217, 119, 6, 0.38);
}

.modal-footer .btn-admin-primary:active:not(:disabled) {
  transform: translateY(0);
}

/* Corporate Lead Dossier Layout */
.lead-dossier-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.lead-dossier-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: var(--admin-table-header-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: 12px;
  gap: 1rem;
}

.lead-dossier-title {
  margin: 0 0 0.3rem 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--admin-text-heading);
}

.lead-dossier-meta {
  font-size: 0.82rem;
  color: var(--admin-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.lead-dossier-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.lead-dossier-stat {
  padding: 0.85rem 1rem;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.lead-dossier-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-text-muted);
}

.lead-dossier-stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--admin-text-heading);
}

.lead-dossier-box {
  padding: 1rem 1.15rem;
  background: var(--admin-table-header-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--admin-text-main);
}

.lead-dossier-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--admin-card-border);
  gap: 1rem;
  flex-wrap: wrap;
}

/* Mobile Responsiveness for Modals */
@media (max-width: 640px) {
  .admin-modal {
    padding: 0.75rem;
    align-items: flex-end;
  }
  .modal-dialog {
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    margin: 0;
  }
  .modal-header {
    padding: 1.1rem 1.25rem;
  }
  .modal-body,
  .modal-form {
    padding: 1.25rem;
  }
  .form-row-2,
  .lead-dossier-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .modal-footer {
    padding: 1rem 1.25rem;
    flex-direction: column-reverse;
    gap: 0.6rem;
  }
  .modal-footer .btn-admin {
    width: 100%;
    justify-content: center;
  }
  .lead-dossier-hero {
    flex-direction: column;
    align-items: stretch;
  }
  .lead-dossier-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .lead-dossier-footer > div {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  .lead-dossier-footer .btn-admin {
    width: 100%;
    justify-content: center;
  }
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-toast {
  padding: 0.75rem 1rem;
  background: #0f172a;
  color: #ffffff;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toastSlide 0.25s ease-out;
}

@keyframes toastSlide {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1200px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .analytics-charts-grid,
  .analytics-tables-grid {
    grid-template-columns: 1fr;
  }
}

/* Sidebar Backdrop for Mobile Touch Dismissal */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 19, 41, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1200px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .analytics-charts-grid,
  .analytics-tables-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-split-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile Slide-in Side Panel */
  .admin-sidebar {
    width: 260px;
    max-width: 82vw;
    height: 100dvh;
    transform: translateX(-100%);
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
  }
  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }

  /* Compact Grouped Side Panel Buttons to Prevent Overflow */
  .admin-sidebar .sidebar-brand {
    padding: 0.75rem 0.9rem;
    flex-shrink: 0;
  }
  .admin-sidebar .sidebar-avatar-logo {
    width: 30px;
    height: 30px;
  }
  .admin-sidebar .sidebar-avatar-logo img {
    width: 20px;
    height: 20px;
  }
  .admin-sidebar .sidebar-title {
    font-size: 0.88rem;
  }
  .admin-sidebar .sidebar-admin-badge {
    font-size: 0.6rem;
  }

  /* Scrollable Nav Container */
  .admin-sidebar .sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.35rem 0.45rem 0.75rem 0.45rem;
  }

  /* Compact Section Titles */
  .admin-sidebar .nav-section-title {
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    padding: 0.4rem 0.5rem 0.15rem 0.5rem;
    margin-top: 0.25rem;
  }

  /* Compact Menu Items */
  .admin-sidebar .sidebar-item {
    margin-bottom: 2px;
  }
  .admin-sidebar .sidebar-item a {
    padding: 0.42rem 0.6rem;
    font-size: 0.82rem;
    gap: 0.55rem;
    border-radius: 6px;
  }
  .admin-sidebar .nav-icon {
    width: 16px;
    height: 16px;
  }
  .admin-sidebar .nav-badge-pill {
    min-width: 16px;
    height: 16px;
    font-size: 0.62rem;
    padding: 0 4px;
  }

  /* Sticky Bottom Profile & Logout Button - Always Visible & Never Blocked */
  .admin-sidebar .sidebar-user-footer {
    padding: 0.65rem 0.85rem;
    flex-shrink: 0;
    margin-top: auto;
    background: rgba(7, 12, 24, 0.98);
    border-top: 1px solid var(--admin-sidebar-border);
    position: relative;
    z-index: 10;
  }
  .admin-sidebar .sidebar-user-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  .admin-sidebar .sidebar-user-name {
    font-size: 0.8rem;
  }
  .admin-sidebar .sidebar-logout-btn {
    padding: 0.35rem;
  }
  .admin-sidebar .sidebar-logout-btn svg {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 580px) {
  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }
  .header-page-subtitle,
  .sidebar-user-email {
    display: none;
  }
  .btn-ghost-action span {
    display: none;
  }
}

/* ==========================================================================
   MEDIA UPLOAD DROPZONE & PREVIEWS (DEVICE UPLOAD)
   ========================================================================== */
.media-upload-group {
  margin-bottom: 1.15rem;
}
.media-upload-dropzone {
  border: 2px dashed var(--admin-card-border);
  border-radius: var(--radius-card, 12px);
  background: var(--admin-input-bg);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  user-select: none;
}
.media-upload-dropzone:hover,
.media-upload-dropzone.dragover {
  border-color: var(--admin-primary);
  background: rgba(43, 140, 77, 0.08);
  transform: translateY(-1px);
}
.media-dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.media-dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(43, 140, 77, 0.14);
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.2rem;
}
.media-dropzone-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--admin-text-heading);
}
.media-dropzone-hint {
  font-size: 0.76rem;
  color: var(--admin-text-muted);
}
.media-upload-preview {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--admin-card-bg);
  border: 1px solid var(--admin-card-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 1rem;
  animation: fadeIn 0.2s ease-out;
}
.media-preview-thumb {
  width: 68px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.media-preview-info {
  flex: 1;
  min-width: 0;
}
.media-preview-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--admin-text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-preview-meta {
  font-size: 0.74rem;
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
  font-weight: 500;
}
.media-preview-remove {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.media-preview-remove:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}
