/* ================================================================
   DIAM Administrative Dashboard — Shared Design System
   Aesthetic: Ukrainian Government Digital Portal (Diia-inspired)
   Fonts: Montserrat (headings) + Nunito Sans (body)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800&family=Nunito+Sans:ital,opsz,wght@0,6..12,400;0,6..12,500;0,6..12,600;0,6..12,700;1,6..12,400&display=swap');

/* ── Design Tokens ───────────────────────────────────────────── */
:root {
  --navy:           #0F1F3D;
  --navy-hover:     #162B52;
  --navy-active:    #1D3566;
  --blue:           #1173C6;
  --blue-hover:     #0D62AD;
  --blue-light:     #EBF4FF;
  --blue-mid:       #3B9BE0;
  --bg:             #EEF2F7;
  --white:          #FFFFFF;
  --text:           #1A2B4A;
  --text-2:         #5D7290;
  --text-3:         #9AADC4;
  --border:         #D1DBE8;
  --border-light:   #EAF0F6;

  /* Status colours */
  --green:          #00C980;  --green-bg:       #E4FAF3;  --green-text:     #007D50;
  --amber:          #FF9500;  --amber-bg:       #FFF4E5;  --amber-text:     #C47200;
  --red:            #FF3B30;  --red-bg:         #FFF0EF;  --red-text:       #C12D24;
  --purple:         #7B61FF;  --purple-bg:      #F3F0FF;  --purple-text:    #5040CC;
  --teal:           #00B4D8;  --teal-bg:        #E5F9FF;  --teal-text:      #0090AE;
  --gold:           #F2C500;  --gold-bg:        #FFFBE5;  --gold-text:      #8C6E00;

  /* Ukrainian flag */
  --flag-blue:      #1173C6;
  --flag-yellow:    #FFD600;

  /* Geometry */
  --sidebar-w:      256px;
  --header-h:       64px;
  --radius:         10px;
  --radius-sm:      6px;
  --radius-lg:      16px;
  --radius-xl:      24px;

  /* Shadows */
  --shadow-xs:      0 1px 2px rgba(15,31,61,0.06);
  --shadow:         0 1px 3px rgba(15,31,61,0.08), 0 4px 12px rgba(15,31,61,0.05);
  --shadow-md:      0 4px 16px rgba(15,31,61,0.10), 0 8px 24px rgba(15,31,61,0.06);
  --shadow-hover:   0 8px 28px rgba(15,31,61,0.14), 0 2px 8px rgba(15,31,61,0.08);
  --shadow-modal:   0 24px 64px rgba(15,31,61,0.22), 0 8px 24px rgba(15,31,61,0.12);

  /* Typography */
  --font-head:  'Montserrat', sans-serif;
  --font-body:  'Nunito Sans', sans-serif;

  --t:          0.18s ease;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hover); }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }

/* ── Flag Stripe ─────────────────────────────────────────────── */
.flag-stripe {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--flag-blue) 50%, var(--flag-yellow) 50%);
  z-index: 9999;
}

/* ── Page Scaffold ───────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
  padding-top: 4px; /* flag stripe offset */
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 4px;
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - 4px);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-decoration: none;
}
.sidebar-logo-icon {
  width: 36px; height: 36px;
  background: var(--blue);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 800; font-size: 14px;
  color: #fff;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(17,115,198,0.4);
}
.sidebar-logo-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  letter-spacing: 0.3px;
}
.sidebar-logo-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.nav-section {
  margin-bottom: 24px;
}
.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 0 10px 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  font-weight: 600;
  transition: background var(--t), color var(--t);
  text-decoration: none;
  position: relative;
}
.nav-item i {
  font-size: 18px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.9);
}
.nav-item.active {
  background: rgba(17,115,198,0.25);
  color: #fff;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--blue);
  border-radius: 0 3px 3px 0;
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--t);
}
.sidebar-user:hover { background: rgba(255,255,255,0.07); }
.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-size: 12px; font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}

/* ── Main Area ───────────────────────────────────────────────── */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 4px);
}

/* ── Top Header ─────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 50;
  box-shadow: var(--shadow-xs);
}
.header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.header-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb-sep { opacity: 0.5; }
.breadcrumb .current { color: var(--text-2); font-weight: 600; }

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Page Content ────────────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 28px;
}
.page-section { margin-bottom: 28px; }
.page-section:last-child { margin-bottom: 0; }

/* ── Stat Cards ─────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow var(--t), transform var(--t);
  animation: fadeSlideUp 0.35s ease both;
}
.stat-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon.blue   { background: var(--blue-light);  color: var(--blue); }
.stat-icon.green  { background: var(--green-bg);     color: var(--green-text); }
.stat-icon.amber  { background: var(--amber-bg);     color: var(--amber-text); }
.stat-icon.red    { background: var(--red-bg);       color: var(--red-text); }
.stat-icon.purple { background: var(--purple-bg);    color: var(--purple-text); }
.stat-icon.teal   { background: var(--teal-bg);      color: var(--teal-text); }
.stat-value {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-top: 4px;
  letter-spacing: 0.2px;
}

/* ── Panel / Card ────────────────────────────────────────────── */
.panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: fadeSlideUp 0.35s ease both;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
}
.panel-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.panel-body { padding: 22px; }
.panel-actions { display: flex; align-items: center; gap: 10px; }

/* ── Data Table ──────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table thead th {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 10px 16px;
  text-align: left;
  white-space: nowrap;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.table thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.table thead th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }
.table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background var(--t);
}
.table tbody tr:hover { background: #f7fafe; }
.table tbody tr:last-child { border-bottom: none; }
.table td {
  padding: 13px 16px;
  vertical-align: middle;
}
.table td.nowrap { white-space: nowrap; }

/* User avatar cell */
.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-size: 12px; font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}
.avatar-blue   { background: var(--blue); }
.avatar-green  { background: var(--green-text); }
.avatar-purple { background: var(--purple-text); }
.avatar-amber  { background: var(--amber-text); }
.avatar-red    { background: var(--red-text); }
.avatar-teal   { background: var(--teal-text); }
.user-name { font-weight: 600; color: var(--text); font-size: 14px; line-height: 1.2; }
.user-email { font-size: 12px; color: var(--text-2); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  border: 2px solid transparent;
  transition: all var(--t);
  white-space: nowrap;
  line-height: 1;
  cursor: pointer;
}
.btn i { font-size: 16px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn-primary:hover:not(:disabled) {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  box-shadow: 0 4px 12px rgba(17,115,198,0.35);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--blue-light);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-danger:hover:not(:disabled) {
  background: var(--red-text);
  border-color: var(--red-text);
  box-shadow: 0 4px 12px rgba(255,59,48,0.3);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--border-light);
  color: var(--text);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}
.btn-sm i { font-size: 14px; }

.btn-icon {
  padding: 7px;
  border-radius: var(--radius-sm);
}
.btn-icon i { font-size: 16px; margin: 0; }

/* ── Status & Role Badges ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  vertical-align: middle;
}
.badge i { font-size: 12px; }

/* Project Statuses */
.badge-draft                  { color: var(--text-3);      background: var(--border-light); }
.badge-submitted              { color: var(--blue);         background: var(--blue-light); }
.badge-pre_check_in_progress  { color: var(--purple-text);  background: var(--purple-bg); }
.badge-pre_check_failed       { color: var(--red-text);     background: var(--red-bg); }
.badge-ai_check_in_progress   { color: #8B5CF6;             background: #F5F3FF; }
.badge-ai_check_failed        { color: var(--red-text);     background: var(--red-bg); }
.badge-awaiting_expert_review { color: var(--amber-text);   background: var(--amber-bg); }
.badge-returned_by_expert     { color: #C25400;             background: #FFF0E0; }
.badge-awaiting_diam_review   { color: var(--gold-text);    background: var(--gold-bg); }
.badge-returned_by_diam       { color: var(--amber-text);   background: var(--amber-bg); }
.badge-permit_issued          { color: var(--green-text);   background: var(--green-bg); }
.badge-rejected               { color: var(--red-text);     background: var(--red-bg); }
.badge-archived               { color: var(--text-2);       background: var(--border); }

/* User Roles */
.badge-construction_customer { color: var(--teal-text);    background: var(--teal-bg); }
.badge-project_organization  { color: var(--blue);         background: var(--blue-light); }
.badge-expert                { color: var(--purple-text);  background: var(--purple-bg); }
.badge-diam_inspector        { color: var(--amber-text);   background: var(--amber-bg); }
.badge-admin                 { color: var(--red-text);     background: var(--red-bg); }

/* User Status */
.badge-active  { color: var(--green-text); background: var(--green-bg); }
.badge-deleted { color: var(--text-3);     background: var(--border-light); }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 6px;
}
.form-label .required { color: var(--red); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
  appearance: none;
}
.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(17,115,198,0.12);
}
.form-control:disabled {
  background: var(--bg);
  color: var(--text-2);
  cursor: not-allowed;
}
.form-control::placeholder { color: var(--text-3); }

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239AADC4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 5px;
}
.form-error {
  font-size: 12px;
  color: var(--red-text);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Search Bar ──────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-wrap i {
  position: absolute;
  left: 12px;
  font-size: 16px;
  color: var(--text-3);
  pointer-events: none;
}
.search-input {
  padding: 8px 14px 8px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  width: 260px;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(17,115,198,0.12);
}
.search-input::placeholder { color: var(--text-3); }

/* ── Toolbar ─────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Filter Tabs ─────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--border-light);
  padding: 4px;
  border-radius: var(--radius-sm);
}
.tab-item {
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tab-item:hover { color: var(--text); background: rgba(255,255,255,0.6); }
.tab-item.active { background: var(--white); color: var(--blue); box-shadow: var(--shadow-xs); }
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  background: var(--blue-light);
  color: var(--blue);
}
.tab-item.active .tab-count { background: var(--blue); color: #fff; }

/* ── File Upload Zone ────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
  background: var(--bg);
  position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--blue);
  background: var(--blue-light);
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-zone-icon {
  font-size: 40px;
  color: var(--blue);
  margin-bottom: 12px;
}
.upload-zone-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.upload-zone-hint {
  font-size: 12px;
  color: var(--text-2);
}
.upload-zone-hint strong { color: var(--blue); }

/* Document list item */
.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  transition: background var(--t);
}
.doc-item:hover { background: var(--border-light); }
.doc-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--red-bg);
  color: var(--red-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.doc-name { font-weight: 600; font-size: 13.5px; color: var(--text); }
.doc-meta { font-size: 11.5px; color: var(--text-2); }
.doc-actions { margin-left: auto; display: flex; gap: 6px; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,31,61,0.5);
  backdrop-filter: blur(3px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 480px;
  animation: scaleUp 0.2s ease;
  overflow: hidden;
}
.modal-lg { max-width: 640px; }
.modal-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.modal-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.modal-subtitle {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 3px;
}
.modal-close {
  background: none;
  border: none;
  padding: 2px;
  color: var(--text-3);
  cursor: pointer;
  font-size: 22px;
  transition: color var(--t);
  flex-shrink: 0;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Toast Notifications ────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow-md);
  min-width: 280px;
  max-width: 380px;
  pointer-events: all;
  animation: toastIn 0.25s ease;
  border-left: 4px solid var(--blue);
}
.toast.success { border-left-color: var(--green); }
.toast.error   { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--amber); }
.toast i { font-size: 18px; flex-shrink: 0; }
.toast.success i { color: var(--green); }
.toast.error   i { color: var(--red); }
.toast.warning i { color: var(--amber); }
.toast-text { flex: 1; font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.toast-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  transition: color var(--t);
}
.toast-close:hover { color: #fff; }
.toast.hiding { animation: toastOut 0.2s ease forwards; }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}
.empty-state i {
  font-size: 56px;
  color: var(--border);
  margin-bottom: 16px;
}
.empty-state-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 8px;
}
.empty-state-text {
  font-size: 13px;
  color: var(--text-3);
  max-width: 320px;
  margin: 0 auto 20px;
}

/* ── Loading Skeleton ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, #e8eff7 50%, var(--border-light) 75%);
  background-size: 400% 100%;
  border-radius: var(--radius-sm);
  animation: shimmer 1.4s ease infinite;
}

/* ── Divider ─────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 20px 0;
}

/* ── Utilities ───────────────────────────────────────────────── */
.text-muted   { color: var(--text-2); }
.text-sm      { font-size: 12px; }
.text-right   { text-align: right; }
.font-bold    { font-weight: 700; }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.mt-4         { margin-top: 4px; }
.mt-8         { margin-top: 8px; }
.mb-16        { margin-bottom: 16px; }

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  to   { opacity: 0; transform: translateX(24px); }
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Stagger stat cards */
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.10s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.20s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }

/* ── Language Switcher ───────────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(0,0,0,0.06);
  border-radius: 6px;
  padding: 2px;
}
.lang-sep { color: var(--border); font-size: 11px; padding: 0 1px; }
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-family: var(--font-head);
  transition: all var(--t);
}
.lang-btn:hover { background: var(--border-light); color: var(--text-1); }
.lang-btn.active { background: var(--blue); color: #fff; }
