/* ==========================================================================
   SAFAS CLOUD & MAIL ADMIN - ULTRA-PREMIUM LUXURY DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  /* Ultra-clean Luxury Canvas - Light Mode */
  --bg-app: #f4f7fc;
  --bg-surface: #ffffff;
  --bg-surface-secondary: #f8fafd;
  --bg-surface-hover: #f0f4fa;
  --bg-subtle: #edf2f9;

  --text-primary: #091224;
  --text-secondary: #566a85;
  --text-muted: #8e9fb5;
  --text-inverse: #ffffff;

  --border-light: #e4ebf5;
  --border-subtle: #edf2f9;
  --border-glass: rgba(255, 255, 255, 0.85);
  --border-focus: #2563eb;

  /* Vibrant Accent Palette */
  --primary: #1862f0;
  --primary-hover: #124fd0;
  --primary-gradient: linear-gradient(135deg, #2b6bf3 0%, #1044d0 100%);
  --primary-light: #eef4ff;
  --primary-glow: rgba(24, 98, 240, 0.35);

  /* Platform Accent Colors */
  --cloud-blue: #1862f0;
  --cloud-blue-bg: #eef4ff;
  --mail-purple: #7c3aed;
  --mail-purple-bg: #f5f3ff;
  --unified-teal: #0d9488;
  --unified-teal-bg: #f0fdfa;

  /* Status Colors with Luxury Soft Glow */
  --status-valid-bg: #eafaf1;
  --status-valid-text: #059669;
  --status-valid-dot: #10b981;
  --status-valid-glow: rgba(16, 185, 129, 0.4);

  --status-invalid-bg: #fff2ea;
  --status-invalid-text: #ea580c;
  --status-invalid-dot: #f97316;
  --status-invalid-glow: rgba(249, 115, 22, 0.4);

  --status-expired-bg: #fef2f2;
  --status-expired-text: #dc2626;
  --status-expired-dot: #ef4444;
  --status-expired-glow: rgba(239, 68, 68, 0.4);

  --status-pending-bg: #fffbeb;
  --status-pending-text: #d97706;
  --status-pending-dot: #f59e0b;
  --status-pending-glow: rgba(245, 158, 11, 0.4);

  /* Priority Tags */
  --priority-urgent-bg: #fef2f2;
  --priority-urgent-text: #ef4444;
  --priority-high-bg: #fff7ed;
  --priority-high-text: #f97316;
  --priority-medium-bg: #eff6ff;
  --priority-medium-text: #2563eb;
  --priority-low-bg: #f8fafc;
  --priority-low-text: #64748b;

  /* Compliance Bar Gradients */
  --comp-orange-grad: linear-gradient(90deg, #f97316, #fb923c);
  --comp-yellow-grad: linear-gradient(90deg, #84cc16, #a3e635);
  --comp-teal-grad: linear-gradient(90deg, #06b6d4, #22d3ee);

  /* Storage Card Royal Cobalt Blue */
  --storage-bg: #1862f0;
  --storage-gradient: linear-gradient(145deg, #1b68f5 0%, #1355e2 100%);
  --storage-glow: 0 16px 36px rgba(24, 98, 240, 0.32);

  /* Ultra-refined Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.03), 0 1px 3px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 12px 28px -4px rgba(15, 23, 42, 0.06), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 24px 48px -8px rgba(15, 23, 42, 0.1), 0 8px 18px -4px rgba(15, 23, 42, 0.04);
  --shadow-blue-btn: 0 8px 22px rgba(24, 98, 240, 0.35);

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  /* Premium Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Dark Mode Luxury Palette */
[data-theme="dark"] {
  --bg-app: #080d1a;
  --bg-surface: #10192d;
  --bg-surface-secondary: #16223d;
  --bg-surface-hover: #1e2e50;
  --bg-subtle: #172440;

  --text-primary: #f8fafc;
  --text-secondary: #9cb1ce;
  --text-muted: #647a9b;
  --text-inverse: #080d1a;

  --border-light: #213254;
  --border-subtle: #192742;
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;

  --primary: #306eff;
  --primary-hover: #558bff;
  --primary-light: rgba(48, 110, 255, 0.15);
  --primary-glow: rgba(48, 110, 255, 0.4);

  --cloud-blue-bg: rgba(37, 99, 235, 0.18);
  --mail-purple-bg: rgba(124, 58, 237, 0.18);
  --unified-teal-bg: rgba(13, 148, 136, 0.18);

  --status-valid-bg: rgba(16, 185, 129, 0.15);
  --status-valid-text: #34d399;
  --status-invalid-bg: rgba(249, 115, 22, 0.15);
  --status-invalid-text: #fb923c;
  --status-expired-bg: rgba(239, 68, 68, 0.15);
  --status-expired-text: #f87171;
  --status-pending-bg: rgba(245, 158, 11, 0.15);
  --status-pending-text: #fbbf24;

  --priority-urgent-bg: rgba(239, 68, 68, 0.2);
  --priority-high-bg: rgba(249, 115, 22, 0.2);
  --priority-medium-bg: rgba(37, 99, 235, 0.2);
  --priority-low-bg: rgba(100, 116, 139, 0.2);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 50px rgba(0, 0, 0, 0.65);
  --shadow-blue-btn: 0 8px 24px rgba(48, 110, 255, 0.4);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-app);
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(124, 58, 237, 0.04) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  padding-bottom: 60px;
}

/* 100% Circular User Avatars Across Entire System */
.user-avatar, .uploader-avatar, .kyc-avatar, .profile-avatar, .avatar-circle, img.user-avatar, img.uploader-avatar {
  border-radius: 50% !important;
  aspect-ratio: 1 / 1;
  object-fit: cover !important;
}

.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 32px;
}

/* ==========================================================================
   STICKY HEADER AREA (Dedicated Full-Width Shield against Scrolling Overlaps)
   ========================================================================== */
.top-header-area {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--bg-app);
  background: linear-gradient(to bottom, var(--bg-app) 80%, rgba(244, 247, 252, 0.85) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0 14px 0;
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.03);
}

[data-theme="dark"] .top-header-area {
  background: linear-gradient(to bottom, var(--bg-app) 80%, rgba(8, 13, 26, 0.85) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-inner-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}

.top-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  padding: 8px 16px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  position: relative;
  gap: 12px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #1862f0 0%, #7c3aed 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 6px 16px rgba(24, 98, 240, 0.35);
  transition: transform var(--transition-spring);
}

.brand-section:hover .brand-logo {
  transform: scale(1.08) rotate(-4deg);
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-name .highlight {
  background: linear-gradient(135deg, #1862f0, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  border: 1px solid rgba(24, 98, 240, 0.2);
}

/* Nav Tabs */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  background: var(--bg-surface-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  flex-wrap: nowrap;
  margin: 0 auto;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.835rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-normal);
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-hover);
}

.nav-link.active {
  color: var(--text-primary);
  background-color: var(--bg-surface);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-pill-badge {
  font-size: 0.685rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: #ef4444;
  color: white;
  margin-left: 2px;
}

/* Navigation Dropdown Menu for User Management */
.nav-item.has-dropdown {
  position: relative;
}

.dropdown-arrow-icon {
  transition: transform 0.25s ease;
  opacity: 0.7;
}

.nav-item.has-dropdown:hover .dropdown-arrow-icon {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px) scale(0.96);
  min-width: 300px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 8px;
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 14px;
}

.nav-item.has-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

.nav-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.18s ease, transform 0.18s ease;
  cursor: pointer;
}

.nav-dropdown-item:hover {
  background: var(--bg-surface-hover);
  transform: translateX(3px);
}

.dropdown-item-icon {
  font-size: 18px;
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 1px;
}

.dropdown-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dropdown-item-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Right Nav Actions */
.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  flex-shrink: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 9px;
  height: 9px;
  background-color: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(0.95); }
  50% { transform: scale(1.25); }
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 12px 3px 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.user-profile-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-focus);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50% !important;
  object-fit: cover;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   DROPDOWN MENUS (Notifications & Profile) - ABSOLUTELY POSITIONED
   ========================================================================== */
.notification-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 380px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 20px 40px rgba(0, 0, 0, 0.12);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.97);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.notification-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.notification-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-secondary);
}

.notification-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.notification-count-badge {
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 0.725rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.mark-read-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.mark-read-btn:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

.notification-list {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notification-item {
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.notification-item:hover {
  background-color: var(--bg-surface-hover);
}

.notification-item.unread {
  background-color: var(--primary-light);
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-gradient);
}

.notif-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon-box.warning { background-color: #fff1eb; color: #ea580c; }
.notif-icon-box.danger { background-color: #fef2f2; color: #ef4444; }
.notif-icon-box.success { background-color: #ecfdf5; color: #10b981; }
.notif-icon-box.info { background-color: #eff6ff; color: #1862f0; }

.notif-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}

.notif-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.notif-desc {
  font-size: 0.785rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.notif-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.notification-footer {
  padding: 12px 18px;
  text-align: center;
  background: var(--bg-surface-secondary);
  border-top: 1px solid var(--border-subtle);
}

.clear-notifs-btn {
  background: transparent;
  border: none;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.clear-notifs-btn:hover {
  color: var(--primary);
}

/* Profile Dropdown Menu */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 230px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 20px 40px rgba(0, 0, 0, 0.12);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.97);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.profile-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.profile-menu-item {
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.profile-menu-item:hover {
  background-color: var(--bg-surface-hover);
  color: var(--primary);
}

.profile-menu-item.logout {
  color: #ef4444;
  border-top: 1px solid var(--border-subtle);
}

.profile-menu-item.logout:hover {
  background-color: #fef2f2;
}

/* ==========================================================================
   CROSS-PLATFORM JUMP BANNER (Cloud + Mail Ecosystem)
   ========================================================================== */
.ecosystem-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
  gap: 12px;
}

.eco-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eco-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.825rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.eco-tag.cloud {
  background: var(--cloud-blue-bg);
  color: var(--cloud-blue);
  border: 1px solid rgba(24, 98, 240, 0.2);
}

.eco-tag.mail {
  background: var(--mail-purple-bg);
  color: var(--mail-purple);
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.eco-right-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eco-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.825rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-light);
  background: var(--bg-surface-secondary);
  color: var(--text-secondary);
}

.eco-link-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--primary);
  border-color: var(--border-focus);
  transform: translateY(-1px);
}

/* ==========================================================================
   PAGE HEADER & ACTIONS
   ========================================================================== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #ffffff;
  height: 40px;
  padding: 0 22px;
  border-radius: var(--radius-full);
  font-size: 0.885rem;
  font-weight: 700;
  border: 1px solid var(--primary);
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: none !important;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none !important;
}

.btn-primary.btn-mail {
  background: var(--mail-purple);
  border-color: var(--mail-purple);
  box-shadow: none !important;
}

.btn-primary.btn-mail:hover {
  background: #6d28d9;
  border-color: #6d28d9;
  box-shadow: none !important;
}

/* ==========================================================================
   VIEW PANELS (Tab Switchable Containers)
   ========================================================================== */
.view-panel {
  display: none;
  animation: fadeInPanel 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* Main Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.main-content-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  max-width: 100%;
}

.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* ==========================================================================
   METRICS KPI STRIP
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.kpi-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.kpi-sub {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 600;
}

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

.kpi-icon-box.blue { background: var(--cloud-blue-bg); color: var(--cloud-blue); }
.kpi-icon-box.purple { background: var(--mail-purple-bg); color: var(--mail-purple); }
.kpi-icon-box.orange { background: #fff7ed; color: #ea580c; }
.kpi-icon-box.green { background: #ecfdf5; color: #10b981; }

/* ==========================================================================
   FOLDER QUICK-CARDS GRID
   ========================================================================== */
.folders-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.folder-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 125px;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.folder-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-glow);
}

.folder-card.active-filter {
  border-color: var(--primary);
  background-color: var(--primary-light);
  box-shadow: 0 6px 20px rgba(24, 98, 240, 0.2);
}

.folder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.folder-icon-wrapper {
  width: 40px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-spring);
}

.folder-card:hover .folder-icon-wrapper {
  transform: scale(1.12);
}

.folder-arrow-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.folder-card:hover .folder-arrow-btn {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  transform: translate(2px, -2px);
}

.folder-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.folder-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-subtext {
  font-size: 0.775rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==========================================================================
   SHARED CARD & TABLE STYLES
   ========================================================================== */
.content-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.table-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-light);
  user-select: none;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: none !important;
}

.action-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: rgba(24, 98, 240, 0.4);
  transform: translateY(-1px);
  box-shadow: none !important;
}

.action-btn:active {
  transform: translateY(0);
  box-shadow: none !important;
}

.action-btn.active {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: none !important;
}

.action-btn.active:hover {
  background: linear-gradient(135deg, #185ee0 0%, #0d3eb8 100%);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: none !important;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px 14px 8px 36px;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-family: inherit;
  width: 200px;
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  width: 240px;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

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

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

.data-table th {
  padding: 12px 14px;
  font-size: 0.785rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  white-space: nowrap;
}

.data-table td {
  padding: 14px;
  font-size: 0.875rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
  white-space: nowrap;
}

.data-table tr:hover td {
  background-color: var(--bg-surface-hover);
}

/* Status & Platform Pills */
.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.platform-tag.cloud {
  background: var(--cloud-blue-bg);
  color: var(--cloud-blue);
  border: 1px solid rgba(24, 98, 240, 0.2);
}

.platform-tag.mail {
  background: var(--mail-purple-bg);
  color: var(--mail-purple);
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.platform-tag.unified {
  background: var(--unified-teal-bg);
  color: var(--unified-teal);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  font-weight: 700;
  white-space: nowrap !important;
  flex-shrink: 0;
  line-height: 1.2;
}

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

.status-valid {
  background-color: var(--status-valid-bg);
  color: var(--status-valid-text);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.status-valid .status-dot { background-color: var(--status-valid-dot); box-shadow: 0 0 6px var(--status-valid-glow); }

.status-pending {
  background-color: var(--status-pending-bg);
  color: var(--status-pending-text);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.status-pending .status-dot { background-color: var(--status-pending-dot); box-shadow: 0 0 6px var(--status-pending-glow); }

.status-invalid, .status-rejected {
  background-color: var(--status-expired-bg);
  color: var(--status-expired-text);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.status-invalid .status-dot, .status-rejected .status-dot { background-color: var(--status-expired-dot); box-shadow: 0 0 6px var(--status-expired-glow); }

/* Progress Quota Bar inside table (Unified Cloud + Mail Segmented) */
.user-quota-track {
  width: 130px;
  height: 8px;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  display: inline-flex;
  margin-right: 8px;
  vertical-align: middle;
  border: 1px solid var(--border-subtle);
}

.user-quota-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
}

/* Document Audit Table Luxury Accents */
.doc-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.mono-id-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(24, 98, 240, 0.15);
  display: inline-block;
}

.table-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.table-date-chip svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.table-date-chip.exp {
  font-weight: 800;
  color: var(--text-primary);
}

.exp-calendar-icon {
  font-size: 0.8rem;
  opacity: 0.8;
}

.date-text {
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.825rem;
  color: var(--text-primary);
}

.source-tag {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  display: inline-block;
}

.header-count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(24, 98, 240, 0.2);
}

.btn-doc-audit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  font-size: 0.785rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(24, 98, 240, 0.22);
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.btn-doc-audit:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: none !important;
}

.btn-doc-audit:active {
  transform: translateY(0);
  box-shadow: none !important;
}

.btn-doc-audit svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}

/* ==========================================================================
   VERIFICATION CENTER & KYC HUB (Luxury Fintech / Stripe Identity Grade)
   ========================================================================== */
.kyc-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
  gap: 24px;
}

.kyc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.kyc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  border-color: var(--primary);
}

.kyc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.kyc-user-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.kyc-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50% !important;
  object-fit: cover;
  border: 2px solid var(--primary-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.kyc-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.kyc-user-title {
  font-weight: 800;
  font-size: 0.975rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kyc-user-sub {
  font-size: 0.765rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
  min-width: 0;
}

.kyc-user-email {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 125px;
  display: inline-block;
}

/* Dual Document & Selfie Visual Comparison Cards (Crystal Clear, Full Bleed) */
.kyc-visual-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.kyc-photo-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #f1f5f9;
  cursor: pointer;
  height: 145px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.kyc-photo-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(24, 98, 240, 0.15);
}

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

.kyc-photo-card:hover .kyc-photo-img {
  transform: scale(1.06);
}

/* Floating Frosted Glass Floating Pills */
.kyc-floating-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  letter-spacing: 0.01em;
}

.kyc-floating-badge.match {
  background: rgba(6, 95, 70, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.kyc-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 3;
}

.kyc-photo-card:hover .kyc-hover-overlay {
  opacity: 1;
}

.kyc-hover-btn {
  background: #ffffff;
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transform: translateY(4px);
  transition: transform 0.2s ease;
}

.kyc-photo-card:hover .kyc-hover-btn {
  transform: translateY(0);
}

/* Structured Metadata Grid */
.kyc-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  background: var(--bg-surface-secondary);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.kyc-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kyc-meta-label {
  font-size: 0.685rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kyc-meta-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.kyc-meta-val.mono {
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary);
}

.country-flag-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  vertical-align: middle;
}

.country-flag-img {
  width: 19px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Actions Row */
.kyc-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-approve {
  flex: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  padding: 0 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.btn-approve:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

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

.btn-reject {
  flex: 0.9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.btn-reject:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: translateY(-1px);
}

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

.btn-inspect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  background: var(--bg-surface);
  color: var(--primary);
  border: 1px solid var(--border-light);
  padding: 0 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.btn-inspect:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-1px);
}

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

.kyc-verified-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  background: var(--status-valid-bg);
  color: var(--status-valid-text);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 700;
}

/* ==========================================================================
   SUPPORT & HELP DESK
   ========================================================================== */
.tickets-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ticket-row-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.ticket-row-item:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-focus);
  transform: translateX(3px);
}

.ticket-row-item.unread {
  border-left: 4px solid #1862f0;
}

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

.ticket-priority-tag {
  font-size: 0.725rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.priority-urgent { background: var(--priority-urgent-bg); color: var(--priority-urgent-text); border: 1px solid rgba(239, 68, 68, 0.2); }
.priority-high { background: var(--priority-high-bg); color: var(--priority-high-text); border: 1px solid rgba(249, 115, 22, 0.2); }
.priority-medium { background: var(--priority-medium-bg); color: var(--priority-medium-text); border: 1px solid rgba(37, 99, 235, 0.2); }
.priority-low { background: var(--priority-low-bg); color: var(--priority-low-text); border: 1px solid rgba(100, 116, 139, 0.2); }

.ticket-subject-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ticket-subject {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ticket-snippet {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

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

/* Chat & Ticket Reply Drawer */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 380px;
  overflow-y: auto;
  padding: 14px;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  max-width: 80%;
  font-size: 0.885rem;
  line-height: 1.4;
  position: relative;
}

.chat-bubble.customer {
  background: var(--bg-surface);
  color: var(--text-primary);
  align-self: flex-start;
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 4px;
}

.chat-bubble.admin {
  background: var(--primary-gradient);
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(24, 98, 240, 0.25);
}

.chat-time {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-top: 4px;
  text-align: right;
}

/* Diagnostics Action Bar inside Ticket Drawer */
.diagnostic-bar {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
  flex-wrap: wrap;
}

.diagnostic-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.diagnostic-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: none !important;
}

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

/* ==========================================================================
   STORAGE & PACKAGES HUB
   ========================================================================== */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.package-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: all var(--transition-normal);
  position: relative;
}

.package-card.highlight {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(24, 98, 240, 0.15);
}

.package-card.highlight::before {
  content: 'POPULAR';
  position: absolute;
  top: -10px;
  right: 18px;
  background: var(--primary-gradient);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.pkg-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.pkg-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.pkg-edit-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.pkg-edit-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  transform: scale(1.08);
}

.pkg-quota {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary);
  margin: 2px 0 6px 0;
}

.pkg-price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}

.pkg-price-val {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.pkg-price-period {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

.pkg-price-lkr {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 700;
  background: var(--bg-surface-secondary);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  display: inline-block;
  margin-bottom: 12px;
}

.pkg-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Quota Interactive Range Slider */
.quota-slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.quota-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slider-val-badge {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
}

.quota-range-slider {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background: #cbd5e1;
  outline: none;
  cursor: pointer;
  accent-color: var(--primary);
}

/* ==========================================================================
   SIDEBAR STORAGE SPEEDOMETER WIDGET
   ========================================================================== */
.storage-widget {
  background: var(--storage-gradient);
  border-radius: var(--radius-xl);
  padding: 24px 26px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--storage-glow);
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.storage-widget:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(24, 98, 240, 0.5);
}

.storage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.storage-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.storage-dots-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.storage-dots-btn:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: scale(1.06);
}

.storage-content-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.storage-gauge-wrapper {
  position: relative;
  width: 145px;
  height: 145px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.gauge-value-arc {
  fill: none;
  stroke: #ffffff;
  stroke-width: 7.5;
  stroke-linecap: round;
  stroke-dasharray: 263.89;
  stroke-dashoffset: 197.92;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.6));
  transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gauge-center-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.gauge-percentage {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #ffffff;
}

.gauge-subtext {
  font-size: 0.775rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  margin-top: 4px;
  line-height: 1.25;
  text-align: center;
}

.storage-legend-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-grow: 1;
  padding-left: 6px;
}

.storage-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.35;
  transition: transform var(--transition-fast);
}

.storage-legend-item:hover {
  transform: translateX(4px);
}

.legend-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.legend-bullet.b-policy { background-color: #68b5ff; box-shadow: 0 0 10px #68b5ff; }
.legend-bullet.b-vehicle { background-color: #38efef; box-shadow: 0 0 10px #38efef; }
.legend-bullet.b-reports { background-color: #6ee7b7; box-shadow: 0 0 10px #6ee7b7; }

.legend-info {
  display: flex;
  flex-direction: column;
}

.legend-val {
  font-weight: 700;
  font-size: 0.925rem;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.legend-cat {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.785rem;
  font-weight: 500;
}

/* Real-Time Live Server Telemetry Badge */
.storage-sub-live {
  font-size: 0.725rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  display: block;
  margin-top: 1px;
}

.server-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.685rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #a7f3d0;
  text-transform: uppercase;
}

.live-blink-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: liveHeartbeat 1.6s infinite ease-in-out;
}

@keyframes liveHeartbeat {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Server Hardware Telemetry List (Full-Width Horizontal Rows) */
.server-hardware-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 1;
}

.server-hw-row {
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hw-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hw-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.hw-badge-icon {
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
}

.hw-name {
  font-size: 0.725rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hw-metrics-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.hw-temp-badge, .hw-free-badge {
  font-size: 0.675rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.hw-live-val {
  font-size: 0.775rem;
  font-weight: 800;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.01em;
}

.hw-track {
  width: 100%;
  height: 5px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.hw-fill-cpu {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #38efef 0%, #68b5ff 100%);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px rgba(56, 239, 239, 0.6);
}

.hw-fill-ram {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #a7f3d0 0%, #34d399 100%);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}

/* ==========================================================================
   DOCUMENT COMPLIANCE WIDGET
   ========================================================================== */
.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.widget-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.multi-progress-bar {
  display: flex;
  height: 9px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background-color: var(--bg-surface-secondary);
  gap: 3px;
}

.progress-segment {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.seg-orange { background: var(--comp-orange-grad); width: 16%; }
.seg-yellow { background: var(--comp-yellow-grad); width: 62%; }
.seg-teal { background: var(--comp-teal-grad); width: 22%; }

.compliance-stat-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
  margin-bottom: 20px;
}

.stat-pill-box {
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.stat-pill-box:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.stat-pill-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-dot-orange { width: 7px; height: 7px; border-radius: 50%; background-color: var(--comp-orange); }
.stat-dot-yellow { width: 7px; height: 7px; border-radius: 50%; background-color: #84cc16; }
.stat-dot-teal { width: 7px; height: 7px; border-radius: 50%; background-color: var(--comp-teal); }

.stat-pill-label {
  font-size: 0.725rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(9, 18, 36, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

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

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--border-light);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
  transform: scale(0.92) translateY(18px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-card.modal-large {
  max-width: 780px;
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

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

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.modal-close-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  font-size: 1.1rem;
  color: var(--text-secondary);
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-shadow: none !important;
}

.modal-close-btn:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  transform: rotate(90deg) scale(1.12);
}

.modal-close-btn:active {
  transform: rotate(90deg) scale(0.95);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.form-input, .form-select, .form-textarea {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.885rem;
  transition: all var(--transition-fast);
}

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

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.885rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
  transform: translateY(-1px);
  box-shadow: none !important;
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: none !important;
}

/* ==========================================================================
   CUSTOM STORAGE QUOTA SLIDER - LUXURY FINTECH DESIGN
   ========================================================================== */
.quota-slider-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 10px 0;
}

.quota-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quota-slider-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quota-slider-icon {
  font-size: 1.4rem;
  background: var(--primary-light);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(24, 98, 240, 0.15);
}

.quota-slider-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
}

.quota-slider-hint {
  font-size: 0.765rem;
  color: var(--text-secondary);
  display: block;
}

/* Luxury Typography Value Badge */
.slider-val-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  background: linear-gradient(135deg, #eef4ff 0%, #dbeafe 100%);
  color: #1862f0;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(24, 98, 240, 0.25);
  box-shadow: 0 2px 10px rgba(24, 98, 240, 0.12);
  user-select: none;
}

.slider-val-badge .val-num {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 800;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #1862f0;
}

.slider-val-badge .val-unit {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 0.85rem;
  font-weight: 800;
  color: #1d4ed8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quota-slider-track-container {
  padding: 4px 0;
}

.quota-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: var(--radius-full);
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
  margin: 0;
  border: none;
}

.quota-range-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(to right, #1862f0 0%, #1862f0 var(--slider-pct, 19%), #e2e8f0 var(--slider-pct, 19%), #e2e8f0 100%);
}

.quota-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #1862f0;
  box-shadow: 0 4px 12px rgba(24, 98, 240, 0.4);
  cursor: grab;
  margin-top: -7px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.quota-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
  box-shadow: 0 6px 18px rgba(24, 98, 240, 0.55);
}

.quota-range-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.05);
}

.quota-range-slider::-moz-range-track {
  width: 100%;
  height: 10px;
  border-radius: var(--radius-full);
  background: #e2e8f0;
}

.quota-range-slider::-moz-range-progress {
  height: 10px;
  border-radius: var(--radius-full);
  background: #1862f0;
}

.quota-range-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #1862f0;
  box-shadow: 0 4px 12px rgba(24, 98, 240, 0.4);
  cursor: grab;
}

.quota-scale-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0 2px;
}

.quota-scale-ticks strong {
  color: var(--text-primary);
}

.quota-preset-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.preset-pill-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.preset-pill-btn {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-pill-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Real-Time Main Server Allocation Sync Card */
.server-allocation-sync-card {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sync-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sync-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sync-metric-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}

.sync-metric-label {
  font-size: 0.685rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.sync-metric-val {
  font-size: 0.925rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

.sync-metric-val.highlight {
  color: var(--primary);
}

/* ==========================================================================
   TOAST NOTIFICATION STACKING & POPUP SYSTEM (DARK OBSIDIAN LUXURY PILLS)
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  z-index: 100005;
  pointer-events: none;
  max-width: 440px;
}

.toast {
  pointer-events: auto;
  background: #18191b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
  padding: 12px 16px;
  border-radius: 14px;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 310px;
  max-width: 420px;
  width: fit-content;
  position: relative;
  overflow: hidden;
  animation: toastPopupIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.toast:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.toast-message {
  font-size: 0.885rem;
  font-weight: 500;
  color: #f8fafc;
  line-height: 1.4;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

/* Icon Discs matching design in image */
.toast-icon-disc {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon-disc.success {
  background: rgba(16, 185, 129, 0.18);
}

.toast-icon-disc.success .toast-inner-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #064e2b;
}

.toast-icon-disc.error {
  background: rgba(239, 68, 68, 0.18);
}

.toast-icon-disc.error .toast-inner-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.toast-icon-disc.warning {
  background: rgba(245, 158, 11, 0.18);
}

.toast-icon-disc.warning .toast-inner-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.toast-icon-disc.info {
  background: rgba(24, 98, 240, 0.18);
}

.toast-icon-disc.info .toast-inner-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1862f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

/* Close Button */
.toast-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-left: auto;
  flex-shrink: 0;
  padding: 0;
}

.toast-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Popup Entrance & Exit Animations (From Bottom, NO PROGRESS BARS) */
@keyframes toastPopupIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastPopupOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    max-height: 120px;
    margin-bottom: 0;
  }
  100% {
    opacity: 0;
    transform: translateY(16px) scale(0.92);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: -12px;
  }
}

.toast.toast-leaving {
  animation: toastPopupOut 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

/* ==========================================================================
   HIGH-RESOLUTION ADAPTIVE LIGHTBOX POPUP WINDOW
   ========================================================================== */
#imageLightboxModal {
  z-index: 99999 !important;
}

#imageLightboxModal.active {
  z-index: 99999 !important;
}

.lightbox-dialog {
  width: fit-content;
  max-width: min(90vw, 680px);
  min-width: 360px;
  max-height: 90vh;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
  position: relative;
  z-index: 100000 !important;
}

.modal-overlay.active .lightbox-dialog {
  transform: scale(1);
}

.lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-surface-secondary);
  border-bottom: 1px solid var(--border-subtle);
  gap: 14px;
}

.lightbox-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lightbox-icon {
  font-size: 1.4rem;
}

.lightbox-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.lightbox-subtitle {
  font-size: 0.775rem;
  color: var(--text-secondary);
  font-weight: 600;
}

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

/* Zoom Controls Pill Toolbar */
.zoom-controls-pill {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 3px 6px;
  gap: 2px;
  box-shadow: none !important;
}

.zoom-pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.zoom-pill-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.zoom-pill-indicator {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-primary);
  padding: 0 6px;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.zoom-pill-indicator:hover {
  color: var(--primary);
}

.lightbox-canvas {
  position: relative;
  background: #090e1a;
  padding: 16px;
  max-height: 56vh;
  overflow: auto;
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 98, 240, 0.4) transparent;
}

.lightbox-canvas::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.lightbox-canvas::-webkit-scrollbar-track {
  background: transparent;
}

.lightbox-canvas::-webkit-scrollbar-thumb {
  background: rgba(24, 98, 240, 0.4);
  border-radius: 4px;
}

.lightbox-canvas::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.lightbox-scroll-wrapper {
  display: flex;
  min-width: 100%;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: auto;
}

.lightbox-img {
  max-width: 100%;
  max-height: 52vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: block;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.22s ease, max-height 0.22s ease;
  cursor: zoom-in;
}

.lightbox-img.zoomed {
  cursor: zoom-out;
}

.lightbox-footer {
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  background: var(--bg-surface-secondary);
  border-top: 1px solid var(--border-subtle);
  gap: 12px;
}

.lightbox-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 12px;
  background: var(--bg-surface);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.lightbox-meta-chip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}

.meta-chip-label {
  font-size: 0.685rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.meta-chip-val {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-chip-val.mono {
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary);
}

.lightbox-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.lightbox-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.785rem;
  color: var(--status-valid-text);
  background: var(--status-valid-bg);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 600;
}

.lightbox-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Symmetrical, Equal-Sized Action Buttons */
.lightbox-btn-approve {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  font-size: 0.825rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.lightbox-btn-approve:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

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

.lightbox-btn-reject {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  background: #fef2f2;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.35);
  font-size: 0.825rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.lightbox-btn-reject:hover {
  background: #ef4444;
  color: #ffffff !important;
  border-color: #ef4444;
  transform: translateY(-1px);
}

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

/* ==========================================================================
   MASTER ADMIN USER DEEP AUDIT & STEALTH INSPECTION CONSOLE
   ========================================================================== */
.modal-extra-large {
  max-width: 1100px;
  width: 95vw;
  height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.audit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.audit-user-profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stealth-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.35);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  color: #7c3aed;
  letter-spacing: 0.03em;
  user-select: none;
}

.audit-tabs-bar {
  display: flex;
  gap: 8px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-surface-secondary);
}

.audit-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.audit-tab-btn:hover {
  color: var(--primary);
}

.audit-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--bg-surface);
}

.tab-count-chip {
  background: rgba(24, 98, 240, 0.12);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  color: var(--primary);
}

.audit-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
}

.audit-panel-view {
  display: none;
  height: 100%;
}

.audit-panel-view.active {
  display: flex;
  flex-direction: column;
}

/* Mail Layout */
.audit-mail-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  height: 520px;
  min-height: 520px;
}

.audit-mail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid var(--border-light);
  padding-right: 18px;
  min-height: 0;
}

.audit-mail-folder-pills {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mail-folder-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mail-folder-btn:hover {
  background: var(--bg-surface-secondary);
  color: var(--text-primary);
}

.mail-folder-btn.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(24, 98, 240, 0.3);
}

.folder-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

.folder-badge.spam {
  background: #fee2e2;
  color: #ef4444;
}

.audit-email-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px 6px 6px 3px;
  scrollbar-width: thin;
}

.audit-email-item {
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.audit-email-item:hover {
  border-color: rgba(24, 98, 240, 0.45);
  background: var(--bg-surface-hover);
  box-shadow: 0 4px 12px rgba(24, 98, 240, 0.08);
}

.audit-email-item.active {
  background: #f0f6ff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(24, 98, 240, 0.12);
}

[data-theme="dark"] .audit-email-item.active {
  background: rgba(24, 98, 240, 0.14);
  border-color: #3b82f6;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.email-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.email-sender-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.email-avatar-pill {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #1862f0 0%, #0d3eb8 100%);
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.email-avatar-pill.purple {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.email-avatar-pill.emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.email-avatar-pill.amber {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.email-sender-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-time-pill {
  font-size: 0.685rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface-secondary);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  flex-shrink: 0;
}

.email-item-subject {
  font-size: 0.835rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.email-item-snippet {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.email-item-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.email-badge-att {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.685rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(24, 98, 240, 0.18);
}

.email-badge-spam {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.685rem;
  font-weight: 700;
  color: #ef4444;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.email-secure-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-left: auto;
  letter-spacing: 0.02em;
}

.audit-mail-reader {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow-y: auto;
  min-height: 0;
}

.stealth-read-notice {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.25);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.email-reader-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.email-reader-subject {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.email-reader-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.email-reader-body {
  font-size: 0.865rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  flex: 1;
}

.email-reader-attachments {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attachment-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.785rem;
  font-weight: 600;
  max-width: 340px;
}

/* Cloud Storage Layout */
.audit-cloud-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.cloud-filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cloud-storage-stat-pill {
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.785rem;
  font-weight: 700;
  border: 1px solid rgba(24, 98, 240, 0.2);
}

.audit-cloud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 16px;
  overflow-y: auto;
  padding-bottom: 12px;
}

.audit-cloud-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.audit-cloud-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.cloud-thumb-box {
  height: 120px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cloud-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.audit-cloud-card:hover .cloud-thumb-img {
  transform: scale(1.06);
}

.cloud-thumb-placeholder {
  font-size: 2.4rem;
}

.cloud-file-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  justify-content: space-between;
}

.cloud-file-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cloud-file-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.cloud-file-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.btn-cloud-download, .btn-cloud-preview {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-light);
  background: var(--bg-surface-secondary);
  color: var(--text-primary);
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.btn-cloud-download:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-cloud-preview:hover {
  background: var(--text-primary);
  color: #ffffff;
  border-color: var(--text-primary);
}

/* Identity Profile & Security Console */
.audit-profile-card {
  background: var(--bg-surface);
  padding: 22px 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.audit-profile-card-header {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.audit-kv-list {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.audit-kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.835rem;
  gap: 14px;
}

.audit-kv-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.audit-kv-label {
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.audit-kv-val {
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.live-ip-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.785rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.inline-flag-wrap {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  vertical-align: middle;
}

.inline-flag-img {
  width: 17px;
  height: 12px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  vertical-align: middle;
}

/* User Profile Cell Alignment (Single Horizontal Row) */
.user-profile-cell, .uploader-cell {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 160px;
  white-space: nowrap;
}

.user-table-avatar, .uploader-avatar {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 1.5px solid var(--border-light);
  flex-shrink: 0 !important;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.user-table-avatar:hover, .uploader-avatar:hover {
  transform: scale(1.08);
  border-color: var(--primary);
}

.user-cell-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.user-cell-name, .user-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: color 0.15s ease;
}

.user-cell-sub {
  font-size: 0.725rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* Clickable User Hover Affordances */
.clickable-user {
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.clickable-user:hover {
  color: var(--primary) !important;
  text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1200px) {
  .dashboard-grid { grid-template-columns: 1fr 340px; }
  .folders-grid, .kpi-grid, .packages-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .sidebar-column { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .app-container { padding: 12px; }
  .top-navbar { flex-wrap: wrap; gap: 12px; padding: 12px; }
  .nav-links { width: 100%; order: 3; }
  .sidebar-column { grid-template-columns: 1fr; }
  .folders-grid, .kpi-grid, .packages-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   DOCUMENT & PAYMENT COMPLIANCE AUDIT MODAL & SLIP GALLERY (ULTRA-PREMIUM)
   ========================================================================== */
#docPaymentComplianceModal .modal-card {
  max-width: 860px;
  width: 95%;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.audit-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 840px) {
  .audit-summary-grid {
    grid-template-columns: 1fr;
  }
}

.audit-info-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 108px;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.audit-box-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: block;
}

.audit-user-profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.audit-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.audit-user-meta-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.audit-user-name-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-plan-badge {
  font-size: 0.76rem;
  font-weight: 700;
  color: #6D28D9;
  background: #EDE9FE;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 4px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  box-sizing: border-box;
}

.audit-residency-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.775rem;
  font-weight: 700;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#auditDocPaymentMethod {
  font-size: 0.86rem;
  font-weight: 800;
  color: #0F172A;
  display: block;
  margin-bottom: 5px;
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-reference-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-slips-section {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 18px 20px;
}

.audit-slips-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.audit-slip-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.audit-slip-card:hover {
  border-color: #2563EB;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.15);
}

.audit-slip-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: #FFFFFF;
  display: block;
  padding: 6px;
}

.audit-slip-footer {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  background: #FFFFFF;
  border-top: 1px solid #F1F5F9;
}

.audit-compliance-checklist {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 14px;
  padding: 14px 18px;
}

.compliance-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #166534;
  font-weight: 600;
}

.slip-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

/* ==========================================================================
   AUDIT CONSOLE TAB SYSTEM & KYC DOSSIER
   ========================================================================== */
.audit-tabs-nav-bar {
  display: flex;
  background: #F1F5F9;
  padding: 6px;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
}

.audit-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: none !important;
  box-shadow: none !important;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.audit-tab-btn:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-primary);
}

.audit-tab-btn.active {
  background: #FFFFFF !important;
  color: var(--primary) !important;
  border: 1px solid var(--border-light) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.kyc-dossier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .kyc-dossier-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kyc-dossier-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.kyc-dossier-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kyc-dossier-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0F172A;
}

.kyc-dossier-val.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   REJECT BUTTON - ULTRA-PREMIUM LUXURY CRIMSON (SHADOWLESS + SHIMMER SWEEP)
   ========================================================================== */
#btnRejectDocPayment, .btn-reject-payment {
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
  color: #FFFFFF;
  border: 1px solid rgba(185, 28, 28, 0.9);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none !important;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, border-color 0.25s ease, opacity 0.2s ease;
}

/* Elegant Light Sweep Shimmer Effect */
#btnRejectDocPayment::before, .btn-reject-payment::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0) 70%,
    transparent 100%
  );
  transition: left 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

#btnRejectDocPayment[style*="display: none"] {
  display: none !important;
}

#btnApproveDocPayment[style*="display: none"] {
  display: none !important;
}

#btnRejectDocPayment:hover, .btn-reject-payment:hover {
  background: linear-gradient(135deg, #EF4444 0%, #C81E1E 100%);
  border-color: #EF4444;
  transform: translateY(-1.5px);
  box-shadow: none !important;
}

#btnRejectDocPayment:hover::before, .btn-reject-payment:hover::before {
  left: 140%;
}

#btnRejectDocPayment:active, .btn-reject-payment:active {
  transform: translateY(0) scale(0.97);
  background: linear-gradient(135deg, #B91C1C 0%, #991B1B 100%);
  box-shadow: none !important;
}

/* ==========================================================================
   3D FROSTED BLUE GLASS USER DOSSIER FOLDERS (MATCHING USER'S 3D FOLDER DESIGN)
   ========================================================================== */
.user-folders-grid-layout {
  width: 100%;
  margin-top: 6px;
}

.user-dossier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  align-items: stretch;
}

@media (max-width: 640px) {
  .user-dossier-grid {
    grid-template-columns: 1fr;
  }
}

/* 3D Glass Folder Card */
.glass-folder-card {
  position: relative;
  border-radius: 20px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  padding-top: 14px; /* Space for the top tab */
}

.glass-folder-card:hover {
  transform: translateY(-7px) scale(1.02);
}

.glass-folder-card:active {
  transform: translateY(-2px) scale(0.99);
}

/* Back Folder Base & Top Tab (Deep Royal Blue 3D Shape) */
.folder-back-body {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(155deg, #1E40AF 0%, #2563EB 55%, #1D4ED8 100%);
  border-radius: 18px;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.35);
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgba(147, 197, 253, 0.3);
}

.folder-top-tab {
  position: absolute;
  top: 0;
  left: 10px;
  width: 90px;
  height: 22px;
  background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
  border-top-left-radius: 10px;
  border-top-right-radius: 14px;
  z-index: 1;
  box-shadow: 0 -2px 8px rgba(37, 99, 235, 0.2);
  border-top: 1.5px solid rgba(255, 255, 255, 0.4);
  border-left: 1.5px solid rgba(255, 255, 255, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.glass-folder-card:hover .folder-top-tab {
  transform: translateY(-3px);
}

/* Front Frosted Glass Pocket (Translucent with Blur & Specular Reflections) */
.folder-front-pocket {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(224, 238, 255, 0.48) 50%,
    rgba(191, 219, 254, 0.38) 100%
  );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 16px 16px 14px 16px;
  box-shadow: 
    0 12px 28px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(147, 197, 253, 0.4);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

/* Light Sheen Reflection across the Frosted Glass */
.folder-front-pocket::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0) 60%,
    transparent 100%
  );
  transform: rotate(25deg) translateY(-100%);
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.glass-folder-card:hover .folder-front-pocket::before {
  transform: rotate(25deg) translateY(100%);
}

/* Bottom-Right Frosted Mini Accent Badge (Matching 3D Reference Image) */
.folder-corner-accent {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.55);
  border: 1.2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #1E40AF;
  pointer-events: none;
}

/* User Profile Inside Folder */
.folder-user-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.folder-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.folder-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  background: #FFFFFF;
}

.folder-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.folder-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.folder-user-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.folder-account-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem;
  font-weight: 700;
  color: #1E40AF;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.folder-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.folder-plan-pill {
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(237, 233, 254, 0.85);
  color: #6D28D9;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(196, 181, 253, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.folder-status-pill.verified {
  background: rgba(220, 252, 231, 0.9);
  color: #15803D;
  border: 1px solid rgba(134, 239, 172, 0.8);
}

.folder-status-pill.pending {
  background: rgba(254, 243, 199, 0.9);
  color: #B45309;
  border: 1px solid rgba(253, 230, 138, 0.8);
}

.folder-click-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(203, 213, 225, 0.5);
  font-size: 0.74rem;
  color: #1E40AF;
  font-weight: 700;
}

.folder-click-hint span:last-child {
  transition: transform 0.2s ease;
}

.glass-folder-card:hover .folder-click-hint span:last-child {
  transform: translateX(3px);
}

/* ==========================================================================
   OFFICIAL REGISTRATION & ONBOARDING PDF DOSSIER SHEET (A4 EXECUTIVE FORMAT)
   ========================================================================== */
.pdf-dossier-sheet {
  width: 794px; /* Exact A4 width at 96 DPI */
  height: 1120px; /* Exact A4 height at 96 DPI */
  max-height: 1120px;
  background: #FFFFFF;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  padding: 30px 34px;
  box-sizing: border-box;
  color: #0F172A;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Certificate Security Guilloche & Golden Double Border */
.pdf-dossier-sheet::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 2px solid #1E3A8A;
  border-radius: 6px;
  pointer-events: none;
  z-index: 1;
}

.pdf-dossier-sheet::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  bottom: 14px;
  border: 1.2px dashed #D97706;
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   USER INFORMATION & PROFILE DETAILS MODAL (UntitledUI Clean Form Style)
   ========================================================================== */
.user-profile-popup-dialog {
  animation: modalScaleIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.upm-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 40px;
}

.upm-label {
  width: 170px;
  flex-shrink: 0;
  font-size: 0.835rem;
  font-weight: 700;
  color: var(--text-secondary);
  user-select: none;
}

.upm-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.upm-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.upm-input-pill {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface-secondary);
  font-size: 0.84rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upm-input-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  transition: border-color 0.2s ease;
}

.upm-input-with-icon:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.upm-input-field {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  padding: 8px 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.btn-delete-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FEE2E2;
  font-size: 0.825rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-delete-user-pill:hover {
  background: #FEE2E2;
  transform: translateY(-1px);
}

.upm-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.upm-close-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #CBD5E1;
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .upm-close-btn:hover {
  background: #1E293B;
  color: #F8FAFC;
  border-color: #334155;
}

@media (max-width: 640px) {
  .upm-form-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .upm-label {
    width: 100%;
  }
}

/* ==========================================================================
   USER PROFILE SHOWCASE CARDS GRID (Dribbble/UntitledUI Luxury Card Style)
   ========================================================================== */
.user-profile-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
  margin-top: 8px;
}

.user-profile-showcase-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.05);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.user-profile-showcase-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.1);
  border-color: rgba(37, 99, 235, 0.35);
}

.ups-card-cover {
  height: 112px;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 12px 14px;
}

.ups-cover-tag {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  color: #0F172A;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ups-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 18px;
  margin-top: -36px;
  position: relative;
  z-index: 2;
}

.ups-avatar-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid var(--bg-surface);
  background: var(--bg-surface);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  cursor: pointer;
}

.ups-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.ups-verified-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563EB;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.ups-company-badge {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ups-info-body {
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ups-user-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.ups-user-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: color 0.15s ease;
}

.ups-user-name:hover {
  color: var(--primary);
}

.ups-user-role {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.ups-bookmark-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-surface-secondary);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ups-bookmark-btn:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.3);
  transform: scale(1.08);
}

.ups-stats-strip {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 10px 8px;
  margin: 14px 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  text-align: center;
}

.ups-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ups-stat-box:not(:last-child) {
  border-right: 1px solid var(--border-subtle);
}

.ups-stat-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ups-stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: capitalize;
}

.ups-more-details-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--radius-full);
  background: #0F172A;
  color: #FFFFFF;
  border: none;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
}

.ups-more-details-btn:hover {
  background: #1E293B;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

[data-theme="dark"] .ups-more-details-btn {
  background: #38BDF8;
  color: #0F172A;
}

[data-theme="dark"] .ups-more-details-btn:hover {
  background: #7DD3FC;
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.3);
}

[data-theme="dark"] .ups-cover-tag {
  background: rgba(15, 23, 42, 0.85);
  color: #F8FAFC;
}

/* ==========================================================================
   STORAGE ANALYTICS & BANDWIDTH CONSUMPTION DASHBOARD STYLES
   ========================================================================== */
.storage-insights-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.si-kpi-card {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.si-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.si-kpi-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.si-kpi-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.si-kpi-badge.badge-blue {
  background: #EFF6FF;
  color: #2563EB;
}

.si-kpi-badge.badge-purple {
  background: #FAF5FF;
  color: #9333EA;
}

.si-kpi-badge.badge-green {
  background: #ECFDF5;
  color: #059669;
}

[data-theme="dark"] .si-kpi-badge.badge-blue {
  background: rgba(37, 99, 235, 0.2);
  color: #60A5FA;
}

[data-theme="dark"] .si-kpi-badge.badge-purple {
  background: rgba(147, 51, 234, 0.2);
  color: #C084FC;
}

[data-theme="dark"] .si-kpi-badge.badge-green {
  background: rgba(5, 150, 105, 0.2);
  color: #34D399;
}

.si-kpi-val-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
}

.si-kpi-value {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.si-kpi-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.si-kpi-progress-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-top: 4px;
}

[data-theme="dark"] .si-kpi-progress-bar {
  background: rgba(255, 255, 255, 0.08);
}

.si-kpi-progress-bar.dual {
  display: flex;
}

.si-kpi-fill {
  height: 100%;
  border-radius: 3px;
}

.si-kpi-fill-drive {
  height: 100%;
  background: #2563EB;
}

.si-kpi-fill-mail {
  height: 100%;
  background: #7C3AED;
}

.si-kpi-meta-text {
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 2px;
}

.storage-distribution-box {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 16px 18px;
  margin-top: 16px;
}

.multi-segment-bar {
  height: 12px;
  border-radius: 6px;
  background: #E2E8F0;
  display: flex;
  overflow: hidden;
  gap: 2px;
}

[data-theme="dark"] .multi-segment-bar {
  background: #1E293B;
}

.segment-pill.seg-1tb {
  background: #7C3AED;
}

.segment-pill.seg-500gb {
  background: #2563EB;
}

.segment-pill.seg-200gb {
  background: #10B981;
}

.segment-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.seg-1tb {
  background: #7C3AED;
}

.legend-dot.seg-500gb {
  background: #2563EB;
}

.legend-dot.seg-200gb {
  background: #10B981;
}

.legend-dot.seg-free {
  background: #CBD5E1;
}

[data-theme="dark"] .legend-dot.seg-free {
  background: #475569;
}

.top-consumers-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-consumer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 10px 16px;
  gap: 14px;
  transition: all 0.2s ease;
}

.top-consumer-row:hover {
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateX(3px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.region-nodes-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.region-node-card {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.rnc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rnc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.rnc-bar {
  height: 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

[data-theme="dark"] .rnc-bar {
  background: rgba(255, 255, 255, 0.08);
}

.live-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(16, 185, 129, 0.25);
  animation: subtleLivePulse 2.4s ease-in-out infinite;
}

[data-theme="dark"] .live-sync-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
}

@keyframes subtleLivePulse {
  0%, 100% { opacity: 0.88; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

.live-metric-flash {
  animation: liveFlashEffect 0.8s ease-out;
}

@keyframes liveFlashEffect {
  0% { color: #2563EB; text-shadow: 0 0 8px rgba(37, 99, 235, 0.5); }
  100% { color: inherit; text-shadow: none; }
}

.live-iops-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #10B981;
  font-size: 0.68rem;
  font-weight: 700;
}

/* ==========================================================================
   DELETE USER CONFIRMATION POPUP MODAL STYLES (UntitledUI Luxury Style)
   ========================================================================== */
.duc-danger-disc {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FEE2E2;
  border: 4px solid #FEF2F2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

[data-theme="dark"] .duc-danger-disc {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.1);
}

.duc-user-capsule {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.duc-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
}

.duc-warning-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(254, 242, 242, 0.7);
  border: 1px solid rgba(254, 226, 226, 0.9);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

[data-theme="dark"] .duc-warning-box {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.2);
  color: #FCA5A5;
}

.duc-warning-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.btn-confirm-danger-delete {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  background: #DC2626;
  color: #FFFFFF;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: none;
}

.btn-confirm-danger-delete:hover {
  background: #B91C1C;
  transform: translateY(-1px);
  box-shadow: none;
}

.btn-confirm-danger-delete:active {
  transform: translateY(0);
}

/* PDF Print Media Stylesheet */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }
  body * {
    visibility: hidden;
  }
  #userRegistrationPdfModal,
  #userRegistrationPdfModal .modal-card,
  #userRegistrationPdfModal .modal-body,
  #pdfLiveSheetWrapper,
  #pdfLiveSheetContent,
  #pdfLiveSheetContent * {
    visibility: visible !important;
  }
  #userRegistrationPdfModal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
    background: #FFF !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  .modal-header, .modal-close-btn, .modal-footer, #userRegistrationPdfModal .action-btn {
    display: none !important;
  }
  .pdf-dossier-sheet {
    box-shadow: none !important;
    margin: 0 !important;
    width: 794px !important;
    height: 1120px !important;
    max-height: 1120px !important;
    padding: 30px 34px !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
  }
}
