/* Existing cabinet layout; shared tokens come from /_static/sdo24-theme-v1.css. */


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--tblr-font-sans-serif);
  overflow-x: hidden;
}

.page-wrapper {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page-body {
  flex: 1 0 auto;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.app-shell {
  max-width: 1180px;
  padding-bottom: 24px;
  min-width: 0;
}

.login-screen {
  min-height: min(620px, calc(100vh - 190px));
  display: grid;
  place-items: center;
}

.login-card {
  width: min(100%, 460px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.login-card .card-body {
  padding: clamp(24px, 5vw, 40px);
}

.login-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.login-copy,
.login-help,
.login-case,
.login-status {
  color: var(--muted);
}

.login-case {
  margin: 16px 0 0;
  font-weight: 600;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.login-otp {
  max-width: 180px;
  font-size: 24px;
  letter-spacing: .28em;
}

.login-status {
  min-height: 24px;
  margin: 16px 0 0;
}

.login-status.is-error {
  color: var(--red);
}

.login-help {
  margin: 8px 0 0;
  font-size: 13px;
}

.app-shell .row,
.app-shell [class^="col-"],
.app-shell [class*=" col-"] {
  min-width: 0;
}

.summary-band,
.focus-card,
.action-panel,
.assistant-footnote,
.case-block {
  border: 1px solid color-mix(in srgb, var(--border) 84%, var(--surface));
  box-shadow: var(--shadow);
}

.cabinet-navbar {
  position: sticky;
  top: 0;
  z-index: 10;
}

.cabinet-navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
  min-width: 0;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 16px;
  color: inherit;
  text-decoration: none;
}

.navbar-brand span {
  white-space: nowrap;
}

.navbar-menu {
  display: none;
  width: auto;
  margin-left: auto;
  min-width: 0;
  flex: 0 0 auto;
  position: relative;
}

.navbar-menu summary::-webkit-details-marker {
  display: none;
}

.navbar-menu .navbar-toggler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.navbar-menu__panel {
  display: none;
  width: 100%;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.navbar-menu[open] .navbar-menu__panel {
  display: block;
}

.desktop-actions {
  margin-left: auto;
  align-items: center;
  gap: 8px;
}

.header-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.navbar-menu__actions {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar-menu__item {
  margin: 0;
}

.navbar-menu__link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 0;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.navbar-menu__link:focus-visible {
  color: var(--blue);
}

@media (hover: hover) and (pointer: fine) {
  .navbar-menu__link:hover {
    color: var(--blue);
  }
}

.header-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 148px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 88%, var(--surface)), var(--blue));
  color: #fff;
  font-weight: 800;
}

.eyebrow,
.card-label,
.section-kicker,
.rail-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.2;
}

.case-id {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 10%, var(--surface));
  color: var(--blue);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.first-screen {
  display: grid;
  gap: 0;
  min-width: 0;
}

.overview-screen,
.service-detail-screen {
  min-width: 0;
}

.overview-screen {
  display: grid;
  gap: 16px;
}

.overview-support,
.service-card,
.archive-placeholder {
  border: 1px solid color-mix(in srgb, var(--border) 84%, var(--surface));
  box-shadow: var(--shadow);
}

.overview-header {
  padding: 4px 0 0;
}

.overview-sections {
  display: grid;
  gap: 16px;
}

.overview-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.overview-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.overview-section__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.services-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

.service-card {
  display: grid;
  min-width: 0;
  background: var(--surface);
  border-radius: 12px;
}

.service-card__body {
  display: grid;
  gap: 14px;
  padding: 18px;
  min-width: 0;
}

.service-card__header,
.service-card__summary,
.service-card__footer {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.service-card__footer {
  justify-items: start;
}

.service-card__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.service-card__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.service-card__title-link {
  color: inherit;
  text-decoration: none;
}

.service-card__title-link:hover,
.service-card__title-link:focus-visible {
  text-decoration: underline;
}

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

.service-card__summary-text,
.service-card__summary-line {
  margin: 0;
  overflow-wrap: anywhere;
}

.service-card__summary-text {
  color: var(--text);
}

.service-card__summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--muted);
}

.service-card__summary-label {
  font-weight: 700;
  color: var(--text);
}

.service-card__summary-value {
  min-width: 0;
}

.service-card__open {
  width: auto;
  max-width: 100%;
  align-self: start;
  display: inline-flex;
}

.service-card__open-secondary {
  min-height: 36px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.archive-placeholder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  opacity: 0.92;
}

.service-page-header {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 0 0 12px;
}

.service-page-header .page-title {
  font-size: 32px;
  line-height: 1.15;
}

.service-page-header__back {
  display: none;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.breadcrumb-muted {
  margin: 0;
  font-size: 14px;
}

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

.breadcrumb-muted .breadcrumb-item.active {
  color: var(--text);
}

.service-page-header__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.service-page-header__row > * {
  min-width: 0;
}

.service-page-header__badge {
  flex: 0 0 auto;
  max-width: 100%;
}

.first-screen > .row {
  max-width: 100%;
  min-width: 0;
}

.summary-band {
  background: var(--surface);
}

.summary-band .card-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.summary-title-row {
  display: grid;
  gap: 4px;
}

.summary-band h2 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.3;
}

.summary-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.summary-text {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.meta-card {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft) 70%, var(--surface));
}

.meta-card strong,
.blocker-alert strong,
.action-title {
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: normal;
  word-break: normal;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 0;
  font-weight: 600;
}

.focus-tone-neutral {
  border-color: color-mix(in srgb, var(--border) 82%, var(--surface));
}

.focus-tone-action {
  border-color: color-mix(in srgb, var(--blue) 24%, var(--surface));
  background: var(--surface);
}

.focus-tone-warning {
  border-color: color-mix(in srgb, var(--yellow) 32%, var(--surface));
  background: var(--surface);
}

.focus-tone-danger {
  border-color: color-mix(in srgb, var(--red) 32%, var(--surface));
  background: var(--surface);
}

.focus-tone-success {
  border-color: color-mix(in srgb, var(--green) 30%, var(--surface));
  background: var(--surface);
}

.focus-badge {
  color: #fff;
}

.focus-badge-neutral,
.focus-badge-action {
  background: var(--blue);
}

.focus-badge-warning {
  background: var(--yellow);
  color: #2d2300;
}

.focus-badge-danger {
  background: var(--red);
}

.focus-badge-success {
  background: var(--green);
}

.blocker-alert {
  margin: 0;
  padding: 14px 16px;
  border-radius: 8px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.summary-band .hero-actions {
  justify-content: flex-start;
}

.btn-list {
  margin: 0;
}

.btn-list .btn,
.hero-actions__list .btn {
  min-height: 40px;
  padding-inline: 16px;
  font-weight: 700;
  white-space: normal;
}

.hero-actions__list .btn {
  flex: 1 1 220px;
}

.panel-stack,
.dashboard-blocks,
.legal-links {
  display: grid;
  gap: 12px;
}

.required-now-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.required-now-list li {
  position: relative;
  padding: 12px 12px 12px 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--yellow) 7%, var(--surface));
  color: var(--text);
  line-height: 1.4;
}

.required-now-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 16px;
  width: 12px;
  height: 12px;
  border-radius: 8px;
  background: var(--yellow);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--yellow) 18%, transparent);
}

.progress-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

.progress-scroll .steps {
  width: 100%;
  min-width: 0;
}

.progress-scroll .step-item {
  min-width: 0;
  padding-inline: 8px;
  text-align: center;
  white-space: normal;
}

.progress-scroll .step-item::before,
.progress-scroll .step-item::after {
  background: var(--border);
}

.progress-scroll .step-item.is-completed {
  color: var(--green);
}

.progress-scroll .step-item.is-completed::before,
.progress-scroll .step-item.is-completed::after {
  background: var(--green) !important;
}

.progress-scroll .step-item.active {
  color: var(--blue);
}

.progress-scroll .step-item.active::before {
  background: var(--blue) !important;
}

.progress-scroll .step-item.active::after {
  background: var(--border) !important;
}

.progress-mobile {
  display: none;
}

.progress-mobile__counter {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  padding: 0;
}

.progress-mobile__step {
  min-width: 0;
}

.progress-mobile__step-marker {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-weight: 700;
}

.progress-mobile__step.progress-step-completed .progress-mobile__step-marker {
  border-color: var(--green);
  background: var(--green-lt);
  color: var(--green);
}

.progress-mobile__step.progress-step-active .progress-mobile__step-marker {
  border-color: var(--blue);
  background: var(--blue-lt);
  color: var(--blue);
}

.progress-mobile__current {
  margin-top: 8px;
  color: var(--text);
  font-weight: 600;
  word-break: normal;
  overflow-wrap: anywhere;
}

.progress-scroll .step-item.progress-step-pending {
  color: var(--gray);
}

.legal-links a {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft) 45%, var(--surface));
  text-decoration: none;
  font-weight: 600;
}

.documents-empty {
  padding: 0;
  border: 0;
  background: transparent;
}

.documents-empty .empty-title {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

.timeline-simple {
  position: relative;
  display: grid;
  gap: 10px;
  padding-left: 0;
}

.timeline-simple::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 5px;
  width: 1px;
  background: var(--tblr-border-color, rgba(98, 105, 118, 0.16));
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.timeline-marker {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 999px;
  border: 2px solid var(--green);
  background: var(--tblr-bg-surface, #fff);
  box-shadow: none;
}

.timeline-content {
  min-width: 0;
}

.timeline-title,
.timeline-note,
.assistant-text {
  margin: 0;
  line-height: 1.45;
}

.panel-lead {
  display: block;
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
}

.timeline-title {
  color: var(--text);
  font-weight: 700;
}

.timeline-note {
  margin-top: 2px;
  color: var(--muted);
}

.history-empty {
  padding: 16px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft) 35%, var(--surface));
}

.case-block {
  padding: 18px;
  border-left-width: 5px;
  border-radius: 8px;
  background: var(--surface);
}

.case-block header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.case-block h3 {
  margin: 0;
  font-size: 18px;
}

.case-block p,
.case-block li {
  color: var(--text);
  line-height: 1.5;
}

.case-block p:last-child,
.case-block ul:last-child {
  margin-bottom: 0;
}

.case-block ul {
  padding-left: 20px;
}

.status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
  flex: 0 0 auto;
}

.status-green {
  color: var(--green);
}

.status-yellow {
  color: var(--yellow);
}

.status-red {
  color: var(--red);
}

.status-gray {
  color: var(--gray);
}

.case-block.status-green,
.case-block.status-yellow,
.case-block.status-red,
.case-block.status-gray {
  border-left-color: currentColor;
}

.value-fallback {
  color: var(--muted);
}

.is-hidden,
[hidden] {
  display: none !important;
}

.page-footer {
  margin-top: auto;
  border-top: 1px solid color-mix(in srgb, var(--border) 84%, var(--surface));
  background: var(--surface);
  backdrop-filter: blur(10px);
}

.page-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.page-footer__brand,
.page-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.page-footer__links a {
  color: inherit;
  text-decoration: none;
}

.panel-action-btn {
  width: 100%;
  justify-content: center;
}

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

@media (max-width: 991px) {
  .desktop-actions {
    display: none;
  }

  .navbar-menu {
    display: block;
    order: 2;
    width: auto;
    flex-basis: auto;
  }

  .navbar-menu__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(280px, calc(100vw - 32px));
    margin-top: 0;
    padding: 12px 16px 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
    z-index: 20;
  }
}

@media (max-width: 767px) {
  .cabinet-navbar__inner {
    gap: 10px;
    flex-wrap: nowrap;
  }

  .service-page-header__row {
    align-items: stretch;
  }

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

  .service-card__open {
    width: 100%;
  }

  .breadcrumb-desktop {
    display: none;
  }

  .service-page-header__back {
    display: inline-flex;
  }

  .case-block header,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .progress-scroll .steps {
    display: none;
  }

  .progress-mobile {
    display: block;
  }

  .page-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .case-block {
    padding: 16px;
  }

  .navbar-brand {
    font-size: 14px;
    gap: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .breadcrumb-muted {
    font-size: 13px;
  }

  .page-title {
    font-size: 26px;
  }

  .service-page-header .page-title {
    font-size: 22px;
    line-height: 1.2;
  }

  .service-page-header__row {
    display: grid;
    justify-content: flex-start;
    gap: 8px;
  }

  .service-page-header__badge.status-pill {
    justify-self: flex-start;
    min-height: 22px;
    padding: 2px 8px;
    border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--surface));
    border-radius: 999px;
    background-color: color-mix(in srgb, var(--blue) 10%, var(--surface)) !important;
    color: var(--blue) !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
  }

  .status-pill {
    align-self: flex-start;
  }

  .progress-mobile__counter {
    gap: 6px;
  }

  .progress-mobile__step-marker {
    min-height: 36px;
  }
}

/* Human correspondence: controls use the cabinet's existing form/button styles. */
#support.card.h-100,
#ai-assistant.card.h-100 { height: auto !important; }
#support .card-body.panel-stack,
#ai-assistant .card-body.panel-stack { align-content: start; }
.case-human-chat { display: grid; gap: 12px; min-width: 0; width: 100%; }
.case-human-chat__status { margin: 0; color: var(--muted, var(--muted)); font-size: 14px; line-height: 1.5; }
.case-human-chat__messages { display: flex; flex-direction: column; gap: 8px; max-height: 22rem; overflow: auto; padding: 2px; }
.case-human-chat__messages:empty { display: none; }
.case-human-chat__message { margin: 0; padding: 10px 12px; max-width: 92%; border: 1px solid var(--tblr-border-color, #dce3ed); border-radius: 10px; background: var(--tblr-bg-surface, #fff); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.case-human-chat__message--incoming { align-self: flex-end; background: var(--surface-soft); }
.case-human-chat__message--outgoing { align-self: flex-start; }
.case-human-chat__input { width: 100%; min-height: 88px; resize: vertical; font: inherit; }
.case-human-chat__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.case-human-chat__actions .btn { min-height: 40px; }
.case-human-chat__older { justify-self: start; padding-inline: 0; white-space: normal; }
.case-human-chat .btn:focus-visible,
.case-human-chat__input:focus-visible { outline: 2px solid var(--tblr-primary, var(--blue)); outline-offset: 3px; }
@media (max-width: 575.98px) {
  .case-human-chat__message { max-width: 100%; }
  .case-human-chat__actions .btn-primary { flex: 1 0 100%; }
}

/* E89-01: comfortable touch targets and bounded menu on short mobile viewports. */
@media (max-width: 991px) {
  .navbar-menu .navbar-toggler { min-width: 44px; min-height: 44px; }
  .navbar-menu .navbar-menu__actions .navbar-menu__link { min-height: 44px; }
  .navbar-menu__panel { max-height: calc(100dvh - 112px); overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 767px) and (max-height: 600px) {
  .login-screen { min-height: 0; place-items: start center; }
}
