/* GoalPost / FBA Admin theme – light green gradient, white cards, dark green accents */
:root {
  --bg-gradient-start: #e8f5e9;
  --bg-gradient-end: #c8e6c9;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.06);
  --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --primary: #1b5e20;
  --primary-hover: #2e7d32;
  --accent-green: #43a047;
  --accent-yellow: #facc15;
  --cream: #f5f0e6;
  --teal: #0d9488;
  --success: #22c55e;
  --error: #dc2626;
  --text: #1f2937;
  --text-muted: #6b7280;
  --input-bg: #fefce8;
  --input-border: #e5e7eb;
  /* Motion — calm, product-style easing */
  --motion-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --motion-duration: 0.32s;
  --motion-duration-fast: 0.18s;
  --motion-stagger: 0.055s;
  /* Mockup-aligned accents (customer dashboard reference) */
  --mockup-blue: #0d6efd;
  --mockup-blue-soft: rgba(13, 110, 253, 0.12);
  --mockup-header-blue: #1565c0;
  --category-green: #1b5e20;
  --category-green-bold: #145214;
  --mockup-fail-red: #c62828;
  /* Full-width layout (mockup: edge-to-edge with small gutters) */
  --dashboard-page-gutter: 1.5rem;
  /* Folder tabs (mockup Tailwind: rounded-t-lg, hsl borders) */
  --folder-tab-active-bg: hsl(153, 60%, 32%);
  --folder-tab-active-border: hsl(153, 60%, 32%);
  --folder-tab-border: hsl(150, 20%, 88%);
  --folder-tab-text: hsl(220, 10%, 40%);
  --folder-tab-hover-bg: hsl(150, 20%, 96%);
  --folder-tab-inactive-bg: hsl(0, 0%, 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: var(--text);
}

/* Logo – GoalPost image */
.logo-img {
  display: block;
  width: auto;
  height: auto;
  border-radius: 12px;
  flex-shrink: 0;
}
.logo-img-login {
  height: 80px;
  margin: 0 auto 1rem;
}
.logo-img-header {
  height: 40px;
}

/* Login – matches Football Admin: white card, soft shadow, green button */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  animation: goalpost-login-in calc(var(--motion-duration) + 0.1s) var(--motion-ease-out) both;
}

.login-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-header .logo-img-login {
  margin: 0 auto 1rem;
}

.login-header h1 {
  margin: 0 0 0.35rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.login-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.login-form label {
  display: block;
  margin-bottom: 1.25rem;
}

.login-form label span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.login-form input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.12);
}

.login-form button {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.login-form button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.login-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.error-msg {
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Dashboard – FBA Admin style: light bg, white cards, green accents */
.dashboard {
  min-height: 100vh;
  padding: 0 var(--dashboard-page-gutter) 2rem;
  box-sizing: border-box;
  width: 100%;
}

/* Mockup primary nav — folder tabs (px-6, gap-1.5, rounded-t-lg, border-b-0) */
.primary-nav-bar {
  width: 100%;
  margin: 0 0 0.85rem;
  padding: 0 var(--dashboard-page-gutter);
  border-bottom: 1px solid var(--folder-tab-border);
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.primary-nav-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.375rem;
  min-width: min-content;
  padding-bottom: 0;
}

.primary-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--folder-tab-text);
  text-decoration: none;
  border-radius: 0.5rem 0.5rem 0 0;
  border: 1px solid var(--folder-tab-border);
  border-bottom: none;
  background: var(--folder-tab-inactive-bg);
  white-space: nowrap;
  transition:
    color var(--motion-duration-fast) var(--motion-ease-soft),
    background var(--motion-duration-fast) var(--motion-ease-soft),
    border-color var(--motion-duration-fast) var(--motion-ease-soft);
  margin-bottom: -1px;
  position: relative;
  z-index: 0;
}

.primary-nav-link:hover {
  color: var(--folder-tab-text);
  background: var(--folder-tab-hover-bg);
}

.primary-nav-link.is-active {
  color: hsl(0, 0%, 100%);
  background: var(--folder-tab-active-bg);
  border-color: var(--folder-tab-active-border);
  z-index: 1;
}

.primary-nav-link:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

.dashboard-page-main {
  width: 100%;
  margin: 0;
  padding: 0 0 2rem;
  box-sizing: border-box;
}

.placeholder-card--wide {
  max-width: 48rem;
}

.home-panel-eyebrow {
  margin: 0 0 0.35rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--category-green-bold);
  letter-spacing: 0.02em;
}

.dashboard-home-panel {
  width: 100%;
  margin: 0 0 2rem;
  padding: 1.25rem 1.35rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  box-sizing: border-box;
}

.home-panel-header {
  margin-bottom: 1rem;
}

.home-panel-title {
  margin: 0 0 0.35rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--category-green-bold);
}

.home-panel-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.home-methodology {
  margin: 0.5rem 0 0.25rem 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-body);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 0.35rem 0.6rem 0.6rem;
  background: #fafbfa;
}

.home-methodology > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--category-green-bold);
  list-style: none;
  padding: 0.2rem 0.1rem;
}

.home-methodology > summary::-webkit-details-marker {
  display: none;
}

.home-methodology[open] > summary {
  margin-bottom: 0.35rem;
}

.home-methodology-body {
  max-width: 60rem;
  padding: 0 0.1rem 0.15rem 0.35rem;
  border-top: 1px dashed var(--card-border);
  padding-top: 0.5rem;
}

.home-methodology-body ul {
  margin: 0;
  padding-left: 1.1rem;
}

.home-methodology-body li {
  margin: 0.3rem 0;
}

.home-methodology-body li code {
  font-size: 0.8em;
  background: #eef2ef;
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

.home-risk-fail-count {
  font-size: 0.82em;
  color: var(--text-muted);
  font-weight: 500;
}

.home-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.home-kpi-card {
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, #f8faf8 0%, #fff 100%);
  border: 1px solid var(--input-border);
  border-radius: 10px;
}

.home-kpi-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.home-kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

.home-kpi-value--fail {
  color: var(--mockup-fail-red);
}

.home-kpi-grid--hero {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .home-kpi-grid--hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.home-kpi-card--stat {
  min-height: 5.5rem;
}

.home-kpi-sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.home-kpi-sub--warn {
  color: #b45309;
}

.home-kpi-value--flaky {
  color: #d97706;
}

.home-kpi-card--deploy-risky {
  background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
  border-color: rgba(185, 28, 28, 0.35);
}

.home-kpi-card--deploy-risky .home-kpi-value {
  color: var(--mockup-fail-red);
}

.home-widgets-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}

@media (max-width: 960px) {
  .home-widgets-row {
    grid-template-columns: 1fr;
  }
}

.home-widgets-row--schedule {
  margin-bottom: 0.5rem;
}

.home-widget {
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, #fafdfb 0%, #fff 100%);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(27, 94, 32, 0.06);
}

.home-widget-title {
  margin: 0 0 0.35rem 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--category-green-bold);
}

.home-widget-icon {
  margin-right: 0.35rem;
}

.home-widget-hint {
  margin: 0 0 0.75rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.home-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.home-risk-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow-y: auto;
}

.home-risk-item {
  padding: 0.5rem 0.65rem;
  margin-bottom: 0.45rem;
  font-size: 0.86rem;
  line-height: 1.4;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: #fff;
}

.home-risk-item--empty {
  color: var(--text-muted);
  font-style: italic;
}

.home-risk-fail {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  margin-right: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #991b1b;
  background: #fee2e2;
  border-radius: 4px;
}

.home-risk-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.home-trend-range {
  display: flex;
  gap: 0.35rem;
}

.home-trend-btn {
  padding: 0.25rem 0.55rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--card-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  cursor: pointer;
}

.home-trend-btn--active {
  color: var(--card-bg);
  background: var(--primary);
  border-color: var(--primary);
}

.home-trend-chart {
  min-height: 140px;
  margin-top: 0.5rem;
}

.home-trend-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2px;
  min-height: 130px;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--input-border);
}

.home-trend-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-trend-stack {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  align-items: stretch;
  width: 100%;
  height: 120px;
}

.home-trend-seg--pass {
  background: #22c55e;
  border-radius: 2px 2px 0 0;
  min-height: 2px;
}

.home-trend-seg--skip {
  background: #facc15;
  min-height: 2px;
}

.home-trend-seg--fail {
  background: #ef4444;
  border-radius: 0 0 2px 2px;
  min-height: 2px;
}

.home-trend-seg--empty {
  flex: 1;
  min-height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
}

.home-trend-xlabel {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  transform: rotate(-35deg);
  transform-origin: center top;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.home-legend-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: middle;
}

.home-legend-dot--pass {
  background: #22c55e;
}
.home-legend-dot--skip {
  background: #facc15;
}
.home-legend-dot--fail {
  background: #ef4444;
}

.home-widget--modules {
  margin-bottom: 1.25rem;
}

.home-modules-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home-module-row {
  display: grid;
  grid-template-columns: minmax(3rem, 5rem) minmax(4rem, auto) minmax(4.5rem, auto) 1fr 2.75rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.86rem;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 640px) {
  .home-module-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

.home-module-name {
  font-weight: 700;
  color: var(--primary);
}

.home-module-count {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.home-module-fail.is-bad {
  font-weight: 700;
  color: var(--mockup-fail-red);
}

.home-module-fail.is-ok {
  font-weight: 700;
  color: #059669;
}

.home-module-bar-wrap {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.home-module-bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  border-radius: 4px;
}

.home-module-pct {
  text-align: right;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* —— Test scheduling card (home) —— */
.home-widget--schedule {
  padding: 1.25rem 1.35rem 1.35rem;
  border-radius: 14px;
  border: 1px solid rgba(27, 94, 32, 0.12);
  box-shadow: var(--card-shadow);
  background: linear-gradient(165deg, #ffffff 0%, #fbfefc 100%);
}

.home-schedule-card-head {
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.home-schedule-card-title {
  margin-bottom: 0.35rem !important;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.home-schedule-card-sub {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 36rem;
}

.home-schedule-section {
  margin-bottom: 1.15rem;
}

.home-schedule-section-title {
  margin: 0 0 0.55rem 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--category-green-bold);
  opacity: 0.92;
}

.home-schedule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-schedule-list--boxed {
  padding: 0.15rem 0.85rem;
  background: rgba(232, 245, 233, 0.45);
  border: 1px solid rgba(27, 94, 32, 0.1);
  border-radius: 10px;
}

.home-schedule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.65rem 0;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.home-schedule-item:last-child {
  border-bottom: none;
}

.home-schedule-item-label {
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.home-schedule-target {
  margin-top: 0.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.home-schedule-callout {
  margin: 0 0 1.1rem 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text);
  background: linear-gradient(90deg, rgba(13, 110, 253, 0.08) 0%, rgba(232, 245, 233, 0.6) 100%);
  border-left: 3px solid var(--mockup-blue);
  border-radius: 0 8px 8px 0;
}

.home-schedule-field {
  margin-bottom: 1rem;
}

.home-schedule-field:last-of-type {
  margin-bottom: 0.35rem;
}

.home-schedule-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.home-schedule-label-hint {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.home-schedule-select-wrap {
  position: relative;
}

.home-schedule-select-wrap::after {
  content: "";
  position: absolute;
  right: 0.85rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  opacity: 0.65;
}

.home-schedule-select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 2.65rem;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  background-color: #fff;
  background-image: linear-gradient(180deg, #fff 0%, #fafafa 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  appearance: none;
  cursor: pointer;
  transition: border-color var(--motion-duration-fast) var(--motion-ease-soft),
    box-shadow var(--motion-duration-fast) var(--motion-ease-soft);
}

.home-schedule-select:hover {
  border-color: rgba(27, 94, 32, 0.35);
}

.home-schedule-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.18);
}

/* Segmented Dev / Prod */
.sched-env-segmented {
  display: inline-flex;
  padding: 4px;
  background: #e8ecf0;
  border-radius: 11px;
  gap: 2px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.sched-env-seg {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.sched-env-seg input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.sched-env-seg-ui {
  display: block;
  padding: 0.45rem 1.35rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 8px;
  transition: background var(--motion-duration-fast) var(--motion-ease-soft),
    color var(--motion-duration-fast) var(--motion-ease-soft),
    box-shadow var(--motion-duration-fast) var(--motion-ease-soft);
}

.sched-env-seg input:focus-visible + .sched-env-seg-ui {
  outline: 2px solid var(--mockup-blue);
  outline-offset: 2px;
}

.sched-env-seg input:checked + .sched-env-seg-ui {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.home-schedule-field--env {
  margin-top: 0.15rem;
}

.home-schedule-time-row {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.5rem;
  background: #fff;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.home-schedule-num {
  width: 2.85rem;
  padding: 0.4rem 0.35rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--text);
  border: none;
  border-radius: 6px;
  background: rgba(232, 245, 233, 0.35);
  transition: background var(--motion-duration-fast) var(--motion-ease-soft);
  -moz-appearance: textfield;
}

.home-schedule-num::-webkit-outer-spin-button,
.home-schedule-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.home-schedule-num:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(27, 94, 32, 0.25);
}

.home-schedule-time-sep {
  color: var(--text-muted);
  font-weight: 800;
  font-size: 1rem;
  padding: 0 0.1rem;
  user-select: none;
}

.home-schedule-actions {
  margin-top: 1.25rem;
}

.home-schedule-save-btn {
  width: 100%;
  padding: 0.72rem 1.25rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(180deg, var(--primary-hover) 0%, var(--primary) 100%);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(27, 94, 32, 0.28);
  transition: transform var(--motion-duration-fast) var(--motion-ease-out),
    box-shadow var(--motion-duration-fast) var(--motion-ease-out),
    filter var(--motion-duration-fast) var(--motion-ease-out);
}

.home-schedule-save-btn:hover {
  filter: brightness(1.06);
  box-shadow: 0 4px 14px rgba(27, 94, 32, 0.32);
}

.home-schedule-save-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(27, 94, 32, 0.25);
}

.home-schedule-save-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.35), 0 2px 8px rgba(27, 94, 32, 0.28);
}

.home-schedule-save-btn-text {
  display: inline-block;
}

.home-schedule-save-status {
  margin: 0.65rem 0 0 0;
  font-size: 0.82rem;
  min-height: 1.25em;
  color: var(--text-muted);
  text-align: center;
}

.home-schedule-save-status--ok {
  color: #15803d;
  font-weight: 700;
}

.home-schedule-save-status--error {
  color: var(--mockup-fail-red);
  font-weight: 700;
}

.home-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.home-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.home-toggle-ui {
  width: 2.5rem;
  height: 1.35rem;
  background: #d1d5db;
  border-radius: 999px;
  transition: background 0.2s;
  position: relative;
}

.home-toggle-ui::after {
  content: "";
  position: absolute;
  width: 1.05rem;
  height: 1.05rem;
  background: #fff;
  border-radius: 50%;
  top: 0.15rem;
  left: 0.2rem;
  transition: transform 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.home-toggle input:checked + .home-toggle-ui {
  background: var(--primary);
}

.home-toggle input:checked + .home-toggle-ui::after {
  transform: translateX(1.1rem);
}

.home-daily-report {
  margin: 0;
  padding: 0.85rem 1rem;
  max-height: 280px;
  overflow: auto;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  border: 1px solid #334155;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
  animation: goalpost-header-in var(--motion-duration) var(--motion-ease-out) both;
}

.dashboard-header--mockup {
  width: 100%;
  margin: 0 0 0.75rem;
  box-sizing: border-box;
}

.dashboard-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
  flex-wrap: wrap;
}

.dashboard-header--mockup .header-brand {
  flex: 0 0 auto;
}

.dashboard-header--mockup .header-toolbar {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 0.75rem;
  min-width: 0;
}

.header-search-wrap {
  display: flex;
  align-items: center;
  flex: 1 1 200px;
  min-width: 0;
  max-width: 28rem;
  padding: 0.35rem 0.65rem;
  background: var(--card-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.header-search-icon {
  margin-right: 0.35rem;
  opacity: 0.55;
  font-size: 0.9rem;
}

.header-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
}

.header-search-input:focus {
  outline: none;
}

.header-env-toggles {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.env-chip {
  padding: 0.3rem 0.55rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--cream);
  border: 1px solid var(--input-border);
  border-radius: 999px;
  cursor: default;
  opacity: 0.92;
}

.env-chip--active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  opacity: 1;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--mockup-header-blue);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--mockup-blue-soft);
}

.detail-role-banner {
  margin-bottom: 0.35rem;
}

.detail-role-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--category-green-bold);
  line-height: 1.25;
}

.btn-logout {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--card-bg);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.btn-logout:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(27, 94, 32, 0.06);
}

/* Platform strip: Web vs Mobile vs Load (mockup) */
.platform-tabs-bar {
  width: 100%;
  margin: 0 0 0.75rem;
  animation: goalpost-header-in var(--motion-duration) var(--motion-ease-out) both;
  animation-delay: 0.02s;
}

.platform-tabs-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.platform-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  background: var(--card-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition:
    color var(--motion-duration-fast) var(--motion-ease-soft),
    background var(--motion-duration-fast) var(--motion-ease-soft),
    border-color var(--motion-duration-fast) var(--motion-ease-soft),
    box-shadow var(--motion-duration-fast) var(--motion-ease-out);
}

.platform-tab:hover {
  color: var(--mockup-blue);
  border-color: rgba(13, 110, 253, 0.45);
  background: var(--mockup-blue-soft);
}

.platform-tab.is-active {
  color: var(--card-bg);
  background: var(--mockup-blue);
  border-color: var(--mockup-blue);
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.28);
}

.platform-tab:focus-visible {
  outline: 2px solid var(--mockup-blue);
  outline-offset: 2px;
}

.placeholder-page {
  width: 100%;
  margin: 0;
  padding: 0 0 2rem;
  box-sizing: border-box;
}

.placeholder-page .placeholder-card {
  margin-left: auto;
  margin-right: auto;
}

.placeholder-card {
  max-width: 42rem;
  padding: 1.75rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.placeholder-title {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--category-green-bold);
}

.placeholder-lead {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.5;
}

.placeholder-body {
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.placeholder-body code {
  font-size: 0.88em;
  padding: 0.1rem 0.35rem;
  background: var(--input-bg);
  border-radius: 4px;
}

.placeholder-link {
  font-weight: 600;
  color: var(--mockup-blue);
  text-decoration: none;
}

.placeholder-link:hover {
  text-decoration: underline;
}

/* Role tabs — full width of master+detail column (same max-width as split layout) */
.role-tabs-bar {
  width: 100%;
  margin: 0 0 1.25rem;
  animation: goalpost-header-in var(--motion-duration) var(--motion-ease-out) both;
  animation-delay: 0.04s;
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
}

.role-tabs-label {
  flex: 0 0 auto;
  align-self: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.role-tabs-inner {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: stretch;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.role-tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--card-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition:
    color var(--motion-duration-fast) var(--motion-ease-soft),
    background var(--motion-duration-fast) var(--motion-ease-soft),
    border-color var(--motion-duration-fast) var(--motion-ease-soft),
    box-shadow var(--motion-duration-fast) var(--motion-ease-out);
}

.role-tab:hover {
  color: var(--primary);
  border-color: rgba(27, 94, 32, 0.35);
  background: rgba(27, 94, 32, 0.06);
}

.role-tab.is-selected {
  color: var(--card-bg);
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(27, 94, 32, 0.22);
}

.role-tab:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
  z-index: 1;
  position: relative;
}

@media (max-width: 640px) {
  .role-tab {
    font-size: 0.75rem;
    padding: 0.5rem 0.35rem;
  }
}

.suite-list-loading {
  margin: 0;
  padding: 1rem 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dashboard-main {
  margin: 0.35rem 0 0;
  width: 100%;
}

/* [hidden] alone loses to .dashboard-main--split { display: grid } — force hide for route-based home vs run. */
#dashboard-home-panel[hidden],
#dashboard-run-workspace[hidden] {
  display: none !important;
}

/* Master–detail: suite list | selected suite + output */
.dashboard-main--split {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

.dashboard-main--split > .dashboard-master {
  animation: goalpost-panel-in var(--motion-duration) var(--motion-ease-out) backwards;
}

.dashboard-main--split > .dashboard-detail {
  animation: goalpost-panel-in var(--motion-duration) var(--motion-ease-out) var(--motion-stagger)
    backwards;
}

@media (max-width: 960px) {
  .dashboard-main--split {
    grid-template-columns: 1fr;
  }
}

.week-nav {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.day-picker-wrap {
  position: relative;
}

/* Tooltip + cursor while Maven run locks the day picker (title set from app.js). */
.day-picker-wrap.day-picker-wrap--run-locked {
  cursor: help;
}

.day-picker-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  color: var(--primary);
  background: var(--card-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  cursor: pointer;
  transition:
    background var(--motion-duration-fast) var(--motion-ease-soft),
    border-color var(--motion-duration-fast) var(--motion-ease-soft),
    box-shadow var(--motion-duration-fast) var(--motion-ease-out),
    transform var(--motion-duration-fast) var(--motion-ease-out);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.day-picker-btn:hover {
  background: rgba(27, 94, 32, 0.06);
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(27, 94, 32, 0.12);
}
.day-picker-btn:active {
  transform: scale(0.98);
}

.day-picker-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
  transform: none;
}
.day-picker-btn:disabled:hover {
  background: var(--card-bg);
  border-color: var(--input-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.day-picker-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  min-width: 12rem;
  background: var(--card-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 50;
  max-height: 14rem;
  overflow-y: auto;
}
.day-picker-dropdown:not([hidden]) {
  display: block;
  animation: goalpost-dropdown-in var(--motion-duration-fast) var(--motion-ease-out) both;
  transform-origin: top left;
}

.day-picker-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  text-align: left;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.day-picker-option:hover {
  background: rgba(27, 94, 32, 0.08);
}
.day-picker-option.selected {
  background: rgba(27, 94, 32, 0.12);
  color: var(--primary);
  font-weight: 500;
}

.week-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  min-width: 12rem;
}

.btn-week {
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-week:hover:not(:disabled) {
  background: rgba(27, 94, 32, 0.08);
  color: var(--primary);
}

.btn-week:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* —— Master column (suite list) —— */
.dashboard-master {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 7.5rem);
  padding: 1rem 1rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

@media (max-width: 960px) {
  .dashboard-master {
    max-height: min(42vh, 22rem);
  }
}

.master-toolbar {
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}

.master-week-nav {
  margin-bottom: 0.75rem;
}

.master-heading {
  margin: 0 0 0.5rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.suite-filter-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.suite-filter {
  width: 100%;
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.suite-filter::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

.suite-filter:focus {
  outline: none;
  border-color: var(--mockup-blue);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.suite-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  /* Space between row content / selection border and the vertical scrollbar */
  padding-right: 1rem;
  scrollbar-gutter: stable;
}

.suite-list-item {
  display: flex;
  width: 100%;
  padding: 0.55rem 0.65rem;
  font: inherit;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background var(--motion-duration-fast) var(--motion-ease-soft),
    border-color var(--motion-duration-fast) var(--motion-ease-soft),
    transform var(--motion-duration-fast) var(--motion-ease-out),
    box-shadow var(--motion-duration-fast) var(--motion-ease-soft);
  animation: goalpost-row-in 0.26s var(--motion-ease-out) both;
}

.suite-list-item:nth-child(1) {
  animation-delay: 0.1s;
}
.suite-list-item:nth-child(2) {
  animation-delay: calc(0.1s + 1 * var(--motion-stagger));
}
.suite-list-item:nth-child(3) {
  animation-delay: calc(0.1s + 2 * var(--motion-stagger));
}
.suite-list-item:nth-child(4) {
  animation-delay: calc(0.1s + 3 * var(--motion-stagger));
}
.suite-list-item:nth-child(5) {
  animation-delay: calc(0.1s + 4 * var(--motion-stagger));
}
.suite-list-item:nth-child(6) {
  animation-delay: calc(0.1s + 5 * var(--motion-stagger));
}
.suite-list-item:nth-child(7) {
  animation-delay: calc(0.1s + 6 * var(--motion-stagger));
}
.suite-list-item:nth-child(8) {
  animation-delay: calc(0.1s + 7 * var(--motion-stagger));
}
.suite-list-item:nth-child(9) {
  animation-delay: calc(0.1s + 8 * var(--motion-stagger));
}
.suite-list-item:nth-child(10) {
  animation-delay: calc(0.1s + 9 * var(--motion-stagger));
}
.suite-list-item:nth-child(11) {
  animation-delay: calc(0.1s + 10 * var(--motion-stagger));
}
.suite-list-item:nth-child(12) {
  animation-delay: calc(0.1s + 11 * var(--motion-stagger));
}
.suite-list-item:nth-child(n + 13) {
  animation-delay: calc(0.1s + 12 * var(--motion-stagger));
}

.suite-list-item:hover {
  background: rgba(27, 94, 32, 0.06);
  transform: translateX(3px);
}

.suite-list-item.is-selected {
  background: rgba(27, 94, 32, 0.1);
  border-color: rgba(27, 94, 32, 0.35);
  box-shadow: 0 2px 10px rgba(27, 94, 32, 0.1);
}

.suite-list-item.is-selected .suite-list-item-label {
  font-weight: 600;
  color: var(--category-green-bold);
}

.suite-list-item.is-filtered-out {
  display: none;
}

/* Full suite row: first in list; divider below before individual tests */
.suite-list-item--aggregate {
  margin-bottom: 0.35rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--input-border);
  font-weight: 600;
  color: var(--primary);
}

.suite-list-item-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.suite-list-item-label {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
}

.suite-history-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-content: flex-start;
  min-height: 0.65rem;
}

.suite-history-dots--inline {
  min-height: 1rem;
}

.history-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}

.history-dot:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px var(--primary);
}

.history-dot.passed {
  background: var(--success);
}

.history-dot.failed {
  background: var(--mockup-fail-red);
}

.history-dot.skipped {
  background: #d97706;
}

.history-dot.killed {
  background: #9a3412;
}

/* In-progress run (appended rightmost) — R→G→Y cycle; not clickable. */
.history-dot--running {
  cursor: help;
  pointer-events: auto;
  background: #c42b2b;
  animation: history-dot-running 2.4s ease-in-out infinite;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.history-dot--running:hover {
  transform: scale(1.2);
  animation: history-dot-running 2.4s ease-in-out infinite;
  box-shadow: 0 0 0 2px var(--primary);
}

/* Latest *completed* run pulse — skip when the last dot is the in-progress chip. */
.suite-history-dots .history-dot:last-child:not(.history-dot--running) {
  animation: history-dot-latest 2.2s ease-in-out infinite;
}

.suite-history-dots .history-dot:last-child:not(.history-dot--running):hover {
  animation: none;
  transform: scale(1.2);
  box-shadow: 0 0 0 2px var(--primary);
}

@keyframes history-dot-running {
  0%,
  100% {
    background: #c42b2b;
  }
  33% {
    background: #1d8a4a;
  }
  66% {
    background: #d4a00a;
  }
}

@keyframes history-dot-latest {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.18);
  }
  50% {
    transform: scale(1.22);
    box-shadow: 0 0 0 5px rgba(0, 0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .suite-history-dots .history-dot:last-child:not(.history-dot--running) {
    animation: none;
  }
  .history-dot--running {
    animation: none;
    background: var(--primary);
  }
}

.btn-run {
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-run:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-run:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.detail-run-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 0;
}

.detail-run-actions .btn-run-mode {
  flex: 1 1 0;
  min-width: 0;
}

.btn-run-mode {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  min-height: 2.75rem;
  min-width: 0;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-run-mode:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Critical — warm brown/orange (matches “Critical Only” emphasis in theme) */
.btn-run-mode--critical {
  color: #9a3412;
  border-color: #fdba74;
  background: #fff;
}

.btn-run-mode--critical:hover:not(:disabled) {
  background: #fff7ed;
  border-color: #f97316;
  color: #7c2d12;
}

.btn-run-mode--critical:focus {
  outline: 2px solid #fb923c;
  outline-offset: 1px;
}

/* Re-run failed — medium blue (matches “Re-run Failed” in theme) */
.btn-run-mode--failed {
  color: #2563eb;
  border-color: #93c5fd;
  background: #fff;
}

.btn-run-mode--failed:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.btn-run-mode--failed:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
}

.detail-run-actions .btn-run-primary,
.detail-run-actions .btn-kill {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-run-primary {
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
}

.btn-kill {
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #991b1b;
  background: #fff;
  border: 1px solid #dc2626;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-kill:hover:not(:disabled) {
  background: #fef2f2;
  color: #7f1d1d;
}

.btn-kill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* —— Detail column —— */
.dashboard-detail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
  min-height: calc(100vh - 7.5rem);
}

@media (max-width: 960px) {
  .dashboard-detail {
    min-height: auto;
  }
}

.detail-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 1.1rem 1.25rem;
  transition:
    box-shadow var(--motion-duration) var(--motion-ease-out),
    transform var(--motion-duration) var(--motion-ease-out),
    border-color var(--motion-duration-fast) var(--motion-ease-soft);
}

.dashboard-detail > .detail-card--suite {
  animation: goalpost-panel-in var(--motion-duration) var(--motion-ease-out) calc(1.5 * var(--motion-stagger))
    backwards;
}

.dashboard-detail > .detail-card--output {
  animation: goalpost-panel-in var(--motion-duration) var(--motion-ease-out) calc(2.5 * var(--motion-stagger))
    backwards;
}

.detail-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
}

.detail-card--suite {
  flex-shrink: 0;
}

.detail-card--output {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.detail-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.detail-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.detail-history-block {
  margin-top: 0.85rem;
}

.detail-history-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.detail-history-dots {
  min-height: 1.25rem;
}

.detail-suite-status {
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

.detail-suite-status.passed {
  color: var(--success);
  font-weight: 600;
}

.detail-suite-status.failed,
.detail-suite-status.error,
.detail-suite-status.timeout {
  color: var(--error);
  font-weight: 600;
}

.detail-suite-status.skipped {
  color: #b45309;
  font-weight: 600;
}

.detail-suite-status.killed {
  color: #9a3412;
  font-weight: 600;
}

.detail-runner-heading {
  margin: 0 0 0.75rem 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-card--output .run-output-wrapper {
  flex: 1;
  min-height: 220px;
}

.run-global-status {
  padding: 0.65rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition:
    color var(--motion-duration) var(--motion-ease-soft),
    background var(--motion-duration) var(--motion-ease-soft),
    border-color var(--motion-duration) var(--motion-ease-soft),
    box-shadow var(--motion-duration) var(--motion-ease-out);
}

.run-global-status.running {
  color: var(--primary);
  background: rgba(27, 94, 32, 0.08);
}

.run-global-status.passed {
  color: var(--success);
}

.run-global-status.failed,
.run-global-status.error {
  color: var(--error);
  background: #fef2f2;
}

.run-global-status.skipped {
  color: #b45309;
  background: #fffbeb;
}

.run-global-status.killed {
  color: #9a3412;
  background: #fff7ed;
}

.run-output-wrapper {
  flex: 1;
  min-height: 280px;
  padding: 1rem;
  background: #fafafa;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  overflow: auto;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.run-output {
  margin: 0;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
}

.run-output .pass {
  color: var(--success);
}

.run-output .fail {
  color: var(--error);
}

/* Report modal */
.report-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.report-modal:not([hidden]) {
  display: flex;
}

.report-modal:not([hidden]) .report-modal-backdrop {
  animation: goalpost-backdrop-in 0.28s var(--motion-ease-out) both;
}

.report-modal:not([hidden]) .report-modal-content {
  animation: goalpost-modal-sheet-in calc(var(--motion-duration) + 0.05s) var(--motion-ease-out) both;
}

/* Run dot menu (View HTML report / View run details) */
.run-dot-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.run-dot-menu[hidden] {
  display: none;
}
.run-dot-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}
.run-dot-menu:not([hidden]) .run-dot-menu-backdrop {
  animation: goalpost-backdrop-in 0.22s var(--motion-ease-out) both;
}

.run-dot-menu-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 12rem;
  padding: 0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.run-dot-menu:not([hidden]) .run-dot-menu-content {
  animation: goalpost-pop-in 0.26s var(--motion-ease-out) both;
}
.run-dot-menu-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  text-align: left;
  color: var(--primary);
  text-decoration: none;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.run-dot-menu-item:hover {
  background: rgba(27, 94, 32, 0.08);
}
.run-dot-menu-item:not(a) {
  width: 100%;
  font: inherit;
}

.report-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.report-modal-content {
  position: relative;
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.report-modal-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--card-border);
  background: #fafafa;
}

.report-modal-action-row {
  flex: 1 1 14rem;
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  min-width: 0;
  align-items: stretch;
}

.report-modal-action-cell {
  flex: 1 1 0;
  min-width: 0;
}

.report-modal-action-cell:not([hidden]) {
  display: flex;
}

.report-modal-action-cell .btn-extent-report {
  flex: 1;
  width: 100%;
  min-height: 2.5rem;
  box-sizing: border-box;
  font-size: 0.8rem;
  padding: 0.45rem 0.6rem;
}

.report-modal-header h3 {
  flex-shrink: 0;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* Run details: Extent + download — equal-width row */
.report-action-row {
  flex-direction: row;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: stretch;
}

.report-action-row:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
}

.report-action-cell {
  flex: 1 1 0;
  min-width: 0;
}

.report-action-cell:not([hidden]) {
  display: flex;
}

.report-action-cell .btn-extent-report {
  flex: 1;
  width: 100%;
  min-height: 2.75rem;
  box-sizing: border-box;
}

/* Primary button style — client asked for button, not plain link */
.btn-extent-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-extent-report:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(22, 101, 52, 0.2);
}

.report-modal-close {
  flex-shrink: 0;
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.report-modal-close:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.06);
}

.report-output {
  margin: 0;
  padding: 1rem;
  flex: 1;
  overflow: auto;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
  background: #fafafa;
}

.report-output .pass {
  color: var(--success);
}

.report-output .fail {
  color: var(--error);
}

/* —— Keyframes & accessibility —— */
@keyframes goalpost-header-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes goalpost-panel-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes goalpost-row-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes goalpost-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes goalpost-login-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes goalpost-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes goalpost-modal-sheet-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes goalpost-pop-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-duration: 0.01ms;
    --motion-duration-fast: 0.01ms;
    --motion-stagger: 0s;
  }

  .dashboard-header,
  .dashboard-home-panel,
  .platform-tabs-bar,
  .role-tabs-bar,
  .dashboard-main--split > .dashboard-master,
  .dashboard-main--split > .dashboard-detail,
  .dashboard-detail > .detail-card,
  .suite-list-item,
  .login-card,
  .day-picker-dropdown:not([hidden]),
  .report-modal:not([hidden]) .report-modal-backdrop,
  .report-modal:not([hidden]) .report-modal-content,
  .run-dot-menu:not([hidden]) .run-dot-menu-backdrop,
  .run-dot-menu:not([hidden]) .run-dot-menu-content {
    animation: none !important;
  }

  .suite-list-item:hover {
    transform: none;
  }

  .day-picker-btn:active {
    transform: none;
  }
}
