/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
*/

:root {
  --vdp-primary: #4f46e5;
  --vdp-primary-hover: #4338ca;
  --vdp-primary-tint: #eef2ff;
  --vdp-text: #0f172a;
  --vdp-text-secondary: #64748b;
  --vdp-text-muted: #94a3b8;
  --vdp-border: #e2e8f0;
  --vdp-border-soft: #f1f5f9;
  --vdp-bg: #f8fafc;
  --vdp-surface: #ffffff;
  --vdp-success: #16a34a;
  --vdp-success-tint: #f0fdf4;
  --vdp-danger: #dc2626;
  --vdp-danger-tint: #fef2f2;
  --vdp-warning: #b45309;
  --vdp-warning-tint: #fffbeb;
  --vdp-info: #0891b2;
  --vdp-info-tint: #ecfeff;
  --vdp-font-display: "Manrope", "Segoe UI", sans-serif;
  --vdp-font-body: "Public Sans", "Segoe UI", sans-serif;
  --vdp-radius-sm: 8px;
  --vdp-radius-md: 9px;
  --vdp-radius-lg: 12px;
  --vdp-radius-xl: 14px;
  --vdp-radius-pill: 999px;
  --vdp-shadow-hover: 0 2px 10px rgba(79, 70, 229, 0.08);
  --vdp-shadow-popover: 0 8px 24px rgba(15, 23, 42, 0.12);
  --vdp-shadow-modal: 0 20px 60px rgba(15, 23, 42, 0.18);
  --vdp-sidebar-width: 240px;

  /* Backward-compatible aliases so any not-yet-migrated selector still renders sanely */
  --bg: var(--vdp-bg);
  --surface: var(--vdp-surface);
  --surface-strong: var(--vdp-surface);
  --surface-soft: var(--vdp-border-soft);
  --text: var(--vdp-text);
  --muted: var(--vdp-text-secondary);
  --border: var(--vdp-border);
  --border-strong: var(--vdp-border);
  --brand: var(--vdp-primary);
  --brand-strong: var(--vdp-primary-hover);
  --brand-ghost: var(--vdp-primary-tint);
  --ink: var(--vdp-text);
  --ok: var(--vdp-success);
  --warn: var(--vdp-warning);
  --danger: var(--vdp-danger);
  --shadow: var(--vdp-shadow-modal);
  --shadow-soft: var(--vdp-shadow-hover);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--vdp-text);
  font-family: var(--vdp-font-body);
  background: var(--vdp-bg);
  min-height: 100dvh;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

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

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

h1,
h2,
h3 {
  font-family: var(--vdp-font-display);
  color: var(--vdp-text);
}

/* ===================== App shell / sidebar ===================== */

.app-shell {
  min-height: 100dvh;
  display: flex;
}

.app-shell__sidebar {
  width: var(--vdp-sidebar-width);
  flex-shrink: 0;
  background: var(--vdp-surface);
  border-right: 1px solid var(--vdp-border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 20px 14px;
  gap: 0;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
}

.app-shell__frame {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid var(--vdp-border-soft);
  margin-bottom: 14px;
  color: var(--vdp-text);
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: var(--vdp-radius-md);
  background: var(--vdp-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.brand__mark svg {
  width: 18px;
  height: 18px;
}

.brand__copy {
  min-width: 0;
}

.brand__eyebrow {
  display: block;
  font: 700 13.5px var(--vdp-font-display);
  color: var(--vdp-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__text {
  display: block;
  font: 500 11px var(--vdp-font-body);
  color: var(--vdp-text-muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav__link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: var(--vdp-radius-sm);
  color: var(--vdp-text-secondary);
  font: 600 13.5px var(--vdp-font-body);
}

.sidebar-nav__link:hover,
.sidebar-nav__link--active {
  background: var(--vdp-bg);
  color: var(--vdp-text);
  text-decoration: none;
}

.sidebar-nav__link--active {
  color: var(--vdp-primary);
  font-weight: 700;
}

.sidebar-nav__icon {
  display: inline-flex;
  flex-shrink: 0;
}

.sidebar-nav__icon svg {
  width: 17px;
  height: 17px;
}

.sidebar-nav__label {
  white-space: nowrap;
}

.sidebar-nav__badge {
  margin-left: auto;
  background: var(--vdp-danger-tint);
  color: var(--vdp-danger);
  font: 700 10.5px var(--vdp-font-body);
  padding: 2px 6px;
  border-radius: var(--vdp-radius-pill);
}

.sidebar-nav__badge--info {
  background: var(--vdp-primary);
  color: #fff;
}

.sidebar-profile {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--vdp-border-soft);
  position: relative;
}

.sidebar-profile summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: var(--vdp-radius-sm);
  cursor: pointer;
}

.sidebar-profile summary::-webkit-details-marker {
  display: none;
}

.sidebar-profile summary:hover {
  background: var(--vdp-bg);
}

.sidebar-profile__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--vdp-primary-tint);
  color: var(--vdp-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 11px var(--vdp-font-display);
  flex-shrink: 0;
}

.sidebar-profile__copy {
  min-width: 0;
}

.sidebar-profile__name {
  font: 600 12px var(--vdp-font-body);
  color: var(--vdp-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile__role {
  font: 500 10.5px var(--vdp-font-body);
  color: var(--vdp-text-muted);
}

.sidebar-profile__menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  width: 200px;
  background: var(--vdp-surface);
  border: 1px solid var(--vdp-border);
  border-radius: var(--vdp-radius-lg);
  box-shadow: var(--vdp-shadow-popover);
  overflow: hidden;
  z-index: 20;
}

.sidebar-profile__header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--vdp-border-soft);
}

.sidebar-profile__header strong {
  display: block;
  font: 700 12.5px var(--vdp-font-body);
  color: var(--vdp-text);
}

.sidebar-profile__header span {
  font: 500 11px var(--vdp-font-body);
  color: var(--vdp-text-muted);
}

.sidebar-profile__item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font: 600 12.5px var(--vdp-font-body);
  color: var(--vdp-text);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}

.sidebar-profile__item:hover {
  background: var(--vdp-bg);
  text-decoration: none;
}

.sidebar-profile__item--danger {
  color: var(--vdp-danger);
  border-top: 1px solid var(--vdp-border-soft);
}

.sidebar-profile__item--danger:hover {
  background: var(--vdp-danger-tint);
}

.sidebar-profile__form {
  margin: 0;
}

.flash-stack {
  display: grid;
  gap: 10px;
  padding: 16px 36px 0;
}

.flash {
  border-radius: var(--vdp-radius-md);
  padding: 12px 16px;
  border: 1px solid;
  font: 600 13px var(--vdp-font-body);
}

.flash--notice {
  color: var(--vdp-success);
  background: var(--vdp-success-tint);
  border-color: #bbf7d0;
}

.flash--alert {
  color: var(--vdp-danger);
  background: var(--vdp-danger-tint);
  border-color: #fecaca;
}

.page {
  padding: 36px 44px;
  flex: 1;
}

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

  .app-shell__sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    padding: 10px 14px;
    gap: 10px;
    border-right: none;
    border-bottom: 1px solid var(--vdp-border);
  }

  .brand {
    padding: 0;
    border-bottom: none;
    margin-bottom: 0;
  }

  .brand__copy,
  .sidebar-nav__label,
  .sidebar-profile__copy {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px;
  }

  .sidebar-profile {
    margin-top: 0;
    margin-left: auto;
    padding-top: 0;
    border-top: none;
  }

  .sidebar-profile__menu {
    left: auto;
    right: 0;
  }

  .flash-stack {
    padding: 16px 20px 0;
  }

  .page {
    padding: 24px 20px;
  }
}

/* ===================== Breadcrumb ===================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 500 12.5px var(--vdp-font-body);
  color: var(--vdp-text-muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--vdp-text-muted);
}

.breadcrumb a:hover {
  color: var(--vdp-primary);
}

.breadcrumb__current {
  color: #334155;
  font-weight: 600;
}

/* ===================== Typography helpers ===================== */

.eyebrow {
  margin: 0 0 4px;
  color: var(--vdp-primary);
  font: 700 11px var(--vdp-font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-header h1 {
  font: 800 22px var(--vdp-font-display);
  margin: 0;
  letter-spacing: -0.01em;
}

.page-header p {
  margin: 4px 0 0;
  font: 500 13px var(--vdp-font-body);
  color: var(--vdp-text-secondary);
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hero h1 {
  font: 800 24px var(--vdp-font-display);
  margin: 0;
}

.hero p {
  margin: 0;
  color: var(--vdp-text-secondary);
  font: 500 14px var(--vdp-font-body);
  line-height: 1.55;
}

.hero {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.hero--auth {
  max-width: 42rem;
}

.hero--public {
  min-height: 80dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.hero--public > div {
  max-width: 34rem;
}

.hero-actions {
  margin-top: 12px;
}

/* ===================== Cards / panels ===================== */

.panel,
.shell-card,
.metric,
.action-card,
.detail-card,
.timeline-card,
.summary-row,
.step-card,
.action-tile,
.hero-panel,
.form-card--elevated {
  background: var(--vdp-surface);
  border: 1px solid var(--vdp-border);
  border-radius: var(--vdp-radius-lg);
}

.panel {
  padding: 20px 22px;
}

.panel--split {
  display: grid;
  gap: 20px;
}

.panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel__header h2 {
  margin: 0;
  font: 700 14.5px var(--vdp-font-display);
}

.panel__header p {
  margin: 2px 0 0;
  color: var(--vdp-text-secondary);
  font: 500 12.5px var(--vdp-font-body);
}

.panel__link {
  color: var(--vdp-primary);
  font: 600 12.5px var(--vdp-font-body);
}

.section-intro,
.field-hint,
.empty-state,
.empty-state-inline {
  color: var(--vdp-text-secondary);
  font: 500 12.5px var(--vdp-font-body);
}

.empty-state {
  padding: 18px 0;
}

/* ===================== Home ===================== */

.workspace-home {
  display: grid;
  gap: 24px;
}

.workspace-home__header h1 {
  font: 800 24px var(--vdp-font-display);
  margin: 0 0 4px;
}

.workspace-home__header p {
  margin: 0;
  color: var(--vdp-text-secondary);
  font: 500 14px var(--vdp-font-body);
}

.panel--home {
  background: none;
  border: none;
  padding: 0;
  display: grid;
  gap: 20px;
}

.home-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--vdp-surface);
  border: 1px solid var(--vdp-border);
  border-radius: var(--vdp-radius-sm);
  padding: 7px 12px;
  max-width: 320px;
}

.home-selector .input {
  border: none;
  padding: 0;
  background: none;
  font: 500 12.5px var(--vdp-font-body);
}

.home-selector .input:focus {
  box-shadow: none;
}

.field--grow {
  min-width: 0;
  flex: 1;
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.action-tile {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-tile:has(a:hover),
.action-tile:has(button:hover) {
  border-color: #c7d2fe;
}

.action-tile__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--vdp-radius-md);
  background: var(--vdp-primary-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vdp-primary);
}

.action-tile--incident .action-tile__icon {
  background: var(--vdp-danger-tint);
  color: var(--vdp-danger);
}

.action-tile--history .action-tile__icon {
  background: var(--vdp-success-tint);
  color: var(--vdp-success);
}

.action-tile__eyebrow {
  margin: 0;
  font: 700 12px var(--vdp-font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--vdp-text-muted);
}

.action-tile h2 {
  margin: 0;
  font: 700 14px var(--vdp-font-display);
}

.action-tile__description {
  margin: 0;
  font: 500 12px var(--vdp-font-body);
  color: var(--vdp-text-muted);
}

.action-tile__footer {
  margin-top: auto;
}

.action-tile .button {
  width: 100%;
}

/* ===================== Buttons ===================== */

.button,
.form-submit,
button.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--vdp-radius-md);
  border: 0;
  background: var(--vdp-primary);
  color: #ffffff;
  font: 700 13px var(--vdp-font-body);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--vdp-font-body);
}

.button:hover,
.form-submit:hover {
  background: var(--vdp-primary-hover);
  color: #fff;
  text-decoration: none;
}

.button--ghost {
  background: var(--vdp-border-soft);
  color: #334155;
}

.button--ghost:hover {
  background: var(--vdp-border);
  color: #334155;
}

.button--dark,
.button--primary {
  background: var(--vdp-primary);
  color: #fff;
}

.button--secondary {
  background: var(--vdp-border-soft);
  color: #334155;
}

.button--compact {
  padding: 8px 14px;
  font-size: 12.5px;
}

button.button {
  appearance: none;
}

/* ===================== Forms ===================== */

.form-grid,
.auth-form {
  display: grid;
  gap: 14px;
}

.field,
.form-field {
  display: grid;
  gap: 6px;
}

.field label,
.form-field label,
.form-label {
  font: 600 12px var(--vdp-font-body);
  color: #475569;
  text-transform: none;
  letter-spacing: normal;
  opacity: 1;
}

.input,
.form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--vdp-border);
  border-radius: var(--vdp-radius-sm);
  background: var(--vdp-surface);
  color: var(--vdp-text);
  font: 500 13px var(--vdp-font-body);
  transition: border-color 0.15s ease;
}

.input::placeholder,
.form-input::placeholder {
  color: var(--vdp-text-muted);
}

.input:focus,
.form-input:focus {
  outline: none;
  border-color: var(--vdp-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

.input--textarea {
  min-height: 8rem;
  resize: vertical;
  font-family: var(--vdp-font-body);
}

.input--file {
  padding: 8px 10px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.form-errors {
  padding: 12px 16px;
  border-radius: var(--vdp-radius-sm);
  border: 1px solid #fecaca;
  background: var(--vdp-danger-tint);
  color: var(--vdp-danger);
  font: 600 12.5px var(--vdp-font-body);
}

.success-banner {
  padding: 12px 16px;
  border-radius: var(--vdp-radius-sm);
  border: 1px solid #bbf7d0;
  background: var(--vdp-success-tint);
  color: #166534;
  font: 500 12.5px var(--vdp-font-body);
}

.success-banner strong {
  font-weight: 700;
}

.form-message {
  padding: 12px 14px;
  margin-top: 12px;
  border-radius: var(--vdp-radius-sm);
  font: 600 12.5px var(--vdp-font-body);
}

.form-message--success {
  background: var(--vdp-success-tint);
  color: #166534;
  border: 1px solid #bbf7d0;
}

.form-message--error {
  background: var(--vdp-danger-tint);
  color: var(--vdp-danger);
  border: 1px solid #fecaca;
}

/* ===================== Auth screens ===================== */

.auth-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vdp-bg);
  padding: 24px;
}

.auth-form-wrapper,
.form-card--centered {
  width: 100%;
  max-width: 380px;
  background: var(--vdp-surface);
  border: 1px solid var(--vdp-border);
  border-radius: var(--vdp-radius-xl);
  padding: 36px 32px;
}

.auth-form-title {
  margin: 0 0 4px;
  font: 800 20px var(--vdp-font-display);
  color: var(--vdp-text);
}

.auth-form-subtitle {
  margin: 0 0 26px;
  font: 500 13px var(--vdp-font-body);
  color: var(--vdp-text-secondary);
}

.auth-form-footer {
  margin: 16px 0 0;
  text-align: center;
  font: 600 12.5px var(--vdp-font-body);
  color: var(--vdp-text-secondary);
}

.auth-link {
  color: var(--vdp-primary);
  font-weight: 600;
}

.auth-link:hover {
  color: var(--vdp-primary-hover);
}

.auth-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--vdp-radius-md);
  background: var(--vdp-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: #fff;
}

@media (max-width: 640px) {
  .auth-screen {
    padding: 16px;
  }

  .auth-form-wrapper,
  .form-card--centered {
    padding: 28px 24px;
  }
}

/* ===================== Badges ===================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--vdp-radius-pill);
  font: 700 10.5px var(--vdp-font-body);
  text-transform: none;
}

.badge--neutral {
  background: var(--vdp-border-soft);
  color: #334155;
}

.badge--success {
  background: var(--vdp-success-tint);
  color: #166534;
}

.badge--warning {
  background: var(--vdp-warning-tint);
  color: var(--vdp-warning);
}

.badge--danger {
  background: var(--vdp-danger-tint);
  color: var(--vdp-danger);
}

.badge--info {
  background: var(--vdp-info-tint);
  color: var(--vdp-info);
}

/* ===================== Lists / timelines ===================== */

.stack-list,
.dashboard-grid,
.metrics,
.action-grid,
.template-list,
.summary-table {
  display: grid;
  gap: 12px;
}

.metrics {
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.metrics--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric {
  padding: 18px 20px;
}

.metric__label {
  margin: 0;
  font: 500 12px var(--vdp-font-body);
  color: var(--vdp-text-muted);
}

.metric__value {
  margin: 6px 0 0;
  font: 800 26px var(--vdp-font-display);
  color: var(--vdp-text);
}

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

.timeline-card,
.detail-card,
.step-card,
.summary-row,
.action-card {
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.timeline-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  cursor: default;
}

.timeline-card--interactive,
.timeline-card--button {
  cursor: pointer;
}

.timeline-card--interactive:hover,
.timeline-card--button:hover {
  border-color: #c7d2fe;
  text-decoration: none;
}

.timeline-card strong {
  font: 600 13px var(--vdp-font-body);
  color: var(--vdp-text);
}

.timeline-card p {
  margin: 0;
  font: 500 12px var(--vdp-font-body);
  color: var(--vdp-text-muted);
}

.timeline-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--vdp-text-muted);
  font: 500 11.5px var(--vdp-font-body);
}

.timeline-card__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timeline-card__icon,
.step-card__index {
  width: 32px;
  height: 32px;
  border-radius: var(--vdp-radius-sm);
  background: var(--vdp-primary-tint);
  color: var(--vdp-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 11px var(--vdp-font-display);
  flex-shrink: 0;
}

.timeline-card__cta {
  margin-top: 2px;
  font: 700 11.5px var(--vdp-font-body);
  color: var(--vdp-primary);
}

.detail-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.detail-card strong {
  font: 600 13px var(--vdp-font-body);
}

.detail-card p {
  margin: 0;
  font: 500 12px var(--vdp-font-body);
  color: var(--vdp-text-muted);
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-list__item {
  padding: 12px 14px;
  border: 1px solid var(--vdp-border);
  border-radius: var(--vdp-radius-sm);
  background: var(--vdp-bg);
}

.detail-list__item p {
  margin: 4px 0 0;
  font: 500 12.5px var(--vdp-font-body);
}

.summary-row {
  justify-content: space-between;
}

.summary-row__aside {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font: 500 12px var(--vdp-font-body);
  color: var(--vdp-text-muted);
}

.action-card {
  display: block;
  color: var(--vdp-text);
  font: 700 13px var(--vdp-font-display);
}

.action-card:hover {
  border-color: #c7d2fe;
  text-decoration: none;
  color: var(--vdp-text);
}

.action-card--outlined,
.action-card--muted,
.action-card--gradient {
  background: var(--vdp-surface);
  color: var(--vdp-text);
}

.action-card__eyebrow {
  display: block;
  margin: 0 0 4px;
  font: 700 11px var(--vdp-font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vdp-text-muted);
}

/* ===================== Checklist step nav / progress ===================== */

.stack-list--compact {
  gap: 4px;
}

.step-card {
  padding: 10px 12px;
  border-radius: var(--vdp-radius-sm);
  border: none;
  background: var(--vdp-border-soft);
  gap: 10px;
}

.step-card--active {
  background: var(--vdp-primary-tint);
}

.step-card__index {
  width: 22px;
  height: 22px;
  font-size: 10.5px;
}

.progress-track {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 6px;
  border-radius: var(--vdp-radius-pill);
  background: var(--vdp-border);
  margin-bottom: 20px;
}

.progress-track__value {
  display: block;
  height: 100%;
  background: var(--vdp-primary);
  transition: width 0.25s ease;
}

.question-panel h2 {
  margin: 0;
  font: 700 15px var(--vdp-font-display);
}

.question-panel p {
  margin: 4px 0 0;
  color: var(--vdp-text-secondary);
  font: 500 12.5px var(--vdp-font-body);
}

.choice-group {
  display: flex;
  gap: 8px;
}

.choice-card {
  position: relative;
}

.choice-card__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card__body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 18px;
  border-radius: var(--vdp-radius-sm);
  border: 1.5px solid var(--vdp-border);
  background: var(--vdp-surface);
  color: var(--vdp-text);
  font: 700 12.5px var(--vdp-font-body);
  cursor: pointer;
}

.choice-card__input:checked + .choice-card__body {
  border-color: var(--vdp-primary);
  background: var(--vdp-primary-tint);
  color: var(--vdp-primary);
}

/* ===================== Modals / dialogs ===================== */

dialog.action-modal,
.action-modal {
  width: min(40rem, calc(100vw - 2rem));
  padding: 0;
  border: 1px solid var(--vdp-border);
  border-radius: var(--vdp-radius-xl);
  background: var(--vdp-surface);
  box-shadow: var(--vdp-shadow-modal);
}

.action-modal::backdrop,
.modal-overlay {
  background: rgba(15, 23, 42, 0.5);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.action-modal--detail {
  width: min(48rem, calc(100vw - 2rem));
}

.action-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--vdp-border-soft);
}

.action-modal__header h2 {
  margin: 4px 0 0;
  font: 800 17px var(--vdp-font-display);
}

.action-modal__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--vdp-border-soft);
  color: var(--vdp-text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.action-modal__close:hover {
  background: var(--vdp-border);
  color: var(--vdp-text);
}

.modal-list {
  display: grid;
  gap: 10px;
  padding: 18px 22px 22px;
}

.modal-list--detail {
  gap: 12px;
}

.modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--vdp-border);
  border-radius: var(--vdp-radius-md);
  background: var(--vdp-bg);
}

.modal-row p {
  margin: 2px 0 0;
  color: var(--vdp-text-muted);
  font: 500 12px var(--vdp-font-body);
}

.modal-content {
  display: flex;
  flex-direction: column;
  max-width: 32rem;
  width: 100%;
  background: var(--vdp-surface);
  border: 1px solid var(--vdp-border);
  border-radius: var(--vdp-radius-xl);
  box-shadow: var(--vdp-shadow-modal);
  overflow: hidden;
}

.modal-content--medium {
  max-width: 28rem;
}

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

.modal-header h2 {
  margin: 0;
  font: 800 16px var(--vdp-font-display);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--vdp-text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: var(--vdp-radius-sm);
}

.modal-close:hover {
  background: var(--vdp-border-soft);
}

.modal-body {
  padding: 20px;
  flex: 1;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 20px;
  border-top: 1px solid var(--vdp-border-soft);
}

/* ===================== Unit picker / grid ===================== */

.unit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.unit-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  color: var(--vdp-text);
}

.unit-card:hover {
  border-color: #c7d2fe;
  box-shadow: var(--vdp-shadow-hover);
  text-decoration: none;
  color: var(--vdp-text);
}

.unit-card--active {
  border-color: var(--vdp-primary);
}

.unit-card__name {
  font: 700 14px var(--vdp-font-display);
}

.unit-card__meta {
  font: 500 12px var(--vdp-font-body);
  color: var(--vdp-text-muted);
}

.unit-card__footer {
  display: flex;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid var(--vdp-border-soft);
  flex-wrap: wrap;
  font: 500 11.5px var(--vdp-font-body);
  color: var(--vdp-text-secondary);
}

.unit-card__footer strong {
  color: #334155;
}

/* ===================== Filter pills ===================== */

.pill-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.pill-filter {
  padding: 6px 14px;
  border-radius: var(--vdp-radius-pill);
  font: 600 12px var(--vdp-font-body);
  background: var(--vdp-border-soft);
  color: #334155;
  border: none;
  cursor: pointer;
}

.pill-filter--active,
.pill-filter:hover {
  background: var(--vdp-primary-tint);
  color: var(--vdp-primary);
  text-decoration: none;
}

/* ===================== Pagination ===================== */

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.pagination ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination li {
  display: inline-block;
}

.pagination__link,
.pagination__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--vdp-border);
  border-radius: var(--vdp-radius-sm);
  background: var(--vdp-surface);
  color: var(--vdp-text);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.pagination__link:hover {
  background: var(--vdp-primary);
  color: white;
  border-color: var(--vdp-primary);
}

.pagination__current {
  background: var(--vdp-primary);
  color: white;
  border-color: var(--vdp-primary);
  cursor: default;
}

/* ===================== Documents ===================== */

.documents-list {
  display: grid;
  gap: 12px;
}

.document-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 16px 20px;
  border: 1px solid var(--vdp-border);
  border-radius: var(--vdp-radius-lg);
  background: var(--vdp-surface);
}

.document-card:hover {
  border-color: #c7d2fe;
}

.document-card__header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.document-card__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--vdp-radius-sm);
  background: var(--vdp-primary-tint);
  color: var(--vdp-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.document-card__meta {
  flex: 1;
  min-width: 0;
}

.document-card__title {
  margin: 0 0 4px;
  font: 600 12.5px var(--vdp-font-body);
  word-break: break-word;
}

.document-card__info {
  margin: 0;
  display: flex;
  gap: 10px;
  font: 500 11.5px var(--vdp-font-body);
  color: var(--vdp-text-muted);
}

.document-card__kind {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--vdp-radius-sm);
  background: var(--vdp-primary-tint);
  color: var(--vdp-primary);
  font-weight: 700;
  text-transform: capitalize;
}

.document-card__body {
  grid-column: 1;
  display: grid;
  gap: 6px;
  font: 500 12px var(--vdp-font-body);
}

.document-card__source,
.document-card__resource,
.document-card__date {
  display: flex;
  gap: 6px;
}

.document-card__source strong,
.document-card__resource strong,
.document-card__date strong {
  color: var(--vdp-text);
  min-width: 5rem;
}

.document-card__footer {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.empty-state-block {
  text-align: center;
  padding: 3rem 1.5rem;
}

.empty-state-block__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state-block h2 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
}

.empty-state-block p {
  margin: 0;
  color: var(--vdp-text-secondary);
}

@media (max-width: 767px) {
  .home-actions {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

  .document-card {
    grid-template-columns: 1fr;
  }

  .document-card__footer {
    grid-column: 1;
  }

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

@media (min-width: 768px) {
  .dashboard-grid--history {
    grid-template-columns: 0.85fr 1fr 1fr;
  }

  .dashboard-grid--checklist {
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: start;
  }

  .panel--split {
    grid-template-columns: minmax(16rem, 0.7fr) minmax(0, 1.3fr);
    align-items: start;
  }

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