/* ============================================================
   Glowtalent — Internal Password Manager
   ============================================================ */

:root {
  --bg: #f7f6fa;
  --bg-elev: #ffffff;
  --bg-sunken: #f0eef5;
  --bg-sidebar: #14101e;
  --bg-sidebar-hover: #211a35;
  --bg-sidebar-active: #2c2148;
  --border: #e6e3ed;
  --border-strong: #d4cfdf;
  --border-sidebar: #221a36;

  --fg: #1a142a;
  --fg-muted: #5e5872;
  --fg-subtle: #8c8699;
  --fg-on-dark: #ece8f5;
  --fg-on-dark-muted: #9890ac;

  --accent: #6b00ff;
  --accent-hover: #5800d6;
  --accent-soft: #efe6ff;

  --success: #1f7a4d;
  --success-bg: #e6f3ec;
  --success-border: #bfe0cc;

  --danger: #b3261e;
  --danger-bg: #fbeae8;
  --danger-border: #f3c8c4;

  --warning: #8a5a00;
  --warning-bg: #fdf4dc;
  --warning-border: #f0dba0;

  --neutral-bg: #f0eef5;
  --neutral-border: #ddd8e7;

  --shadow-sm: 0 1px 2px rgba(26, 20, 42, 0.04);
  --shadow-md: 0 4px 14px rgba(26, 20, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(26, 20, 42, 0.22);

  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 10px;

  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --sidebar-w: 224px;
  --topbar-h: 56px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ---------- App shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
.app[data-density="compact"] .page { padding-top: 18px; padding-bottom: 24px; }
.app[data-density="compact"] .panel-body { padding: 12px; }
.app[data-density="compact"] .t th,
.app[data-density="compact"] .t td { padding-top: 8px; padding-bottom: 8px; }
.app[data-density="compact"] .stat { padding: 14px; }
.app[data-density="compact"] .page-header { margin-bottom: 16px; }

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--bg-sidebar);
  color: var(--fg-on-dark);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-sidebar);
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border-sidebar);
}
.sidebar-brand-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  color: #b794ff;
  flex-shrink: 0;
}
.sidebar-brand-mark svg { width: 100%; height: 100%; }
.sidebar-brand-name {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.2px;
}
.sidebar-brand-org {
  font-size: 11px;
  color: var(--fg-on-dark-muted);
  margin-top: 1px;
}

.sidebar-section {
  padding: 14px 12px 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-on-dark-muted);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 16px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 16px;
  margin: 1px 8px;
  border-radius: var(--radius-sm);
  color: var(--fg-on-dark);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  border: none;
  background: transparent;
  width: calc(100% - 16px);
  text-align: left;
  transition: background 0.08s;
}
.sidebar-item:hover { background: var(--bg-sidebar-hover); }
.sidebar-item.active {
  background: var(--bg-sidebar-active);
  color: #fff;
}
.sidebar-item .icon { color: #9c92b8; width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-item.active .icon { color: #c9b8ff; }
.sidebar-item .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-on-dark-muted);
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 3px;
}
.sidebar-item.danger .count {
  background: rgba(179,38,30,0.25);
  color: #ffb8b3;
}

.sidebar-footer {
  border-top: 1px solid var(--border-sidebar);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #3a2a5c;
  color: #d6c8f5;
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.sidebar-footer-info { min-width: 0; flex: 1; }
.sidebar-footer-name { font-size: 12.5px; font-weight: 500; }
.sidebar-footer-role { font-size: 11px; color: var(--fg-on-dark-muted); }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--topbar-h);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.search {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.search input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--bg-sunken);
  outline: none;
  color: var(--fg);
  transition: border 0.1s, background 0.1s;
}
.search input:focus { background: #fff; border-color: var(--accent); }
.search input::placeholder { color: var(--fg-subtle); }
.search .icon { position: absolute; left: 10px; top: 9px; color: var(--fg-subtle); }
.search .kbd {
  position: absolute; right: 8px; top: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-subtle);
  background: #fff;
  border: 1px solid var(--border);
  padding: 2px 5px;
  border-radius: 3px;
  cursor: pointer;
}
.search .kbd:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.role-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--accent-soft);
  border: 1px solid #dac8ff;
  border-radius: 20px;
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 500;
}
.role-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.icon-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-muted);
  display: grid; place-items: center;
  cursor: pointer;
  position: relative;
}
.icon-btn:hover { background: var(--bg-sunken); color: var(--fg); }
.icon-btn .pulse {
  position: absolute;
  top: 6px; right: 7px;
  width: 7px; height: 7px;
  background: var(--danger);
  border: 1.5px solid var(--bg-elev);
  border-radius: 50%;
}

/* ---------- Page ---------- */
.page {
  flex: 1;
  padding: 24px 28px 48px;
  max-width: 1480px;
  width: 100%;
}
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 24px;
}
.page-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.page-subtitle { color: var(--fg-muted); font-size: 13px; margin: 0; }
.breadcrumb {
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.breadcrumb a { color: var(--fg-muted); text-decoration: none; cursor: pointer; }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--fg);
  cursor: pointer;
  transition: background 0.08s, border-color 0.08s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-sunken); border-color: var(--border-strong); }
.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.secondary {
  color: var(--accent);
  border-color: var(--border-strong);
  background: var(--bg-elev);
}
.btn.secondary:hover { background: var(--accent-soft); border-color: #cdb8ff; }
.btn.danger {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--bg-elev);
}
.btn.danger:hover { background: var(--danger-bg); }
.btn.ghost {
  border-color: transparent;
  background: transparent;
}
.btn.ghost:hover { background: var(--bg-sunken); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 11.5px; }
.btn.lg { height: 38px; padding: 0 16px; font-size: 13.5px; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Cards / Panels ---------- */
.panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.panel-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.panel-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  display: flex; align-items: center; gap: 8px;
}
.panel-meta { font-size: 11.5px; color: var(--fg-muted); }
.panel-body { padding: 16px; }
.panel-body.flush { padding: 0; }

/* ---------- Stat tiles ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.stat-label {
  font-size: 11.5px;
  color: var(--fg-muted);
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.stat-value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
}
.stat-trend { font-size: 11.5px; color: var(--fg-muted); margin-top: 4px; }
.stat.danger .stat-value { color: var(--danger); }
.stat.warning .stat-value { color: var(--warning); }
.stat.info .stat-value { color: var(--accent); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
table.t th {
  text-align: left;
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--bg-sunken);
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
table.t td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.t tr:last-child td { border-bottom: none; }
table.t tbody tr { transition: background 0.05s; }
table.t tbody tr:hover { background: #fafbfc; }
table.t tbody tr.selected { background: var(--accent-soft); }
table.t td.tight { padding-top: 6px; padding-bottom: 6px; }
.cred-name {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cred-name .icon-tile {
  width: 28px; height: 28px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.cred-name .icon-tile.prod { background: #fbeae8; color: var(--danger); border-color: var(--danger-border); }
.cred-name .icon-tile.dev { background: #e6f3ec; color: var(--success); border-color: var(--success-border); }
.cred-name .icon-tile.staging { background: #fdf4dc; color: var(--warning); border-color: var(--warning-border); }
.cred-sub { font-size: 11.5px; color: var(--fg-muted); font-family: var(--font-mono); }
.row-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.1s;
  flex-wrap: nowrap;
}
table.t tbody tr:hover .row-actions { opacity: 1; }
.icon-btn.sm { width: 26px; height: 26px; }

.mobile-only {
  display: none;
}

.text-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.text-link:hover {
  color: var(--accent);
}

.credential-mobile-list {
  gap: 10px;
}

.credential-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-card);
}

.credential-card.selected {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.credential-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.credential-card .icon-tile {
  width: 34px;
  height: 34px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.credential-card .icon-tile.prod { background: #fbeae8; color: var(--danger); border-color: var(--danger-border); }
.credential-card .icon-tile.dev { background: #e6f3ec; color: var(--success); border-color: var(--success-border); }
.credential-card .icon-tile.staging { background: #fdf4dc; color: var(--warning); border-color: var(--warning-border); }

.credential-card-title {
  min-width: 0;
}

.credential-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.credential-card-meta span {
  display: block;
  margin-bottom: 3px;
  color: var(--fg-subtle);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.credential-card-meta strong {
  display: block;
  min-width: 0;
  color: var(--fg);
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.credential-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.credential-card-actions .btn {
  justify-content: center;
}

.credential-card-menu {
  margin-top: 10px;
  padding: 10px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.credential-card-menu .btn {
  justify-content: center;
  min-height: 44px;
}

.credential-card-menu .btn.danger {
  grid-column: 1 / -1;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-sans);
  border: 1px solid var(--neutral-border);
  background: var(--neutral-bg);
  color: var(--fg-muted);
  white-space: nowrap;
  line-height: 1.6;
}
.badge.success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.badge.warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: #dac8ff; }
.badge.mono { font-family: var(--font-mono); font-size: 10.5px; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* env pills */
.env-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 6px 2px;
  border-radius: 3px;
  border: 1px solid;
}
.env-prod { color: var(--danger); border-color: var(--danger-border); background: var(--danger-bg); }
.env-staging { color: var(--warning); border-color: var(--warning-border); background: var(--warning-bg); }
.env-dev { color: var(--success); border-color: var(--success-border); background: var(--success-bg); }
.env-client { color: var(--accent); border-color: #dac8ff; background: var(--accent-soft); }
.env-internal { color: var(--fg-muted); border-color: var(--neutral-border); background: var(--neutral-bg); }

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  font-size: 12px;
  color: var(--fg-muted);
  cursor: pointer;
}
.filter-chip:hover { background: var(--bg-sunken); color: var(--fg); }
.filter-chip.active { background: var(--accent-soft); border-color: #dac8ff; color: var(--accent); }
.filter-chip strong { color: var(--fg); font-weight: 500; }

/* ---------- Vault cards ---------- */
.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.vault-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.1s, box-shadow 0.1s;
}
.vault-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.vault-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.vault-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--fg-muted);
}
.vault-name { font-size: 14px; font-weight: 600; }
.vault-path { font-size: 11.5px; color: var(--fg-muted); font-family: var(--font-mono); }
.vault-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  column-gap: 14px;
  row-gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 11.5px;
  color: var(--fg-muted);
}
.vault-stats strong { color: var(--fg); font-family: var(--font-mono); font-weight: 600; }
.vault-updated {
  min-width: 0;
}
.vault-card-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-start;
  gap: 6px;
}
.vault-access-warning,
.vault-access-warning strong,
.duration-long {
  color: var(--warning);
}

/* ---------- Detail layout ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
}
.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px 16px;
  padding: 14px 16px;
}
.kv dt {
  font-size: 11.5px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
  padding-top: 2px;
}
.kv dd {
  margin: 0;
  font-size: 13px;
}
.kv dd code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-sunken);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
}
.password-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  width: fit-content;
  min-width: 280px;
}
.password-field .dots { letter-spacing: 3px; color: var(--fg-muted); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 26, 43, 0.45);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fade 0.12s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: rise 0.14s ease-out;
}
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal.wide { max-width: 640px; }
.modal-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.modal-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  display: flex; align-items: center; gap: 10px;
}
.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg-sunken);
  flex-shrink: 0;
}

.field { margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field-input, .field-textarea, .field-select {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-elev);
  outline: none;
  color: var(--fg);
}
.field-textarea { height: auto; padding: 8px 10px; min-height: 64px; resize: vertical; line-height: 1.5; }
.field-input:focus, .field-textarea:focus, .field-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(107, 0, 255, 0.14); }
.field-hint { font-size: 11.5px; color: var(--fg-muted); margin-top: 4px; }

.choice-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.choice {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 12px;
  cursor: pointer;
  color: var(--fg);
}
.choice:hover { border-color: var(--border-strong); }
.choice.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 500; }

.license-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.license-preset {
  min-height: 52px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--fg);
  text-align: left;
  padding: 8px 9px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.license-preset:hover {
  border-color: var(--border-strong);
  background: var(--bg-sunken);
}

.license-preset.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.license-preset span {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
}

.license-preset small {
  display: block;
  margin-top: 3px;
  color: var(--fg-muted);
  font-size: 11px;
  line-height: 1.2;
}

.mfa-digits {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 6px 0 8px;
}
.mfa-digit {
  width: 44px; height: 52px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  background: var(--bg-elev);
  color: var(--fg);
  outline: none;
}
.mfa-digit:focus, .mfa-digit.filled { border-color: var(--accent); }

/* ---------- Alerts inline ---------- */
.alert {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid;
  border-radius: var(--radius);
  font-size: 12.5px;
  align-items: flex-start;
}
.alert .icon { flex-shrink: 0; margin-top: 1px; }
.alert.warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning); }
.alert.danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.alert.info { background: var(--accent-soft); border-color: #dac8ff; color: var(--accent); }
.alert .title { font-weight: 600; }
.alert .body { color: inherit; opacity: 0.95; margin-top: 2px; }

/* ---------- Reveal countdown ---------- */
.reveal-box {
  background: linear-gradient(135deg, #1f1538, var(--bg-sidebar));
  color: var(--fg-on-dark);
  padding: 14px 16px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 18px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid #2c2148;
}
.reveal-countdown {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-on-dark-muted);
  display: flex; align-items: center; gap: 6px;
}
.countdown-bar {
  height: 3px;
  background: var(--bg-sunken);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}
.countdown-bar > div {
  height: 100%;
  background: var(--accent);
  transition: width 1s linear;
}

/* ---------- Activity feed ---------- */
.activity {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  align-items: flex-start;
}
.activity:last-child { border-bottom: none; }
.activity .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fg-subtle);
  margin-top: 6px;
  flex-shrink: 0;
}
.activity.success .dot { background: var(--success); }
.activity.danger .dot { background: var(--danger); }
.activity.warning .dot { background: var(--warning); }
.activity-body { flex: 1; min-width: 0; }
.activity-msg { color: var(--fg); }
.activity-meta {
  font-size: 11.5px;
  color: var(--fg-muted);
  margin-top: 2px;
  font-family: var(--font-mono);
}
.activity-user { font-weight: 500; }

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
}
.login-aside {
  background: radial-gradient(circle at 80% 20%, #2a1a4f 0%, var(--bg-sidebar) 55%);
  color: var(--fg-on-dark);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.login-aside > * { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 16px; }
.login-brand .mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  color: #b794ff;
  flex-shrink: 0;
}
.login-brand .mark svg { width: 100%; height: 100%; }
.login-headline {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 380px;
}
.login-headline span { color: #b794ff; }
.login-points { color: var(--fg-on-dark-muted); font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.login-points li { display: flex; gap: 10px; align-items: flex-start; }
.login-points .check { color: #9a7fff; margin-top: 2px; }
.login-foot { font-size: 11.5px; color: var(--fg-on-dark-muted); font-family: var(--font-mono); }
.login-main {
  display: grid;
  place-items: center;
  padding: 48px;
}
.login-mobile-brand {
  display: none;
}
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { font-size: 22px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }
.login-card p.lead { color: var(--fg-muted); margin: 0 0 24px; font-size: 13px; }

.sso-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 44px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius);
  padding: 0 14px;
  font-size: 13.5px;
  color: var(--fg);
  cursor: pointer;
  font-weight: 500;
}
.sso-btn:hover { background: var(--bg-sunken); border-color: var(--border-strong); }
.sso-btn .provider {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 4px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid #dac8ff;
}
.sso-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.sso-btn.primary:hover { background: var(--accent-hover); }
.sso-btn.primary .provider { background: rgba(255,255,255,0.15); color: #fff; border-color: rgba(255,255,255,0.25); }

.divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--fg-subtle); font-size: 11px;
  margin: 18px 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

.secure-banner {
  margin-top: 24px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-sunken);
  font-size: 11.5px;
  color: var(--fg-muted);
  display: flex; gap: 8px;
  align-items: flex-start;
}

/* ---------- Empty / progress ---------- */
.empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--fg-muted);
  font-size: 12.5px;
}
.empty .icon-tile {
  width: 40px; height: 40px;
  margin: 0 auto 10px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid; place-items: center;
  color: var(--fg-subtle);
}

.bar {
  height: 4px;
  background: var(--bg-sunken);
  border-radius: 2px;
  overflow: hidden;
}
.bar > div { height: 100%; background: var(--accent); }
.bar.danger > div { background: var(--danger); }
.bar.warning > div { background: var(--warning); }
.bar.success > div { background: var(--success); }

/* ---------- Section title in panel ---------- */
.section-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 6px 0 10px;
}
.section-row h3 {
  margin: 0; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--fg-muted);
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 2px;
  margin-bottom: 16px;
}
.tab {
  padding: 8px 14px;
  font-size: 12.5px;
  color: var(--fg-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-weight: 500;
  margin-bottom: -1px;
}
.tab:hover { color: var(--fg); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab .count { margin-left: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--fg-subtle); }

/* ---------- Two-col page split ---------- */
.split-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.split-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ---------- Critical row tag (offboarding) ---------- */
.rotation-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.rotation-row:last-child { border-bottom: none; }
.rotation-row .icon-tile { width: 24px; height: 24px; }

/* Misc */
.mono { font-family: var(--font-mono); }
.muted { color: var(--fg-muted); }
.small { font-size: 11.5px; }
.tag-strong { color: var(--fg); font-weight: 500; }
.divider-h { height: 1px; background: var(--border); margin: 14px 0; }
.scroll-cap { max-height: 360px; overflow-y: auto; }

.badge.neutral { background: var(--neutral-bg); color: var(--fg-muted); border-color: var(--neutral-border); }

.one-time-secret-input {
  min-height: 140px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.one-time-secret-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.one-time-secret-toolbar .field-label { margin-bottom: 0; }

.one-time-created {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--success-border);
  background: var(--success-bg);
  border-radius: var(--radius);
}
.one-time-created h4 { margin: 0 0 4px; font-size: 15px; }
.one-time-created p { margin: 0 0 12px; }
.one-time-created .icon-tile {
  color: var(--success);
  border-color: var(--success-border);
  background: var(--bg-elev);
}
.one-time-link-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.one-time-link-box code {
  min-width: 0;
  display: block;
  overflow: auto;
  padding: 9px 10px;
  border: 1px solid var(--success-border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.72);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: nowrap;
}

.one-time-public-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(107,0,255,0.08), rgba(31,122,77,0.08)),
    var(--bg);
}
.one-time-public {
  width: min(100%, 620px);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px;
}
.one-time-public-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  margin-bottom: 16px;
}
.one-time-public .eyebrow {
  margin: 0 0 6px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 700;
}
.one-time-public h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.05;
}
.one-time-public h2 {
  margin: 0;
  font-size: 18px;
}
.one-time-public-warning {
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid var(--warning-border);
  border-radius: var(--radius);
  background: var(--warning-bg);
  color: var(--warning);
}
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  font-weight: 600;
}
.btn-primary { color: #fff; background: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.58; cursor: not-allowed; }
.btn-secondary { color: var(--accent); background: var(--bg-elev); }
.one-time-result {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-sunken);
  overflow: hidden;
}
.one-time-result .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}
.one-time-result pre {
  margin: 0;
  padding: 16px;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  color: var(--fg);
}
#one-time-status {
  margin-top: 10px;
  min-height: 20px;
}
#one-time-status[data-tone="success"] { color: var(--success); }
#one-time-status[data-tone="danger"] { color: var(--danger); }

.toast-stack {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 200;
}
.toast {
  background: var(--bg-sidebar); color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 12.5px;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  min-width: 220px;
  animation: rise 0.15s ease-out;
}
.toast .check { color: #7fc2a0; }

/* Responsive (tablet) */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .split-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 60px; }
  .sidebar-brand-name, .sidebar-brand-org,
  .sidebar-section, .sidebar-item span:not(.count),
  .sidebar-footer-info { display: none; }
  .sidebar-item { justify-content: center; }
}

/* Responsive (phone) */
@media (max-width: 640px) {
  :root {
    --sidebar-w: 0px;
    --topbar-h: auto;
  }

  html, body {
    font-size: 13px;
    overflow-x: hidden;
  }

  .app {
    display: block;
    min-height: 100dvh;
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .main { min-width: 0; }

  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: auto;
    z-index: 80;
    border-right: none;
    border-top: 1px solid var(--border-sidebar);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .sidebar-brand,
  .sidebar-section,
  .sidebar-footer {
    display: none;
  }

  .sidebar-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(78px, 1fr);
    gap: 2px;
    overflow-x: auto;
    padding: 8px 8px 10px;
    scrollbar-width: none;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }

  .sidebar-item {
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 6px 8px;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border-radius: 8px;
    font-size: 10.5px;
    line-height: 1.1;
  }

  .sidebar-item span:not(.count) {
    display: block;
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar-item .icon {
    width: 18px;
    height: 18px;
  }

  .sidebar-item .count {
    position: absolute;
    top: 4px;
    right: 10px;
    margin-left: 0;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    height: auto;
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .search {
    order: 2;
    flex: 1 0 100%;
    max-width: none;
  }

  .search input {
    height: 40px;
    font-size: 16px;
    padding-right: 12px;
  }
  .search .icon { top: 12px; }
  .search .kbd { display: none; }

  .topbar-right {
    order: 1;
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
    gap: 6px;
  }

  .role-pill {
    min-height: 36px;
    border-radius: 8px;
    flex: 1;
    justify-content: center;
  }

  .icon-btn {
    min-width: 42px;
    min-height: 42px;
  }

  .page {
    padding: 16px 12px 28px;
    max-width: none;
  }

  .page-header {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
  }

  .page-header > div:last-child {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  .page-header > div:last-child .btn {
    flex: 1 1 150px;
    justify-content: center;
  }

  .page-title {
    font-size: 19px;
    line-height: 1.2;
  }

  .page-subtitle {
    font-size: 12.5px;
  }

  .breadcrumb {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
  }

  .btn {
    min-height: 42px;
    height: auto;
    padding: 8px 12px;
    white-space: normal;
    justify-content: center;
    text-align: center;
  }

  .btn.sm {
    min-height: 38px;
    height: auto;
    padding: 7px 10px;
  }

  .filter-bar {
    padding: 10px;
    align-items: stretch;
    gap: 7px;
  }

  .filter-chip {
    min-height: 36px;
    justify-content: center;
    flex: 1 1 auto;
    text-align: center;
  }

  .filter-bar > div[style*="margin-left: auto"] {
    flex-basis: 100%;
    margin-left: 0 !important;
    text-align: left;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .stat {
    padding: 12px;
  }

  .stat-value {
    font-size: 22px;
  }

  .split-2,
  .split-3,
  .detail-grid,
  .area-grid {
    grid-template-columns: 1fr !important;
  }

  .vault-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .vault-card {
    padding: 13px;
  }

  .vault-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .vault-updated,
  .vault-card-actions {
    grid-column: 1 / -1;
  }

  .vault-card-actions {
    justify-content: flex-start;
    margin-left: 0;
  }

  .desktop-credential-table {
    display: none;
  }

  .credential-mobile-list.mobile-only {
    display: grid;
  }

  .credential-card {
    border-radius: 8px;
  }

  .credential-card .cred-sub {
    overflow-wrap: anywhere;
  }

  .credential-card-actions .btn {
    min-height: 44px;
  }

  .table-wrap {
    margin-left: -1px;
    margin-right: -1px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table.t {
    min-width: 760px;
  }

  table.t th,
  table.t td {
    padding: 9px 10px;
  }

  .row-actions {
    opacity: 1;
    gap: 6px;
  }

  .row-actions .icon-btn {
    width: 38px;
    height: 38px;
  }

  .panel-header,
  .panel-footer {
    flex-wrap: wrap;
    gap: 8px;
  }

  .kv {
    grid-template-columns: 1fr;
    gap: 4px 0;
    padding: 12px;
  }

  .password-field {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
  }

  .one-time-secret-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .one-time-secret-toolbar .btn {
    justify-content: center;
    width: 100%;
  }

  .modal-backdrop {
    place-items: end center;
    padding: 0;
    backdrop-filter: blur(3px);
  }

  .modal,
  .modal.wide {
    max-width: none;
    width: 100%;
    max-height: 92dvh;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
  }

  .modal-header {
    padding: 14px 16px 12px;
    flex-shrink: 0;
  }

  .modal-title {
    font-size: 14px;
    line-height: 1.25;
    flex-wrap: wrap;
  }

  .modal-body {
    padding: 14px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-footer {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    flex-shrink: 0;
    flex-wrap: wrap;
  }

  .modal-footer .btn {
    flex: 1 1 130px;
  }

  .field-input,
  .field-textarea,
  .field-select {
    min-height: 42px;
    font-size: 16px;
  }

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

  .choice {
    min-height: 40px;
    display: grid;
    place-items: center;
  }

  .one-time-created {
    grid-template-columns: 1fr;
  }

  .one-time-link-box {
    grid-template-columns: 1fr;
  }

  .one-time-public-page {
    place-items: stretch;
    padding: 14px;
  }

  .one-time-public {
    align-self: center;
    padding: 20px;
  }

  .one-time-result .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .mfa-digits {
    gap: 5px;
  }

  .mfa-digit {
    width: 42px;
    height: 50px;
  }

  .reveal-box {
    font-size: 15px;
    align-items: flex-start;
    overflow-x: auto;
  }

  .toast-stack {
    left: 12px;
    right: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .toast {
    width: 100%;
    min-width: 0;
  }

  .login-page {
    display: block;
    min-height: 100dvh;
  }

  .login-aside {
    display: none;
  }

  .login-main {
    min-height: 100dvh;
    padding: 22px 20px 28px;
    place-items: start center;
    align-content: start;
  }

  .login-mobile-brand {
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto 20px;
    padding: 4px 0;
  }

  .login-mobile-brand img {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 16px 34px rgba(36, 18, 84, 0.16);
    flex-shrink: 0;
  }

  .login-mobile-brand-title {
    color: var(--fg);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
  }

  .login-mobile-brand-subtitle {
    margin-top: 3px;
    color: var(--fg-muted);
    font-size: 12px;
  }

  .login-card {
    max-width: 420px;
    padding-top: 0;
  }
}

@media (max-width: 420px) {
  .stat-grid {
    grid-template-columns: 1fr !important;
  }

  .topbar-right .role-pill {
    max-width: 160px;
  }

  .sidebar-nav {
    grid-auto-columns: minmax(76px, 1fr);
  }

  .mfa-digit {
    width: 39px;
  }
}
