:root {
  --cockpit-gold: #d6b56c;
  --cockpit-gold-strong: #f0d697;
  --cockpit-ink: #0c0b0f;
  --cockpit-panel: rgba(24, 22, 29, .86);
  --cockpit-panel-2: rgba(31, 28, 36, .78);
  --cockpit-line: rgba(255, 255, 255, .09);
  --cockpit-shadow: 0 26px 70px rgba(0, 0, 0, .34);
}

body {
  background:
    radial-gradient(circle at 14% 4%, rgba(205, 169, 96, .10), transparent 30rem),
    radial-gradient(circle at 91% 28%, rgba(92, 72, 118, .09), transparent 32rem),
    #0c0b0f;
}

.shell { max-width: 1460px; }
.page-head { padding-bottom: 8px; }
.page-head-nav { position: absolute; inset: 4px 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.page-head-nav .back-link { position: static; }
.page-head h1 { font-size: clamp(34px, 5vw, 62px); letter-spacing: -.045em; }
.page-head .lead { max-width: 680px; font-size: 15px; }
.case-open .page-head { display: none; }

.portfolio-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 14px;
}
.portfolio-stat {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  padding: 17px 18px;
  border: 1px solid var(--cockpit-line);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(31, 29, 37, .92), rgba(17, 16, 21, .88));
  box-shadow: 0 12px 35px rgba(0, 0, 0, .18);
}
.portfolio-stat::after {
  content: "";
  position: absolute;
  width: 90px; height: 90px;
  right: -32px; bottom: -48px;
  border-radius: 50%;
  background: rgba(205, 169, 96, .09);
}
.portfolio-stat-label {
  color: var(--dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.portfolio-stat-value {
  margin-top: 7px;
  color: #f7f2e7;
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -.04em;
}
.portfolio-stat-note { margin-top: 3px; color: var(--muted); font-size: 11px; }
.portfolio-stat.attention .portfolio-stat-value { color: #f1b38d; }
.portfolio-stat.success .portfolio-stat-value { color: #8de0b2; }

.top-toolbar {
  padding: 10px;
  border: 1px solid var(--cockpit-line);
  border-radius: 14px;
  background: rgba(21, 19, 25, .72);
  backdrop-filter: blur(18px);
}
.top-toolbar .search-field input { border-radius: 10px; background: rgba(8, 8, 11, .65); }

.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.entity-card {
  position: relative;
  min-height: 174px;
  padding: 18px;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(28, 26, 33, .95), rgba(17, 16, 21, .92));
  box-shadow: 0 15px 35px rgba(0, 0, 0, .16);
}
.entity-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 15px 0 0 15px;
  background: linear-gradient(180deg, var(--cockpit-gold-strong), transparent 75%);
  opacity: .65;
}
.case-card-id { margin-top: 14px; color: var(--dim); font: 10px/1.4 monospace; }
.case-card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--cockpit-line);
}
.case-card-next.is-overdue { color: #f1a07f; }
.case-card-open { color: var(--gold); font-size: 12px; font-weight: 700; }
.entity-card.is-overdue { border-color: rgba(237, 152, 111, .38); box-shadow: inset 3px 0 0 rgba(237, 152, 111, .72); }
.entity-card.is-today { border-color: rgba(231, 195, 110, .34); box-shadow: inset 3px 0 0 rgba(231, 195, 110, .68); }
.entity-card.is-overdue .entity-card-count { color: #edaa8b; }
.entity-card.is-today .entity-card-count { color: #e7c36e; }

.case-cockpit-hero {
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin-top: 10px;
  padding: 19px 22px;
  border: 1px solid rgba(214, 181, 108, .26);
  border-radius: 17px;
  background:
    radial-gradient(circle at 88% 20%, rgba(214, 181, 108, .17), transparent 18rem),
    linear-gradient(135deg, rgba(35, 31, 40, .98), rgba(15, 14, 19, .98));
  box-shadow: var(--cockpit-shadow);
}
.case-cockpit-hero::after {
  content: "GLS";
  position: absolute;
  right: 28px;
  bottom: -35px;
  color: rgba(255, 255, 255, .025);
  font: 800 130px/1 Arial, sans-serif;
  letter-spacing: -.08em;
  pointer-events: none;
}
.cockpit-topline { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cockpit-back {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0;
}
.cockpit-back:hover { color: var(--gold); }
.case-health {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--cockpit-line); border-radius: 999px;
  background: rgba(5, 5, 7, .38); color: var(--muted); font-size: 11px; font-weight: 700;
}
.case-health-dot { width: 7px; height: 7px; border-radius: 50%; background: #8de0b2; box-shadow: 0 0 0 4px rgba(141, 224, 178, .10); }
.case-health.attention .case-health-dot { background: #f1b38d; box-shadow: 0 0 0 4px rgba(241, 179, 141, .10); }
.case-health.closed .case-health-dot { background: #8c8992; box-shadow: none; }
.cockpit-state-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.cockpit-status-select {
  display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 10px;
  border: 1px solid var(--cockpit-line); border-radius: 999px;
  background: rgba(5,5,7,.38); color: var(--dim); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
}
.cockpit-status-select select {
  min-width: 106px; padding: 5px 28px 5px 9px; border: 0; border-radius: 999px;
  background-color: rgba(255,255,255,.07); color: #f5eee2; font: 700 11px/1.2 inherit; cursor: pointer;
}
.cockpit-status-select option { background: #19171d; color: #fff; }

.cockpit-identity {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(410px, 1.1fr);
  align-items: stretch;
  gap: 18px;
  margin-top: 16px;
}
.cockpit-client-identity { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 8px 4px 8px 0; }
.cockpit-eyebrow { color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.cockpit-identity h2 { margin: 7px 0 10px; color: #fbf7ee; font-size: clamp(26px, 2.7vw, 38px); line-height: 1.02; letter-spacing: -.035em; overflow-wrap: anywhere; }
.cockpit-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.cockpit-meta span { padding: 5px 9px; border: 1px solid var(--cockpit-line); border-radius: 999px; background: rgba(0,0,0,.18); }

.cockpit-vehicle-card {
  position: relative; display: grid; grid-template-columns: minmax(170px, .8fr) minmax(190px, 1fr); align-items: center; gap: 15px;
  min-width: 0; padding: 12px 15px; overflow: hidden;
  border: 1px solid rgba(214,181,108,.18); border-radius: 15px;
  background: linear-gradient(120deg, rgba(214,181,108,.075), rgba(255,255,255,.025));
}
.cockpit-vehicle-card::after { content: ""; position: absolute; inset: auto -35px -70px auto; width: 170px; height: 170px; border: 1px solid rgba(214,181,108,.09); border-radius: 50%; }
.cockpit-vehicle-art { position: relative; min-height: 126px; display: flex; align-items: center; justify-content: center; }
.cockpit-vehicle-art svg { position: relative; z-index: 1; width: 100%; max-width: 230px; height: auto; overflow: visible; filter: drop-shadow(0 13px 10px rgba(0,0,0,.38)); }
.cockpit-vehicle-art svg[hidden] { display: none; }
.vehicle-silhouette { fill: rgba(236,226,207,.82); stroke: rgba(255,255,255,.25); stroke-width: 1; }
.vehicle-wheel { fill: #151419; stroke: var(--cockpit-gold); stroke-width: 3; }
.cockpit-brand-badge {
  position: relative; z-index: 2; display: grid; flex: 0 0 50px; place-items: center;
  width: 50px; height: 50px; border: 1px solid rgba(214,181,108,.32); border-radius: 50%;
  background: rgba(12,11,15,.86); color: var(--cockpit-gold-strong); font-size: 9px; font-weight: 850; letter-spacing: .06em;
}
.cockpit-brand-badge img { width: 31px; height: 31px; object-fit: contain; filter: invert(82%) sepia(41%) saturate(683%) hue-rotate(356deg) brightness(88%) contrast(86%); }
.cockpit-model-image { position: relative; z-index: 1; display: block; width: 100%; max-width: 305px; height: 140px; object-fit: contain; filter: drop-shadow(0 14px 12px rgba(0,0,0,.45)); }
.cockpit-model-image[hidden] { display: none; }
.cockpit-vehicle-copy { position: relative; z-index: 2; min-width: 0; }
.cockpit-vehicle-brandline { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.cockpit-vehicle-brand-name { color: #f2dfb5; font: 700 16px/1.05 Inter, "Segoe UI", Arial, sans-serif; letter-spacing: -.01em; }
.cockpit-vehicle-label { display: block; color: var(--dim); font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.cockpit-vehicle-line { display: block; margin-top: 7px; color: #fff8eb; font: 700 clamp(20px, 2vw, 26px)/1.08 Inter, "Segoe UI", Arial, sans-serif; letter-spacing: -.025em; }
.cockpit-vehicle-meta { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.cockpit-vehicle-open { margin-top: 10px; padding: 0; border: 0; background: transparent; color: var(--gold); font-size: 10px; font-weight: 800; cursor: pointer; }
.cockpit-vehicle-open:hover { color: var(--cockpit-gold-strong); }

.cockpit-focus { position: relative; z-index: 1; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 0 8px; border: 0; border-top: 1px solid var(--cockpit-line); border-radius: 0; background: transparent; }
.cockpit-focus-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: rgba(214,181,108,.13); color: var(--gold); }
.cockpit-focus-label { display: block; color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.cockpit-focus strong, .cockpit-focus small { display: block; }
.cockpit-focus strong { margin-top: 2px; color: #f6f0e5; font-size: 13px; }
.cockpit-focus small { margin-top: 2px; color: var(--dim); font-size: 10px; }
.cockpit-focus-action { padding: 7px 12px; border: 1px solid var(--gold); border-radius: 9px; background: var(--gold); color: #1b160f; font-size: 11px; font-weight: 800; cursor: pointer; }

.cockpit-progress { position: relative; z-index: 1; display: grid; grid-template-columns: auto minmax(120px,1fr); align-items: center; gap: 12px; margin-top: 3px; }
.cockpit-progress-copy { display: flex; align-items: baseline; gap: 7px; color: var(--dim); font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.cockpit-progress-copy strong { color: var(--cockpit-gold-strong); font-size: 12px; letter-spacing: 0; }
.cockpit-progress-track { height: 4px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.07); }
.cockpit-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#9b793b,var(--cockpit-gold-strong)); transition: width .28s ease; }

.cockpit-actions {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 10px; padding-top: 0;
  border-top: 0;
}
.cockpit-action {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--cockpit-line); border-radius: 10px;
  background: rgba(255,255,255,.035); color: #e9e3d7;
  font-size: 12px; font-weight: 650; cursor: pointer;
}
.cockpit-action:hover { border-color: rgba(214,181,108,.46); background: rgba(214,181,108,.10); color: var(--cockpit-gold-strong); }
.cockpit-action.primary { background: var(--cockpit-gold); border-color: var(--cockpit-gold); color: #1a1510; }
.cockpit-action.primary:hover { background: var(--cockpit-gold-strong); }
.cockpit-vehicle-card.is-empty .vehicle-silhouette { opacity: .34; }
.cockpit-vehicle-card.is-empty .vehicle-wheel { opacity: .45; }

.cockpit-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-top: 13px; }
.cockpit-stat {
  min-height: 82px; padding: 14px 15px;
  border: 1px solid var(--cockpit-line); border-radius: 13px;
  background: var(--cockpit-panel);
}
.cockpit-stat-label { color: var(--dim); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.cockpit-stat-value { margin-top: 8px; color: #f7f1e7; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cockpit-stat-sub { margin-top: 2px; color: var(--muted); font-size: 10px; }

.workspace-nav {
  position: sticky; top: 8px; z-index: 7;
  display: flex; gap: 4px; overflow-x: auto;
  margin-top: 14px; padding: 6px;
  border: 1px solid var(--cockpit-line); border-radius: 12px;
  background: rgba(14, 13, 17, .88); backdrop-filter: blur(18px);
}
.workspace-nav button { border: 0; background: transparent; color: var(--muted); border-radius: 8px; padding: 8px 12px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.workspace-nav button:hover { color: var(--gold); background: var(--gold-soft); }

.detail-grid.cockpit-layout { grid-template-columns: minmax(0, 1.55fr) minmax(300px, .72fr); gap: 14px; margin-top: 14px; }
.workspace-card {
  scroll-margin-top: 72px;
  margin-top: 0 !important;
  padding: 20px;
  border: 1px solid var(--cockpit-line);
  border-radius: 16px;
  background: var(--cockpit-panel);
  box-shadow: 0 15px 40px rgba(0,0,0,.16);
}
.col-main, .col-side { display: grid; gap: 14px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.section-kicker { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.section-head h3 { margin: 3px 0 0; color: #f5f0e7; font-size: 18px; letter-spacing: -.02em; }
.section-note { max-width: 280px; color: var(--dim); font-size: 11px; text-align: right; }
.section-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.section-link { border: 0; background: transparent; color: var(--gold); font-size: 11px; font-weight: 700; cursor: pointer; }
.section-link:hover { color: var(--cockpit-gold-strong); }

.guidance-banner { margin-top: 0; border-radius: 14px; padding: 16px 19px; box-shadow: 0 14px 35px rgba(0,0,0,.14); }
.checklist-progress { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.checklist-progress-bar { width: 42%; height: 5px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.checklist-progress-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #987940, var(--cockpit-gold-strong)); }
.checklist-item { min-height: 48px; border-radius: 10px; background: rgba(255,255,255,.025); }
.checklist-item.done { background: rgba(100,201,140,.035); }
.workflow-phase.phase-active { border-color: rgba(214,181,108,.40); box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.workflow-phase.phase-active .workflow-phase-index { background: var(--gold); color: #1a1510; }
.workflow-phase.phase-complete { border-color: rgba(100,201,140,.16); }
.workflow-phase.phase-complete .workflow-phase-index { border-color: rgba(100,201,140,.32); color: #8de0b2; }
.workflow-phase.phase-upcoming { opacity: .78; }
.workflow-phase-state { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }

.readiness-modal { width: min(620px, calc(100vw - 24px)); }
.readiness-body { padding: 20px; }
.readiness-score { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--cockpit-line); border-radius: 12px; background: rgba(214,181,108,.07); }
.readiness-score > span { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; border: 3px solid var(--gold); color: #fff3d4; font-size: 17px; font-weight: 800; }
.readiness-score strong, .readiness-score small { display: block; }
.readiness-score small { margin-top: 3px; color: var(--dim); }
.readiness-list { display: grid; gap: 7px; margin-top: 14px; }
.readiness-item { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 9px; align-items: center; padding: 10px 12px; border: 1px solid var(--cockpit-line); border-radius: 9px; color: var(--muted); font-size: 12px; }
.readiness-item.ok span { color: #8de0b2; }
.readiness-item.missing { border-color: rgba(232,120,120,.22); color: #efc0b0; }
.readiness-item.missing span { color: #e87878; }

.client-profile { display: grid; gap: 10px; }
.client-avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(145deg, rgba(214,181,108,.24), rgba(214,181,108,.06)); color: var(--gold); font-size: 18px; font-weight: 800; }
.client-profile-head { display: flex; align-items: center; gap: 11px; }
.client-profile-name { color: #f7f1e7; font-size: 15px; font-weight: 700; }
.client-profile-type { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.client-contact { display: grid; grid-template-columns: 18px 1fr; gap: 6px 8px; color: var(--muted); font-size: 12px; }
.client-contact a { color: inherit; text-decoration: none; }
.client-contact a:hover { color: var(--gold); }
.transaction-card { background: linear-gradient(145deg, rgba(83,66,39,.16), rgba(24,22,29,.92)); }
.transaction-vehicle { color: #f8f1e4; font-family: "Cormorant Garamond", Georgia, serif; font-size: 23px; font-weight: 650; line-height: 1.08; }
.transaction-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.transaction-facts > div { min-width: 0; padding: 9px 10px; border: 1px solid var(--cockpit-line); border-radius: 9px; background: rgba(0,0,0,.17); }
.transaction-facts span { display: block; color: var(--dim); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.transaction-facts strong { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pick-verified-vehicle { width: 100%; margin-top: 11px; border-color: rgba(214,181,108,.30); color: var(--gold); }
.verified-vehicle-picker { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; max-height: 260px; overflow-y: auto; }
.verified-vehicle-option { display: grid; gap: 4px; padding: 12px; text-align: left; border: 1px solid var(--cockpit-line); border-radius: 10px; background: rgba(0,0,0,.18); color: var(--text); cursor: pointer; }
.verified-vehicle-option:hover, .verified-vehicle-option.active { border-color: var(--gold); background: rgba(214,181,108,.09); }
.verified-vehicle-option strong { color: #f6efe2; font-size: 13px; }
.verified-vehicle-option span { color: var(--dim); font-size: 10px; }
@media (max-width: 620px) { .verified-vehicle-picker { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .case-cockpit-hero { position: relative; top: auto; padding: 17px; }
  .cockpit-focus { grid-template-columns: auto minmax(0,1fr); }
  .cockpit-focus-action { grid-column: 2; width: fit-content; }
}
.client-editor { display: grid; gap: 9px; }
.client-editor[hidden] { display: none; }
.client-editor > p { margin: 0 0 2px; color: var(--dim); font-size: 10px; line-height: 1.45; }
.client-editor label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
.client-editor input, .client-editor textarea, .client-editor select { margin: 0; background: rgba(7,7,9,.52); }
.client-editor-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 3px; }

.quick-case-button { border-color: rgba(214,181,108,.28); color: var(--gold); }
.provisional-client-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin-top: 14px; padding: 15px 18px; border: 1px solid rgba(214,181,108,.28);
  border-radius: 14px; background: linear-gradient(110deg, rgba(214,181,108,.13), rgba(24,22,29,.92));
  box-shadow: 0 14px 34px rgba(0,0,0,.16);
}
.provisional-client-banner[hidden] { display: none; }
.provisional-client-banner strong { display: block; color: #f7f0e4; font-size: 13px; }
.provisional-client-banner span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.existing-client-match { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px; border: 1px solid rgba(214,181,108,.28); border-radius: 10px; background: rgba(214,181,108,.07); }
.existing-client-match[hidden] { display: none; }
.existing-client-match strong, .existing-client-match span { display: block; }
.existing-client-match strong { color: #f5eee2; font-size: 11px; }
.existing-client-match span { margin-top: 2px; color: var(--dim); font-size: 9px; }
.quick-case-choice { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 15px; border: 1px solid rgba(214,181,108,.28); border-radius: 12px; background: linear-gradient(120deg, rgba(214,181,108,.12), rgba(255,255,255,.02)); color: var(--gold); text-align: left; cursor: pointer; }
.quick-case-choice:hover { border-color: var(--gold); background: rgba(214,181,108,.14); }
.quick-case-choice-icon { font-size: 20px; }
.quick-case-choice strong, .quick-case-choice small { display: block; }
.quick-case-choice strong { color: #f5eee2; font-size: 12px; }
.quick-case-choice small { margin-top: 3px; color: var(--dim); font-size: 10px; font-weight: 400; }
.modal-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--dim); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.modal-divider::before, .modal-divider::after { content: ""; flex: 1; height: 1px; background: var(--cockpit-line); }

.next-action-panel { background: linear-gradient(145deg, rgba(205,169,96,.09), rgba(24,22,29,.9)); }
.next-action-panel input { background: rgba(7,7,9,.52); }
.next-action-preview { margin-bottom: 12px; padding: 10px 11px; border-left: 2px solid var(--gold); background: rgba(0,0,0,.18); border-radius: 0 8px 8px 0; }
.next-action-preview strong { display: block; color: #f4eee2; font-size: 12px; }
.next-action-preview span { color: var(--dim); font-size: 10px; }

.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 1px; background: var(--cockpit-line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 11px; padding: 0 0 16px; }
.timeline-dot { position: relative; z-index: 1; width: 17px; height: 17px; border: 4px solid #1a181f; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1px rgba(214,181,108,.25); }
.timeline-dot.note { background: #a68ccc; }
.timeline-dot.document { background: #77b6dd; }
.timeline-dot.done { background: #7fd3a4; }
.timeline-title { color: #eee8dd; font-size: 12px; font-weight: 650; }
.timeline-meta { margin-top: 2px; color: var(--dim); font-size: 10px; }
.timeline-empty { color: var(--dim); font-size: 12px; }

.note-composer textarea { background: rgba(7,7,9,.52); resize: vertical; }
.doc-card { border-radius: 11px; background: rgba(255,255,255,.025); }
.docs-load-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid rgba(232,120,120,.2); border-radius: 10px; background: rgba(232,120,120,.035); }
.docs-load-error .docs-empty { margin: 0; }
.summary-box { border-radius: 12px; }
.danger-zone { padding: 12px 16px; border: 1px solid rgba(232,120,120,.14); border-radius: 12px; background: rgba(232,120,120,.025); }

@media (max-width: 1050px) {
  .portfolio-strip, .cockpit-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid.cockpit-layout { grid-template-columns: 1fr; }
  .cockpit-identity { grid-template-columns: minmax(0,.8fr) minmax(390px,1.2fr); }
}
@media (max-width: 680px) {
  .page-head-nav { position: static; margin-bottom: 22px; }
  .page-head-nav .back-link:last-child { max-width: 170px; text-align: right; }
  .portfolio-strip, .cockpit-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .card-grid { grid-template-columns: 1fr; }
  .portfolio-stat { min-height: 80px; padding: 13px 14px; }
  .portfolio-stat-value { margin-top: 4px; font-size: 24px; }
  .portfolio-stat-note { font-size: 9px; }
  .top-toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .top-toolbar .search-field { grid-column: 1 / -1; min-width: 0; }
  .top-toolbar .button { width: 100%; min-width: 0; margin: 0; padding-inline: 8px; }
  .case-cockpit-hero { padding: 20px 17px; border-radius: 16px; }
  .cockpit-topline { align-items: flex-start; }
  .cockpit-state-controls { align-items: flex-end; flex-direction: column; }
  .case-health { max-width: 50%; padding: 6px 8px; font-size: 9px; }
  .cockpit-status-select span { display: none; }
  .cockpit-status-select { padding-left: 4px; }
  .cockpit-identity { grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
  .cockpit-identity h2 { font-size: 27px; }
  .cockpit-vehicle-card { grid-template-columns: minmax(130px,.78fr) minmax(150px,1fr); }
  .cockpit-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cockpit-action { min-height: 42px; justify-content: center; padding-inline: 8px; text-align: center; }
  .cockpit-stat { min-height: 72px; padding: 11px 12px; }
  .cockpit-stat-value { margin-top: 5px; font-size: 13px; }
  .workspace-nav { top: 5px; margin-inline: -4px; scrollbar-width: none; }
  .workspace-nav::-webkit-scrollbar { display: none; }
  .workspace-nav button { min-height: 38px; padding: 8px 11px; }
  .detail-grid.cockpit-layout { gap: 10px; }
  .col-side { order: -1; }
  .workspace-card { padding: 15px; border-radius: 13px; }
  .section-head { display: block; }
  .section-note { display: none; }
  .section-head-actions { justify-content: flex-start; }
  .section-head-actions .section-link { min-height: 36px; padding: 7px 0; }
  .status-picker { flex-wrap: nowrap; overflow-x: auto; margin-inline: -4px; padding: 0 4px 5px; scrollbar-width: none; }
  .status-picker::-webkit-scrollbar { display: none; }
  .status-picker button { min-height: 38px; flex: 0 0 auto; }
  .provisional-client-banner { align-items: stretch; flex-direction: column; }
  .checklist-item { align-items: flex-start; flex-wrap: wrap; }
  .checklist-label { min-width: calc(100% - 30px); }
  .transaction-vehicle { font-size: 21px; }
  .client-editor-actions .button { min-height: 42px; flex: 1; }
}

@media (max-width: 390px) {
  .cockpit-identity { grid-template-columns: 1fr; }
  .cockpit-vehicle-card { grid-template-columns: 1fr; }
  .cockpit-vehicle-art { min-height: 104px; }
  .cockpit-vehicle-art svg { max-width: 190px; }
  .cockpit-model-image { max-width: 245px; height: 116px; }
  .cockpit-brand-badge { flex-basis: 44px; width: 44px; height: 44px; }
  .cockpit-brand-badge img { width: 27px; height: 27px; }
  .cockpit-progress { grid-template-columns: 1fr; gap: 6px; }
  .cockpit-actions { grid-template-columns: 1fr; }
  .portfolio-stat-label { font-size: 8px; }
}

@media (prefers-reduced-motion: no-preference) {
  .case-cockpit-hero, .portfolio-stat, .workspace-card { animation: cockpitIn .42s ease both; }
  .workspace-card:nth-child(2) { animation-delay: .05s; }
  .workspace-card:nth-child(3) { animation-delay: .1s; }
  @keyframes cockpitIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
}
