/* Etihad Capital Admin — premium fintech (solid colors only) */
:root {
  --navy: #0B1F33;
  --navy-light: #132B45;
  --navy-muted: #1A3550;
  --charcoal: #414042;
  --charcoal-light: #5A5A5C;
  --orange: #F58220;
  --orange-dark: #E06F10;
  --orange-soft: #FFF4EB;
  --gray-text: #A7A9AC;
  --gray-light: #F0F0F1;
  --header-h: 64px;
  --bg: #F7F8FA;
  --card: #FFFFFF;
  --border: #E2E6EA;
  --border-strong: #D4D9DE;
  --text: #1A1A2E;
  --ink: #1A1A2E;
  --muted: #6D6E71;
  --success: #2E9E5B;
  --success-bg: #E8F6EE;
  --danger: #D64545;
  --danger-bg: #FDECEC;
  --warn: #E2741A;
  --warn-bg: #FFF3E8;
  --info: #1A56DB;
  --info-bg: #E8F0FE;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 51, 0.06);
  --shadow: 0 2px 8px rgba(11, 31, 51, 0.08);
  --shadow-lg: 0 8px 24px rgba(11, 31, 51, 0.1);
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --font: 'Segoe UI', Roboto, system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Top header bar ─────────────────────────────────────────────────────── */
.top {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.top-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.top-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #fff;
  min-width: 0;
  flex-shrink: 0;
}
.top-brand:hover { color: #fff; text-decoration: none; opacity: 0.95; }
.top-brand-mark-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  flex-shrink: 0;
}
.top-brand-mark {
  height: 32px;
  width: 32px;
  object-fit: contain;
  display: block;
}
.top-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
  min-width: 0;
}
.top-brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.top-brand-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--orange);
}
.top-nav-check { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.top-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.top-nav-toggle-bar {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.top-nav-check:checked + .top-nav-toggle .top-nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.top-nav-check:checked + .top-nav-toggle .top-nav-toggle-bar:nth-child(2) { opacity: 0; }
.top-nav-check:checked + .top-nav-toggle .top-nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  gap: 20px;
}
.top-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.top-nav-link {
  color: var(--gray-text);
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.15px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
  position: relative;
}
.top-nav-link:hover {
  background: var(--navy-light);
  color: #fff;
  text-decoration: none;
}
.top-nav-link.is-active {
  color: #fff;
  background: var(--navy-muted);
  font-weight: 600;
}
.top-nav-link.is-active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--orange);
  border-radius: 1px;
}
.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-shrink: 0;
}
.notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.notif-btn:hover {
  background: var(--navy-muted);
  border-color: rgba(255, 255, 255, 0.18);
}
.notif-icon { flex-shrink: 0; opacity: 0.9; }
.notif-badge {
  position: absolute;
  top: -5px;
  right: -4px;
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--navy);
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.notif-badge.hidden { display: none; }
.top-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.top-user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.top-user-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.top-logout {
  color: var(--gray-text) !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.top-logout:hover {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.25);
  background: var(--navy-light);
  text-decoration: none !important;
}
@media (max-width: 960px) {
  .top { position: relative; }
  .top-inner { padding: 0 16px; gap: 12px; }
  .top-nav-toggle { display: flex; }
  .top-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 16px 20px;
    box-shadow: 0 12px 32px rgba(11, 31, 51, 0.25);
  }
  .top-nav-check:checked ~ .top-nav { display: flex; }
  .top-nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 12px;
  }
  .top-nav-link { padding: 12px 14px; }
  .top-nav-link.is-active::after { bottom: 8px; }
  .top-nav-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-left: 0;
  }
  .top-user {
    padding-left: 0;
    border-left: none;
    padding-top: 4px;
    justify-content: flex-start;
  }
  .notif-btn { justify-content: center; width: 100%; }
  .top-brand-name { font-size: 14px; }
}
@media (max-width: 480px) {
  .notif-btn-label { display: none; }
  .notif-btn { padding: 8px 14px; }
  .top-brand-sub { display: none; }
}

/* ── Layout ───────────────────────────────────────────────────────────── */
.wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-lg) var(--space-xl);
}
.page-head {
  margin-bottom: var(--space-lg);
}
.page-head h2 {
  margin: 0 0 var(--space-xs);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.page-head .page-sub {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: var(--space-md);
  transition: color 0.15s ease;
}
.back-link:hover {
  color: var(--orange);
  text-decoration: none;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ── Stat cards ───────────────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-md);
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.card .n {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.card .l {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.card.accent { border-top: 3px solid var(--orange); }
.card.success { border-top: 3px solid var(--success); }
.card.warn { border-top: 3px solid var(--warn); }
.card.danger .n { color: var(--danger); }
.card.danger { border-top: 3px solid var(--danger); }
.card.info { border-top: 3px solid var(--info); }

/* ── Sections / panels ────────────────────────────────────────────────── */
.sec {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
}
.sec h3 {
  margin: 0 0 var(--space-md);
  color: var(--navy);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}
.sec h3 .tag {
  font-size: 11px;
  font-weight: 700;
  background: var(--bg);
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* ── Tables ───────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 0 calc(-1 * var(--space-xs));
  padding: 0 var(--space-xs);
}
/* Synced horizontal scrollbar shown ABOVE the table so admins can scroll
   columns without first scrolling to the bottom of the page. */
.table-topscroll {
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 calc(-1 * var(--space-xs));
  padding: 0 var(--space-xs);
}
.table-topscroll-inner { height: 1px; }
/* Keep column headers visible while scrolling the rows vertically. */
table.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}
/* Whole-row click opens the client detail. */
table.data-table tbody tr[data-href],
table.data-table tbody tr[data-journey-id] {
  cursor: pointer;
}
table.data-table tbody tr[data-href]:hover,
table.data-table tbody tr[data-journey-id]:hover {
  background: #EEF1F4;
}
table.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
table.data-table th,
table.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data-table th {
  background: var(--bg);
  color: var(--charcoal);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
table.data-table th.sortable-th {
  cursor: pointer;
  user-select: none;
  padding-right: 22px;
  position: relative;
}
table.data-table th.sortable-th:hover {
  color: var(--navy);
  background: #EEF1F4;
}
table.data-table th.sortable-th::after {
  content: '⇅';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--gray-text);
  opacity: 0.7;
}
table.data-table th.sortable-th.sort-asc::after { content: '↑'; color: var(--orange); opacity: 1; }
table.data-table th.sortable-th.sort-desc::after { content: '↓'; color: var(--orange); opacity: 1; }
table.data-table th.col-num,
table.data-table td.col-num {
  width: 48px;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
}
table.data-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
table.data-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
table.data-table tbody tr:nth-child(even) td { background: #FAFBFC; }
table.data-table tbody tr:hover td { background: var(--orange-soft); }
table.data-table tbody tr:last-child td { border-bottom: none; }
table.data-table td.muted { color: var(--muted); font-size: 13px; }
table.data-table .cell-empty {
  text-align: center;
  color: var(--muted);
  padding: var(--space-xl) var(--space-md);
}

/* Legacy table selector fallback */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th {
  background: var(--bg);
  color: var(--charcoal);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
tbody tr:nth-child(even) td { background: #FAFBFC; }
tr:hover td { background: var(--orange-soft); }
tr:last-child td { border-bottom: none; }

/* ── Status pills ─────────────────────────────────────────────────────── */
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
  border: 1px solid transparent;
}
.pill.sub { background: var(--success-bg); color: var(--success); border-color: #C8E9D6; }
.pill.dft { background: var(--warn-bg); color: var(--warn); border-color: #F5D9BC; }
.pill.abn { background: var(--danger-bg); color: var(--danger); border-color: #F5C8C8; }
.pill.live { background: var(--info-bg); color: var(--info); border-color: #C5D9F7; }
.pill.approved { background: var(--success-bg); color: var(--success); border-color: #C8E9D6; }
.pill.accepted { background: var(--success-bg); color: var(--success); border-color: #C8E9D6; }
.pill.rejected { background: var(--danger-bg); color: var(--danger); border-color: #F5C8C8; }
.pill.declined { background: var(--danger-bg); color: var(--danger); border-color: #F5C8C8; }
.pill.pending { background: var(--warn-bg); color: var(--warn); border-color: #F5D9BC; }
.pill.neutral { background: var(--bg); color: var(--charcoal); border-color: var(--border); }

/* ── Progress bars ────────────────────────────────────────────────────── */
.bar {
  height: 8px;
  background: var(--gray-light);
  border-radius: 4px;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  background: var(--orange);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.bar-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 500;
}

/* ── Links & buttons ──────────────────────────────────────────────────── */
a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
}
a:hover { color: var(--orange-dark); text-decoration: underline; }
a.link-arrow {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* Per-row actions (View + Delete) in the applications list.
   The flex lives on an inner div so the <td> stays a real table cell
   (keeps vertical-align + the row border-bottom aligned). */
table.data-table td.col-actions {
  white-space: nowrap;
  vertical-align: middle;
}
.row-actions {
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.inline-del { margin: 0; display: inline; }
.btn-del {
  background: transparent;
  border: 1px solid #e0b4b4;
  color: #c0392b;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-del:hover { background: #c0392b; color: #fff; border-color: #c0392b; }

/* Small red trash-icon delete button (next to "View") */
.btn-del-icon {
  background: transparent;
  border: none;
  color: #c0392b;
  cursor: pointer;
  padding: 4px;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background .15s ease;
}
.btn-del-icon:hover { background: #fdeaea; }
.btn-del-icon svg { display: block; }

/* Verification traffic by country */
.country-traffic { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.country-row { display: flex; align-items: center; gap: 12px; }
.country-flag { font-size: 26px; line-height: 1; width: 34px; text-align: center; }
.country-name { font-weight: 700; font-size: 15px; min-width: 160px; }
.country-count { font-weight: 700; font-size: 15px; min-width: 36px; text-align: right; }
.country-bar { flex: 1; height: 8px; background: #eef0f3; border-radius: 5px; overflow: hidden; }
.country-bar > i { display: block; height: 100%; background: var(--orange); border-radius: 5px; }

/* List-page flash message (e.g. after deleting a row) */
.flash {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 14px;
}
.flash.ok  { background: #e7f6ec; color: #1d7a44; border: 1px solid #b6e2c6; }
.flash.err { background: #fdeaea; color: #c0392b; border: 1px solid #f1c0c0; }
.flash.warn { background: #fef6e7; color: #9a6b00; border: 1px solid #f3dca0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--orange);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover {
  background: var(--orange-dark);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.btn.secondary {
  background: var(--navy);
  color: #fff;
}
.btn.secondary:hover { background: var(--navy-light); }
.btn.success {
  background: var(--success);
  color: #fff;
}
.btn.success:hover { background: #268A4E; }
.btn.danger {
  background: var(--danger);
  color: #fff;
}
.btn.danger:hover { background: #C23A3A; }
.btn.ghost {
  background: var(--card);
  color: var(--charcoal);
  border-color: var(--border);
}
.btn.ghost:hover {
  background: var(--bg);
  color: var(--navy);
}
.btn.sm {
  padding: 6px 12px;
  font-size: 12px;
}
.btn.block { width: 100%; }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

/* ── Forms ────────────────────────────────────────────────────────────── */
.form-row {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: flex-end;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.form-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: 0.02em;
}
.form-field.grow { flex: 1; min-width: 200px; }

input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
textarea {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(245, 130, 32, 0.15);
}
input::placeholder { color: var(--gray-text); }

.filter-bar {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: flex-end;
  padding: var(--space-md);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
}
.filter-bar .form-field { flex: 0 1 auto; }
.filter-bar .form-field.search { flex: 1 1 240px; }
.filter-bar .form-field .date-dmy { max-width: 140px; }

/* ── Date picker (filter From / To) ───────────────────────────────────── */
.date-picker-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.date-picker-wrap .date-dmy {
  padding-right: 38px;
  cursor: pointer;
}
.date-picker-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.date-picker-btn:hover,
.date-picker-btn:focus-visible {
  color: var(--orange);
  background: var(--orange-soft);
  outline: none;
}
.date-picker-popup {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 120;
  min-width: 272px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.date-picker-popup.is-open { display: block; }
.date-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.date-picker-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.01em;
}
.date-picker-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--charcoal);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.date-picker-nav:hover,
.date-picker-nav:focus-visible {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-soft);
  outline: none;
}
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.date-picker-dow {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  padding: 4px 0;
}
.date-picker-day {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.date-picker-day.is-empty {
  pointer-events: none;
  visibility: hidden;
}
.date-picker-day:hover,
.date-picker-day:focus-visible {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--navy);
  outline: none;
}
.date-picker-day.is-today {
  border-color: var(--navy-muted);
  font-weight: 700;
}
.date-picker-day.is-selected {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  font-weight: 700;
}
.date-picker-day.is-selected:hover,
.date-picker-day.is-selected:focus-visible {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  color: #fff;
}
.journey-toolbar {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: var(--space-md);
}
.journey-filter-select { min-width: 180px; }
.filter-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-md);
}
.toolbar-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  margin-left: auto;
}

/* ── Permission pills (users) ─────────────────────────────────────────── */
.perm-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.perm-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.perm-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.perm-pill span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  background: var(--bg);
  border: 1px solid var(--border);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.perm-pill input:checked + span {
  background: var(--orange-soft);
  border-color: var(--orange);
  color: var(--navy);
}
.perm-pill input:focus-visible + span {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.perm-pill span::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
}
.perm-pill input:checked + span::before {
  background: var(--orange);
}

.user-row-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
}
.user-perms-cell .perm-grid {
  margin-bottom: var(--space-sm);
}
.user-name {
  font-weight: 700;
  color: var(--navy);
}

/* ── Detail page ──────────────────────────────────────────────────────── */
.detail-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: center;
  margin: var(--space-md) 0 var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.btn-export-pdf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  border-left: 4px solid var(--orange);
  transition: background 0.15s ease;
}
.btn-export-pdf:hover {
  background: var(--navy-light);
  color: #fff;
  text-decoration: none;
}
.detail-actions-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.verify-panel { }
.verify-status {
  margin: 0 0 var(--space-md);
  font-size: 14px;
  line-height: 1.6;
}
.verify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.verify-note {
  color: var(--muted);
  font-size: 13px;
  margin: var(--space-sm) 0 0;
}
.verify-flash {
  margin: 0 0 var(--space-md);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
}
.verify-flash-ok {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid #B8E6CC;
}
.verify-flash-warn {
  background: #FFF8E6;
  color: #9A6700;
  border: 1px solid #F0D78C;
}
.verify-flash-err {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #F5C8C8;
}
.verify-reason {
  margin: var(--space-sm) 0 0;
  padding: 12px 14px;
  background: var(--danger-bg);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.6;
  color: var(--charcoal);
}
.reject-modal-card h4 { color: var(--danger); }
.reject-modal-card .modal-warn { color: var(--charcoal); }
.field-label {
  display: block;
  margin: 0 0 var(--space-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.field-label .req { color: var(--danger); }
.reject-reason-input {
  width: 100%;
  min-height: 110px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}
.reject-reason-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11, 31, 51, 0.08);
}

.checklist {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  margin: var(--space-md) 0 0;
  padding: 0;
  list-style: none;
}
.checklist li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-text);
}
.checklist li.done { color: var(--success); }
.checklist li .ck-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  background: var(--gray-light);
  color: var(--muted);
  flex-shrink: 0;
}
.checklist li.done .ck-icon {
  background: var(--success-bg);
  color: var(--success);
}

.kv {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg);
  font-size: 14px;
  gap: var(--space-md);
}
.kv:last-child { border-bottom: none; }
.kv b {
  width: 200px;
  min-width: 140px;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.kv span { color: var(--ink); word-break: break-word; }

.kv-copyable .kv-val-with-copy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1;
}
.kv-val-text {
  color: var(--ink);
  word-break: break-all;
  font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.01em;
}
.btn-copy-ref {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}
.btn-copy-ref:hover {
  color: var(--orange);
  border-color: var(--orange);
  background: var(--orange-soft);
}
.btn-copy-ref:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.btn-copy-ref.is-copied {
  color: var(--success);
  border-color: var(--success);
  background: var(--success-bg);
}
.btn-copy-ref.is-copied .btn-copy-icon { display: none; }
.btn-copy-icon { flex-shrink: 0; }

/* ── Shufti verification card ─────────────────────────────────────────── */
.shufti-card {
  border-top: 3px solid var(--navy);
  background: linear-gradient(180deg, #fafbfd 0%, var(--card) 120px);
}
.shufti-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
.shufti-card-head h3 { margin: 0; }
.shufti-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.shufti-status-pill.accepted { background: var(--success-bg); color: var(--success); border-color: #C8E9D6; }
.shufti-status-pill.declined { background: var(--danger-bg); color: var(--danger); border-color: #F5C8C8; }
.shufti-status-pill.pending { background: var(--warn-bg); color: var(--warn); border-color: #F5D9BC; }
.shufti-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-md);
}
.shufti-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--charcoal);
}
.shufti-badge.liveness.accepted { color: var(--success); border-color: #C8E9D6; background: var(--success-bg); }
.shufti-badge.liveness.declined { color: var(--danger); border-color: #F5C8C8; background: var(--danger-bg); }
.shufti-badge.service { color: var(--navy); border-color: #D4DCE8; background: #EEF2F8; }
.shufti-badge.service.accepted { color: var(--success); border-color: #C8E9D6; background: var(--success-bg); }
.shufti-badge.service.declined { color: var(--danger); border-color: #F5C8C8; background: var(--danger-bg); }
.shufti-badge.service.pending { color: var(--warn); border-color: #F5D9BC; background: var(--warn-bg); }
.shufti-backoffice-link {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--info);
  text-decoration: none;
  white-space: nowrap;
}
.shufti-backoffice-link:hover { text-decoration: underline; }
.shufti-meta { font-size: 12px; color: var(--muted); margin-left: auto; }
.shufti-ref-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 8px 0;
  border-bottom: 1px solid var(--bg);
  font-size: 14px;
}
.shufti-ref-row b {
  width: 200px;
  min-width: 140px;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.shufti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
  align-items: start; /* don't stretch the short Face panel to match the tall Document panel */
}
.shufti-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}
.shufti-panel h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.shufti-panel-status { margin-bottom: 12px; }
.shufti-dl { margin: 0; }
.shufti-dl-row {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--bg);
  font-size: 13px;
}
.shufti-dl-row:last-child { border-bottom: none; }
.shufti-dl-row dt {
  width: 110px;
  flex-shrink: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
}
.shufti-dl-row dd { margin: 0; color: var(--ink); word-break: break-word; }
/* Full-width "All extracted fields" — flow rows into 2-3 columns so the long
   list fills the width instead of leaving an empty gap beside the Face panel. */
.shufti-dl-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0 28px;
}
.shufti-checks {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.shufti-checks li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
  color: var(--charcoal);
}
.shufti-checks li.ok .shufti-check-icon { color: var(--success); }
.shufti-checks li.fail .shufti-check-icon { color: var(--danger); }
.shufti-face-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 8px 0 12px;
}
.shufti-face-score-val {
  font-size: 36px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.shufti-face-score-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.shufti-score-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}
.shufti-score-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--success));
  border-radius: 999px;
}
.shufti-note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.shufti-decline {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: var(--danger-bg);
  border: 1px solid #F5C8C8;
}
.shufti-decline h4 { margin: 0 0 8px; color: var(--danger); font-size: 13px; }
.shufti-decline-reason { margin: 0; font-size: 14px; color: var(--ink); }
.shufti-decline-codes { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }
.shufti-location { margin-top: var(--space-md); font-size: 12px; }
.shufti-empty { padding: var(--space-md) 0; }
.shufti-fetch-error { margin: var(--space-sm) 0 0; }

.doc-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
}
.doc-card {
  width: 200px;
}
.doc-card-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--navy);
}
.doc-card img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  display: block;
}
.doc-card-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.doc-card-remote img { object-fit: contain; background: #f4f6f9; }
.doc-proof-fallback {
  display: block;
  padding: 24px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--navy);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ── Login ────────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: var(--bg);
}
.login {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.login-logo {
  text-align: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}
.login-logo img {
  max-width: 220px;
  width: 75%;
  height: auto;
  display: inline-block;
}
.login h2 {
  text-align: center;
  margin: 0 0 var(--space-lg);
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.login-error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border: 1px solid #F5C8C8;
}
.login-form .form-field { margin-bottom: var(--space-md); }
.login-form .btn { margin-top: var(--space-sm); }

.msg {
  background: var(--success-bg);
  color: var(--success);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid #C8E9D6;
}

/* ── Funnel ───────────────────────────────────────────────────────────── */
.funnel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 4px 0;
}
.funnel-row:last-child { margin-bottom: 0; }
.funnel-label {
  width: 130px;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  flex-shrink: 0;
}
.funnel-bar-wrap { flex: 1; }
.funnel-pct {
  width: 42px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.funnel-count {
  width: 36px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.grid-2-balanced { align-items: stretch; }
.panel-sec { display: flex; flex-direction: column; }
.panel-subhead {
  margin: var(--space-md) 0 var(--space-sm);
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.panel-scroll {
  max-height: 360px;
  min-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.panel-scroll::-webkit-scrollbar { width: 6px; }
.panel-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.panel-placeholder {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  font-weight: 500;
}
.panel-state {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-lg) var(--space-md);
}
.panel-state-empty p,
.panel-state-empty-inline {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  font-weight: 500;
}
.panel-state-error { align-items: flex-start; justify-content: flex-start; text-align: left; }
.panel-hint-block {
  color: var(--warn);
  font-size: 12px;
  margin-bottom: 8px;
  line-height: 1.4;
  font-weight: 600;
}
.dropoff-panel { max-height: 120px; overflow-y: auto; }
.dropoff-row {
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--charcoal);
}
.dropoff-row:last-child { border-bottom: none; }
.dropoff-row b { color: var(--navy); }

/* ── Activity feed ────────────────────────────────────────────────────── */
.activity-feed-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 14px;
}
.activity-feed-footer {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  text-align: center;
}
.activity-view-all {
  background: none;
  border: none;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 12px;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: color 0.15s ease, background 0.15s ease;
}
.activity-view-all:hover {
  color: var(--orange);
  background: var(--orange-soft);
  text-decoration: none;
}
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  align-items: flex-start;
}
.activity-item:last-child { border-bottom: none; }
.activity-body { flex: 1; min-width: 0; }
.activity-msg {
  color: var(--ink);
  line-height: 1.45;
  word-break: break-word;
  font-weight: 500;
}
.activity-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 600;
}
.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  margin-top: 5px;
  flex-shrink: 0;
  border: 2px solid var(--orange-soft);
}
.activity-dot.abandon { background: var(--danger); border-color: var(--danger-bg); }
.activity-dot.submit { background: var(--success); border-color: var(--success-bg); }
.activity-dot.verify { background: var(--navy); border-color: #D4DCE6; }
.activity-dot.document { background: var(--warn); border-color: var(--warn-bg); }

/* ── Notification panel ───────────────────────────────────────────────── */
.notif-panel {
  position: fixed;
  top: var(--header-h);
  right: 0;
  width: 400px;
  max-width: 100vw;
  height: calc(100vh - var(--header-h));
  background: var(--card);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(11, 31, 51, 0.12);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}
.notif-panel.open { transform: translateX(0); }
.notif-panel-head {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: var(--navy);
  color: #fff;
  flex-shrink: 0;
}
.notif-panel-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.notif-panel-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.notif-panel-head .btn-mark-all {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}
.notif-panel-head .btn-mark-all:hover { background: var(--orange-dark); }
.notif-panel-head .notif-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--navy-light);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  font-family: inherit;
  transition: background 0.15s ease;
}
.notif-panel-head .notif-close-btn:hover { background: var(--navy-muted); }
.notif-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm) 0;
  background: var(--bg);
}
.notif-item {
  padding: 14px var(--space-lg);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
  background: var(--card);
}
.notif-item:hover { background: #FAFBFC; }
.notif-item.unread {
  border-left: 4px solid var(--orange);
  background: var(--orange-soft);
}
.notif-item.unread:hover { background: #FFEFE0; }
.notif-item .ni-type {
  font-size: 10px;
  font-weight: 800;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.notif-item .ni-msg {
  font-size: 13px;
  margin-top: 4px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
}
.notif-item .ni-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 600;
}
.notif-empty {
  padding: 48px var(--space-lg);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}

/* ── Toast ────────────────────────────────────────────────────────────── */
.toast-wrap {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--navy);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 0.3s ease;
  border-left: 4px solid var(--orange);
}
.toast .t-type {
  font-size: 10px;
  font-weight: 800;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Journey table ────────────────────────────────────────────────────── */
.journey-name { font-weight: 700; color: var(--navy); }
.journey-sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.timeline-mini { font-size: 11px; color: var(--muted); margin-top: 4px; font-weight: 500; }

.sse-status { font-size: 12px; font-weight: 700; }
.sse-status.on { color: var(--success); }
.sse-status.off { color: var(--danger); }
.sse-status.poll { color: var(--warn); }
.dash-updated-at {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.dash-updated-at:not(:empty) { opacity: 1; }
.dash-updated-at.is-fresh { color: var(--success); }
.page-head .dash-updated-at {
  display: block;
  margin: 6px 0 0;
  margin-left: 0;
}
.panel-error { color: var(--danger); font-size: 13px; margin: 0; line-height: 1.5; font-weight: 600; }
.panel-hint { color: var(--muted); font-size: 12px; font-weight: 500; }
.tag-src { font-size: 10px; font-weight: 700; color: var(--muted); }

/* ── Email health ─────────────────────────────────────────────────────── */
.email-health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
}
.email-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.email-stat .es-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.email-stat .es-val {
  font-size: 16px;
  font-weight: 700;
  margin-top: 6px;
  color: var(--navy);
}
.email-stat .es-val.sm { font-size: 13px; font-weight: 600; }
.email-stat.ok .es-val { color: var(--success); }
.email-stat.bad .es-val { color: var(--danger); }
.email-failures-list {
  margin-top: var(--space-md);
}
.email-failures-list .panel-subhead { margin-top: 0; }

/* ── Empty states ─────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  color: var(--muted);
}
.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--gray-text);
}
.empty-state h4 {
  margin: 0 0 var(--space-sm);
  font-size: 16px;
  font-weight: 700;
  color: var(--charcoal);
}
.empty-state p {
  margin: 0;
  font-size: 14px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.text-success { color: var(--success); font-weight: 600; }
.text-warn { color: var(--warn); font-weight: 600; }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); font-weight: 600; }

/* ── Admin danger zone / clear test data ───────────────────────────────── */
.danger-zone {
  border-color: #F5C8C8;
  background: linear-gradient(180deg, #FFFBFB 0%, var(--card) 100%);
}
.danger-zone h3 { color: var(--danger); }
.danger-zone-desc {
  margin: 0 0 var(--space-md);
  color: var(--charcoal);
  font-size: 14px;
  line-height: 1.6;
  max-width: 720px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 51, 0.55);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}
.modal-backdrop[hidden] { display: none !important; }
.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: var(--space-lg);
}
.modal-card h4 {
  margin: 0 0 var(--space-sm);
  font-size: 18px;
  color: var(--danger);
}
.modal-warn {
  margin: 0 0 var(--space-md);
  color: var(--charcoal);
  font-size: 14px;
  line-height: 1.5;
}
.modal-steps {
  margin: 0 0 var(--space-md);
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.modal-steps code {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}
.modal-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: var(--space-md);
}
.modal-status {
  margin: var(--space-md) 0 0;
  font-size: 13px;
  font-weight: 600;
}
.modal-status.ok { color: var(--success); }
.modal-status.err { color: var(--danger); }

@media print {
  .top, .top-nav, .noprint, form, .notif-panel, .toast-wrap { display: none !important; }
  body { background: #fff; }
  .wrap { margin: 0; max-width: 100%; padding: 0; }
  .sec { box-shadow: none; break-inside: avoid; }
}
