/* Base reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #f5f7fb;
  --bg-elevated: #ffffff;
  --border-subtle: #e1e4f0;
  --border-strong: #c1c7dd;
  --text-main: #151b33;
  --text-muted: #6c7392;
  --text-soft: #9ca3c7;
  --accent: #3857ff;
  --accent-soft: rgba(56, 87, 255, 0.08);
  --accent-strong: #2338b0;
  --danger: #e53935;
  --warning: #ff9800;
  --success: #2e7d32;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --nav-height: 56px;
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.24s ease-out;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #eef1ff 0, #f7f8fc 40%, #f5f7fb 100%);
  color: var(--text-main);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top nav */
.top-nav {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid rgba(209, 213, 238, 0.9);
  backdrop-filter: blur(18px);
  background: rgba(249, 250, 255, 0.9);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: radial-gradient(circle at 0 0, #7dd3fc, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9fafb;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.45);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 700;
  font-size: 15px;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-soft);
}

.top-nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-link:hover {
  background: rgba(148, 163, 255, 0.1);
}

.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.api-status {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.api-status.online {
  background: rgba(46, 125, 50, 0.1);
  color: var(--success);
}

.api-status.error {
  background: rgba(255, 152, 0, 0.1);
  color: var(--warning);
}

.api-status.offline {
  background: rgba(229, 57, 53, 0.1);
  color: var(--danger);
}

.user-menu-container {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.user-menu-btn:hover {
  background: rgba(148, 163, 255, 0.1);
}

.user-badge {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 600;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.user-menu-arrow {
  font-size: 10px;
  color: var(--text-muted);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-subtle);
  min-width: 200px;
  z-index: 100;
}

.user-menu-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.user-menu-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}

.user-menu-email {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.user-menu-divider {
  height: 1px;
  background: var(--border-subtle);
}

.user-menu-item {
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-main);
  transition: background var(--transition-fast);
}

.user-menu-item:hover {
  background: var(--accent-soft);
}

/* Layout */
.layout {
  display: flex;
  flex: 1;
  padding: 18px 20px 24px;
}

.main-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
}

/* Cards */
.card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 255, 0.9);
  padding: 18px 18px 16px;
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.card-header.space-between {
  justify-content: space-between;
}

.card-header h2 {
  font-size: 16px;
  margin: 0;
}

.card-header-actions {
  margin-left: auto;
}

/* Typography */
h1 {
  margin: 0 0 2px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0;
}

h3 {
  margin: 0;
  font-size: 14px;
}

.muted {
  color: var(--text-muted);
  font-size: 13px;
}

.micro {
  font-size: 11px;
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.view-subtitle {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
}

.view-actions {
  display: flex;
  gap: 8px;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn.primary {
  background: var(--accent);
  color: white;
}

.btn.primary:hover {
  background: var(--accent-strong);
}

.btn.ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.btn.ghost:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent-soft);
}

.btn.full-width {
  width: 100%;
  justify-content: center;
}

.btn-inline {
  padding: 4px 8px;
  font-size: 12px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 20px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
}

.input {
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: var(--bg-elevated);
  color: var(--text-main);
  transition: border-color var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
}

.textarea {
  resize: vertical;
  min-height: 80px;
}

.field-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Tables */
.table {
  width: 100%;
}

.table-header {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr 1fr 1fr 1.5fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 2px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-body {
  display: flex;
  flex-direction: column;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr 1fr 1fr 1.5fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
}

.table-row:hover {
  background: var(--accent-soft);
}

.table-row-company {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.table-row-company span:first-child {
  font-weight: 500;
}

.table-row-company span:last-child {
  font-size: 11px;
  color: var(--text-muted);
}

/* Status pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.status-completed {
  background: rgba(46, 125, 50, 0.1);
  color: var(--success);
}

.status-completed .status-dot {
  background: var(--success);
}

.status-scanning {
  background: rgba(56, 87, 255, 0.1);
  color: var(--accent-strong);
}

.status-scanning .status-dot {
  background: var(--accent-strong);
}

.status-not-scanned {
  background: rgba(108, 115, 146, 0.1);
  color: var(--text-muted);
}

.status-not-scanned .status-dot {
  background: var(--text-muted);
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.risk-badge.high {
  background: rgba(229, 57, 53, 0.1);
  color: var(--danger);
}

.risk-badge.high .status-dot {
  background: var(--danger);
}

.risk-badge.medium {
  background: rgba(255, 152, 0, 0.1);
  color: var(--warning);
}

.risk-badge.medium .status-dot {
  background: var(--warning);
}

.risk-badge.low {
  background: rgba(46, 125, 50, 0.1);
  color: var(--success);
}

.risk-badge.low .status-dot {
  background: var(--success);
}

/* Login view */
.login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #eef1ff 0, #f7f8fc 40%, #f5f7fb 100%);
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 24px;
}

.login-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-subtle);
}

.login-card .brand {
  margin-bottom: 24px;
  justify-content: center;
}

.login-card h1 {
  text-align: center;
  margin-bottom: 8px;
}

.login-card .muted {
  text-align: center;
  margin-bottom: 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.error-message {
  padding: 12px;
  background: rgba(229, 57, 53, 0.1);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 13px;
}

.error-banner {
  padding: 12px;
  background: rgba(229, 57, 53, 0.1);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 12px;
}

.success-banner {
  padding: 12px;
  background: rgba(46, 125, 50, 0.1);
  border: 1px solid var(--success);
  border-radius: var(--radius-sm);
  color: var(--success);
  font-size: 13px;
  margin-bottom: 12px;
}

.password-change-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #eef1ff 0, #f7f8fc 40%, #f5f7fb 100%);
}

/* Scan view */
.scan-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}

.scan-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.scan-stepper {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 2px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.step.active {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.step.completed {
  background: rgba(46, 125, 50, 0.1);
  border-color: var(--success);
}

.step-index {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.step.active .step-index {
  background: var(--accent);
  color: white;
}

.step.completed .step-index {
  background: var(--success);
  color: white;
}

.step-label {
  font-size: 11px;
  text-align: center;
  color: var(--text-muted);
}

.step.active .step-label {
  color: var(--accent-strong);
  font-weight: 600;
}

.scan-status-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.scan-lower {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.scan-logs {
  max-height: 400px;
}

.log-output {
  max-height: 350px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 11px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.log-line {
  margin: 4px 0;
  color: var(--text-main);
}

.log-line-prefix {
  color: var(--text-muted);
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.evidence-thumb {
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.evidence-thumb:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.evidence-thumb-type {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.evidence-thumb-label {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
}

.evidence-thumb-meta {
  font-size: 10px;
  color: var(--text-muted);
}

/* Results view */
.results-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}

.results-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.results-top-row {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
}

.risk-card {
  text-align: center;
}

.risk-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.risk-donut {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 12px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.risk-donut-inner {
  text-align: center;
}

.risk-score-unit {
  font-size: 14px;
  color: var(--text-muted);
}

.risk-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.risk-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.risk-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.risk-dot.high {
  background: var(--danger);
}

.risk-dot.medium {
  background: var(--warning);
}

.risk-dot.low {
  background: var(--success);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.service-pill {
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.service-pill h3 {
  margin-bottom: 8px;
  font-size: 14px;
}

.service-pill p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.micro-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 11px;
}

.micro-list li {
  padding: 4px 0;
  color: var(--text-muted);
}

.micro-list li::before {
  content: "• ";
  color: var(--accent);
  font-weight: bold;
}

/* Tabs */
.tabs-header {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.tab-link {
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.tab-link:hover {
  color: var(--text-main);
}

.tab-link.active {
  color: var(--accent-strong);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Findings */
.findings-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.stat-item {
  text-align: center;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  flex: 1;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
}

.stat-value.stat-high {
  color: var(--danger);
}

.stat-value.stat-medium {
  color: var(--warning);
}

.stat-value.stat-low {
  color: var(--success);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.filters-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.filters-left {
  display: flex;
  gap: 8px;
}

.filters-right {
  flex: 1;
}

.findings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.finding-card {
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.finding-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.finding-header h3 {
  margin: 0;
  font-size: 14px;
  flex: 1;
}

.severity-pill {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.severity-pill.hoog {
  background: rgba(229, 57, 53, 0.1);
  color: var(--danger);
}

.severity-pill.middel {
  background: rgba(255, 152, 0, 0.1);
  color: var(--warning);
}

.severity-pill.laag {
  background: rgba(46, 125, 50, 0.1);
  color: var(--success);
}

.finding-category {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.finding-description {
  font-size: 13px;
  margin-bottom: 12px;
  color: var(--text-main);
}

.finding-details {
  font-size: 12px;
  color: var(--text-muted);
}

.finding-details div {
  margin-bottom: 4px;
}

/* Evidence filters */
.evidence-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.evidence-filter-tabs {
  display: flex;
  gap: 4px;
}

.evidence-filter-tab {
  padding: 6px 12px;
  border: none;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.evidence-filter-tab:hover {
  background: var(--accent-soft);
}

.evidence-filter-tab.active {
  background: var(--accent);
  color: white;
}

.evidence-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* Report */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.report-actions {
  display: flex;
  gap: 8px;
}

.report-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.report-view-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.report-view-btn {
  padding: 6px 12px;
  border: none;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
}

.report-view-btn.active {
  background: var(--accent);
  color: white;
}

.report-preview {
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  line-height: 1.6;
}

.report-preview h1,
.report-preview h2,
.report-preview h3 {
  margin-top: 24px;
  margin-bottom: 12px;
}

.report-preview p {
  margin-bottom: 12px;
}

.report-preview ul,
.report-preview ol {
  margin-left: 20px;
  margin-bottom: 12px;
}

.report-preview code {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
}

.report-raw {
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 11px;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* Email */
.email-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.email-template-selector {
  flex: 1;
}

.email-actions {
  display: flex;
  gap: 8px;
}

.email-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
}

.email-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.email-variables {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.var-btn {
  padding: 4px 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
}

.var-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.email-body {
  display: flex;
  flex-direction: column;
}

.email-editor-header {
  margin-bottom: 8px;
}

.email-format-hints {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.email-preview {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.email-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.email-preview-content {
  font-size: 13px;
  line-height: 1.6;
}

.email-preview-subject {
  font-weight: 600;
  margin-bottom: 12px;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1001;
}

.modal-dialog-wide {
  max-width: 800px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px;
  border-top: 1px solid var(--border-subtle);
}

.modal-hint {
  padding: 0 20px 20px;
  font-size: 11px;
  color: var(--text-muted);
}

.evidence-modal-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}

.evidence-modal-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.evidence-modal-meta h3 {
  margin-bottom: 8px;
}

.evidence-meta-pre {
  background: var(--bg);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  overflow-x: auto;
  white-space: pre-wrap;
}

/* Users table */
.users-table .table-header {
  grid-template-columns: 2fr 2fr 1fr 1fr 1.5fr 2fr;
}

.users-table .table-row {
  grid-template-columns: 2fr 2fr 1fr 1fr 1.5fr 2fr;
}

.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.role-badge.admin {
  background: rgba(56, 87, 255, 0.1);
  color: var(--accent-strong);
}

.role-badge.user {
  background: rgba(108, 115, 146, 0.1);
  color: var(--text-muted);
}

.status-active {
  color: var(--success);
}

.status-inactive {
  color: var(--text-muted);
}

.temp-password-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

.temp-password-code {
  font-family: monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-strong);
  flex: 1;
  word-break: break-all;
}

.sales-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.sales-banner-main {
  flex: 1;
}

.sales-status-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 4px;
}

.sales-banner-sub {
  display: block;
  font-size: 12px;
  color: #92400e;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.toggle-label {
  font-size: 12px;
  color: var(--text-muted);
}

.toggle-slider {
  width: 40px;
  height: 20px;
  background: var(--border-subtle);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform var(--transition-fast);
}

input[type="checkbox"]:checked + .toggle-slider {
  background: var(--accent);
}

input[type="checkbox"]:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.summary-item {
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-md);
}

.summary-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.summary-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.summary-item li {
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-main);
}

.summary-item code {
  background: var(--bg-elevated);
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 11px;
}

.nba-section {
  margin-bottom: 20px;
}

.nba-section:last-child {
  margin-bottom: 0;
}

.side-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .scan-layout,
  .results-layout {
    grid-template-columns: 1fr;
  }
  
  .results-top-row {
    grid-template-columns: 1fr;
  }
  
  .email-grid {
    grid-template-columns: 1fr;
  }
  
  .evidence-modal-body {
    grid-template-columns: 1fr;
  }
  
  .table-header,
  .table-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .table-row > div {
    padding: 4px 0;
  }
  
  .sales-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}
