/* ==========================================================================
   MANAGEMENTIK — LIQUID GLASS DESIGN SYSTEM (CSS3)
   Exact numeric specifications from REQUIREMENTS-1.0.md §5
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Brand Emerald & Primary (§5.3) */
  --brand-emerald: #1B4D3E;
  --brand-primary: #25605A;
  --brand-teal: #2D7A6F;
  --brand-teal-light: #316E66;
  --brand-teal-tint: #E6F4F1;
  --brand-teal-ice: #F0FAF8;

  /* Brand Gold (§5.3) */
  --brand-gold: #C59B27;
  --brand-gold-metallic: #D4AF37;
  --brand-gold-amber: #DAA520;
  --brand-gold-light: #E5C158;
  --brand-gold-tint: #FCF8ED;
  --brand-gold-sand: #FAF3E0;

  /* Canvas, Cards & Slate (§5.3) */
  --brand-canvas: #FEFDF9;
  --brand-white: #FFFFFF;
  --brand-slate-dark: #0F172A;
  --brand-slate-card: #1E293B;
  --brand-slate-muted: #475569;
  --brand-slate-light: #64748B;
  --brand-border: rgba(212, 175, 55, 0.22);

  /* Status Colors (§5.3) */
  --status-success: #059669;
  --status-danger: #DC2626;
  --status-warning: #DAA520;

  /* Typography (§5.2) */
  --font-cairo: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Cairo", monospace;

  /* Exact Liquid Glass (§5.1) */
  --glass-bg-light: rgba(255, 255, 255, 0.72);
  --glass-bg-dark: rgba(15, 23, 42, 0.78);
  --glass-border-gold: 1px solid rgba(212, 175, 55, 0.22);
  --glass-border-teal: 1px solid rgba(37, 96, 90, 0.18);
  --glass-shadow: 0 8px 32px 0 rgba(27, 77, 62, 0.08), inset 0 1px 1px 0 rgba(255, 255, 255, 0.6);
  --glass-blur: blur(14px) saturate(180%);
}

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

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-cairo);
  background: var(--brand-canvas);
  color: var(--brand-slate-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.45;
  font-size: 14px;
  background-image: 
    radial-gradient(at 0% 0%, rgba(27, 77, 62, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(212, 175, 55, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Typography Hierarchy (§5.2) */
h1, .h1 { font-size: 24px; font-weight: 900; line-height: 1.25; color: var(--brand-emerald); }
h2, .h2 { font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--brand-primary); }
h3, .h3 { font-size: 14.5px; font-weight: 700; line-height: 1.35; color: var(--brand-slate-dark); }
.text-muted { color: var(--brand-slate-muted); }
.font-mono, .amount, .num-tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Full-Width & Responsive Layout Utilities */
.container, .container-fluid {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 20px clamp(16px, 2.5vw, 32px);
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }

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

/* Dashboard Sidebar Architecture (Pattern: sites/dj-store) */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
}

/* Liquid Glass Containers (§5.1) */
.glass-card {
  background: var(--glass-bg-light);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border-gold);
  border-top: 4px solid var(--brand-gold-metallic);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
  padding: 20px;
  transform: translateZ(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px 0 rgba(27, 77, 62, 0.12);
}

/* ══════════════════════════════════════════════════════════════════════════════
   BOOTSTRAP CARD SYSTEM & GRID UTILITIES
   Strictly standardized Bootstrap card components styled with Liquid Glass
   tokens, Cairo typography, and RTL support.
   ══════════════════════════════════════════════════════════════════════════════ */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background: var(--glass-bg-light);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border-gold);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(27, 77, 62, 0.12);
  border-color: rgba(212, 175, 55, 0.42);
}

/* Top Accent Card Variants */
.card.accent-emerald { border-top: 3.5px solid var(--brand-emerald); }
.card.accent-gold    { border-top: 3.5px solid var(--brand-gold-metallic); }
.card.accent-warning { border-top: 3.5px solid var(--status-warning); }
.card.accent-danger  { border-top: 3.5px solid var(--status-danger); }
.card.accent-info    { border-top: 3.5px solid var(--brand-teal); }

.card-header {
  padding: 12px 16px;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}
.card-header:first-child {
  border-radius: 12px 12px 0 0;
}

.card-header-start,
.card-title-group {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.card-body {
  flex: 1 1 auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-footer {
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.38);
  border-top: 1px solid rgba(212, 175, 55, 0.12);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  border-radius: 0 0 12px 12px;
}

.card-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--brand-slate-dark);
  margin: 0;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-title i,
.card-title-group i,
.card-header i {
  flex-shrink: 0 !important;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-title a,
.card-title-text {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  min-width: 0;
  display: inline-block;
  color: inherit;
  text-decoration: none;
}
.card-title a:hover {
  color: var(--brand-emerald);
}

.card-subtitle {
  font-size: 12px;
  color: var(--brand-slate-muted);
  margin-bottom: 6px;
}

.card-text {
  font-size: 13px;
  color: var(--brand-slate-dark);
  line-height: 1.5;
}

/* Card Key-Value Detail Rows (Replacing Table Rows inside Cards) */
.card-detail-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0;
}

.card-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.14);
  font-size: 12.5px;
  gap: 12px;
}
.card-detail-item:last-child {
  border-bottom: none;
}
.card-detail-label {
  color: var(--brand-slate-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.card-detail-value {
  font-weight: 700;
  color: var(--brand-slate-dark);
  text-align: end;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bootstrap Responsive Grid Helpers */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-inline: -8px;
  row-gap: 16px;
}
.g-2 { margin-inline: -4px; row-gap: 8px; }
.g-2 > * { padding-inline: 4px; }
.g-3 { margin-inline: -8px; row-gap: 16px; }
.g-3 > * { padding-inline: 8px; }
.g-4 { margin-inline: -12px; row-gap: 24px; }
.g-4 > * { padding-inline: 12px; }

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6  { flex: 0 0 50%; max-width: 50%; }
.col-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-3  { flex: 0 0 25%; max-width: 25%; }

@media (min-width: 640px) {
  .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
  .col-sm-6  { flex: 0 0 50%; max-width: 50%; }
  .col-sm-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
}

@media (min-width: 768px) {
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  .col-md-6  { flex: 0 0 50%; max-width: 50%; }
  .col-md-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-md-3  { flex: 0 0 25%; max-width: 25%; }
}

@media (min-width: 1024px) {
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
  .col-lg-6  { flex: 0 0 50%; max-width: 50%; }
  .col-lg-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-lg-3  { flex: 0 0 25%; max-width: 25%; }
}

@media (min-width: 1280px) {
  .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
}

.h-100 { height: 100%; }
.w-100 { width: 100%; }
.flex-grow-1 { flex-grow: 1; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-block { display: block !important; }
.d-none { display: none !important; }
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.text-truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.text-decoration-none { text-decoration: none !important; }
.bg-light-tint { background: rgba(255, 255, 255, 0.45); }

.frosted-panel, .glass-panel {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border-teal);
  border-radius: 10px;
  box-shadow: var(--glass-shadow);
  padding: 24px;
}

.glass-hero {
  background: linear-gradient(135deg, #1B4D3E 0%, #25605A 50%, #2D7A6F 100%);
  color: var(--brand-white);
  border-radius: 16px;
  padding: 48px 32px;
  box-shadow: 0 16px 40px rgba(27, 77, 62, 0.2);
  position: relative;
  overflow: hidden;
}

/* Atmospheric Glowing Accents */
.focus-glow-gold:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.4);
  border-color: var(--brand-gold-metallic);
}

.focus-glow-teal:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 122, 111, 0.35);
  border-color: var(--brand-teal);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: var(--font-cairo);
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--brand-emerald);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: var(--brand-primary);
  box-shadow: 0 4px 14px rgba(27, 77, 62, 0.3);
}

.btn-gold {
  background: var(--brand-gold-metallic);
  color: #0F172A;
}
.btn-gold:hover {
  background: var(--brand-gold-light);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--brand-border);
  color: var(--brand-emerald);
}
.btn-outline:hover {
  background: var(--brand-teal-tint);
}

.btn-danger {
  background: var(--status-danger);
  color: #FFFFFF;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-success { background: #E6F4EA; color: var(--status-success); border: 1px solid rgba(5, 150, 105, 0.25); }
.badge-warning { background: #FEF3C7; color: #B45309; border: 1px solid rgba(218, 165, 32, 0.3); }
.badge-danger  { background: #FEE2E2; color: var(--status-danger); border: 1px solid rgba(220, 38, 38, 0.25); }
.badge-info    { background: var(--brand-teal-tint); color: var(--brand-teal); border: 1px solid rgba(45, 122, 111, 0.2); }

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--brand-slate-dark);
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-family: var(--font-cairo);
  font-size: 13.5px;
  background: #FFFFFF;
  color: var(--brand-slate-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input-error {
  border-color: var(--status-danger) !important;
  background-color: #FEF2F2 !important;
}

.field-error {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--status-danger);
  margin-top: 4px;
}

/* Custom HTML Form ErrorList Container linked via form_id */
.form-error-list {
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

.form-error-alert {
  background: rgba(254, 242, 242, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-right: 4px solid var(--status-danger);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--status-danger);
}
[dir="ltr"] .form-error-alert {
  border-right: 1px solid rgba(220, 38, 38, 0.3);
  border-left: 4px solid var(--status-danger);
}

.error-list-items {
  list-style: disc inside;
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
[dir="rtl"] .data-table { text-align: right; }

.data-table th {
  background: rgba(27, 77, 62, 0.04);
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand-emerald);
  border-bottom: 2px solid var(--brand-border);
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
  vertical-align: middle;
}
.data-table tr:hover td {
  background: rgba(240, 250, 248, 0.6);
}

/* Navigation Header */
.navbar {
  background: var(--glass-bg-light);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border-gold);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 900;
  color: var(--brand-emerald);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
}
.nav-link {
  text-decoration: none;
  font-weight: 700;
  color: var(--brand-slate-muted);
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--brand-emerald);
}

/* Full-Width & Responsive Layout Utilities */
.container, .container-fluid {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 20px clamp(16px, 2.5vw, 32px);
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }

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

/* Dashboard Sidebar Architecture (Pattern: sites/dj-store) */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
}

.sidebar {
  width: 280px;
  min-width: 280px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 250, 248, 0.88) 100%);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-inline-end: 1px solid rgba(212, 175, 55, 0.25);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 2px 0 24px rgba(27, 77, 62, 0.05);
}

.sidebar-head {
  padding: 22px 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}

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

.sidebar-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 8px rgba(27, 77, 62, 0.2));
}

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

.sidebar-brand-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--brand-emerald);
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.sidebar-brand-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--brand-gold-metallic);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-close-btn {
  display: none;
  background: rgba(27, 77, 62, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.2);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--brand-slate-dark);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #DC2626;
  border-color: rgba(220, 38, 38, 0.3);
}

/* Redesigned User / Firm Profile Card */
.sidebar-profile-card {
  margin: 12px 14px 16px;
  padding: 12px 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94) 0%, rgba(246, 250, 248, 0.88) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(27, 77, 62, 0.05);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-profile-card:hover {
  border-color: var(--brand-gold-metallic, #d4af37);
  box-shadow: 0 8px 22px rgba(212, 175, 55, 0.14);
  transform: translateY(-1px);
}

.sidebar-profile-main {
  display: flex;
  align-items: center;
  gap: 11px;
}

.sidebar-profile-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.sidebar-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 96, 90, 0.12), rgba(212, 175, 55, 0.18));
  color: var(--brand-emerald, #1b4d3e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.18);
  transition: all 0.2s ease;
}

.sidebar-profile-card:hover .sidebar-avatar {
  background: var(--brand-emerald, #1b4d3e);
  color: #FFFFFF;
  border-color: var(--brand-gold-metallic, #d4af37);
}

.sidebar-status-dot {
  position: absolute;
  bottom: 0px;
  inset-inline-end: 0px;
  width: 11px;
  height: 11px;
  background: #10B981;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.9);
  animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.sidebar-profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-weight: 800;
  font-size: 13px;
  color: var(--brand-slate-dark, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.sidebar-user-email {
  font-size: 11px;
  font-weight: 500;
  color: var(--brand-slate-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'JetBrains Mono', monospace;
}

.sidebar-profile-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(212, 175, 55, 0.25);
}

.sidebar-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sidebar-role-badge.badge-info {
  background: rgba(37, 96, 90, 0.12);
  color: var(--brand-emerald, #1b4d3e);
  border: 1px solid rgba(37, 96, 90, 0.25);
}

.sidebar-role-badge.badge-warning {
  background: rgba(212, 175, 55, 0.15);
  color: #9A7B1C;
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.sidebar-role-badge.badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.sidebar-fiscal-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-slate-dark, #0f172a);
  background: rgba(212, 175, 55, 0.1);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  font-family: 'JetBrains Mono', monospace;
}

/* Categorized Nav Menu */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-category {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-category-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--brand-slate-muted);
  letter-spacing: 0.8px;
  padding: 0 10px 4px;
  text-transform: uppercase;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: var(--brand-slate-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  border-radius: 10px;
  transition: all 0.22s ease;
  position: relative;
}

.sidebar-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(37, 96, 90, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--brand-teal);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

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

.sidebar-link:hover {
  background: var(--brand-teal-tint);
  color: var(--brand-emerald);
  transform: translateX(2px);
}
[dir="rtl"] .sidebar-link:hover {
  transform: translateX(-2px);
}

.sidebar-link:hover .sidebar-icon-box {
  background: #FFFFFF;
  color: var(--brand-emerald);
  box-shadow: 0 2px 8px rgba(27, 77, 62, 0.12);
}

.sidebar-link.active {
  background: linear-gradient(135deg, var(--brand-emerald), #25605A);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(27, 77, 62, 0.25);
}

.sidebar-link.active .sidebar-icon-box {
  background: rgba(255, 255, 255, 0.18);
  color: var(--brand-gold-metallic);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.6);
}

.sidebar-compliance {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-slate-muted);
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.08);
}

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: #DC2626;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: rgba(220, 38, 38, 0.05);
  border: 1px solid rgba(220, 38, 38, 0.12);
}

.sidebar-logout-btn:hover {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

/* Workspace & Topbar */
.dashboard-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: calc(100% - 280px);
  width: auto;
}

.sidebar.is-collapsed ~ .dashboard-body {
  max-width: 100%;
}

@media (max-width: 1024px) {
  .dashboard-body {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
}

.dashboard-topbar {
  display: flex;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 90;
}

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

.topbar-context-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--brand-emerald);
}

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

.topbar-chip {
  padding: 4px 10px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand-slate-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-user-badge {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
}

.sidebar-toggle {
  background: rgba(37, 96, 90, 0.08);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--brand-emerald, #1b4d3e);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-toggle:hover {
  background: var(--brand-emerald, #1b4d3e);
  color: #FFFFFF;
  border-color: var(--brand-gold-metallic, #d4af37);
  box-shadow: 0 4px 12px rgba(27, 77, 62, 0.15);
  transform: scale(1.02);
}

/* Desktop Sidebar Collapse (Smooth slide out/in) */
@media (min-width: 1025px) {
  .sidebar {
    transition: margin-inline-start 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .sidebar.is-collapsed {
    margin-inline-start: -280px !important;
  }
}

/* Mobile Responsive Off-Canvas Drawer Backdrop & Drawer */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    height: 100vh;
    z-index: 1100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  [dir="rtl"] .sidebar {
    right: 0;
    left: auto;
    transform: translateX(100%);
  }
  [dir="ltr"] .sidebar {
    left: 0;
    right: auto;
    transform: translateX(-100%);
  }

  .sidebar.is-open {
    transform: translateX(0) !important;
  }

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

  .sidebar-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .dashboard-topbar {
    display: flex;
  }
}


/* Signature Canvas Pad */
.signature-pad-container {
  border: 2px dashed var(--brand-gold-metallic);
  border-radius: 10px;
  background: #FFFFFF;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
}
.signature-canvas {
  width: 100%;
  max-width: 600px;
  height: 200px;
  touch-action: none;
  cursor: crosshair;
}

/* ==========================================================================
   Modals for Non-Complicated Forms & Vault Uploads
   ========================================================================== */
.glass-modal-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}

/* Strict visibility gating: hidden when not active or when aria-hidden="true" */
.glass-modal-backdrop[aria-hidden="true"],
.modal-backdrop[aria-hidden="true"],
.glass-modal-backdrop:not(.is-active),
.modal-backdrop:not(.is-active) {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.glass-modal-backdrop.is-active,
.modal-backdrop.is-active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.glass-modal-container,
.modal-dialog {
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  position: relative;
  background: rgba(255, 255, 255, 0.98);
  border-top: 4px solid var(--brand-gold-metallic, #d4af37);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.45);
  padding: 28px;
  box-sizing: border-box;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.glass-modal-header,
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(212, 175, 55, 0.22);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-slate-dark, #0f172a);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-modal-close,
.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--brand-slate-muted, #64748b);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-modal-close:hover,
.modal-close-btn:hover {
  background: var(--brand-teal-tint, rgba(37, 96, 90, 0.1));
  color: var(--brand-emerald, #1b4d3e);
  transform: rotate(90deg);
}

.glass-modal-body,
.modal-body {
  padding: 4px 0;
}

.modal-actions,
.modal-footer,
.glass-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

/* Site Footer */
.site-footer {
  margin-top: auto;
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: var(--brand-slate-muted);
}

/* Language Dropdown Selector */
.language-select {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  background: var(--glass-bg-light);
  border: 1px solid var(--brand-border);
  color: var(--brand-emerald);
  cursor: pointer;
}
.language-select:focus {
  outline: none;
  border-color: var(--brand-gold-metallic);
}

/* Authentication Page Styles (Zero Inline CSS) */
.auth-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 36px 16px 48px;
  min-height: calc(100vh - 100px);
}
.auth-wrapper {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.auth-wrapper-wide {
  max-width: 680px;
}
.auth-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(27, 77, 62, 0.1), 0 2px 8px rgba(212, 175, 55, 0.08);
  overflow: hidden;
}
.auth-card-wide {
  width: 100%;
}

/* Auth Brand Header (Visible above card when navbar is hidden) */
.auth-brand-header {
  margin-bottom: 22px;
}
.auth-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.auth-brand-link:hover {
  transform: translateY(-2px);
}
.auth-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 12px rgba(27, 77, 62, 0.2));
}
.auth-brand-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}
[dir="rtl"] .auth-brand-info {
  text-align: right;
}
.auth-brand-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--brand-emerald);
  letter-spacing: -0.4px;
  line-height: 1.15;
}
.auth-brand-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-gold-metallic);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Redesigned Auth Card Header */
.auth-card-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center;
  padding: 28px 24px 14px !important;
  background: transparent !important;
  border-bottom: 1px solid rgba(212, 175, 55, 0.12) !important;
  width: 100%;
}

.auth-icon-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(27, 77, 62, 0.1) 0%, rgba(212, 175, 55, 0.2) 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--brand-gold-metallic);
  box-shadow: 0 8px 24px rgba(27, 77, 62, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  margin-bottom: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.auth-card:hover .auth-icon-avatar {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 28px rgba(212, 175, 55, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-emerald);
  letter-spacing: -0.4px;
  margin: 0 0 6px 0;
  line-height: 1.25;
}

.auth-subtitle {
  font-size: 13.5px;
  color: var(--brand-slate-muted);
  margin: 0 0 12px 0;
  line-height: 1.45;
  max-width: 380px;
}

.auth-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 14px;
  background: rgba(27, 77, 62, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-slate-dark);
  letter-spacing: 0.2px;
}

.auth-trust-badge i {
  color: var(--brand-emerald);
  font-size: 11px;
}
.auth-card .card-body {
  padding: 24px 28px !important;
}
.auth-card .card-footer {
  padding: 0 28px 24px !important;
}
.auth-footer {
  text-align: center;
  font-size: 13px;
}
.auth-divider {
  border: 0;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  margin: 16px 0;
}
.w-full {
  width: 100%;
}
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-end { text-align: end; }
.text-start { text-align: start; }
.is-hidden { display: none !important; }
.fullwidth-wrapper { width: 100%; max-width: 100%; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-end { display: flex; justify-content: flex-end; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.stat-value-lg { font-size: 24px; font-weight: 900; }
.stat-value-sm { font-size: 16px; font-weight: 800; }
.text-emerald { color: var(--brand-emerald); }
.text-gold { color: var(--brand-gold-amber); }
.text-cyan { color: var(--brand-teal); }
.text-slate { color: #1E293B; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.font-bold { font-weight: 700; }
.btn-block { width: 100%; }
.btn-xs { padding: 4px 8px; font-size: 11px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ─── Icon + Text Spacing Rule ─────────────────────────────────────────────────
   All icons (fa-*) that appear BEFORE text in buttons, links, headings, badges,
   or any inline element must always have a right margin so icon never touches text.
   This is enforced globally via the i + * sibling selector and .icon-gap helpers.
   ─────────────────────────────────────────────────────────────────────────────── */
.btn i[class*="fa-"],
.nav-link i[class*="fa-"],
.sidebar-compliance i[class*="fa-"],
.sidebar-logout-btn i[class*="fa-"],
.badge i[class*="fa-"],
.topbar-chip i[class*="fa-"],
.topbar-context-title i[class*="fa-"],
.card-title i[class*="fa-"],
.page-title i[class*="fa-"],
h1 i[class*="fa-"],
h2 i[class*="fa-"],
h3 i[class*="fa-"],
.modal-title i[class*="fa-"],
.filter-btn i[class*="fa-"],
.ctrl-hub-card-title i[class*="fa-"] {
  margin-inline-end: 6px;
}
/* Utility helpers */
.mr-1 { margin-inline-end: 4px !important; }
.mr-2 { margin-inline-end: 8px !important; }
.me-2 { margin-inline-end: 8px !important; }
.ml-1 { margin-inline-start: 4px !important; }

/* ─── Stat Cards ────────────────────────────────────────────────────────────── */
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: var(--brand-gold-metallic);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(27, 77, 62, 0.12);
}
.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.stat-card-action {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand-gold-metallic);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.stat-card-action:hover { color: var(--brand-emerald); }
.stat-card-value {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  font-family: var(--font-mono);
  margin-block: 4px 2px;
}
.stat-card-label {
  font-size: 11.5px;
  color: var(--brand-slate-muted);
  font-weight: 600;
}
.stat-card-icon-bg {
  position: absolute;
  inset-inline-end: 16px;
  bottom: 12px;
  font-size: 44px;
  opacity: 0.06;
  color: var(--brand-emerald);
  pointer-events: none;
}

/* ─── Avatar Circles ────────────────────────────────────────────────────────── */
.avatar-circle-sm {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.avatar-circle-sm.bg-emerald { background: rgba(27, 77, 62, 0.12); color: var(--brand-emerald); }
.avatar-circle-sm.bg-teal    { background: rgba(45, 122, 111, 0.12); color: var(--brand-teal); }
.avatar-circle-sm.bg-gold    { background: rgba(212, 175, 55, 0.15); color: var(--brand-gold-metallic); }
.avatar-circle-sm.bg-warning { background: rgba(217, 119, 6, 0.12); color: #B45309; }
.avatar-circle-sm.bg-slate   { background: rgba(30, 41, 59, 0.12); color: #475569; }
.avatar-circle-sm.bg-info    { background: rgba(2, 132, 199, 0.12); color: #0284C7; }

/* ─── Control Hub Cards (Quick Access) ─────────────────────────────────────── */
.ctrl-hub-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(212, 175, 55, 0.22);
  box-shadow: var(--glass-shadow);
  text-decoration: none;
  color: var(--brand-slate-dark);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.ctrl-hub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(27, 77, 62, 0.12);
  border-color: var(--brand-gold-metallic);
  color: var(--brand-slate-dark);
  text-decoration: none;
}
.ctrl-hub-card:hover .avatar-circle-sm {
  transform: scale(1.1);
}
.ctrl-hub-card-body {
  flex: 1;
  min-width: 0;
}
.ctrl-hub-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-emerald);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ctrl-hub-card-desc {
  font-size: 12px;
  color: var(--brand-slate-muted);
  line-height: 1.5;
  margin: 0;
}

/* ─── Hover Elevation ───────────────────────────────────────────────────────── */
.hover-elevation {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.hover-elevation:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(27, 77, 62, 0.11);
}

/* ─── Filter Button ─────────────────────────────────────────────────────────── */
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: rgba(212, 175, 55, 0.1);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  border-radius: 10px;
  font-family: var(--font-cairo);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-slate-dark);
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--brand-gold-metallic);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}
.filter-btn.has-active-filters {
  background: var(--brand-emerald);
  color: #fff;
  border-color: var(--brand-emerald);
}
.filter-btn.has-active-filters:hover {
  background: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(27, 77, 62, 0.25);
}

/* ─── Filter SweetAlert Form Styles ─────────────────────────────────────────── */
.swal-filter-form { padding: 4px 0; }
.swal-filter-section { margin-bottom: 14px; }
.swal-filter-section:last-child { margin-bottom: 0; }
.swal-filter-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-slate-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.swal-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.swal-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid rgba(37, 96, 90, 0.25);
  background: rgba(37, 96, 90, 0.06);
  color: var(--brand-slate-dark);
  transition: all 0.15s ease;
  user-select: none;
}
.swal-filter-pill input[type="radio"],
.swal-filter-pill input[type="checkbox"] {
  display: none;
}
.swal-filter-pill:hover {
  background: rgba(37, 96, 90, 0.12);
  border-color: var(--brand-teal);
}
.swal-filter-pill.is-active {
  background: var(--brand-emerald);
  color: #fff;
  border-color: var(--brand-emerald);
}
.swal-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: 10px;
  font-family: var(--font-cairo);
  font-size: 13.5px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-slate-dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.swal-search-input:focus {
  border-color: var(--brand-gold-metallic);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

/* Dashboard UI Components */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--brand-emerald);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Invitations Pills Grid */
.invitations-badges-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.invitation-pill {
  background: var(--glass-bg-base);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--brand-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Signature & Stamps */
.signature-pad-wrapper {
  background: #FFFFFF;
  border: 2px dashed var(--brand-emerald);
  border-radius: 10px;
  padding: 12px;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.signature-canvas {
  width: 100%;
  max-width: 100%;
  height: 200px;
  border-radius: 6px;
  cursor: crosshair;
  touch-action: none;
  display: block;
}
.signature-stamp-box {
  background: rgba(5, 150, 105, 0.08);
  border: 1px solid var(--status-success);
  border-radius: 8px;
  padding: 14px;
}
.signature-img {
  max-height: 80px;
  background: #FFFFFF;
  padding: 4px;
  border: 1px solid #CBD5E1;
  border-radius: 4px;
}
.signature-pending-box {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  padding: 14px;
}

/* Tax Form Sections */
.tax-section-card {
  border-radius: 10px;
  padding: 18px;
}
.tva-section {
  background: rgba(45, 122, 111, 0.06);
}
.other-taxes-section {
  background: rgba(212, 175, 55, 0.08);
}
.tax-section-title {
  font-size: 16px;
  font-weight: 800;
}
.live-calc-panel {
  border: 1px dashed var(--brand-emerald);
  padding: 16px;
}
.live-calc-title {
  font-size: 15px;
  font-weight: 800;
}
.live-calc-value {
  font-size: 18px;
  font-weight: 800;
}
.reauth-gate-box {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  padding: 16px;
}
.prefilled-summary-box {
  background: rgba(45, 122, 111, 0.08);
  border-radius: 8px;
  padding: 12px;
}
.legal-notice-box {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
}
.client-name-link {
  text-decoration: none;
  font-weight: 800;
  color: var(--brand-emerald);
}
.client-name-link:hover {
  color: var(--brand-gold-metallic);
}
.empty-icon {
  font-size: 36px;
  color: var(--brand-slate-muted);
  margin-bottom: 8px;
}
.table-empty-cell {
  text-align: center;
  padding: 40px 16px;
}
.total-row {
  background: rgba(45, 122, 111, 0.08);
  font-weight: 900;
  font-size: 15px;
}
.inline-form {
  display: inline-block;
}

/* ==========================================================================
   Universal Floating Language Switcher
   ========================================================================== */
.floating-lang-widget {
  position: fixed;
  bottom: 24px;
  inset-inline-end: 24px;
  z-index: 9999;
  pointer-events: auto;
}

.floating-lang-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px) saturate(190%);
  -webkit-backdrop-filter: blur(18px) saturate(190%);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(27, 77, 62, 0.16), 0 2px 8px rgba(0, 0, 0, 0.06);
  position: relative;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-lang-widget:hover .floating-lang-card {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--brand-gold-metallic);
  box-shadow: 0 14px 40px rgba(27, 77, 62, 0.24), 0 4px 14px rgba(212, 175, 55, 0.25);
  background: rgba(255, 255, 255, 0.98);
}

.floating-lang-globe {
  color: var(--brand-emerald);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Cairo', system-ui, sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: var(--brand-slate-dark);
  cursor: pointer;
  padding-inline-end: 18px;
}

.floating-lang-arrow {
  position: absolute;
  inset-inline-end: 12px;
  pointer-events: none;
  font-size: 10px;
  color: var(--brand-gold-metallic);
}

/* ==========================================================================
   Redesigned Home Page (Landing) Styles
   ========================================================================== */
.landing-hero {
  position: relative;
  padding: 40px 0 60px;
  overflow: hidden;
}

.hero-glow-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.25;
  z-index: 0;
}

.hero-orb-left {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, var(--brand-emerald), transparent 70%);
  top: -60px;
  inset-inline-start: -100px;
}

.hero-orb-right {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--brand-gold-metallic), transparent 70%);
  bottom: 0;
  inset-inline-end: -80px;
}

.hero-grid-wrapper {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 1024px) {
  .hero-grid-wrapper {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.hero-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-slate-dark);
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
}

.badge-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: 38px;
  font-weight: 900;
  color: var(--brand-emerald);
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 28px;
  }
}

.hero-subtitle {
  font-size: 16px;
  line-height: 1.65;
  color: var(--brand-slate-muted);
  margin-bottom: 28px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.btn-hero {
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(27, 77, 62, 0.15);
  transition: all 0.25s ease;
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(27, 77, 62, 0.25);
}

.hero-security-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-slate-muted);
}

/* Interactive G50 Mockup Card */
.g50-mockup-card {
  padding: 24px;
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 50px rgba(27, 77, 62, 0.14);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.g50-mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid rgba(212, 175, 55, 0.2);
}

.g50-mockup-flag {
  display: flex;
  width: 28px;
  height: 20px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.g50-mockup-flag .green { flex: 1; background: #006633; }
.g50-mockup-flag .white { flex: 1; background: #FFFFFF; }
.g50-mockup-flag .red { flex: 1; background: #D21034; }

.g50-mockup-title-block {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.g50-republic-text {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--brand-slate-muted);
  letter-spacing: 0.3px;
}

.g50-dgi-text {
  font-size: 13px;
  font-weight: 900;
  color: var(--brand-emerald);
}

.g50-mockup-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px 12px;
  background: rgba(37, 96, 90, 0.05);
  border-radius: 8px;
}

.g50-mockup-meta .meta-label {
  display: block;
  font-size: 10px;
  color: var(--brand-slate-muted);
  font-weight: 700;
}

.g50-mockup-meta .meta-value {
  display: block;
  font-size: 12px;
  color: var(--brand-slate-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g50-mockup-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.g50-row {
  padding: 4px 0;
}

.g50-mockup-total {
  padding: 14px;
  background: linear-gradient(135deg, rgba(27, 77, 62, 0.08), rgba(212, 175, 55, 0.12));
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.total-label {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--brand-emerald);
}

.total-amount {
  font-size: 22px;
  font-weight: 900;
  color: var(--brand-emerald);
}

.total-amount small {
  font-size: 12px;
  color: var(--brand-slate-muted);
}

.g50-mockup-seal {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: 8px;
  font-size: 11px;
  color: var(--brand-slate-dark);
}

/* Metrics Strip */
.metrics-strip {
  margin: 40px 0;
}

.metrics-grid {
  padding: 24px;
  border-radius: 16px;
  text-align: center;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
}

.metric-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(27, 77, 62, 0.08);
  margin-bottom: 4px;
}

.metric-val {
  font-size: 28px;
  font-weight: 900;
  color: var(--brand-emerald);
  font-family: 'Cairo', system-ui, sans-serif;
  line-height: 1.1;
}

.metric-lbl {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-slate-muted);
}

/* Feature Cards Grid */
.features-section {
  padding: 50px 0;
}

.section-title {
  font-size: 30px;
  font-weight: 900;
  color: var(--brand-emerald);
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 15px;
  max-width: 650px;
  margin: 0 auto;
}

.feature-cards-grid {
  gap: 24px;
}

.feature-card {
  padding: 28px 24px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.28s ease;
  position: relative;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(27, 77, 62, 0.12);
  border-color: var(--brand-gold-metallic);
}

.feature-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 6px;
}

.feature-icon-wrap.emerald { background: rgba(27, 77, 62, 0.12); color: var(--brand-emerald); }
.feature-icon-wrap.gold { background: rgba(212, 175, 55, 0.16); color: var(--brand-gold-metallic); }
.feature-icon-wrap.teal { background: rgba(37, 96, 90, 0.14); color: var(--brand-teal); }
.feature-icon-wrap.cyan { background: rgba(2, 132, 199, 0.14); color: #0284C7; }
.feature-icon-wrap.purple { background: rgba(139, 92, 246, 0.14); color: #8B5CF6; }
.feature-icon-wrap.amber { background: rgba(245, 158, 11, 0.14); color: #F59E0B; }

.feature-card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-slate-dark);
}

.feature-card-desc {
  font-size: 13.5px;
  line-height: 1.6;
}

/* Workflow Section */
.workflow-section {
  padding: 40px 0 60px;
}

.workflow-panel {
  padding: 44px 32px;
  border-radius: 20px;
}

.workflow-steps-grid {
  gap: 28px;
}

.workflow-step-card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 16px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  box-shadow: 0 6px 20px rgba(27, 77, 62, 0.05);
}

.step-badge {
  position: absolute;
  top: 18px;
  inset-inline-end: 20px;
  font-size: 24px;
  font-weight: 900;
  color: rgba(212, 175, 55, 0.3);
}

.step-icon {
  font-size: 26px;
  margin-bottom: 4px;
}

.step-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--brand-emerald);
}

.step-desc {
  font-size: 13.5px;
  line-height: 1.6;
}

/* Pricing Grid */
.pricing-section {
  padding: 40px 0 60px;
}

.pricing-grid {
  gap: 28px;
  align-items: stretch;
}

.pricing-card {
  padding: 32px 26px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  position: relative;
}

.featured-plan {
  border: 2px solid var(--brand-gold-metallic);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(252, 248, 237, 0.85));
  box-shadow: 0 16px 44px rgba(212, 175, 55, 0.22);
  transform: scale(1.03);
}

@media (max-width: 1024px) {
  .featured-plan {
    transform: none;
  }
}

.featured-ribbon {
  position: absolute;
  top: -12px;
  inset-inline-start: 24px;
  background: linear-gradient(135deg, var(--brand-gold-metallic), #B8860B);
  color: #FFFFFF;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.pricing-plan-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-name {
  font-size: 20px;
  font-weight: 900;
  color: var(--brand-emerald);
}

.plan-target {
  font-size: 13px;
}

.price-amount {
  font-size: 32px;
  font-weight: 900;
  color: var(--brand-slate-dark);
  margin-top: 6px;
}

.price-amount .currency {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-slate-muted);
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  color: var(--brand-slate-dark);
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Final CTA Section */
.final-cta-section {
  padding: 30px 0 60px;
}

.final-cta-card {
  padding: 50px 32px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--brand-emerald) 0%, #25605A 60%, var(--brand-emerald) 100%);
  color: #FFFFFF;
  box-shadow: 0 20px 60px rgba(27, 77, 62, 0.35);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
}

.final-cta-title {
  font-size: 32px;
  font-weight: 900;
  color: #FFFFFF;
  max-width: 700px;
}

@media (max-width: 768px) {
  .final-cta-title {
    font-size: 24px;
  }
}

.final-cta-subtitle {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 15.5px;
  max-width: 620px;
}

.final-cta-actions {
  margin-top: 10px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   CARD-LIST SYSTEM — replaces all data-table usage
   Each list is a stack of .item-row cards inside a .card-list container.
   ══════════════════════════════════════════════════════════════════════════════ */

/* Container */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Single row card */
.item-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(27, 77, 62, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
}
.item-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(27, 77, 62, 0.1);
  border-color: rgba(212, 175, 55, 0.38);
}

/* Left accent bar (coloured per type) */
.item-row::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: var(--brand-gold-metallic);
  opacity: 0.6;
}
.item-row.accent-emerald::before { background: var(--brand-emerald); opacity: 1; }
.item-row.accent-gold::before    { background: var(--brand-gold-metallic); opacity: 1; }
.item-row.accent-danger::before  { background: var(--status-danger); opacity: 1; }
.item-row.accent-warning::before { background: var(--status-warning); opacity: 1; }
.item-row.accent-info::before    { background: #0EA5E9; opacity: 1; }

/* Icon box inside .item-row (replaces avatar-circle-sm when used inline) */
.item-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  background: rgba(27, 77, 62, 0.09);
  color: var(--brand-emerald);
  transition: transform 0.2s ease;
}
.item-icon.icon-emerald  { background: rgba(27, 77, 62, 0.10); color: var(--brand-emerald); }
.item-icon.icon-gold     { background: rgba(212, 175, 55, 0.14); color: var(--brand-gold-metallic); }
.item-icon.icon-danger   { background: rgba(220, 38, 38, 0.10); color: #DC2626; }
.item-icon.icon-warning  { background: rgba(217, 119, 6, 0.10); color: #B45309; }
.item-icon.icon-info     { background: rgba(14, 165, 233, 0.10); color: #0EA5E9; }
.item-icon.icon-slate    { background: rgba(30, 41, 59, 0.10); color: #475569; }
.item-icon.icon-pdf      { background: rgba(220, 38, 38, 0.08); color: #DC2626; font-size: 19px; }
.item-row:hover .item-icon { transform: scale(1.07); }

/* Main content block */
.item-body {
  flex: 1;
  min-width: 0;
}
.item-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand-slate-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--brand-slate-muted);
}
.item-meta-sep { opacity: 0.4; }

/* Right action slot */
.item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Stacked label-value (for audit/fiscal rows) */
.item-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.item-field-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-slate-muted);
}
.item-field-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-slate-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-field-value.mono { font-family: var(--font-mono); }

/* Empty state */
.card-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--brand-slate-muted);
  gap: 12px;
}
.card-list-empty .empty-icon {
  font-size: 36px;
  opacity: 0.35;
}

/* Fiscal line-item row (declaration detail breakdown) */
.fiscal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  gap: 16px;
  transition: background 0.15s;
}
.fiscal-row:last-child { border-bottom: none; }
.fiscal-row:hover { background: rgba(212, 175, 55, 0.04); }
.fiscal-row.total-row {
  background: rgba(27, 77, 62, 0.06);
  border-top: 2px solid rgba(27, 77, 62, 0.18);
  border-bottom: none;
  border-radius: 0 0 12px 12px;
  font-weight: 900;
}
.fiscal-row-label {
  font-size: 13.5px;
  color: var(--brand-slate-dark);
  font-weight: 600;
}
.fiscal-row-amount {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

/* Responsive: stack item-fields on mobile */
@media (max-width: 640px) {
  .item-row { flex-wrap: wrap; gap: 10px; }
  .item-actions { width: 100%; justify-content: flex-end; }
}
