/* ================================================================
   Veralia Hub v2 — Stylesheet
   ================================================================
   Light theme only. No theme switcher.
   ================================================================ */

:root {
  /* Brand */
  --brand:        #1d4ed8;
  --brand-deep:   #0c2f6f;
  --brand-light:  #e8efff;
  --cyan:         #1fa9ff;

  /* Surfaces */
  --bg:           #f7f9fc;
  --surface:      #ffffff;
  --surface-2:    #f1f4fa;
  --surface-hover:#eef2f7;

  /* Borders */
  --border:       #e5e9ef;
  --border-soft:  #eff2f6;

  /* Text */
  --text:         #0f1419;
  --text-muted:   #536471;
  --text-faint:   #8b98a5;

  /* Status */
  --success:      #15803d;
  --success-bg:   #dcfce7;
  --warning:      #b45309;
  --warning-bg:   #fef3c7;
  --danger:       #b91c1c;
  --danger-bg:    #fee2e2;
  --info:         #1d4ed8;
  --info-bg:      #e8efff;

  /* Sizing */
  --sidebar-w:    240px;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    16px;
  --shadow:       0 1px 2px rgba(15, 20, 25, 0.04), 0 4px 12px rgba(15, 20, 25, 0.04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--text); margin: 0 0 8px; line-height: 1.2; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 12px; }

.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.text-center { text-align: center; }
.text-right  { text-align: right; }


/* ================================================================
   Layout: TOPBAR + FIXED sidebar (below topbar) + scrolling main
   ================================================================ */
:root {
  --topbar-h: 60px;
}

.app--auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

/* Top bar — fixed full-width */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  background: var(--brand-deep);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px 0 16px;
  z-index: 20;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.topbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar__brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}
.topbar__brand-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.topbar__brand-text strong { font-weight: 800; }
.topbar__brand-text em {
  font-style: normal;
  font-weight: 400;
  color: var(--cyan);
}
.topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar__msg {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.topbar__msg:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}
.topbar__msg i { width: 20px; height: 20px; }
.topbar__msg-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid var(--brand-deep);
}
.topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  transition: background 0.15s;
}
.topbar__user:hover {
  background: rgba(255, 255, 255, 0.16);
  text-decoration: none;
}
.topbar__user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--brand-deep);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px;
}
.topbar__user-name {
  font-size: 14px;
  font-weight: 600;
}

/* Sidebar — sits BELOW topbar */
.sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  z-index: 5;
}

/* Main — pushed right of sidebar AND below topbar */
.main {
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  padding: 28px 32px 48px;
  max-width: calc(1200px + var(--sidebar-w));
  min-height: calc(100vh - var(--topbar-h));
}

.sidebar__section {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  padding: 16px 10px 4px;
}
.sidebar__section:first-child { padding-top: 4px; }

.sidebar__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
}
.sidebar__item:hover {
  background: var(--surface-2);
  text-decoration: none;
}
.sidebar__item--active {
  background: var(--brand-light);
  color: var(--brand);
}
.sidebar__item--active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--brand);
  border-radius: 0 3px 3px 0;
}
.sidebar__item i { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar__badge {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar__bottom {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

/* Red logout link — danger variant */
.sidebar__item--danger {
  color: var(--danger);
}
.sidebar__item--danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
  text-decoration: none;
}
.sidebar__item--danger.sidebar__item--active::before { background: var(--danger); }


/* ================================================================
   Page header
   ================================================================ */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.page-head__title h1 { margin: 0; }
.page-head__title p  { margin: 4px 0 0; color: var(--text-muted); }


/* ================================================================
   Cards
   ================================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card + .card,
.card + .grid-2 { margin-top: 16px; }
.grid-2 + .card,
.grid-2 + .grid-2 { margin-top: 16px; }

.card__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.card__title h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card__title h2 i { width: 18px; height: 18px; color: var(--brand); }


/* ================================================================
   Buttons
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn i { width: 16px; height: 16px; }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-deep); }
.btn--outline { background: transparent; border-color: var(--border); }
.btn--outline:hover { background: var(--surface-2); }
.btn--danger  { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #991b1b; }
.btn--ghost   { background: transparent; }
.btn--ghost:hover { background: var(--surface-2); }
.btn--block { display: flex; width: 100%; }
.btn--sm    { padding: 6px 12px; font-size: 13px; }
.btn--lg    { padding: 12px 22px; font-size: 15px; }


/* ================================================================
   Forms
   ================================================================ */
.form__row { margin-bottom: 16px; }
.form__label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 13px;
}
.form__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form__input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}
.form__hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}


/* ================================================================
   Flash
   ================================================================ */
.flash {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  border: 1px solid transparent;
}
.flash--success { background: var(--success-bg); border-color: #bbf7d0; color: var(--success); }
.flash--error   { background: var(--danger-bg);  border-color: #fecaca; color: var(--danger);  }
.flash--info    { background: var(--info-bg);    border-color: #c7d2fe; color: var(--info);    }
.flash--warning { background: var(--warning-bg); border-color: #fde68a; color: var(--warning); }


/* ================================================================
   Auth pages (login / 2FA)
   ================================================================ */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 0 4px 24px rgba(15, 20, 25, 0.06);
  width: 100%;
  max-width: 400px;
}
.auth-card__brand { text-align: center; margin-bottom: 24px; }
.auth-card__brand img { width: auto; height: 150px; margin: 0 auto 12px; display: block; }
.auth-card__brand strong {
  display: block; color: var(--brand-deep);
  font-size: 1.25rem; font-weight: 800;
}
.auth-card__brand small {
  display: block; color: var(--text-muted);
  font-size: 12px; margin-top: 4px;
}
.totp-input {
  letter-spacing: 0.5em;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}


/* ================================================================
   Action queue
   ================================================================ */
.queue {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.queue__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.05s;
}
.queue__item:hover {
  border-color: var(--brand);
  text-decoration: none;
}
.queue__item--has {
  border-color: #fde68a;
  background: var(--warning-bg);
}
.queue__item--has:hover { border-color: var(--warning); }
.queue__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.queue__item--has .queue__icon { background: #fef9c3; }
.queue__icon i { width: 18px; height: 18px; color: var(--brand); }
.queue__item--has .queue__icon i { color: var(--warning); }
.queue__count { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.queue__label { font-size: 12px; color: var(--text-muted); }


/* ================================================================
   KPI tiles
   ================================================================ */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.kpi__label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.kpi__value {
  font-size: 1.75rem; font-weight: 800;
  margin-top: 6px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kpi__delta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  display: flex; align-items: center; gap: 4px;
}
.kpi__delta--up   { color: var(--success); }
.kpi__delta--flat { color: var(--text-faint); }
.kpi__delta i { width: 12px; height: 12px; }


/* ================================================================
   Charts — 2-column grid
   ================================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  min-width: 0;        /* allow grid items to shrink */
}

/* Range pill switcher */
.chart-range {
  display: inline-flex;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.chart-range__btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.chart-range__btn:hover { color: var(--text); }
.chart-range__btn--active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 1px 2px rgba(15, 20, 25, 0.06);
}

/* The chart canvas itself */
[data-chart] {
  width: 100%;
  height: 220px;
  display: block;
  position: relative;
}
[data-chart] svg {
  width: 100%; height: 100%; display: block;
}
[data-chart] .chart__line {
  stroke: var(--brand);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-chart] .chart__area {
  fill: rgba(29, 78, 216, 0.08);
  stroke: none;
}
[data-chart] .chart__dots circle {
  fill: #fff;
  stroke: var(--brand);
  stroke-width: 2;
}
[data-chart] .chart__grid line {
  stroke: var(--border-soft);
  stroke-width: 1;
}
[data-chart] .chart__axis text {
  fill: var(--text-faint);
  font-size: 11px;
  font-family: inherit;
}
[data-chart].chart--loading {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.2s;
}
.chart__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 14px;
}


/* ================================================================
   Tables
   ================================================================ */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
.table th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.table tr:last-child td { border-bottom: none; }


/* ================================================================
   Status badges
   ================================================================ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge--pending  { background: var(--warning-bg); color: var(--warning); }
.badge--approved { background: var(--success-bg); color: var(--success); }
.badge--declined { background: var(--danger-bg);  color: var(--danger);  }
.badge--archived { background: var(--surface-2);  color: var(--text-muted); }
.badge--paused   { background: var(--info-bg);    color: var(--info); }


/* ================================================================
   Responsive — collapse to single column under 880px
   ================================================================ */
@media (max-width: 1024px) {
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  :root { --sidebar-w: 0px; }

  /* Hide topbar user name on tiny screens, keep avatar */
  .topbar__user-name { display: none; }
  .topbar__brand-text { font-size: 16px; }

  /* Sidebar becomes a horizontal scroller below the topbar */
  .sidebar {
    position: static;
    top: auto;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 12px;
  }
  .sidebar__section, .sidebar__bottom { display: none; }
  .sidebar__item { font-size: 13px; padding: 8px 10px; }
  .sidebar__item--active::before { display: none; }

  .main { margin-left: 0; padding: 20px 16px 40px; }
}


/* ================================================================
   Queue review cards (Real-ID, Groups, Reports, Unlocks)
   ================================================================ */
.review-card { padding: 20px 22px; }
.review-card + .review-card { margin-top: 16px; }
.review-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}
.review-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.review-card__body {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.review-card__body h3 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.review-card__quote {
  background: var(--surface-2);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 14px;
  margin: 0;
}
.review-card__actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}


/* ================================================================
   Dialog (decline / deny modals)
   ================================================================ */
dialog.dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 32px rgba(15, 20, 25, 0.16);
}
dialog.dialog::backdrop {
  background: rgba(15, 20, 25, 0.4);
  backdrop-filter: blur(2px);
}
dialog.dialog h3 { margin: 0 0 8px; }
dialog.dialog form { margin: 0; }


/* ================================================================
   Users page — filters, table, peace pills, pagination
   ================================================================ */

.users-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.users-filters__search {
  flex: 1;
  min-width: 240px;
  position: relative;
  display: flex;
  align-items: center;
}
.users-filters__search i[data-lucide="search"] {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  pointer-events: none;
}
.users-filters__search input {
  width: 100%;
  padding: 10px 36px 10px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.users-filters__search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}
.users-filters__clear {
  position: absolute;
  right: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-faint);
  background: var(--surface-2);
}
.users-filters__clear:hover { color: var(--text); text-decoration: none; }
.users-filters__clear i { width: 14px; height: 14px; }

.users-filters__select {
  width: auto;
  padding: 10px 12px;
  font-size: 14px;
}

/* Users table */
.users-table th, .users-table td {
  padding: 12px 16px;
  vertical-align: middle;
}
.users-table tbody tr:hover {
  background: var(--surface-2);
}
.users-table__user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.users-table__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  overflow: hidden;
  flex-shrink: 0;
}
.users-table__avatar img { width: 100%; height: 100%; object-fit: cover; }
.users-table__name strong {
  display: inline;
  margin-right: 4px;
}
.users-table__icon { width: 14px; height: 14px; vertical-align: middle; margin-right: 2px; }
.users-table__meta {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Peace score pill — color reflects health */
.peace-pill {
  display: inline-block;
  min-width: 36px;
  padding: 3px 10px;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  background: var(--surface-2);
  color: var(--text);
}
.peace--high     { background: #dcfce7; color: #15803d; }   /* 90+   excellent */
.peace--good     { background: #e8efff; color: var(--brand); } /* 70–89 healthy */
.peace--watch    { background: #fef3c7; color: #b45309; }   /* 50–69 watchlist */
.peace--low      { background: #ffedd5; color: #c2410c; }   /* 30–49 concerning */
.peace--critical { background: #fee2e2; color: var(--danger); } /* 0–29  critical */

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.pagination__info {
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .users-filters__select { width: 100%; }
  .users-table th:nth-child(4),
  .users-table td:nth-child(4),
  .users-table th:nth-child(5),
  .users-table td:nth-child(5) {
    display: none;            /* hide Joined + Last seen on narrow screens */
  }
  .users-table__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
}


/* ================================================================
   User detail page
   ================================================================ */

.user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.user-actions .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.user-profile {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.user-profile__avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 32px;
  overflow: hidden;
  flex-shrink: 0;
}
.user-profile__avatar img {
  width: 100%; height: 100%; object-fit: cover;
}

/* Key-value table used in profile + verification cards */
.kv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.kv-table th, .kv-table td {
  padding: 6px 0;
  text-align: left;
  vertical-align: top;
  border: none;
}
.kv-table th {
  width: 110px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-right: 16px;
}
.kv-table td {
  color: var(--text);
  word-break: break-word;
}

/* Big peace pill display */
.peace-display {
  display: flex;
  align-items: center;
  gap: 16px;
}
.peace-pill--big {
  min-width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
}
.peace-display__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Notes list */
.notes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.notes-list__item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.notes-list__item:last-child { border-bottom: none; }
.notes-list__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.notes-list__head .text-muted { font-size: 12px; }

/* Mobile */
@media (max-width: 720px) {
  .user-profile { flex-direction: column; align-items: stretch; }
  .user-profile__avatar { width: 56px; height: 56px; font-size: 22px; }
  .peace-pill--big { min-width: 64px; height: 64px; font-size: 22px; }
}


/* ================================================================
   User moderation modals + peace presets
   ================================================================ */

.peace-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.peace-presets .btn {
  font-variant-numeric: tabular-nums;
}

.dialog__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}


/* ================================================================
   Dashboard greeting card with weather
   ================================================================ */

.greeting {
  position: relative;
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 60%, #1e3a8a 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(15, 20, 25, 0.10);
  margin-bottom: 24px;
}
.greeting::before {
  /* subtle radial accent */
  content: "";
  position: absolute;
  right: -120px; top: -120px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(31, 169, 255, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.greeting__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.greeting__text { min-width: 0; }
.greeting__time {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 6px;
}
.greeting__name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: #fff;
  line-height: 1.1;
}
.greeting__name .wave {
  display: inline-block;
  margin-left: 8px;
  animation: wave 2s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  10%      { transform: rotate(14deg); }
  20%      { transform: rotate(-8deg); }
  30%      { transform: rotate(14deg); }
  40%      { transform: rotate(-4deg); }
  50%      { transform: rotate(10deg); }
  60%      { transform: rotate(0deg); }
}
.greeting__sub {
  margin-top: 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}
.greeting__sub strong { color: #fff; }
.greeting__sub em {
  font-style: normal;
  color: var(--cyan);
  font-weight: 400;
}
.greeting__url {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
.greeting__url a {
  color: var(--cyan);
  text-decoration: none;
}
.greeting__url a:hover { text-decoration: underline; }

/* Weather widget on the right of the greeting */
.weather {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  min-width: 200px;
}
.weather__icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.weather__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}
.weather__icon i {
  width: 36px; height: 36px;
  color: var(--cyan);
}
.weather__info { line-height: 1.2; }
.weather__temp {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.weather__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  text-transform: capitalize;
  margin-top: 2px;
}
.weather__city {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.weather__city i { width: 11px; height: 11px; }

@media (max-width: 720px) {
  .greeting { padding: 22px; }
  .greeting__inner { grid-template-columns: 1fr; }
  .greeting__name { font-size: 1.6rem; }
  .weather { width: 100%; }
}


/* ================================================================
   Settings page
   ================================================================ */

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 720px) {
  .settings-grid { grid-template-columns: 1fr; }
}

.settings-form {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
}
.settings-form h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

/* Big TOTP regenerate display */
.totp-display {
  background: var(--warning-bg);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 20px;
}
.totp-display h3 { color: var(--warning); }
.totp-display__inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}
.totp-display__qr {
  width: 220px;
  height: 220px;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.totp-display__qr canvas,
.totp-display__qr img {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.totp-display__secret {
  display: block;
  background: #fff;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  letter-spacing: 0.05em;
  word-break: break-all;
}
@media (max-width: 720px) {
  .totp-display__inner { grid-template-columns: 1fr; }
  .totp-display__qr { width: 100%; height: auto; max-width: 280px; margin: 0 auto; }
}


/* ================================================================
   Backup codes display
   ================================================================ */

.backup-codes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: #fff;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
@media (max-width: 720px) {
  .backup-codes { grid-template-columns: 1fr; }
}
.backup-codes__code {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 10px 8px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  user-select: all;
}

.backup-status {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.backup-status__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.backup-status__row > div { flex: 1; min-width: 200px; }

/* Print mode: show ONLY the backup codes when printing */
@media print {
  body * { visibility: hidden; }
  .totp-display, .totp-display * { visibility: visible; }
  .totp-display { position: absolute; top: 0; left: 0; width: 100%; }
  .topbar, .sidebar, .flash, button { display: none !important; }
}

/* ================================================================
   APPEND TO /var/www/html/hub-veraliaglobe/assets/css/hub.css
   Adds the audit filters layout.
   ================================================================ */

.audit-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}
.audit-filters__field { display: flex; flex-direction: column; gap: 6px; }
.audit-filters__actions {
  display: flex;
  gap: 8px;
  align-items: end;
  padding-bottom: 0;
}
@media (max-width: 720px) {
  .audit-filters { grid-template-columns: 1fr; }
  .audit-filters__actions { justify-content: flex-end; }
}

/* ================================================================
   APPEND TO /var/www/html/hub-veraliaglobe/assets/css/hub.css
   Enrollment page (first-time 2FA setup) layout.
   ================================================================ */

.auth-card--wide {
  max-width: 720px;
}

.enroll-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 16px;
}
.enroll-grid__qr {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.enroll-grid__form { min-width: 0; }

@media (max-width: 600px) {
  .enroll-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}