/* Unified Cockpit · interior page compositions.
 * Loaded after legacy page styles and unified-cockpit.css.
 * Uses only the shared cockpit token system; no parallel palette lives here.
 */

body.unified-cockpit .cockpit-page {
  width: min(100%, 1460px);
  margin: 0 auto;
  color: var(--cockpit-ink);
}

body.unified-cockpit .cockpit-page > :first-child {
  margin-top: 0;
}

body.unified-cockpit .cockpit-page > :last-child {
  margin-bottom: 0;
}

body.unified-cockpit .cockpit-page .hero.cockpit-page-head,
body.unified-cockpit .cockpit-page > .cockpit-page-head {
  min-height: 0;
  margin: 0;
  padding: 0 0 26px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cockpit-ink);
  box-shadow: none;
}

body.unified-cockpit .cockpit-page .cockpit-page-head > div:first-child {
  min-width: 0;
  flex: 1 1 420px;
}

body.unified-cockpit .cockpit-page .cockpit-page-head h1 {
  max-width: 24ch;
  margin: 12px 0 10px;
  color: var(--cockpit-wine);
  font: 600 clamp(38px, 3.3vw, 52px)/1.05 var(--cockpit-serif);
  letter-spacing: -0.032em;
}

body.unified-cockpit .cockpit-page .cockpit-page-head p:not(.cockpit-kicker) {
  max-width: 78ch;
  margin: 0;
  color: var(--cockpit-muted);
  font-size: 13px;
  line-height: 1.65;
}

body.unified-cockpit .cockpit-page > :where(.panel, .card, .cockpit-sheet) {
  margin: 0 0 20px;
  padding: 24px 26px;
  border: 1px solid var(--cockpit-line);
  border-radius: 14px;
  background: var(--cockpit-surface);
  box-shadow: var(--cockpit-shadow-card);
}

body.unified-cockpit .cockpit-page > :where(.panel, .card, .cockpit-sheet) > h2:first-child {
  margin: 0 0 8px;
  color: var(--cockpit-wine);
  font: 600 24px/1.2 var(--cockpit-serif);
}

body.unified-cockpit .cockpit-page .panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: -24px -26px 22px;
  padding: 20px 26px;
  border-bottom: 1px solid var(--cockpit-line);
}

body.unified-cockpit .cockpit-page .panel-head h2 {
  margin: 0;
  color: var(--cockpit-wine);
  font: 600 23px/1.2 var(--cockpit-serif);
}

body.unified-cockpit .cockpit-page .panel-head p,
body.unified-cockpit .cockpit-page .section-note {
  margin: 5px 0 0;
  color: var(--cockpit-muted);
  font-size: 12px;
  line-height: 1.6;
}

body.unified-cockpit .cockpit-page .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
  align-items: end;
  margin-top: 18px;
}

body.unified-cockpit .cockpit-page .form-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--cockpit-line);
  border-radius: 12px;
  background: var(--cockpit-paper-wash);
}

body.unified-cockpit .cockpit-page .form-grid > label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--cockpit-ink);
  font-size: 12px;
  font-weight: 700;
}

body.unified-cockpit .cockpit-page .form-grid > :where(.wide, .full) {
  grid-column: 1 / -1;
}

body.unified-cockpit .cockpit-page .form-grid > div:has(> .button:only-child) {
  display: flex;
  align-items: flex-end;
}

body.unified-cockpit .cockpit-page .form-grid > div:has(> .button:only-child) .button {
  width: 100%;
}

body.unified-cockpit .cockpit-page :where(.table-wrap, .table-scroll) {
  margin-top: 18px;
  border: 1px solid var(--cockpit-line);
  border-radius: 11px;
  box-shadow: none;
}

body.unified-cockpit .cockpit-page code.mono,
body.unified-cockpit .cockpit-page .mono {
  font-family: var(--cockpit-mono);
}

body.unified-cockpit .cockpit-page .alert {
  margin: 0 0 18px;
  border-color: var(--cockpit-line-strong);
  background: var(--cockpit-gold-soft);
  color: var(--cockpit-gold-ink);
}

body.unified-cockpit .cockpit-page .alert.ok {
  border-color: var(--cockpit-green);
  background: var(--cockpit-green-soft);
  color: var(--cockpit-green-deep);
}

body.unified-cockpit .cockpit-page :where(.portfolio-badge, [class^="badge-role-"]) {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cockpit-blue-soft);
  color: var(--cockpit-blue);
  font-size: 11px;
  font-weight: 700;
}

body.unified-cockpit .cockpit-page .portfolio-badge.vigentes,
body.unified-cockpit .cockpit-page .badge-active {
  background: var(--cockpit-green-soft);
  color: var(--cockpit-green-deep);
}

body.unified-cockpit .cockpit-page :where(.portfolio-badge.vencidos, .portfolio-badge.sin_liberar, .badge-inactive) {
  background: var(--cockpit-danger-soft);
  color: var(--cockpit-danger-deep);
}

body.unified-cockpit .cockpit-page details {
  margin-top: 18px;
  border-top: 1px solid var(--cockpit-line);
}

body.unified-cockpit .cockpit-page details > summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  color: var(--cockpit-wine);
}

/* --- Cartera ------------------------------------------------------------- */

body.unified-cockpit .cockpit-dashboard-page.cartera {
  display: flex;
  width: min(100%, 1600px);
  flex-direction: column;
  gap: 18px;
  padding: 0;
}

body.unified-cockpit .cockpit-dashboard-page .dashboard-hero {
  align-items: flex-start;
  padding-bottom: 26px;
}

body.unified-cockpit .cockpit-dashboard-page .dashboard-hero h1 {
  font-size: clamp(40px, 3.2vw, 52px);
}

body.unified-cockpit .cockpit-dashboard-page .dashboard-hero .who {
  max-width: 105ch;
  font-size: 12px;
}

body.unified-cockpit .cockpit-dashboard-page .dashboard-hero > form {
  padding-top: 23px;
}

body.unified-cockpit .cockpit-dashboard-page .dashboard-hero > form .btn {
  min-width: 174px;
}

body.unified-cockpit .cockpit-dashboard-page .cartera-alert {
  padding: 14px 16px;
  border: 1px solid var(--cockpit-line-strong);
  border-radius: 10px;
  background: var(--cockpit-gold-soft);
  color: var(--cockpit-gold-ink);
  box-shadow: none;
}

body.unified-cockpit .cockpit-dashboard-page .cartera-body {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 22px;
}

body.unified-cockpit .cockpit-dashboard-page .cn {
  overflow: clip;
  border: 1px solid var(--cockpit-line);
  border-radius: 14px;
  background: var(--cockpit-surface);
  color: var(--cockpit-ink);
  box-shadow: var(--cockpit-shadow-card);
}

body.unified-cockpit .cockpit-dashboard-page .cn-txt {
  padding: 24px 26px;
}

body.unified-cockpit .cockpit-dashboard-page .cn .eyebrow,
body.unified-cockpit .cockpit-dashboard-page .cn h2,
body.unified-cockpit .cockpit-dashboard-page .cn-in,
body.unified-cockpit .cockpit-dashboard-page .cn-why b {
  color: var(--cockpit-wine);
}

body.unified-cockpit .cockpit-dashboard-page .cn h2 {
  font: 600 28px/1.15 var(--cockpit-serif);
}

body.unified-cockpit .cockpit-dashboard-page .cn p,
body.unified-cockpit .cockpit-dashboard-page .cn-why,
body.unified-cockpit .cockpit-dashboard-page .cn-queue small {
  color: var(--cockpit-muted);
}

body.unified-cockpit .cockpit-dashboard-page .cn-media::before {
  display: none;
}

body.unified-cockpit .cockpit-dashboard-page .cn-media {
  border-left: 1px solid var(--cockpit-line);
}

body.unified-cockpit .cockpit-dashboard-page .cn-queue {
  border-top-color: var(--cockpit-line);
  background: var(--cockpit-paper-wash);
}

body.unified-cockpit .cockpit-dashboard-page .cn-queue a {
  min-height: 58px;
  border-right-color: var(--cockpit-line);
  color: var(--cockpit-ink);
}

body.unified-cockpit .cockpit-dashboard-page .cn-queue a:hover {
  background: var(--cockpit-gold-soft);
}

body.unified-cockpit .cockpit-dashboard-page .cn-queue i {
  border-color: var(--cockpit-gold);
  color: var(--cockpit-wine);
}

body.unified-cockpit .cockpit-dashboard-page .big-three {
  overflow: clip;
  border: 1px solid var(--cockpit-line);
  border-radius: 12px;
  background: var(--cockpit-surface);
  box-shadow: none;
}

body.unified-cockpit .cockpit-dashboard-page .bt-item {
  min-height: 104px;
  padding: 16px;
  border-right-color: var(--cockpit-line);
}

body.unified-cockpit .cockpit-dashboard-page .bt-item b {
  color: var(--cockpit-wine);
  font: 600 28px/1 var(--cockpit-serif);
}

body.unified-cockpit .cockpit-dashboard-page .cartera-exp,
body.unified-cockpit .cockpit-dashboard-page .project-card,
body.unified-cockpit .cockpit-dashboard-page .panel,
body.unified-cockpit .cockpit-dashboard-page .collapse-panel {
  border: 1px solid var(--cockpit-line);
  background: var(--cockpit-surface);
  box-shadow: var(--cockpit-shadow-card);
}

body.unified-cockpit .cockpit-dashboard-page .cartera-exp {
  padding: 20px;
  border-radius: 14px;
}

body.unified-cockpit .cockpit-dashboard-page .project-card {
  border-radius: 12px;
}

body.unified-cockpit .cockpit-dashboard-page .project-card:hover {
  box-shadow: var(--cockpit-shadow-float);
}

body.unified-cockpit .cockpit-dashboard-page .pc-step {
  background: var(--cockpit-paper-soft);
}

body.unified-cockpit .cockpit-dashboard-page .cartera-side .panel,
body.unified-cockpit .cockpit-dashboard-page .cartera-side .collapse-panel {
  padding: 18px;
  border-radius: 12px;
}

body.unified-cockpit .cockpit-dashboard-page .cartera-side .panel.is-night {
  border-color: var(--cockpit-night);
  background: var(--cockpit-night);
  color: var(--cockpit-night-text);
}

/* --- Work mode chooser --------------------------------------------------- */

body.unified-cockpit .cockpit-mode-page {
  max-width: 920px;
}

body.unified-cockpit .cockpit-mode-page .cockpit-page-head {
  padding-top: 24px;
}

body.unified-cockpit .modo-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

body.unified-cockpit .modo-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  border: 1px solid var(--cockpit-line);
  border-radius: 14px;
  background: var(--cockpit-surface);
  color: var(--cockpit-ink);
  text-decoration: none;
  box-shadow: var(--cockpit-shadow-card);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

body.unified-cockpit .modo-card::before {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: auto;
  place-items: center;
  border: 1px solid var(--cockpit-line-strong);
  border-radius: 50%;
  color: var(--cockpit-wine);
  content: "→";
  font-size: 20px;
}

body.unified-cockpit .modo-card.is-campo::before {
  border-color: var(--cockpit-gold);
  background: var(--cockpit-gold);
  color: var(--cockpit-gold-ink);
}

body.unified-cockpit .modo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--cockpit-shadow-float);
}

body.unified-cockpit .modo-card b {
  display: block;
  margin-bottom: 8px;
  color: var(--cockpit-wine);
  font: 600 30px/1 var(--cockpit-serif);
}

body.unified-cockpit .modo-card span {
  color: var(--cockpit-muted);
  line-height: 1.65;
}

body.unified-cockpit .modo-continuity {
  margin-top: 18px;
  color: var(--cockpit-muted);
}

body.unified-cockpit .modo-more {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

body.unified-cockpit .modo-more a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--cockpit-line-strong);
  border-radius: 8px;
  background: var(--cockpit-surface);
  font-weight: 700;
  text-decoration: none;
}

/* --- Mission control ----------------------------------------------------- */

body.unified-cockpit .cockpit-mission-page .mission-summary {
  gap: 10px;
  margin: 0 0 20px;
}

body.unified-cockpit .cockpit-mission-page .mission-summary article {
  padding: 16px 18px;
  border-color: var(--cockpit-line);
  border-radius: 11px;
  background: var(--cockpit-surface);
  box-shadow: none;
}

body.unified-cockpit .cockpit-mission-page .mission-summary span {
  color: var(--cockpit-muted);
}

body.unified-cockpit .cockpit-mission-page .mission-summary strong {
  color: var(--cockpit-wine);
  font: 600 30px/1.1 var(--cockpit-serif);
}

body.unified-cockpit .cockpit-mission-page .mission-summary .is-alert strong {
  color: var(--cockpit-danger);
}

body.unified-cockpit .cockpit-mission-page .mission-filter-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.unified-cockpit .cockpit-mission-page .mission-results {
  margin-top: 28px;
}

body.unified-cockpit .cockpit-mission-page .mission-results-head h2 {
  color: var(--cockpit-wine);
  font: 600 26px/1.2 var(--cockpit-serif);
}

body.unified-cockpit .cockpit-mission-page .mission-card {
  grid-template-columns: minmax(0, 1fr) minmax(270px, 320px);
  padding: 22px;
  border-color: var(--cockpit-line);
  border-left: 4px solid var(--cockpit-gold);
  border-radius: 12px;
  background: var(--cockpit-surface);
  box-shadow: var(--cockpit-shadow-card);
}

body.unified-cockpit .cockpit-mission-page .mission-card.priority-0 {
  border-left-color: var(--cockpit-danger);
}

body.unified-cockpit .cockpit-mission-page .mission-card.priority-1 {
  border-left-color: var(--cockpit-amber);
}

body.unified-cockpit .cockpit-mission-page .mission-card h3 {
  color: var(--cockpit-wine);
  font: 600 23px/1.2 var(--cockpit-serif);
}

body.unified-cockpit .cockpit-mission-page .mission-assignment,
body.unified-cockpit .cockpit-mission-page .mission-readonly {
  border-color: var(--cockpit-line);
  background: var(--cockpit-paper-soft);
}

body.unified-cockpit .cockpit-mission-page .mission-priority,
body.unified-cockpit .cockpit-mission-page .mission-type {
  background: var(--cockpit-blue-soft);
  color: var(--cockpit-blue);
}

/* --- Job activity -------------------------------------------------------- */

body.unified-cockpit .cockpit-activity-page {
  max-width: 1120px;
}

body.unified-cockpit .cockpit-activity-page .activity-panel {
  padding: 0;
  overflow: clip;
}

body.unified-cockpit .cockpit-activity-page .activity-panel > :not(.panel-head) {
  margin-right: 24px;
  margin-left: 24px;
}

body.unified-cockpit .cockpit-activity-page .activity-panel > .panel-head {
  margin: 0;
}

body.unified-cockpit .cockpit-activity-page .activity-list {
  display: grid;
  gap: 0;
}

body.unified-cockpit .cockpit-activity-page .activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--cockpit-line);
}

body.unified-cockpit .cockpit-activity-page .activity-row:last-child {
  border-bottom: 0;
}

body.unified-cockpit .cockpit-activity-page .activity-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

body.unified-cockpit .cockpit-activity-page .activity-status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--cockpit-blue-soft);
  color: var(--cockpit-blue);
  font-size: 10px;
  font-weight: 700;
}

body.unified-cockpit .cockpit-activity-page .activity-status.done {
  background: var(--cockpit-green-soft);
  color: var(--cockpit-green-deep);
}

body.unified-cockpit .cockpit-activity-page .activity-status.failed {
  background: var(--cockpit-danger-soft);
  color: var(--cockpit-danger-deep);
}

body.unified-cockpit .cockpit-activity-page :where(.activity-stage, .activity-result, .job-receipt, small) {
  color: var(--cockpit-muted);
}

body.unified-cockpit .cockpit-activity-page .activity-empty {
  padding: 48px 24px;
  text-align: center;
}

/* --- Accounts and administration ---------------------------------------- */

body.unified-cockpit :where(.cockpit-account-page, .cockpit-admin-page, .cockpit-identity-page) {
  max-width: 1320px;
}

body.unified-cockpit :where(.cockpit-account-page, .cockpit-admin-page, .cockpit-identity-page) > .panel {
  margin-bottom: 20px;
}

body.unified-cockpit .cockpit-account-page #activation-link-banner code {
  display: block;
  padding: 12px;
  border-radius: 8px;
  background: var(--cockpit-paper-soft);
  color: var(--cockpit-wine);
}

body.unified-cockpit .cockpit-identity-page .identity-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
  gap: 20px;
  align-items: start;
}

body.unified-cockpit .cockpit-identity-page .identity-layout > .panel {
  margin: 0 0 20px;
  padding: 24px 26px;
}

body.unified-cockpit .cockpit-identity-page .identity-preview-panel {
  position: sticky;
  top: 22px;
}

body.unified-cockpit .cockpit-identity-page .identity-engine-preview,
body.unified-cockpit .cockpit-identity-page .cedula-card {
  width: 100%;
  margin-top: 16px;
  border: 1px solid var(--cockpit-line);
  border-radius: 10px;
  background: var(--cockpit-surface-solid);
}

body.unified-cockpit .cockpit-identity-page .identity-engine-preview {
  height: auto;
  object-fit: contain;
}

body.unified-cockpit .cockpit-identity-page .cedula-card {
  overflow: clip;
}

body.unified-cockpit .cockpit-identity-page .cedula-header,
body.unified-cockpit .cockpit-identity-page .cedula-logo-wrap {
  padding: 14px 16px;
  background: var(--cockpit-paper-soft);
}

body.unified-cockpit .cockpit-identity-page .cedula-body {
  display: grid;
  gap: 9px;
  padding: 16px;
}

body.unified-cockpit .cockpit-identity-page .cedula-field {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
}

body.unified-cockpit .cockpit-identity-page .cedula-field-label,
body.unified-cockpit .cockpit-identity-page .cedula-logo-label {
  color: var(--cockpit-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

body.unified-cockpit .cockpit-identity-page .cedula-logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--cockpit-line);
}

body.unified-cockpit .cockpit-identity-page :where(.cedula-logo-preview, .identity-logo-current) {
  max-width: 150px;
  max-height: 80px;
  object-fit: contain;
}

body.unified-cockpit .cockpit-identity-page :where(.field-error, .field-warn) {
  font-size: 11px;
}

body.unified-cockpit .cockpit-identity-page .field-error {
  color: var(--cockpit-danger-deep);
}

body.unified-cockpit .cockpit-identity-page .field-warn {
  color: var(--cockpit-amber);
}

body.unified-cockpit .cockpit-admin-page .credit-balance {
  min-width: 150px;
  text-align: right;
}

body.unified-cockpit .cockpit-admin-page .credit-balance strong,
body.unified-cockpit .cockpit-admin-page .credit-balance span {
  display: block;
}

body.unified-cockpit .cockpit-admin-page .credit-balance strong {
  color: var(--cockpit-wine);
  font: 600 28px/1 var(--cockpit-serif);
}

body.unified-cockpit .cockpit-admin-page .credit-balance span {
  margin-top: 4px;
  color: var(--cockpit-muted);
  font-size: 11px;
}

body.unified-cockpit .cockpit-admin-page .grid {
  display: grid;
  gap: 18px;
  margin: 18px 0;
}

body.unified-cockpit .cockpit-admin-page .grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.unified-cockpit .cockpit-admin-page .grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.unified-cockpit .cockpit-admin-page .grid > label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}

body.unified-cockpit .cockpit-diagnostics-page ol {
  display: grid;
  gap: 10px;
  padding-left: 24px;
}

/* --- Help manual --------------------------------------------------------- */

body.unified-cockpit .cockpit-help-page {
  max-width: 1120px;
}

body.unified-cockpit .cockpit-help-page .help-manual {
  padding: 0;
  overflow: clip;
}

body.unified-cockpit .cockpit-help-page .help-manual-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 20px;
  border-bottom: 1px solid var(--cockpit-line);
  background: var(--cockpit-paper-soft);
}

body.unified-cockpit .cockpit-help-page .help-manual-index a {
  display: flex;
  min-height: 48px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--cockpit-line);
  border-radius: 8px;
  background: var(--cockpit-surface);
  color: var(--cockpit-wine);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

body.unified-cockpit .cockpit-help-page .help-manual-section {
  padding: 26px;
  border-bottom: 1px solid var(--cockpit-line);
  scroll-margin-top: 24px;
}

body.unified-cockpit .cockpit-help-page .help-manual-section:last-child {
  border-bottom: 0;
}

body.unified-cockpit .cockpit-help-page .help-manual-section h2 {
  margin: 0 0 12px;
  color: var(--cockpit-wine);
  font: 600 26px/1.2 var(--cockpit-serif);
}

body.unified-cockpit .cockpit-help-page .help-manual-section h3 {
  margin: 20px 0 6px;
  color: var(--cockpit-ink);
  font-size: 15px;
}

body.unified-cockpit .cockpit-help-page .help-manual-section p,
body.unified-cockpit .cockpit-help-page .help-manual-section li {
  color: var(--cockpit-muted-strong);
  line-height: 1.75;
}

body.unified-cockpit .cockpit-help-page #revision-word > section {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--cockpit-line);
  border-radius: 9px;
  background: var(--cockpit-paper-wash);
}

/* --- Mesa home: one rail, no duplicate top bar --------------------------- */

body.unified-cockpit .cockpit-mesa-home {
  width: 100%;
  max-width: 1600px;
}

body.unified-cockpit .cockpit-mesa-home .mesa-grid {
  gap: 22px;
  padding: 0;
}

body.unified-cockpit .cockpit-mesa-home .mesa-main {
  gap: 20px;
}

body.unified-cockpit .cockpit-mesa-home .cockpit-mesa-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  padding: 0;
  overflow: clip;
  border: 1px solid var(--cockpit-line);
  border-radius: 14px;
  background: var(--cockpit-surface);
  box-shadow: var(--cockpit-shadow-card);
}

body.unified-cockpit .cockpit-mesa-home .cockpit-mesa-hero .hero-text {
  padding: 28px;
}

body.unified-cockpit .cockpit-mesa-home .cockpit-mesa-hero .eyebrow {
  color: var(--cockpit-wine);
}

body.unified-cockpit .cockpit-mesa-home .cockpit-mesa-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 10px;
  font-size: 11px;
}

body.unified-cockpit .cockpit-mesa-home .cockpit-mesa-context .live {
  color: var(--cockpit-green);
}

body.unified-cockpit .cockpit-mesa-home .cockpit-mesa-context a {
  color: var(--cockpit-wine);
  font-weight: 700;
}

body.unified-cockpit .cockpit-mesa-home .cockpit-mesa-hero h1 {
  margin: 12px 0 8px;
  color: var(--cockpit-wine);
  font: 600 clamp(36px, 3.5vw, 52px)/1.04 var(--cockpit-serif);
}

body.unified-cockpit .cockpit-mesa-home .cockpit-mesa-hero :where(.hero-sub, .ready p span) {
  color: var(--cockpit-muted);
}

body.unified-cockpit .cockpit-mesa-home .cockpit-mesa-hero .ring-value {
  color: var(--cockpit-wine);
}

body.unified-cockpit .cockpit-mesa-home .cockpit-mesa-hero .ring-value small {
  color: var(--cockpit-muted);
}

body.unified-cockpit .cockpit-mesa-home .hero-map {
  min-height: 260px;
  border-left: 1px solid var(--cockpit-line);
}

body.unified-cockpit .cockpit-mesa-home .next {
  margin: 0;
  padding: 22px 24px;
  border: 1px solid var(--cockpit-line);
  border-radius: 14px;
  box-shadow: var(--cockpit-shadow-card);
}

body.unified-cockpit .cockpit-mesa-home .next h2 {
  color: var(--cockpit-wine);
  font: 600 26px/1.2 var(--cockpit-serif);
}

body.unified-cockpit .cockpit-mesa-home .cards {
  gap: 18px;
}

body.unified-cockpit .cockpit-mesa-home .card-word,
body.unified-cockpit .cockpit-mesa-home .card-services {
  border: 1px solid var(--cockpit-line);
  border-radius: 14px;
  background: var(--cockpit-surface);
  color: var(--cockpit-ink);
  box-shadow: var(--cockpit-shadow-card);
}

body.unified-cockpit .cockpit-mesa-home .card-word h3,
body.unified-cockpit .cockpit-mesa-home .card-word .code,
body.unified-cockpit .cockpit-mesa-home .card-word .eyebrow {
  color: var(--cockpit-wine);
}

body.unified-cockpit .cockpit-mesa-home .card-word .facts dt {
  color: var(--cockpit-muted);
}

body.unified-cockpit .cockpit-mesa-home .mesa-side {
  gap: 14px;
}

body.unified-cockpit .cockpit-mesa-home .side-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cockpit-line);
}

body.unified-cockpit .cockpit-mesa-home .side-head h2 {
  color: var(--cockpit-wine);
  font: 600 20px/1.2 var(--cockpit-serif);
}

body.unified-cockpit .cockpit-mesa-home .keys {
  border-radius: 12px;
  background: var(--cockpit-night);
  color: var(--cockpit-night-soft);
}

/* --- Mobile companion home ---------------------------------------------- */

body.unified-cockpit .cockpit-mobile-home {
  width: 100%;
  max-width: 900px;
}

body.unified-cockpit .cockpit-mobile-home .m-hero.cockpit-page-head {
  display: block;
  padding: 26px;
  overflow: clip;
  border: 1px solid var(--cockpit-line);
  border-radius: 14px;
  background: var(--cockpit-surface);
  color: var(--cockpit-ink);
  box-shadow: var(--cockpit-shadow-card);
}

body.unified-cockpit .cockpit-mobile-home .m-hero::before,
body.unified-cockpit .cockpit-mobile-home .m-hero::after {
  display: none;
}

body.unified-cockpit .cockpit-mobile-home .m-hero-top .m-eyebrow,
body.unified-cockpit .cockpit-mobile-home .m-hero-sub,
body.unified-cockpit .cockpit-mobile-home .m-ready p,
body.unified-cockpit .cockpit-mobile-home .m-ring-value small {
  color: var(--cockpit-muted);
}

body.unified-cockpit .cockpit-mobile-home .m-hero h1 {
  color: var(--cockpit-wine);
  font: 600 clamp(34px, 5vw, 48px)/1.05 var(--cockpit-serif);
}

body.unified-cockpit .cockpit-mobile-home .m-live {
  color: var(--cockpit-green);
}

body.unified-cockpit .cockpit-mobile-home .m-ring-value {
  color: var(--cockpit-wine);
}

body.unified-cockpit .cockpit-mobile-home .m-next {
  margin: 18px 0 0;
  border: 1px solid var(--cockpit-line);
  border-radius: 14px;
  box-shadow: var(--cockpit-shadow-card);
}

body.unified-cockpit .cockpit-mobile-home .m-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 0;
}

body.unified-cockpit .cockpit-mobile-home .m-row {
  grid-template-columns: 52px minmax(0, 1fr);
  align-content: start;
  border: 1px solid var(--cockpit-line);
  box-shadow: none;
}

body.unified-cockpit .cockpit-mobile-home .m-row .m-state {
  grid-column: 2;
}

/* --- Signed-out entry and recovery -------------------------------------- */

body:not(.unified-cockpit) {
  min-height: 100vh;
  margin: 0;
  background: var(--cockpit-paper);
  color: var(--cockpit-ink);
  font: 400 14px/1.5 var(--cockpit-sans);
}

body:not(.unified-cockpit) > .top {
  display: flex;
  min-height: 76px;
  align-items: center;
  padding: 14px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--cockpit-line);
  background: var(--cockpit-night);
  color: var(--cockpit-night-text);
}

body:not(.unified-cockpit) > .top .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

body:not(.unified-cockpit) > .top img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

body:not(.unified-cockpit) > .top strong,
body:not(.unified-cockpit) > .top span {
  display: block;
}

body:not(.unified-cockpit) > .top strong {
  font: 600 20px/1.1 var(--cockpit-serif);
}

body:not(.unified-cockpit) > .top span {
  margin-top: 4px;
  color: var(--cockpit-night-muted);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

body:not(.unified-cockpit) > main {
  min-height: calc(100vh - 140px);
}

body:not(.unified-cockpit) .auth-shell {
  display: grid;
  min-height: calc(100vh - 140px);
  grid-template-columns: minmax(320px, 0.72fr) minmax(420px, 1.28fr);
  background: var(--cockpit-paper);
}

body:not(.unified-cockpit) .auth-shell-single {
  display: grid;
  grid-template-columns: minmax(0, 520px);
  place-content: center;
  padding: 40px 20px;
}

body:not(.unified-cockpit) .portal-access-column {
  display: grid;
  place-items: center;
  padding: 44px clamp(22px, 5vw, 72px);
  background: var(--cockpit-night);
}

body:not(.unified-cockpit) :where(.login-card-sovereign, .auth-card) {
  width: 100%;
  max-width: 460px;
  padding: 30px;
  border: 1px solid var(--cockpit-line);
  border-radius: 16px;
  background: var(--cockpit-surface);
  color: var(--cockpit-ink);
  box-shadow: var(--cockpit-shadow-float);
}

body:not(.unified-cockpit) .login-logo {
  display: block;
  width: 62px;
  height: 62px;
  margin-bottom: 20px;
  border-radius: 50%;
  object-fit: cover;
}

body:not(.unified-cockpit) :where(.login-card-sovereign, .auth-card) h1 {
  margin: 0 0 8px;
  color: var(--cockpit-wine);
  font: 600 clamp(30px, 4vw, 40px)/1.08 var(--cockpit-serif);
}

body:not(.unified-cockpit) :where(.login-card-sovereign, .auth-card) p {
  color: var(--cockpit-muted);
}

body:not(.unified-cockpit) :where(.login-form, .auth-card form) {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

body:not(.unified-cockpit) :where(.login-form, .auth-card form) label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

body:not(.unified-cockpit) :where(.login-form, .auth-card form) input {
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid var(--cockpit-line-strong);
  border-radius: 8px;
  background: var(--cockpit-surface-solid);
  color: var(--cockpit-ink);
  font: 400 16px/1.4 var(--cockpit-sans);
}

body:not(.unified-cockpit) :where(.login-form, .auth-card) .button {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: var(--cockpit-radius-control);
  background: var(--cockpit-gold);
  color: var(--cockpit-gold-ink) !important;
  box-shadow: none;
  font: 700 12px/1.2 var(--cockpit-sans);
  text-decoration: none;
  transition: filter 120ms ease, transform 120ms ease;
}

body:not(.unified-cockpit) :where(.login-form, .auth-card) .button:hover {
  color: var(--cockpit-gold-ink) !important;
  filter: brightness(0.97);
  box-shadow: none;
}

body:not(.unified-cockpit) :where(.login-form, .auth-card) .button:active {
  transform: scale(0.98);
}

body:not(.unified-cockpit) :where(.login-form, .auth-card) .button:focus-visible {
  outline: 3px solid var(--cockpit-focus);
  outline-offset: 3px;
}

body:not(.unified-cockpit) .forgot-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  margin-top: 10px;
  color: var(--cockpit-wine);
  font-weight: 700;
}

body:not(.unified-cockpit) .portal-manifesto {
  display: flex;
  min-width: 0;
  justify-content: center;
  flex-direction: column;
  padding: 56px clamp(28px, 6vw, 92px);
  background: var(--cockpit-paper);
}

body:not(.unified-cockpit) .portal-title {
  max-width: 16ch;
  margin: 0;
  color: var(--cockpit-wine);
  font: 600 clamp(38px, 5vw, 64px)/1.02 var(--cockpit-serif);
  letter-spacing: -0.035em;
}

body:not(.unified-cockpit) .portal-lead {
  max-width: 720px;
  color: var(--cockpit-muted-strong);
  font-size: 17px;
  line-height: 1.7;
}

body:not(.unified-cockpit) .portal-philosophy {
  max-width: 760px;
  margin-top: 16px;
  border-top: 1px solid var(--cockpit-line);
}

body:not(.unified-cockpit) .portal-philosophy summary {
  min-height: 52px;
  color: var(--cockpit-wine);
  font-weight: 700;
}

body:not(.unified-cockpit) .portal-callout {
  display: flex;
  gap: 14px;
  margin: 20px 0;
  padding: 18px;
  border-radius: 10px;
  background: var(--cockpit-surface);
}

body:not(.unified-cockpit) .portal-callout-bar {
  width: 4px;
  border-radius: 4px;
  background: var(--cockpit-gold);
}

body:not(.unified-cockpit) .portal-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

body:not(.unified-cockpit) :where(.cap-pill, .portal-badge) {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--cockpit-surface);
  color: var(--cockpit-wine);
  font-size: 12px;
  font-weight: 700;
}

body:not(.unified-cockpit) .portal-tagline-seal {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--cockpit-gold-ink);
  font-size: 11px;
  letter-spacing: 0.08em;
}

body:not(.unified-cockpit) .error-card {
  text-align: center;
}

body:not(.unified-cockpit) .error-card-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 50%;
  background: var(--cockpit-danger-soft);
  color: var(--cockpit-danger-deep);
  font: 700 26px/1 var(--cockpit-serif);
}

body:not(.unified-cockpit) .error-card .actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

body:not(.unified-cockpit) > footer {
  padding: 20px;
  border-top: 1px solid var(--cockpit-line);
  color: var(--cockpit-muted);
  font-size: 11px;
  text-align: center;
}

/* --- Responsive interiors ------------------------------------------------ */

@media (max-width: 1180px) {
  body.unified-cockpit .cockpit-dashboard-page .cartera-body {
    grid-template-columns: 1fr;
  }

  body.unified-cockpit .cockpit-dashboard-page .cartera-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.unified-cockpit .cockpit-mesa-home .mesa-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.unified-cockpit .cockpit-mesa-home .mesa-side {
    max-width: none;
  }
}

@media (max-width: 960px) {
  body.unified-cockpit .cockpit-page .hero.cockpit-page-head,
  body.unified-cockpit .cockpit-page > .cockpit-page-head {
    padding-bottom: 20px;
  }

  body.unified-cockpit .cockpit-page .cockpit-page-head h1 {
    font-size: clamp(34px, 10vw, 44px);
  }

  body.unified-cockpit .cockpit-page > :where(.panel, .card, .cockpit-sheet) {
    padding: 20px 18px;
  }

  body.unified-cockpit .cockpit-page .panel-head {
    margin: -20px -18px 20px;
    padding: 18px;
  }

  body.unified-cockpit .cockpit-dashboard-page .dashboard-hero > form {
    width: 100%;
    padding-top: 6px;
  }

  body.unified-cockpit .cockpit-dashboard-page .dashboard-hero > form .btn {
    width: 100%;
  }

  body.unified-cockpit .cockpit-dashboard-page .cartera-side,
  body.unified-cockpit .cockpit-mobile-home .m-rows {
    grid-template-columns: 1fr;
  }

  body.unified-cockpit .cockpit-dashboard-page .big-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.unified-cockpit .cockpit-dashboard-page .bt-item {
    border-bottom: 1px solid var(--cockpit-line);
  }

  body.unified-cockpit .cockpit-dashboard-page .cn {
    grid-template-columns: 1fr;
  }

  body.unified-cockpit .cockpit-dashboard-page .cn-media {
    min-height: 200px;
    border-top: 1px solid var(--cockpit-line);
    border-left: 0;
  }

  body.unified-cockpit .cockpit-dashboard-page .cn-queue {
    grid-template-columns: 1fr;
  }

  body.unified-cockpit .cockpit-dashboard-page .cn-queue a {
    border-right: 0;
    border-bottom: 1px solid var(--cockpit-line);
  }

  body.unified-cockpit .cockpit-mode-page {
    padding-top: 0;
  }

  body.unified-cockpit .modo-cards,
  body.unified-cockpit .cockpit-mission-page .mission-filter-grid,
  body.unified-cockpit .cockpit-identity-page .identity-layout,
  body.unified-cockpit .cockpit-admin-page .grid.three {
    grid-template-columns: 1fr;
  }

  body.unified-cockpit .cockpit-identity-page .identity-preview-panel {
    position: static;
  }

  body.unified-cockpit .cockpit-mesa-home .cockpit-mesa-hero {
    grid-template-columns: 1fr;
  }

  body.unified-cockpit .cockpit-mesa-home .hero-map {
    min-height: 220px;
    border-top: 1px solid var(--cockpit-line);
    border-left: 0;
  }
}

@media (max-width: 720px) {
  body.unified-cockpit .cockpit-page .form-grid,
  body.unified-cockpit .cockpit-page .form-grid.compact,
  body.unified-cockpit .cockpit-admin-page .grid.two,
  body.unified-cockpit .cockpit-mission-page .mission-card,
  body.unified-cockpit .cockpit-help-page .help-manual-index {
    grid-template-columns: 1fr;
  }

  body.unified-cockpit .cockpit-page .form-grid.compact {
    padding: 14px;
  }

  body.unified-cockpit .cockpit-activity-page .activity-row {
    grid-template-columns: 1fr;
  }

  body.unified-cockpit .cockpit-activity-page .activity-row > .button {
    width: 100%;
  }

  body.unified-cockpit .cockpit-dashboard-page .cartera-exp {
    padding: 16px;
  }

  body.unified-cockpit .cockpit-dashboard-page .pc-grid {
    grid-template-columns: 1fr;
  }

  body.unified-cockpit .cockpit-help-page .help-manual-section {
    padding: 20px 18px;
  }

  body.unified-cockpit .cockpit-mobile-home .m-hero.cockpit-page-head {
    padding: 20px 18px 28px;
  }

  body:not(.unified-cockpit) .auth-shell {
    grid-template-columns: 1fr;
  }

  body:not(.unified-cockpit) .portal-access-column {
    padding: 32px 18px;
  }

  body:not(.unified-cockpit) .portal-manifesto {
    padding: 36px 22px;
  }

  body:not(.unified-cockpit) .portal-title {
    font-size: 40px;
  }
}

@media (max-width: 480px) {
  body.unified-cockpit .cockpit-dashboard-page .big-three {
    grid-template-columns: 1fr;
  }

  body.unified-cockpit .cockpit-dashboard-page .bt-item {
    min-height: 0;
    border-right: 0;
  }

  body.unified-cockpit .cockpit-mode-page .modo-card {
    min-height: 220px;
    padding: 22px;
  }

  body:not(.unified-cockpit) :where(.login-card-sovereign, .auth-card) {
    padding: 24px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.unified-cockpit .cockpit-page *,
  body:not(.unified-cockpit) .auth-shell * {
    transition-duration: 0.01ms;
    animation-duration: 0.01ms;
  }
}
