.branding-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .branding-layout {
    grid-template-columns: 1fr;
  }
}

.branding-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.branding-color-select {
  width: 100%;
}

.branding-logo-preview {
  min-height: 48px;
  margin-bottom: 1rem;
}

.live-preview-client {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--color-bg, #f1f5f9);
}

.live-preview-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface, #fff);
  margin: -1rem -1rem 0.75rem;
  padding: 0.75rem 1rem;
}

.live-preview-nav {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.stat-grid-compact {
  grid-template-columns: 1fr;
  margin-bottom: 1rem;
}

.code-input {
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}


:root {
  --color-primary: #1e40af;
  --color-primary-hover: #1d4ed8;
  --color-secondary: #64748b;
  --color-accent: #1e40af;
  --color-bg: #f1f5f9;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-success: #15803d;
  --color-error: #b91c1c;
  --color-warning: #b45309;
  --color-info: #0369a1;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

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

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

.header-inner {
  width: 100%;
  margin: 0;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.logo-lockup,
.footer-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.logo-text,
.footer-brand-name {
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.logo-img {
  max-height: 36px;
  width: auto;
  display: block;
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.auth-brand .logo-img {
  max-height: 48px;
}

.auth-brand span,
.auth-brand .logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.footer-logo-link {
  display: inline-block;
  margin-bottom: 0.5rem;
}

.footer-logo {
  max-height: 32px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.nav-role {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-secondary);
  padding: 0.2rem 0.5rem;
  background: color-mix(in srgb, var(--color-secondary) 12%, var(--color-bg));
  border: 1px solid color-mix(in srgb, var(--color-secondary) 22%, transparent);
  border-radius: 4px;
}

.nav-placeholder {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.logout-form {
  margin-left: auto;
}

/* Main */
.main-content {
  width: 100%;
  flex: 1;
  min-width: 0;
  padding: 1.5rem;
}

body.auth-page .main-content {
  max-width: 560px;
  margin: 0 auto;
  flex: none;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
}

.text-muted {
  color: var(--color-muted);
  margin: 0;
}

/* Flash messages */
.flash-messages {
  margin-bottom: 1rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
}

.flash-success { background: #dcfce7; border-color: #86efac; color: var(--color-success); }
.flash-error { background: #fee2e2; border-color: #fca5a5; color: var(--color-error); }
.flash-warning { background: #fef3c7; border-color: #fcd34d; color: var(--color-warning); }
.flash-info { background: #e0f2fe; border-color: #7dd3fc; color: var(--color-info); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.25;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-secondary {
  background: var(--color-surface);
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--color-secondary) 10%, var(--color-surface));
  color: var(--color-text);
}

.btn-ghost {
  background: transparent;
  color: var(--color-muted);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
}

/* Forms */
.login-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.login-tab {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  color: var(--color-muted);
}

.login-tab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.login-panel {
  display: none;
}

.login-panel.active {
  display: block;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.btn-google {
  text-align: center;
}

.form-hint {
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.auth-card {
  max-width: 400px;
  margin: 3rem auto;
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

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

.auth-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.auth-card h1 {
  margin: 0 0 0.25rem;
}

.form-stack {
  margin-top: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label:not(.checkbox-label) {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
}

.form-group input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 1.5rem 0;
}

.form-section-title {
  font-size: 1rem;
  margin: 0 0 1rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.filter-form select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-staff { background: #e0f2fe; color: #0369a1; }
.badge-manager { background: #ede9fe; color: #6d28d9; }

.badge-status { text-transform: capitalize; font-weight: 600; }
.badge-draft { background: #f1f5f9; color: #475569; }
.badge-submitted { background: #e0f2fe; color: #0369a1; }
.badge-under_review { background: #fef3c7; color: #b45309; }
.badge-approved { background: #dcfce7; color: #15803d; }
.badge-rejected { background: #fee2e2; color: #b91c1c; }
.badge-disbursed { background: #dbeafe; color: #1d4ed8; }
.badge-active { background: #dcfce7; color: #15803d; }
.badge-closed { background: #f1f5f9; color: #64748b; }
.badge-defaulted { background: #fecaca; color: #991b1b; }
.badge-pending { background: #f1f5f9; color: #475569; }
.badge-partial { background: #fef3c7; color: #b45309; }
.badge-paid { background: #dcfce7; color: #15803d; }
.badge-overdue { background: #fee2e2; color: #b91c1c; }
.badge-success { background: #dcfce7; color: #15803d; }

.email-body-preview {
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  background: #fff;
  max-width: 42rem;
}

.site-footer {
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  background: var(--color-bg, #f1f5f9);
  border-top: 1px solid var(--color-border, #e2e8f0);
}

.footer-inner {
  width: 100%;
  margin: 0;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.footer-newsletter-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.footer-newsletter-message {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.footer-copy {
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

.footer-link {
  display: inline-block;
  margin-right: 1rem;
  margin-top: 0.5rem;
}

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

.content-editor-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 2fr 1fr;
}

@media (max-width: 900px) {
  .content-editor-layout {
    grid-template-columns: 1fr;
  }
}

.content-html a {
  color: var(--color-primary, #1a56db);
  text-decoration: underline;
}

.blog-list {
  display: grid;
  gap: 1.5rem;
}

.blog-card h2 {
  margin-bottom: 0.25rem;
}

.blog-meta {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.tab-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab-buttons .active {
  background: var(--color-primary, #1a56db);
  color: #fff;
}
.badge-failed { background: #fee2e2; color: #b91c1c; }
.badge-cancelled { background: #f1f5f9; color: #64748b; }
.schedule-row-overdue { background: #fef2f2; }

.status-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.status-timeline-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.25rem;
  position: relative;
}

.status-timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.status-timeline-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

.status-timeline-title {
  font-weight: 600;
}

.status-timeline-meta {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.status-timeline-note {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-bg);
  border-radius: var(--radius);
}

.quick-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.quick-actions-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.kyc-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.kyc-item {
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.kyc-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.kyc-item-header h3 {
  margin: 0;
  font-size: 1rem;
}

.kyc-item-meta {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.kyc-item-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.kyc-upload-btn {
  cursor: pointer;
  margin: 0;
}

.flash-warning {
  background: #fef3c7;
  border-color: #fcd34d;
  color: var(--color-warning);
}

.filter-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-form-row input,
.filter-form-row select {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.btn-xs {
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  margin-left: 0.5rem;
}

.btn-update {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-accent);
}

.detail-list-wide {
  gap: 0.75rem 2rem;
}

/* Cards & stat grid */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-card {
  padding: 1.25rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-header h2 {
  margin: 0;
  font-size: 1.125rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.stat-card-label {
  font-size: 0.8125rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0.25rem 0;
  color: var(--color-accent);
}

.stat-card-hint {
  font-size: 0.75rem;
  color: var(--color-muted);
}

/* Data table */
.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  font-weight: 600;
  color: var(--color-muted);
  background: var(--color-bg);
}

.table-empty {
  text-align: center;
  color: var(--color-muted);
  padding: 2rem !important;
}

/* Modals — ERP Modal Pattern */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal-dialog {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
  width: min(520px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  z-index: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.125rem;
}

.modal-body {
  padding: 1.25rem;
}

.modal-footer {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--color-border);
}

.detail-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.5rem;
  margin: 0;
}

.detail-list dt {
  font-weight: 600;
  color: var(--color-muted);
}

.detail-list dd {
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--color-border);
}

.code-block {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.quick-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stat-grid-inline {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.bar-chart {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bar-chart-row {
  display: grid;
  grid-template-columns: 7rem 1fr 2rem;
  align-items: center;
  gap: 0.5rem;
}

.bar-chart-label,
.bar-chart-value {
  font-size: 0.85rem;
}

.bar-chart-bar {
  height: 0.65rem;
  background: var(--color-primary);
  border-radius: 4px;
  min-width: 2%;
}

.bar-chart-bar-alt {
  background: var(--color-accent);
}

.bar-chart-bar-success {
  background: var(--color-success);
}

.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
  border-radius: var(--radius);
  min-height: 1rem;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 768px) {
  .main-nav {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .page-header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .filter-form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.75rem;
    background: var(--color-surface);
  }

  .data-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    border: none;
  }

  .data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--color-muted);
  }

  .table-wrap .data-table td:last-child {
    justify-content: flex-end;
  }
}

/* Module 15 — side navigation */
.app-shell {
  display: flex;
  min-height: calc(100vh - 120px);
}

.side-nav {
  width: 240px;
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.side-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.side-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  color: var(--color-text);
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
  font: inherit;
}

.side-nav-link:hover,
.side-nav-link.is-active {
  background: var(--color-bg);
  color: var(--color-primary);
  text-decoration: none;
}

.side-nav-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.side-nav-logout {
  margin-top: auto;
}

.app-shell.side-nav-collapsed .side-nav {
  width: 72px;
}

.app-shell.side-nav-collapsed .side-nav-label {
  display: none;
}

.public-nav {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.public-nav a {
  color: var(--color-text);
  text-decoration: none;
}

.public-nav a:hover {
  color: var(--color-primary);
}

.landing-hero {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent, var(--color-primary)));
  color: #fff;
  border-radius: var(--radius);
  padding: 3rem 2rem;
  margin-bottom: 1.5rem;
}

.landing-hero .btn-primary {
  background: #fff;
  color: var(--color-primary);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.product-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--color-surface);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1rem;
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-question {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.faq-answer {
  margin: 0;
}

.calc-slider {
  width: 100%;
  margin: 0.75rem 0;
}

.kyc-preview-media iframe,
.kyc-preview-media img {
  width: 100%;
  max-height: 420px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-top: 1rem;
}

.email-preview-body {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  max-height: 360px;
  overflow: auto;
}

.staff-preview-kyc {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.kyc-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
  }

  .side-nav {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .app-shell.side-nav-collapsed .side-nav {
    width: 100%;
  }

  .app-shell.side-nav-collapsed .side-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .app-shell.side-nav-collapsed .side-nav-label {
    display: inline;
  }
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.downloads-card h2 {
  margin-top: 0;
}

.downloads-version {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.downloads-notes {
  white-space: pre-wrap;
  margin-bottom: 1rem;
  color: var(--color-muted);
}

.downloads-req {
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.build-job-log {
  margin-top: 1rem;
  max-height: 240px;
  overflow: auto;
  padding: 0.75rem;
  background: var(--color-surface-muted, #f8fafc);
  border-radius: 0.5rem;
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-list-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem 1rem;
}
