:root {
  color-scheme: dark;
  --bg: #0b1220;
  --bg-alt: #0f1a2c;
  --card: #141d33;
  --card-soft: #17223b;
  --border: #233252;
  --text: #eef2f8;
  --muted: #9fb0cc;
  --accent: #4ea8de;
  --teal: #2dd4bf;
  --success: #34d399;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 20px 45px rgba(8, 14, 29, 0.55);
  --radius: 12px;
  --page-top-gap: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Sora", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% -20%, rgba(78, 168, 222, 0.25), transparent 60%),
    radial-gradient(900px 600px at 90% 0%, rgba(52, 211, 153, 0.2), transparent 55%),
    linear-gradient(135deg, var(--bg), #121c33 65%, #0d172b);
  min-height: 100vh;
}

body.theme-fade {
  --theme-fade-duration: 600s;
}

body.theme-fade,
body.theme-fade .sidebar,
body.theme-fade .topbar,
body.theme-fade .dashboard-topbar,
body.theme-fade .panel,
body.theme-fade .metric-card,
body.theme-fade .mini-card,
body.theme-fade .setting-card,
body.theme-fade .note-card,
body.theme-fade .file-card,
body.theme-fade .output-card,
body.theme-fade .vault-item,
body.theme-fade .auth-card,
body.theme-fade .otp-card,
body.theme-fade .master-card,
body.theme-fade .action-card,
body.theme-fade .topbar-search,
body.theme-fade .icon-button,
body.theme-fade .profile,
body.theme-fade .tag,
body.theme-fade .select,
body.theme-fade .toggle,
body.theme-fade .pill,
body.theme-fade .callout,
body.theme-fade .chart,
body.theme-fade .mini-bar,
body.theme-fade .list-icon,
body.theme-fade .metric-icon,
body.theme-fade .favorite-icon,
body.theme-fade .alert-badge,
body.theme-fade .nav-badge,
body.theme-fade .sidebar-card,
body.theme-fade .modal-overlay,
body.theme-fade .modal-card,
body.theme-fade .modal-close,
body.theme-fade .glass-toast-overlay,
body.theme-fade .glass-toast-card,
body.theme-fade .glass-toast-close,
body.theme-fade .glass-prompt-overlay,
body.theme-fade .glass-prompt-card,
body.theme-fade .glass-prompt-cancel,
body.theme-fade .glass-prompt-confirm {
  transition:
    background-color var(--theme-fade-duration, 600s) linear,
    background var(--theme-fade-duration, 600s) linear,
    color var(--theme-fade-duration, 600s) linear,
    border-color var(--theme-fade-duration, 600s) linear,
    box-shadow var(--theme-fade-duration, 600s) linear;
}

body[data-theme="alt"] {
  color-scheme: light;
  --bg: #f2f6ff;
  --bg-alt: #e5ecf8;
  --card: #ffffff;
  --card-soft: #f4f7fb;
  --border: #cdd7ea;
  --text: #0f172a;
  --muted: #4b5b75;
  --accent: #2f78c4;
  --teal: #0f9d8a;
  --success: #1f9d63;
  --warning: #c77700;
  --danger: #c62828;
  --shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

body[data-theme="alt"] {
  background: radial-gradient(1200px 800px at 10% -20%, rgba(78, 168, 222, 0.18), transparent 60%),
    radial-gradient(900px 600px at 90% 0%, rgba(45, 212, 191, 0.12), transparent 55%),
    linear-gradient(135deg, #eef2ff, #e6ecf7 60%, #dfe7f4);
}

body[data-theme="alt"] .panel,
body[data-theme="alt"] .metric-card,
body[data-theme="alt"] .mini-card,
body[data-theme="alt"] .setting-card,
body[data-theme="alt"] .note-card,
body[data-theme="alt"] .file-card,
body[data-theme="alt"] .output-card,
body[data-theme="alt"] .vault-item,
body[data-theme="alt"] .auth-card,
body[data-theme="alt"] .otp-card,
body[data-theme="alt"] .master-card {
  background: #f8fafd;
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

body[data-theme="alt"] .panel-header,
body[data-theme="alt"] .table th,
body[data-theme="alt"] .table td {
  border-color: rgba(148, 163, 184, 0.35);
}

body[data-theme="alt"] .ghost,
body[data-theme="alt"] .icon-button,
body[data-theme="alt"] .profile,
body[data-theme="alt"] .tag,
body[data-theme="alt"] .select,
body[data-theme="alt"] .toggle {
  background: #eef3fb;
  border-color: rgba(148, 163, 184, 0.5);
  color: #1f2a44;
}

body[data-theme="alt"] .notification-dropdown {
  background: linear-gradient(180deg, rgba(249, 251, 255, 0.98), rgba(236, 242, 250, 0.98));
  border-color: rgba(148, 163, 184, 0.45);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

body[data-theme="alt"] .notification-dropdown-item {
  background: #f8fafd;
  border-color: rgba(148, 163, 184, 0.35);
}

body[data-theme="alt"] .notification-dropdown-item:hover,
body[data-theme="alt"] .notification-dropdown-item:focus-visible {
  background: #eef4fb;
  border-color: rgba(47, 120, 196, 0.42);
}

body[data-theme="alt"] .notification-dropdown-message {
  color: #1f2a44;
}

body[data-theme="alt"] .notification-dropdown-meta {
  color: #4b5b75;
}

body[data-theme="alt"] .notification-dropdown-header,
body[data-theme="alt"] .notification-view-all {
  border-color: rgba(148, 163, 184, 0.35);
}

body[data-theme="alt"] .notification-view-all {
  background: #f8fafd;
}

body[data-theme="alt"] .pill {
  background: #eef3fb;
  border-color: rgba(148, 163, 184, 0.5);
}

body[data-theme="alt"] .callout {
  background: rgba(78, 168, 222, 0.12);
  border-color: rgba(78, 168, 222, 0.3);
}

body[data-theme="alt"] .chart,
body[data-theme="alt"] .chart.compact,
body[data-theme="alt"] .mini-bar,
body[data-theme="alt"] .chart-line svg,
body[data-theme="alt"] .chart-interactive svg {
  background: #f2f5fb;
  border-color: rgba(148, 163, 184, 0.35);
}

body[data-theme="alt"] .metric-track,
body[data-theme="alt"] .strength-track,
body[data-theme="alt"] .severity-track {
  background: rgba(148, 163, 184, 0.35);
}

body[data-theme="alt"] .field input,
body[data-theme="alt"] .field select,
body[data-theme="alt"] .field textarea,
body[data-theme="alt"] .auth-field input {
  background: #f8fafd;
  border-color: rgba(148, 163, 184, 0.5);
  color: #0f172a;
}

body[data-theme="alt"] .form-status,
body[data-theme="alt"] .auth-status {
  background: #f2f5fb;
  border-color: rgba(148, 163, 184, 0.5);
  color: #1f2a44;
}

body[data-theme="alt"] .auth-login .main {
  background: linear-gradient(150deg, #eef2ff 0%, #e3e9f6 45%, #dde5f4 100%);
}

body[data-theme="alt"] .auth-bg {
  background-image:
    radial-gradient(1200px 900px at 12% 10%, rgba(78, 168, 222, 0.25) 0%, rgba(78, 168, 222, 0.08) 40%, transparent 65%),
    radial-gradient(900px 700px at 78% 78%, rgba(45, 212, 191, 0.22) 0%, rgba(45, 212, 191, 0.08) 45%, transparent 70%),
    linear-gradient(135deg, rgba(238, 242, 255, 0.95) 0%, rgba(226, 233, 246, 0.9) 50%, rgba(219, 229, 244, 0.98) 100%);
}

body[data-theme="alt"] .chart-donut circle:first-child {
  stroke: #d7e0f0;
}

body[data-theme="alt"] .legend-item {
  background: #eef3fb;
  border-color: rgba(148, 163, 184, 0.5);
  color: #4b5b75;
}

body[data-theme="alt"] .legend-item.is-active {
  border-color: rgba(47, 120, 196, 0.55);
  color: #1f2a44;
}

body[data-theme="alt"] .chart-tooltip {
  background: #f8fafd;
  border-color: rgba(148, 163, 184, 0.45);
  color: #1f2a44;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

body[data-theme="alt"] .tooltip-row strong {
  color: #1f2a44;
}

body[data-theme="alt"] .risk-chart {
  background: linear-gradient(
    180deg,
    rgba(239, 68, 68, 0.1) 0%,
    rgba(245, 158, 11, 0.08) 24%,
    rgba(250, 204, 21, 0.08) 48%,
    rgba(78, 168, 222, 0.08) 72%,
    rgba(16, 185, 129, 0.08) 100%
  );
  border: 1px solid rgba(148, 163, 184, 0.35);
}

body[data-theme="alt"] .risk-band-label,
body[data-theme="alt"] .risk-y-axis,
body[data-theme="alt"] .risk-x-axis {
  color: rgba(71, 85, 105, 0.8);
}

body[data-theme="alt"] .risk-band-label.critical {
  color: rgba(220, 38, 38, 0.7);
}

body[data-theme="alt"] .risk-band-label.high {
  color: rgba(234, 88, 12, 0.7);
}

body[data-theme="alt"] .risk-band-label.moderate {
  color: rgba(202, 138, 4, 0.7);
}

body[data-theme="alt"] .risk-band-label.low {
  color: rgba(22, 163, 74, 0.7);
}

body[data-theme="alt"] .risk-marker {
  background: #f8fafd;
  border-color: rgba(47, 120, 196, 0.35);
  color: #1f2a44;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

body[data-theme="alt"] .risk-point {
  fill: #f8fafd;
  stroke: #2f78c4;
}

body[data-theme="alt"] .heatmap-header span,
body[data-theme="alt"] .heatmap-day,
body[data-theme="alt"] .heatmap-legend {
  color: #5c6c86;
}

body[data-theme="alt"] .heatmap-cell {
  background: rgba(148, 163, 184, 0.25);
}

body[data-theme="alt"] .line-point {
  stroke: rgba(148, 163, 184, 0.8);
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  /* remove top gap while preserving horizontal and bottom padding */
  padding: var(--page-top-gap) 24px 24px 24px;
}

.content-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
  grid-column: 2;
}
.main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
}

h1 {
  margin: 6px 0 0;
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  position: relative;
  overflow: visible;
  min-width: 0;
}

.topbar-identity {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-self: center;
  margin-left: auto;
  flex-shrink: 0;
}

.topbar-identity > * {
  flex-shrink: 0;
}

.ghost {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(35, 50, 82, 0.8);
  background: rgba(15, 26, 44, 0.8);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.ghost.small {
  padding: 6px 10px;
  font-size: 0.75rem;
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(20, 29, 51, 0.9);
  border-radius: 999px;
  padding: 6px 14px;
  border: 1px solid rgba(35, 50, 82, 0.6);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
  flex: 0 0 auto;
  min-width: 0;
  width: auto;
  justify-content: flex-start;
}

.profile-info {
  display: grid;
  min-width: 0;
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2dd4bf, #4ea8de);
  display: grid;
  place-items: center;
  color: #0b1220;
  font-weight: 700;
}

.profile-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-sub {
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ghost:hover,
.ghost:focus-visible {
  border-color: rgba(78, 168, 222, 0.75);
  background: linear-gradient(135deg, rgba(78, 168, 222, 0.3), rgba(45, 212, 191, 0.25));
  box-shadow: 0 8px 18px rgba(13, 30, 56, 0.45);
}

.ghost:active {
  transform: translateY(1px);
}

.profile:hover,
.profile:focus-visible {
  border-color: rgba(78, 168, 222, 0.7);
  box-shadow: 0 10px 24px rgba(13, 30, 56, 0.35);
}

.profile:active {
  transform: translateY(1px);
}

.icon-button {
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  position: relative;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: rgba(78, 168, 222, 0.75);
  background: linear-gradient(135deg, rgba(78, 168, 222, 0.32), rgba(45, 212, 191, 0.22));
  box-shadow: 0 10px 20px rgba(13, 30, 56, 0.45);
}

.icon-button:active {
  transform: translateY(1px);
}

.icon-button:hover::after,
.icon-button:focus-visible::after {
  content: attr(aria-label);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(6, 11, 20, 0.94);
  border: 1px solid rgba(78, 168, 222, 0.45);
  color: #e2e8f0;
  pointer-events: none;
}

.notification-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  align-self: center;
}

.notification-bell {
  overflow: visible;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(35, 50, 82, 0.7);
  background: rgba(12, 18, 32, 0.85);
  color: var(--text);
  flex: 0 0 auto;
  padding: 0;
}

.notification-menu.is-open .notification-bell {
  border-color: rgba(78, 168, 222, 0.82);
  background: linear-gradient(135deg, rgba(78, 168, 222, 0.34), rgba(45, 212, 191, 0.24));
  box-shadow: 0 12px 24px rgba(13, 30, 56, 0.42);
}

.notification-bell svg {
  width: 20px;
  height: 20px;
}

.notification-bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.35);
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: min(380px, calc(100vw - 24px));
  padding: 0;
  border-radius: 20px;
  border: 1px solid rgba(35, 50, 82, 0.72);
  background: linear-gradient(180deg, rgba(20, 29, 51, 0.98), rgba(11, 18, 32, 0.98));
  box-shadow: 0 24px 48px rgba(8, 14, 29, 0.5);
  overflow: hidden;
  z-index: 70;
}

.notification-dropdown[hidden] {
  display: none !important;
}

.notification-dropdown-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(35, 50, 82, 0.45);
}

.notification-dropdown-list {
  display: grid;
  gap: 2px;
  max-height: 380px;
  overflow: auto;
  padding: 8px;
}

.notification-dropdown-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: rgba(12, 18, 32, 0.72);
  border: 1px solid rgba(35, 50, 82, 0.55);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.notification-dropdown-item:visited {
  color: inherit;
  text-decoration: none;
}

.notification-dropdown-item:hover,
.notification-dropdown-item:focus-visible {
  border-color: rgba(78, 168, 222, 0.62);
  background: rgba(22, 34, 58, 0.94);
  transform: translateY(-1px);
}

.notification-dropdown-icon {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(78, 168, 222, 0.14);
}

.notification-dropdown-icon.critical,
.notification-dropdown-icon.high {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.14);
}

.notification-dropdown-icon.warning,
.notification-dropdown-icon.medium {
  background: var(--warning);
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.14);
}

.notification-dropdown-icon.info,
.notification-dropdown-icon.low {
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(45, 212, 191, 0.14);
}

.notification-dropdown-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.notification-dropdown-message {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-dropdown-meta {
  color: var(--muted);
  font-size: 0.74rem;
  font-family: "IBM Plex Mono", monospace;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.notification-dropdown-separator {
  margin: 0 6px;
}

.notification-dropdown-empty {
  margin: 8px;
}

.notification-view-all {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(35, 50, 82, 0.45);
  border-radius: 0;
  padding: 12px 16px;
  background: rgba(12, 18, 32, 0.82);
  text-decoration: none;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.metric-card {
  background: var(--card);
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(35, 50, 82, 0.6);
  box-shadow: var(--shadow);
}

.metric-card.warn {
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.12), rgba(245, 158, 11, 0.12));
}

.metric-header {
  font-size: 0.85rem;
  color: var(--muted);
}

.metric-value {
  font-size: 2.2rem;
  margin: 8px 0;
  font-weight: 600;
}

.metric-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.metric-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.metric-bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--accent));
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(35, 50, 82, 0.8);
  background: rgba(12, 18, 32, 0.8);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.pill.success {
  border-color: rgba(52, 211, 153, 0.4);
  color: var(--success);
}

.pill.warning {
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--warning);
}

.pill.danger {
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger);
}

.pill.info {
  border-color: rgba(78, 168, 222, 0.5);
  color: var(--accent);
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid rgba(35, 50, 82, 0.6);
  padding: 18px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel h2 {
  margin: 0;
  font-size: 1.1rem;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.chart {
  background: rgba(9, 14, 26, 0.5);
  border-radius: 16px;
  padding: 16px;
  border: 1px dashed rgba(78, 168, 222, 0.25);
}

.chart-line svg {
  width: 100%;
  height: 160px;
}

.chart-labels {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

.risk-panel {
  position: relative;
}

.risk-header {
  align-items: flex-start;
  gap: 16px;
}

.risk-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ghost.small.is-active {
  border-color: rgba(78, 168, 222, 0.6);
  color: #e2e8f0;
}

.risk-chart {
  position: relative;
  border-radius: 18px;
  padding: 24px 16px 32px 52px;
  background: linear-gradient(
    180deg,
    rgba(239, 68, 68, 0.15) 0%,
    rgba(245, 158, 11, 0.12) 24%,
    rgba(250, 204, 21, 0.12) 48%,
    rgba(78, 168, 222, 0.12) 72%,
    rgba(16, 185, 129, 0.1) 100%
  );
  overflow: hidden;
}

.risk-bands {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  pointer-events: none;
}

.risk-band-label {
  padding: 10px 0 0 16px;
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.risk-band-label.critical {
  color: rgba(248, 113, 113, 0.75);
}

.risk-band-label.high {
  color: rgba(251, 146, 60, 0.75);
}

.risk-band-label.moderate {
  color: rgba(250, 204, 21, 0.7);
}

.risk-band-label.low {
  color: rgba(52, 211, 153, 0.7);
}

.risk-y-axis {
  position: absolute;
  left: 10px;
  top: 28px;
  bottom: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgba(226, 232, 240, 0.7);
}

.risk-x-axis {
  position: absolute;
  left: 52px;
  right: 16px;
  bottom: 8px;
  display: grid;
  gap: 8px;
  font-size: 0.7rem;
  color: rgba(226, 232, 240, 0.75);
  text-align: center;
}

.risk-chart svg {
  width: 100%;
  height: 260px;
  display: block;
}

.risk-area {
  fill: rgba(78, 168, 222, 0.18);
}

.risk-line {
  fill: none;
  stroke: #4ea8de;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 6px 14px rgba(78, 168, 222, 0.35));
}

.risk-point {
  fill: #0b1220;
  stroke: #4ea8de;
  stroke-width: 3;
}

.risk-annotations {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.risk-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(9, 13, 24, 0.92);
  border: 1px solid rgba(78, 168, 222, 0.4);
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  box-shadow: 0 10px 24px rgba(6, 9, 18, 0.5);
}

.risk-marker-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ef4444;
  color: #fff;
  font-weight: 700;
  font-size: 0.7rem;
}

.risk-legend {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.chart-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(35, 50, 82, 0.6);
  background: rgba(12, 18, 32, 0.7);
  color: var(--muted);
  font-size: 0.7rem;
  cursor: pointer;
}

.legend-item.is-active {
  border-color: rgba(78, 168, 222, 0.6);
  color: #e2e8f0;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.failed {
  background: #ef4444;
}

.legend-dot.resets {
  background: #f59e0b;
}

.legend-dot.lockouts {
  background: #4ea8de;
}

.chart-interactive {
  position: relative;
}

.chart-interactive svg {
  width: 100%;
  height: 240px;
}

.line-grid {
  stroke: rgba(78, 168, 222, 0.2);
  stroke-width: 1;
}

.line-path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-point {
  stroke: rgba(8, 11, 22, 0.85);
  stroke-width: 2;
}

.line-series.is-hidden {
  opacity: 0.15;
}

.chart-axis {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  color: var(--muted);
  font-size: 0.7rem;
}

.chart-axis.x {
  bottom: 6px;
  display: grid;
  gap: 8px;
  padding: 0 24px 0 40px;
  text-align: center;
}

.chart-axis.y {
  top: 18px;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-left: 8px;
}

.chart-tooltip {
  position: absolute;
  min-width: 160px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(9, 13, 24, 0.92);
  border: 1px solid rgba(78, 168, 222, 0.35);
  color: #e2e8f0;
  font-size: 0.75rem;
  box-shadow: 0 16px 30px rgba(6, 9, 18, 0.55);
  opacity: 0;
  transform: translate(-50%, -10px);
  transition: opacity 0.15s ease;
  pointer-events: none;
  z-index: 2;
}

.chart-tooltip.is-visible {
  opacity: 1;
}

.tooltip-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}

.tooltip-row strong {
  color: #e2e8f0;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.chart-empty.is-visible {
  display: flex;
}

.heatmap {
  position: relative;
  display: grid;
  gap: 10px;
}

.heatmap-header,
.heatmap-row {
  display: grid;
  grid-template-columns: 60px repeat(24, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
}

.heatmap-body {
  display: grid;
  gap: 6px;
}

.heatmap-header span {
  font-size: 0.65rem;
  color: var(--muted);
  text-align: center;
}

.heatmap-day {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
  padding-right: 6px;
}

.heatmap-cell {
  height: 18px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--muted);
}

.heatmap-scale {
  display: flex;
  gap: 4px;
}

.heatmap-swatch {
  width: 18px;
  height: 10px;
  border-radius: 4px;
  background: rgba(78, 168, 222, var(--level));
  border: 1px solid rgba(78, 168, 222, 0.3);
}

.chart-activity {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spark-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 10px;
  height: 140px;
}

.spark-bar {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--muted);
}

.bar-rect {
  width: 100%;
  max-width: 28px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #4ea8de 0%, #1f6f9f 100%);
  box-shadow: 0 8px 20px rgba(15, 30, 60, 0.35);
}

.chart-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--muted);
}

.chart-bars {
  display: grid;
  gap: 12px;
}

.severity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

.severity-label {
  width: 80px;
  text-transform: capitalize;
}

.severity-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(31, 42, 68, 0.7);
  overflow: hidden;
}

.severity-fill {
  height: 100%;
  border-radius: inherit;
  background: #4ea8de;
}

.severity-fill.critical {
  background: #ef4444;
}

.severity-fill.high {
  background: #f97316;
}

.severity-fill.medium {
  background: #f59e0b;
}

.severity-fill.low {
  background: #34d399;
}

.severity-fill.info {
  background: #4ea8de;
}

.severity-count {
  width: 32px;
  text-align: right;
  color: #e2e8f0;
}

.chart-donut {
  position: relative;
  display: grid;
  place-items: center;
}

.chart-donut svg {
  width: 200px;
  height: 200px;
}

.donut-center {
  position: absolute;
  text-align: center;
}

.donut-value {
  font-size: 1.6rem;
  font-weight: 600;
}

.donut-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.dot.strong {
  background: var(--success);
}

.dot.weak {
  background: var(--warning);
}

.dot.reused {
  background: var(--accent);
}

.dot.breached {
  background: var(--danger);
}

.alert-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.alert-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 10px;
}

.alert-icon.danger {
  background: var(--danger);
}

.alert-icon.warning {
  background: var(--warning);
}

.alert-icon.info {
  background: var(--accent);
}

.alert-icon.neutral {
  background: var(--muted);
}

.event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(35, 50, 82, 0.4);
}

.event-row:last-child {
  border-bottom: none;
}

.list-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.list-grid h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.list-grid ul {
  padding-left: 18px;
  margin: 0;
  line-height: 1.5;
}

.mini-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.mini-card {
  background: var(--card-soft);
  border: 1px solid rgba(35, 50, 82, 0.6);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.mini-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.mini-value {
  font-size: 1.4rem;
  font-weight: 600;
}

.mini-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.subgrid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.subhead {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 8px;
}

.chart.compact {
  padding: 12px;
}

.chart.compact svg {
  width: 100%;
  height: 130px;
}

.report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.vault-structure {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(12, 18, 32, 0.8);
  border: 1px solid rgba(35, 50, 82, 0.8);
  font-size: 0.7rem;
  text-transform: none;
  color: var(--text);
}

.vault-item {
  background: rgba(12, 18, 32, 0.7);
  border: 1px solid rgba(35, 50, 82, 0.6);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.vault-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vault-item-header .ghost {
  margin-left: auto;
}

.vault-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4ea8de, #2dd4bf);
  color: #0b1220;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.vault-item-title {
  font-weight: 600;
}

.vault-field {
  display: grid;
  grid-template-columns: minmax(110px, 140px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.field-label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.field-value {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.masked {
  color: var(--muted);
  letter-spacing: 1px;
}

.field-actions {
  display: flex;
  gap: 6px;
}

.vault-field button {
  justify-self: end;
  white-space: nowrap;
}

.vault-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.strength-meter {
  display: grid;
  gap: 6px;
  min-width: 160px;
}

.strength-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.strength-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--accent));
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(35, 50, 82, 0.8);
  background: var(--card-soft);
  color: var(--text);
  font-family: inherit;
}

.field input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
}

.range-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 6px;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(35, 50, 82, 0.7);
  background: rgba(12, 18, 32, 0.6);
  font-size: 0.8rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.output-card {
  background: rgba(12, 18, 32, 0.7);
  border: 1px solid rgba(35, 50, 82, 0.6);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.output-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.6px;
}

.output-value {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.2rem;
}

.output-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.output-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.health-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.step-list {
  display: grid;
  gap: 10px;
  background: rgba(10, 16, 30, 0.7);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid rgba(35, 50, 82, 0.5);
  counter-reset: step;
}

.step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
}

.step::before {
  counter-increment: step;
  content: counter(step) ".";
  color: var(--accent);
  font-weight: 600;
}

.notes-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.note-card,
.file-card {
  background: rgba(12, 18, 32, 0.7);
  border: 1px solid rgba(35, 50, 82, 0.6);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.note-title,
.file-title {
  font-weight: 600;
}

.note-body {
  color: var(--muted);
  font-size: 0.85rem;
}

.note-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.setting-card {
  background: rgba(12, 18, 32, 0.7);
  border: 1px solid rgba(35, 50, 82, 0.6);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.setting-title {
  font-weight: 600;
}

.setting-desc {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.table th,
.table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(35, 50, 82, 0.6);
}

.table th {
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 0.7rem;
}

.meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.code-block {
  background: rgba(10, 16, 30, 0.7);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid rgba(35, 50, 82, 0.5);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  display: grid;
  gap: 6px;
}

.code-block.mono {
  line-height: 1.6;
}

.code-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.code-label {
  color: var(--muted);
}

.code-spacer {
  height: 8px;
}

.callout {
  background: rgba(78, 168, 222, 0.15);
  border: 1px solid rgba(78, 168, 222, 0.35);
  padding: 12px;
  border-radius: 12px;
  font-size: 0.85rem;
}

.auth-login .app-shell {
  grid-template-columns: 1fr;
  padding: 0;
  min-height: 100vh;
}

.auth-login .sidebar {
  display: none;
}

.auth-login .main {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #0b0a10 0%, #09070f 35%, #12081f 60%, #0b0a10 100%);
}

.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1200px 900px at 12% 10%, rgba(165, 74, 255, 0.55) 0%, rgba(88, 28, 135, 0.2) 35%, transparent 60%),
    radial-gradient(900px 700px at 78% 78%, rgba(86, 110, 255, 0.55) 0%, rgba(37, 54, 160, 0.2) 40%, transparent 65%),
    linear-gradient(135deg, rgba(12, 9, 20, 0.95) 0%, rgba(18, 8, 34, 0.85) 45%, rgba(9, 7, 15, 0.98) 100%);
  background-blend-mode: screen, screen, normal;
}

.auth-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 6px),
    radial-gradient(1200px 900px at 40% 40%, rgba(0, 0, 0, 0.35), transparent 70%);
  opacity: 0.35;
}

.auth-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.5px);
  opacity: 0.9;
}

.auth-shape-one {
  width: 420px;
  height: 420px;
  left: 6%;
  top: 10%;
  background: radial-gradient(circle at 30% 30%, rgba(151, 58, 255, 0.7), rgba(60, 18, 110, 0.15));
  filter: blur(8px);
  opacity: 0.45;
}

.auth-shape-two {
  width: 380px;
  height: 380px;
  right: 8%;
  bottom: 6%;
  background: radial-gradient(circle at 60% 60%, rgba(87, 108, 255, 0.65), rgba(26, 36, 94, 0.2));
  filter: blur(10px);
  opacity: 0.5;
}

.otp-verify .main {
  min-height: 100vh;
  position: relative;
}

.otp-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 20;
  backdrop-filter: blur(16px);
  background:
    radial-gradient(1000px 760px at 15% 20%, rgba(78, 168, 222, 0.25), transparent 60%),
    radial-gradient(900px 700px at 80% 75%, rgba(45, 212, 191, 0.2), transparent 65%),
    rgba(7, 10, 20, 0.68);
}

.otp-card {
  width: min(420px, 92vw);
  padding: 34px 30px 28px;
  border-radius: 28px;
  text-align: center;
  position: relative;
  background: linear-gradient(160deg, rgba(14, 20, 38, 0.92), rgba(8, 10, 20, 0.92));
  border: 1px solid rgba(78, 168, 222, 0.35);
  box-shadow: 0 30px 70px rgba(5, 10, 22, 0.7), 0 0 30px rgba(78, 168, 222, 0.15);
}

.otp-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(78, 168, 222, 0.8), rgba(45, 212, 191, 0.3), rgba(99, 102, 241, 0.3));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.otp-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 6px;
}

.otp-title {
  margin: 0;
  font-size: 2rem;
}

.otp-subtitle {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.otp-progress {
  height: 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
  overflow: hidden;
  margin: 18px 0 8px;
}

.otp-progress-bar {
  height: 100%;
  width: 68%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--accent));
  box-shadow: 0 0 18px rgba(78, 168, 222, 0.4);
}

.otp-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.otp-form {
  display: grid;
  gap: 12px;
}

.otp-form .field input {
  text-align: center;
  letter-spacing: 0.3rem;
  font-size: 1.15rem;
  background: rgba(9, 13, 24, 0.9);
  border: 1px solid rgba(78, 168, 222, 0.35);
}

.otp-submit {
  width: 100%;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  color: #061320;
  background: linear-gradient(90deg, #4ea8de, #2dd4bf);
  box-shadow: 0 10px 24px rgba(15, 30, 60, 0.35);
}

.otp-note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}

.master-setup {
  overflow: hidden;
}

.master-setup .main {
  min-height: 100vh;
  position: relative;
}

.master-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 25;
  backdrop-filter: blur(18px);
  background:
    radial-gradient(1200px 800px at 20% 15%, rgba(78, 168, 222, 0.18), transparent 65%),
    radial-gradient(900px 700px at 80% 70%, rgba(45, 212, 191, 0.14), transparent 70%),
    linear-gradient(150deg, rgba(6, 9, 18, 0.86), rgba(8, 12, 24, 0.92));
}

.master-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(transparent 97%, rgba(255, 255, 255, 0.04) 100%),
    linear-gradient(90deg, transparent 97%, rgba(255, 255, 255, 0.04) 100%);
  background-size: 46px 46px;
  opacity: 0.2;
}

.master-card {
  width: min(440px, 92vw);
  padding: 34px 32px 30px;
  border-radius: 26px;
  text-align: center;
  position: relative;
  background: linear-gradient(165deg, rgba(13, 19, 38, 0.95), rgba(8, 11, 22, 0.95));
  border: 1px solid rgba(78, 168, 222, 0.28);
  box-shadow: 0 40px 90px rgba(5, 10, 22, 0.75), 0 0 40px rgba(78, 168, 222, 0.15);
}

.master-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(78, 168, 222, 0.7), rgba(45, 212, 191, 0.25), rgba(99, 102, 241, 0.25));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.master-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(12, 18, 32, 0.75);
  border: 1px solid rgba(78, 168, 222, 0.3);
  font-size: 0.7rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

.master-title {
  margin: 16px 0 6px;
  font-size: 2.1rem;
}

.master-subtitle {
  margin: 0 auto 18px;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 320px;
}

.master-form {
  display: grid;
  gap: 12px;
}

.master-form .field input {
  text-align: center;
  font-size: 1rem;
  background: rgba(9, 13, 24, 0.92);
  border: 1px solid rgba(78, 168, 222, 0.35);
}

.master-submit {
  width: 100%;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  color: #061320;
  background: linear-gradient(90deg, #4ea8de, #2dd4bf);
  box-shadow: 0 12px 28px rgba(15, 30, 60, 0.35);
}

.master-note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}

body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(14px);
  background:
    radial-gradient(900px 700px at 15% 20%, rgba(78, 168, 222, 0.2), transparent 60%),
    radial-gradient(700px 600px at 85% 70%, rgba(99, 102, 241, 0.2), transparent 65%),
    linear-gradient(150deg, rgba(6, 9, 18, 0.85), rgba(10, 14, 28, 0.92));
}

.modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: min(580px, 92vw);
  padding: 30px 30px 26px;
  border-radius: 26px;
  position: relative;
  background: linear-gradient(160deg, rgba(15, 21, 38, 0.96), rgba(9, 12, 24, 0.96));
  border: 1px solid rgba(78, 168, 222, 0.28);
  box-shadow: 0 32px 70px rgba(4, 8, 20, 0.75), 0 0 30px rgba(78, 168, 222, 0.18);
}

.modal-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(78, 168, 222, 0.7), rgba(45, 212, 191, 0.2), rgba(99, 102, 241, 0.35));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.modal-scroll {
  max-height: min(60vh, 520px);
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: none;
}

.modal-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.modal-header {
  margin-bottom: 16px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: rgba(12, 18, 32, 0.7);
  color: rgba(231, 238, 255, 0.9);
  font-size: 1.2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.modal-close:hover {
  transform: translateY(-1px);
  background: rgba(28, 38, 70, 0.8);
  border-color: rgba(99, 102, 241, 0.6);
}

body[data-theme="alt"] .modal-overlay {
  background:
    radial-gradient(900px 700px at 15% 20%, rgba(78, 168, 222, 0.16), transparent 60%),
    radial-gradient(700px 600px at 85% 70%, rgba(47, 120, 196, 0.12), transparent 65%),
    linear-gradient(150deg, rgba(226, 233, 246, 0.86), rgba(219, 229, 244, 0.9));
}

body[data-theme="alt"] .modal-card {
  background: linear-gradient(160deg, rgba(250, 252, 255, 0.98), rgba(235, 240, 249, 0.96));
  border-color: rgba(47, 120, 196, 0.25);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16), 0 0 26px rgba(47, 120, 196, 0.12);
}

body[data-theme="alt"] .modal-card::before {
  background: linear-gradient(135deg, rgba(47, 120, 196, 0.5), rgba(15, 157, 138, 0.2), rgba(99, 102, 241, 0.18));
}

body[data-theme="alt"] .modal-close {
  background: rgba(235, 240, 249, 0.9);
  color: #1f2a44;
  border-color: rgba(47, 120, 196, 0.3);
}

body[data-theme="alt"] .modal-close:hover {
  background: #e4ecf9;
  border-color: rgba(47, 120, 196, 0.55);
}

.modal-subfields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.modal-subfields:not(.is-visible) {
  display: none;
}

.generator-trigger {
  margin-top: 10px;
  align-self: flex-start;
  display: none;
}

.generator-trigger.is-visible {
  display: inline-flex;
}

.vault-entry-shell {
  display: grid;
  gap: 16px;
  width: min(1180px, 96vw);
  margin: 0 auto;
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
  justify-content: center;
}

.vault-entry-shell.is-split {
  grid-template-columns: repeat(2, minmax(0, 580px));
  align-items: stretch;
}

.vault-entry-shell .modal-card {
  width: min(580px, 92vw);
  margin: 0 auto;
}

.vault-entry-shell.is-split .modal-card {
  height: 100%;
}

.vault-generator {
  display: none;
  gap: 14px;
  align-content: start;
  max-height: calc(100vh - 140px);
  overflow: auto;
  scrollbar-width: none;
}

.vault-generator.is-visible {
  display: grid;
}

.vault-generator::-webkit-scrollbar {
  width: 0;
  height: 0;
}

@media (max-width: 980px) {
  .vault-entry-shell.is-split {
    grid-template-columns: 1fr;
  }
}

.vault-generator .output-value {
  font-size: 1.05rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.vault-generator .output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.generator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.generator-title {
  margin: 6px 0 0;
  font-size: 1.1rem;
}

.auth-card {
  width: min(420px, 92vw);
  padding: 42px 36px;
  border-radius: 16px;
  background: rgba(20, 29, 51, 0.78);
  border: 1px solid rgba(35, 50, 82, 0.7);
  box-shadow: 0 30px 60px rgba(8, 14, 29, 0.6);
  backdrop-filter: blur(14px);
  display: grid;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.auth-header {
  text-align: center;
  display: grid;
  gap: 6px;
}

.auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 4px;
  display: grid;
  place-items: center;
}

.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.auth-eyebrow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
}

.auth-title {
  margin: 0;
  font-size: 2rem;
  letter-spacing: 0.6px;
}

.auth-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(35, 50, 82, 0.8);
  background: rgba(12, 18, 32, 0.65);
  color: var(--text);
  font-family: inherit;
}

.auth-submit {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: #0b1220;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  box-shadow: 0 12px 28px rgba(45, 212, 191, 0.2);
}

.auth-links {
  display: grid;
  gap: 10px;
  text-align: center;
}

.auth-links a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(35, 50, 82, 0.7);
  background: rgba(12, 18, 32, 0.65);
  transition: all 0.2s ease;
}

.auth-links a:hover {
  border-color: rgba(78, 168, 222, 0.6);
  background: rgba(78, 168, 222, 0.15);
}

.auth-status {
  display: none;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  border: 1px solid rgba(35, 50, 82, 0.7);
  background: rgba(12, 18, 32, 0.65);
  color: var(--muted);
  text-align: center;
}

.auth-status.is-visible {
  display: block;
}

.auth-status.error {
  border-color: rgba(239, 68, 68, 0.6);
  color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
}

.auth-status.info {
  border-color: rgba(78, 168, 222, 0.5);
  color: var(--accent);
  background: rgba(78, 168, 222, 0.12);
}

.form-status {
  display: none;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  border: 1px solid rgba(35, 50, 82, 0.7);
  background: rgba(12, 18, 32, 0.65);
  color: var(--muted);
}

.form-status.is-visible {
  display: block;
}

.form-status.success {
  border-color: rgba(52, 211, 153, 0.5);
  color: var(--success);
  background: rgba(52, 211, 153, 0.12);
}

.form-status.error {
  border-color: rgba(239, 68, 68, 0.6);
  color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
}

.glass-toast-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  backdrop-filter: blur(14px);
  background: rgba(7, 10, 20, 0.55);
}

.glass-toast-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.glass-toast-card {
  width: min(460px, 92vw);
  padding: 22px 22px 18px;
  border-radius: 22px;
  display: grid;
  gap: 10px;
  text-align: center;
  position: relative;
  background: linear-gradient(160deg, rgba(18, 26, 45, 0.96), rgba(9, 12, 24, 0.96));
  border: 1px solid rgba(78, 168, 222, 0.3);
  box-shadow: 0 26px 60px rgba(5, 10, 22, 0.7), 0 0 30px rgba(78, 168, 222, 0.12);
}

.glass-toast-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(78, 168, 222, 0.7), rgba(45, 212, 191, 0.25), rgba(99, 102, 241, 0.25));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.glass-toast-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.glass-toast-message {
  font-size: 0.9rem;
  color: var(--muted);
}

.glass-toast-close {
  justify-self: center;
  border-radius: 999px;
  border: 1px solid rgba(78, 168, 222, 0.35);
  background: rgba(12, 18, 32, 0.7);
  color: var(--text);
  padding: 6px 16px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.glass-toast-close:hover {
  transform: translateY(-1px);
  border-color: rgba(78, 168, 222, 0.65);
  background: rgba(20, 29, 51, 0.8);
}

.glass-toast-card.success {
  border-color: rgba(52, 211, 153, 0.45);
}

.glass-toast-card.success .glass-toast-title {
  color: var(--success);
}

.glass-toast-card.error {
  border-color: rgba(239, 68, 68, 0.55);
}

.glass-toast-card.error .glass-toast-title {
  color: var(--danger);
}

.glass-toast-card.warning {
  border-color: rgba(245, 158, 11, 0.55);
}

.glass-toast-card.warning .glass-toast-title {
  color: var(--warning);
}

.glass-toast-card.info {
  border-color: rgba(78, 168, 222, 0.55);
}

.glass-toast-card.info .glass-toast-title {
  color: var(--accent);
}

body[data-theme="alt"] .glass-toast-overlay {
  background: rgba(226, 233, 246, 0.75);
}

body[data-theme="alt"] .glass-toast-card {
  background: linear-gradient(160deg, rgba(250, 252, 255, 0.97), rgba(235, 240, 249, 0.96));
  border-color: rgba(47, 120, 196, 0.25);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16), 0 0 24px rgba(47, 120, 196, 0.12);
}

body[data-theme="alt"] .glass-toast-message {
  color: #4b5b75;
}

body[data-theme="alt"] .glass-toast-close {
  background: rgba(235, 240, 249, 0.9);
  color: #1f2a44;
  border-color: rgba(47, 120, 196, 0.3);
}

.glass-prompt-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  backdrop-filter: blur(18px);
  background:
    radial-gradient(1000px 760px at 18% 20%, rgba(78, 168, 222, 0.25), transparent 60%),
    radial-gradient(900px 700px at 80% 75%, rgba(45, 212, 191, 0.2), transparent 65%),
    rgba(7, 10, 20, 0.65);
}

.glass-prompt-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.glass-prompt-card {
  width: min(520px, 94vw);
  padding: 24px 24px 20px;
  border-radius: 22px;
  display: grid;
  gap: 12px;
  position: relative;
  background: linear-gradient(160deg, rgba(16, 24, 44, 0.96), rgba(9, 12, 24, 0.96));
  border: 1px solid rgba(78, 168, 222, 0.3);
  box-shadow: 0 28px 70px rgba(5, 10, 22, 0.75), 0 0 30px rgba(78, 168, 222, 0.16);
}

.glass-prompt-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(78, 168, 222, 0.75), rgba(45, 212, 191, 0.28), rgba(99, 102, 241, 0.3));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.glass-prompt-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.glass-prompt-message {
  font-size: 0.9rem;
  color: var(--muted);
}

.glass-prompt-message.is-hidden {
  display: none;
}

.glass-prompt-message.is-error {
  color: var(--danger);
}

.glass-prompt-form {
  display: grid;
  gap: 14px;
}

.glass-prompt-fields {
  display: grid;
  gap: 12px;
}

.glass-prompt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.glass-prompt-cancel,
.glass-prompt-confirm {
  border-radius: 999px;
  border: 1px solid rgba(78, 168, 222, 0.35);
  background: rgba(12, 18, 32, 0.75);
  color: var(--text);
  padding: 8px 18px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.glass-prompt-confirm {
  border-color: rgba(45, 212, 191, 0.5);
  background: linear-gradient(135deg, rgba(78, 168, 222, 0.85), rgba(45, 212, 191, 0.85));
  color: #0b1220;
  font-weight: 600;
}

.glass-prompt-cancel:hover,
.glass-prompt-confirm:hover {
  transform: translateY(-1px);
}

body[data-theme="alt"] .glass-prompt-overlay {
  background:
    radial-gradient(1000px 760px at 18% 20%, rgba(78, 168, 222, 0.18), transparent 60%),
    radial-gradient(900px 700px at 80% 75%, rgba(45, 212, 191, 0.16), transparent 65%),
    rgba(226, 233, 246, 0.85);
}

body[data-theme="alt"] .glass-prompt-card {
  background: linear-gradient(160deg, rgba(250, 252, 255, 0.98), rgba(235, 240, 249, 0.96));
  border-color: rgba(47, 120, 196, 0.25);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16), 0 0 26px rgba(47, 120, 196, 0.12);
}

body[data-theme="alt"] .glass-prompt-message {
  color: #4b5b75;
}

body[data-theme="alt"] .glass-prompt-cancel {
  background: rgba(235, 240, 249, 0.9);
  color: #1f2a44;
  border-color: rgba(47, 120, 196, 0.3);
}

.score-card {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  font-size: 0.85rem;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.checklist input {
  accent-color: var(--teal);
  margin-right: 8px;
}

.select {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(35, 50, 82, 0.6);
  background: rgba(12, 18, 32, 0.7);
  font-size: 0.75rem;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.is-visible {
  animation: fadeUp 0.6s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .topbar-identity {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .topbar-actions {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .profile {
    width: auto;
    max-width: min(240px, calc(100vw - 110px));
  }

  .topbar-identity {
    width: auto;
    max-width: 100%;
    justify-content: flex-end;
    margin-left: 0;
    gap: 10px;
  }

  .notification-dropdown {
    right: 0;
    width: min(320px, calc(100vw - 24px));
  }

  .metric-card {
    padding: 14px;
  }

  .vault-field {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .vault-field button {
    justify-self: flex-start;
  }

  .vault-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}


.page-subtitle {
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--muted);
}
