/* ==========================================================================
   LAW DEVELOPMENT CENTRE (LDC) - PRE-ENTRY MANAGEMENT SYSTEM
   DUAL THEME DESIGN SYSTEM (LIGHT & DARK WITH INSTANT PERSISTENT SWITCHER)
   OPTIMIZED FOR CLEAN 100% BROWSER SCREEN FIT (REDUCED BASE TYPOGRAPHY)
   ========================================================================== */

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

:root {
  /* Base Typography */
  font-size: 13.5px;

  /* Fonts */
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Official LDC Logo Palette */
  --ldc-purple-deep: #3b145a;
  --ldc-purple: #5c2483;
  --ldc-purple-vivid: #7e22ce;
  --ldc-purple-bright: #9333ea;
  --ldc-purple-light: #a855f7;
  --ldc-purple-soft: #f5f3ff;
  --ldc-purple-glow: rgba(92, 36, 131, 0.18);

  --ldc-cyan-deep: #0369a1;
  --ldc-cyan: #00a3e0;
  --ldc-cyan-vivid: #0284c7;
  --ldc-cyan-bright: #0ea5e9;
  --ldc-cyan-soft: #e0f2fe;
  --ldc-cyan-glow: rgba(0, 163, 224, 0.18);

  --ldc-lavender: #8b5cf6;
  --ldc-lavender-subtle: #ddd6fe;

  /* Status Accents */
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.10);
  --color-danger: #e11d48;
  --color-danger-bg: rgba(225, 29, 72, 0.10);
  --color-warning: #d97706;
  --color-warning-bg: rgba(217, 119, 6, 0.10);
  --color-info: #0284c7;
  --color-info-bg: rgba(2, 132, 199, 0.10);

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #5c2483 0%, #7e22ce 55%, #00a3e0 100%);
  --gradient-cyan: linear-gradient(135deg, #0284c7 0%, #00a3e0 100%);
  --gradient-purple: linear-gradient(135deg, #5c2483 0%, #7e22ce 100%);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   THEME TOKENS: LIGHT THEME (DEFAULT)
   ========================================================================== */
:root, [data-theme="light"] {
  --bg-app: #f4f6fb;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f9f8fe;
  --bg-surface: #f0edf9;
  --bg-surface-elevated: #e6e2f5;

  --border-subtle: #e4e1f0;
  --border-medium: #cbd5e1;
  --border-glow: rgba(0, 163, 224, 0.35);

  --text-pure: #0f172a;
  --text-main: #1e293b;
  --text-muted: #475569;
  --text-dim: #64748b;

  --shadow-card: 0 2px 10px -1px rgba(92, 36, 131, 0.05), 0 0 0 1px rgba(92, 36, 131, 0.06);
  --shadow-elevated: 0 12px 28px -4px rgba(92, 36, 131, 0.10), 0 0 0 1px rgba(92, 36, 131, 0.10);
  --shadow-btn: 0 3px 10px rgba(92, 36, 131, 0.25);
  --shadow-cyan-btn: 0 3px 10px rgba(0, 163, 224, 0.22);

  --bg-pattern: 
    radial-gradient(at 0% 0%, rgba(92, 36, 131, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 163, 224, 0.05) 0px, transparent 50%);
}

/* ==========================================================================
   THEME TOKENS: DARK THEME
   ========================================================================== */
[data-theme="dark"] {
  --bg-app: #08060f;
  --bg-sidebar: #0e0a1b;
  --bg-card: rgba(18, 13, 34, 0.85);
  --bg-card-hover: rgba(28, 20, 52, 0.95);
  --bg-surface: #17112c;
  --bg-surface-elevated: #21193d;

  --border-subtle: rgba(167, 139, 250, 0.12);
  --border-medium: rgba(167, 139, 250, 0.22);
  --border-glow: rgba(0, 163, 224, 0.40);

  --text-pure: #ffffff;
  --text-main: #f1f0f7;
  --text-muted: #a39eb8;
  --text-dim: #6d6688;

  --shadow-card: 0 8px 24px -4px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--border-subtle);
  --shadow-elevated: 0 16px 36px -8px rgba(0, 0, 0, 0.65), 0 0 16px rgba(126, 34, 206, 0.18);
  --shadow-btn: 0 3px 12px rgba(92, 36, 131, 0.45);
  --shadow-cyan-btn: 0 3px 12px rgba(0, 163, 224, 0.30);

  --bg-pattern: 
    radial-gradient(at 0% 0%, rgba(92, 36, 131, 0.18) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 163, 224, 0.14) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(126, 34, 206, 0.06) 0px, transparent 70%);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  font-size: 13px;
  line-height: 1.45;
  background-image: var(--bg-pattern);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ldc-purple);
}

/* App Container */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.app-sidebar {
  width: 235px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sidebar-brand {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(92, 36, 131, 0.03);
}

.brand-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--ldc-purple-glow));
}

.brand-info h1 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text-pure);
  line-height: 1.15;
}

.brand-info p {
  font-size: 9.5px;
  color: var(--ldc-cyan-deep);
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

[data-theme="dark"] .brand-info p {
  color: var(--ldc-cyan-bright);
}

.sidebar-nav {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ldc-purple);
  padding: 10px 10px 4px;
}

[data-theme="dark"] .nav-section-title {
  color: var(--ldc-lavender);
  opacity: 0.85;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7.5px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  transition: var(--transition);
  color: var(--text-dim);
  flex-shrink: 0;
}

.nav-item:hover {
  background-color: var(--bg-surface);
  color: var(--ldc-purple);
}

[data-theme="dark"] .nav-item:hover {
  background-color: rgba(126, 34, 206, 0.14);
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(92, 36, 131, 0.14) 0%, rgba(0, 163, 224, 0.08) 100%);
  color: var(--ldc-purple);
  font-weight: 700;
  border: 1px solid rgba(92, 36, 131, 0.18);
  box-shadow: 0 1px 6px rgba(92, 36, 131, 0.06);
}

[data-theme="dark"] .nav-item.active {
  background: linear-gradient(90deg, rgba(92, 36, 131, 0.40) 0%, rgba(0, 163, 224, 0.16) 100%);
  color: #fff;
  border: 1px solid rgba(167, 139, 250, 0.22);
  box-shadow: 0 2px 10px rgba(92, 36, 131, 0.25);
}

.nav-item.active svg {
  color: var(--ldc-cyan-deep);
}

[data-theme="dark"] .nav-item.active svg {
  color: var(--ldc-cyan-bright);
}

.sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(92, 36, 131, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-sizing: border-box;
  overflow: hidden;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  text-decoration: none;
  overflow: hidden;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 10.5px;
  box-shadow: 0 2px 6px var(--ldc-purple-glow);
  flex-shrink: 0;
}

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

.user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-pure);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 9.5px;
  color: var(--ldc-purple);
  font-weight: 800;
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .user-role {
  color: var(--ldc-cyan-bright);
}

.sidebar-footer-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.sidebar-footer-btn {
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
}

.sidebar-footer-btn:hover {
  background: var(--bg-surface);
  color: var(--ldc-purple);
}

[data-theme="dark"] .sidebar-footer-btn:hover {
  color: var(--ldc-cyan-bright);
}

/* Main Workspace */
.app-main {
  flex: 1;
  margin-left: 235px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Navbar */
.app-topbar {
  height: 56px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(16px);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

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

.intake-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.intake-badge-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--ldc-cyan-deep);
  box-shadow: 0 0 6px var(--ldc-cyan-glow);
}

[data-theme="dark"] .intake-badge-icon {
  background-color: var(--ldc-cyan);
  box-shadow: 0 0 8px var(--ldc-cyan-bright);
}

.intake-selector-label {
  font-size: 10px;
  color: var(--ldc-purple);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

[data-theme="dark"] .intake-selector-label {
  color: var(--ldc-lavender);
}

.intake-select {
  background: transparent;
  border: none;
  color: var(--text-pure);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.intake-select option {
  background-color: var(--bg-card);
  color: var(--text-pure);
}

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

/* Theme Switcher Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--ldc-purple);
  border-color: var(--ldc-purple);
  transform: scale(1.04);
}

[data-theme="dark"] .theme-toggle-btn:hover {
  color: var(--ldc-cyan-bright);
  border-color: var(--ldc-cyan-bright);
}

.theme-toggle-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

/* Page Workspace */
.page-content {
  padding: 18px 22px;
  flex: 1;
}

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

.page-title h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.page-title p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
}

.kpi-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.kpi-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--ldc-purple);
}

.kpi-icon-wrapper svg {
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .kpi-icon-wrapper {
  color: var(--ldc-cyan-bright);
}

.kpi-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ldc-purple);
}

[data-theme="dark"] .kpi-label {
  color: var(--ldc-lavender);
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: -0.4px;
  line-height: 1.1;
}

.kpi-subtext {
  font-size: 11px;
  color: var(--text-muted);
}

/* Custom Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.card-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(92, 36, 131, 0.02);
}

.card-header h3 {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-pure);
  letter-spacing: -0.1px;
}

.card-body {
  padding: 18px;
}

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

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.table th {
  padding: 9px 14px;
  background-color: var(--bg-surface);
  color: var(--ldc-purple);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

[data-theme="dark"] .table th {
  color: var(--ldc-lavender);
}

.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  vertical-align: middle;
}

.table tr:hover td {
  background-color: var(--bg-card-hover);
  color: var(--text-pure);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.2;
}

.badge-success {
  background-color: var(--color-success-bg);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .badge-success {
  color: #34d399;
}

.badge-danger {
  background-color: var(--color-danger-bg);
  color: #e11d48;
  border: 1px solid rgba(225, 29, 72, 0.25);
}

[data-theme="dark"] .badge-danger {
  color: #fb7185;
}

.badge-warning {
  background-color: var(--color-warning-bg);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

[data-theme="dark"] .badge-warning {
  color: #fbbf24;
}

.badge-info {
  background-color: rgba(0, 163, 224, 0.10);
  color: var(--ldc-cyan-deep);
  border: 1px solid rgba(0, 163, 224, 0.22);
}

[data-theme="dark"] .badge-info {
  color: var(--ldc-cyan-bright);
}

.badge-purple {
  background-color: rgba(92, 36, 131, 0.08);
  color: var(--ldc-purple);
  border: 1px solid rgba(92, 36, 131, 0.20);
}

[data-theme="dark"] .badge-purple {
  background-color: rgba(126, 34, 206, 0.18);
  color: var(--ldc-purple-light);
}

.badge-neutral {
  background-color: var(--bg-surface);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.3;
}

.btn svg {
  width: 14px;
  height: 14px;
}

.btn-sm {
  padding: 4px 9px;
  font-size: 11px;
}

.btn-lg {
  padding: 10px 20px;
  font-size: 13.5px;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(92, 36, 131, 0.35);
}

.btn-cyan {
  background: var(--gradient-cyan);
  color: #ffffff;
  box-shadow: var(--shadow-cyan-btn);
}

.btn-cyan:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--ldc-purple);
  color: var(--text-pure);
}

.btn-danger {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
}

/* Form Inputs */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ldc-purple);
  margin-bottom: 5px;
}

[data-theme="dark"] .form-label {
  color: var(--ldc-lavender);
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  color: var(--text-pure);
  font-family: inherit;
  font-size: 12.5px;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--ldc-purple);
  box-shadow: 0 0 0 2px rgba(92, 36, 131, 0.12);
  background-color: var(--bg-card);
}

[data-theme="dark"] .form-control:focus {
  border-color: var(--ldc-cyan-bright);
  box-shadow: 0 0 0 2px rgba(0, 163, 224, 0.18);
}

.form-row {
  display: flex;
  gap: 14px;
}

.form-row .form-group {
  flex: 1;
}

/* Alerts */
.alert {
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
}

.alert svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.alert-success {
  background-color: var(--color-success-bg);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #059669;
}

[data-theme="dark"] .alert-success {
  color: #34d399;
}

.alert-error {
  background-color: var(--color-danger-bg);
  border: 1px solid rgba(225, 29, 72, 0.25);
  color: #e11d48;
}

[data-theme="dark"] .alert-error {
  color: #fb7185;
}

.alert-warning {
  background-color: var(--color-warning-bg);
  border: 1px solid rgba(217, 119, 6, 0.25);
  color: #d97706;
}

[data-theme="dark"] .alert-warning {
  color: #fbbf24;
}

.alert-info {
  background-color: var(--color-info-bg);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: var(--ldc-cyan-deep);
}

[data-theme="dark"] .alert-info {
  color: var(--ldc-cyan-bright);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop.active {
  display: flex !important;
}

[data-theme="dark"] .modal-backdrop {
  background: rgba(8, 6, 15, 0.82);
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 560px;
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(92, 36, 131, 0.03);
}

.modal-header h4 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-pure);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-pure);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Progress Bar */
.progress-container {
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  height: 10px;
  width: 100%;
  overflow: hidden;
  margin: 12px 0;
  border: 1px solid var(--border-subtle);
}

.progress-bar {
  background: var(--gradient-brand);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px var(--ldc-purple-glow);
}

/* Grid Utilities */
.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Public Verification Portal Styles */
.public-verify-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-app);
}

.verify-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
}

.verify-header {
  padding: 22px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(92, 36, 131, 0.03);
}

.verify-header-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin: 0 auto 10px;
  display: block;
  filter: drop-shadow(0 0 10px var(--ldc-purple-glow));
}

.verify-header h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--text-pure);
}

.verify-header p {
  font-size: 11px;
  color: var(--ldc-cyan-deep);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.8px;
  margin-top: 3px;
}

[data-theme="dark"] .verify-header p {
  color: var(--ldc-cyan-bright);
}

.verify-status-banner {
  padding: 12px 18px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.4px;
}

.verify-status-success {
  background-color: var(--color-success-bg);
  color: #059669;
  border-bottom: 1px solid rgba(16, 185, 129, 0.22);
}

[data-theme="dark"] .verify-status-success {
  color: #34d399;
}

.verify-status-invalid {
  background-color: var(--color-danger-bg);
  color: #e11d48;
  border-bottom: 1px solid rgba(225, 29, 72, 0.22);
}

[data-theme="dark"] .verify-status-invalid {
  color: #fb7185;
}

.verify-body {
  padding: 20px;
}

.verify-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12.5px;
}

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

.verify-row .label {
  color: var(--ldc-purple);
  font-weight: 700;
}

[data-theme="dark"] .verify-row .label {
  color: var(--ldc-lavender);
}

.verify-row .value {
  color: var(--text-pure);
  font-weight: 700;
  text-align: right;
}

.mono {
  font-family: var(--font-mono);
}
