:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f1f4f8;
  --ink: #10233d;
  --muted: #607087;
  --soft: #8490a1;
  --line: #dde3eb;
  --line-strong: #c7d0dc;
  --navy: #061b33;
  --navy-800: #0a2442;
  --navy-700: #123459;
  --blue: #155eef;
  --blue-dark: #1049bd;
  --blue-soft: #edf4ff;
  --green: #12835b;
  --green-soft: #e8f7f0;
  --amber: #bf6a12;
  --amber-soft: #fff3e2;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 10px 28px rgba(16, 35, 61, 0.08);
  --shadow-sm: 0 1px 2px rgba(16, 35, 61, 0.04);
  --font-display: var(--font);
}

* {
  letter-spacing: 0 !important;
}

body {
  background: var(--bg);
}

h1,
h2,
h3 {
  font-family: var(--font);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(21, 94, 239, 0.28);
  outline-offset: 2px;
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  padding: 18px 14px;
  gap: 16px;
  background: var(--navy);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  padding: 0 4px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: #2568ee;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.brand strong {
  font-size: 16px;
}

.account-switcher {
  padding: 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.14);
}

.account-logo {
  border-radius: 6px;
  background: #e49a18;
}

.nav-list {
  gap: 4px;
}

.nav-item {
  min-height: 41px;
  border-radius: 6px;
  color: #c8d3e1;
  font-size: 13px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.065);
}

.nav-item.active {
  background: #123967;
  box-shadow: inset 3px 0 0 #4c87ff;
}

.sidebar-card {
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.14);
}

.balance-card strong,
.help-card strong {
  font-variant-numeric: tabular-nums;
}

.main-shell {
  min-height: 100vh;
  padding: 0 24px 34px;
}

.topbar {
  min-height: 64px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 250, 0.96);
  backdrop-filter: blur(12px);
}

.search-box,
.role-switcher,
.ghost-button,
.icon-button {
  border-radius: 7px;
  box-shadow: none;
}

.search-box {
  height: 40px;
}

.primary-button,
.secondary-button {
  min-height: 40px;
  border-radius: 6px;
  box-shadow: none;
}

.panel {
  border-radius: 8px;
  box-shadow: none;
}

.view.active {
  padding-top: 22px;
}

.text-link {
  color: var(--blue-dark);
}

/* Dashboard */
.dash {
  width: 100%;
  max-width: none;
  gap: 18px;
}

.dash-topline {
  align-items: center;
}

.dash-greeting h1 {
  color: var(--ink);
  font-size: 28px;
  font-weight: 760;
}

.dash-greeting p {
  margin-top: 5px;
  font-size: 13px;
}

.dash-callout {
  min-height: 78px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.dash-callout.warning {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.dash-pulse {
  width: 10px;
  height: 10px;
  border: 2px solid var(--blue);
  background: #fff;
  box-shadow: none;
}

.dash-callout strong {
  font-size: 15px;
}

.dash-callout span {
  color: var(--muted);
}

.dash-callout-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.dash-callout-facts {
  display: flex;
  flex: 0 1 auto;
  gap: 22px;
  margin: 0;
  padding: 0 18px;
  border-left: 1px solid var(--line);
}

.dash-callout-facts div {
  min-width: 100px;
}

.dash-callout-facts dt,
.dash-callout-facts dd {
  margin: 0;
}

.dash-callout-facts dt {
  color: var(--muted);
  font-size: 10px;
}

.dash-callout-facts dd {
  margin-top: 4px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}

.dash-callout > button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
}

.dash-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.dash-kpi,
.dash-kpi.accent-blue,
.dash-kpi.accent-gold {
  min-height: 118px;
  padding: 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.dash-kpi:last-child {
  border-right: 0;
}

.dash-kpi-value {
  margin-top: 8px;
  font-size: 25px;
  font-weight: 760;
}

.dash-cols {
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
}

.dash-main,
.dash-side {
  gap: 18px;
}

.dash-panel-head {
  padding: 17px 18px 8px;
}

.dash-panel-head h2 {
  font-size: 15px;
}

.dash-list {
  padding: 0 18px 10px;
}

.dash-req {
  min-height: 62px;
  padding: 11px 0;
}

.dash-req-info strong {
  font-size: 13px;
}

.dash-steps i {
  width: 17px;
  height: 3px;
  border-radius: 2px;
}

.dash-steps i.current {
  background: var(--blue);
}

.dash-todo {
  padding: 13px 0;
}

.dash-check {
  width: 5px;
  height: 34px;
  margin-top: 0;
  border: 0;
  border-radius: 3px;
  background: var(--blue);
}

.dash-mutual {
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.dash-mutual-tag {
  color: var(--green);
}

.dash-mutual p {
  color: var(--muted);
}

.dash-mutual-gain {
  color: var(--green);
}

.dash-mutual button {
  border-color: var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.dash-offer {
  border-color: var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

/* Selected dossier direction */
body.cc-dossier-active .topbar {
  display: none;
}

body.cc-dossier-active #requestView.view.active {
  padding-top: 0;
}

#requestContentGrid.cc-mode {
  display: block;
}

#requestContentGrid.cc-mode > .work-area {
  width: 100%;
  gap: 0;
}

#requestContentGrid.cc-mode .page-heading,
#requestContentGrid.cc-mode #dossierTabs,
#requestContentGrid.cc-mode > .work-area > .dossier-tab-panel,
#requestContentGrid.cc-mode > #requestSummary {
  display: none !important;
}

.cc-dossier {
  width: 100%;
  min-width: 0;
  color: var(--ink);
}

.cc-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;
}

.cc-context-bar {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.cc-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
}

.cc-back:hover,
.cc-context-action:hover,
.cc-context-menu button:hover {
  color: var(--blue-dark);
}

.cc-context-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cc-context-date,
.cc-context-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.cc-context-date {
  margin-right: 8px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.cc-context-bar svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.cc-context-action {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 680;
}

.cc-more-actions {
  position: relative;
}

.cc-context-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: grid;
  width: 190px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: var(--shadow);
}

.cc-context-menu button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 11px;
  font-weight: 650;
}

.cc-header {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.cc-eyebrow,
.cc-current-task span,
.cc-task-consequence > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.cc-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 7px;
}

.cc-title-row h1 {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 30px;
  font-weight: 760;
  line-height: 1.15;
}

.cc-status {
  flex: 0 0 auto;
  max-width: 280px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
}

.cc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.cc-meta span {
  position: relative;
}

.cc-meta span:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.cc-meta strong {
  margin-left: 4px;
  color: var(--ink);
  font-weight: 690;
}

.cc-attention {
  color: var(--amber) !important;
}

.cc-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.cc-stat-strip article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 17px 20px;
  border-right: 1px solid var(--line);
}

.cc-stat-strip article > div {
  min-width: 0;
}

.cc-stat-icon {
  width: 25px;
  height: 25px;
  color: #466180;
}

.cc-stat-strip article:first-child {
  padding-left: 0;
}

.cc-stat-strip article:last-child {
  border-right: 0;
}

.cc-stat-strip span,
.cc-stat-strip strong,
.cc-stat-strip small {
  display: block;
}

.cc-stat-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
}

.cc-stat-strip strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.cc-stat-strip small {
  margin-top: 3px;
  color: var(--soft);
  font-size: 10px;
  line-height: 1.35;
}

.cc-stat-strip .positive strong {
  color: var(--green);
}

.cc-stat-strip .positive .cc-stat-icon {
  color: var(--green);
}

.cc-stat-strip .attention strong {
  color: var(--amber);
}

.cc-stat-strip .attention .cc-stat-icon {
  color: #466180;
}

.cc-body-grid {
  display: grid;
  grid-template-columns: 195px minmax(0, 1fr) 282px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.cc-cycle,
.cc-workspace,
.cc-evidence {
  min-width: 0;
}

.cc-cycle {
  padding: 20px 18px 18px 0;
  border-right: 1px solid var(--line);
}

.cc-cycle h2,
.cc-evidence h2,
.cc-commercial h2 {
  font-size: 13px;
  font-weight: 760;
}

.cc-cycle ol {
  display: grid;
  gap: 0;
  margin: 15px 0 0;
  padding: 0;
  list-style: none;
}

.cc-cycle li {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  min-height: 50px;
}

.cc-cycle li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 0;
  left: 11px;
  width: 1px;
  background: var(--line-strong);
}

.cc-cycle li b {
  position: relative;
  z-index: 1;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
}

.cc-cycle li b svg {
  width: 14px;
  height: 14px;
}

.cc-cycle li.done b {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.cc-cycle li.current b {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.cc-cycle li div {
  min-width: 0;
  padding-top: 2px;
}

.cc-cycle li strong,
.cc-cycle li span {
  display: block;
}

.cc-cycle li strong {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.25;
}

.cc-cycle li span {
  margin-top: 3px;
  color: var(--soft);
  font-size: 10px;
}

.cc-cycle li.current strong,
.cc-cycle li.current span {
  color: var(--blue-dark);
}

.cc-workspace {
  padding: 20px 22px 24px;
}

.cc-current-task {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(190px, 0.75fr);
  gap: 22px;
  min-height: 108px;
  padding: 14px 16px 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 7px;
  background: #fbfcfe;
}

.cc-task-copy,
.cc-task-consequence {
  min-width: 0;
}

.cc-task-copy h2 {
  margin-top: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 760;
}

.cc-task-title-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 7px;
}

.cc-task-title-row svg {
  width: 25px;
  height: 25px;
  color: #365b87;
}

.cc-task-copy > p {
  margin-left: 38px;
}

.cc-task-copy p,
.cc-task-consequence p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.cc-task-consequence {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.cc-task-consequence strong {
  display: block;
  margin-top: 5px;
  color: var(--amber);
  font-size: 11px;
}

.cc-commercial {
  margin-top: 22px;
}

.cc-commercial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.85fr);
  gap: 24px;
  margin-top: 13px;
}

.cc-commercial dl,
.cc-detail-grid {
  margin: 0;
}

.cc-commercial dl > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.78fr) minmax(0, 1.22fr);
  gap: 16px;
  padding: 7px 0;
}

.cc-commercial dt,
.cc-detail-grid dt {
  color: var(--muted);
  font-size: 11px;
}

.cc-commercial dd,
.cc-detail-grid dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 11px;
  font-weight: 670;
  text-align: left;
}

.cc-pricing-ledger {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.cc-pricing-ledger > div {
  grid-template-columns: minmax(0, 1fr) auto !important;
}

.cc-pricing-ledger dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cc-pricing-ledger .total {
  margin: 4px 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cc-pricing-ledger .total dt,
.cc-pricing-ledger .total dd {
  color: var(--ink);
  font-size: 15px;
  font-weight: 780;
}

.cc-pricing-ledger > small {
  display: block;
  margin-top: 13px;
  color: var(--soft);
  font-size: 9px;
  line-height: 1.5;
}

.cc-evidence {
  border-left: 1px solid var(--line);
}

.cc-evidence > section {
  padding: 20px 18px;
  border-bottom: 1px solid var(--line);
}

.cc-evidence > section:last-child {
  border-bottom: 0;
}

.cc-proof-title,
.cc-evidence > section > span {
  display: block;
}

.cc-proof-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.45;
}

.cc-proof-title svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--green);
}

.cc-evidence > section > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.cc-outline-button {
  width: 100%;
  min-height: 36px;
  margin-top: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.cc-document-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 13px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.cc-document-row > svg {
  width: 19px;
  height: 19px;
  color: var(--blue-dark);
}

.cc-document-row div,
.cc-document-row strong,
.cc-document-row span {
  min-width: 0;
}

.cc-document-row strong,
.cc-document-row span {
  display: block;
  overflow-wrap: anywhere;
}

.cc-document-row strong {
  font-size: 10px;
  line-height: 1.4;
}

.cc-document-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.cc-document-row button {
  align-self: center;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 750;
}

.cc-validation-list {
  display: grid;
  gap: 13px;
  margin-top: 14px;
}

.cc-validation-list article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
}

.cc-validation-list b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  background: transparent;
  color: var(--green);
}

.cc-validation-list b svg {
  width: 18px;
  height: 18px;
}

.cc-validation-list article.warning b {
  color: var(--amber);
}

.cc-validation-list article.pending b {
  color: var(--muted);
}

.cc-validation-list strong,
.cc-validation-list span {
  display: block;
}

.cc-validation-list strong {
  font-size: 10px;
  line-height: 1.35;
}

.cc-validation-list span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.cc-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
}

.cc-record {
  min-width: 0;
  padding-right: 22px;
  border-right: 1px solid var(--line);
}

.cc-work-tabs {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.cc-work-tabs button {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

.cc-work-tabs button.active {
  border-bottom-color: var(--blue);
  color: var(--blue-dark);
}

.cc-tab-panel {
  min-height: 142px;
  padding: 5px 0 10px;
}

.cc-activity-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  padding: 10px 7px;
  border-bottom: 1px solid var(--line);
}

.cc-activity-row:last-child {
  border-bottom: 0;
}

.cc-activity-row time {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.cc-activity-row strong,
.cc-activity-row span {
  display: block;
}

.cc-activity-row strong {
  font-size: 10px;
}

.cc-activity-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.cc-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding-top: 12px;
}

.cc-detail-grid > div {
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cc-detail-grid > div:nth-child(3n) {
  border-right: 0;
}

.cc-detail-grid dd {
  margin-top: 5px;
}

.cc-empty {
  display: grid;
  gap: 5px;
  padding: 24px 4px;
}

.cc-empty strong {
  font-size: 12px;
}

.cc-empty span {
  color: var(--muted);
  font-size: 11px;
}

.cc-clarification-list {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.cc-clarification {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid #f0c878;
  border-radius: 6px;
  background: #fffaf0;
}

.cc-clarification.answered {
  border-color: #b7dfca;
  background: #f5fcf8;
}

.cc-clarification-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.cc-clarification-head strong,
.cc-clarification-head span,
.cc-clarification-source span,
.cc-clarification-question span,
.cc-clarification-answer span,
.cc-clarification-answer small {
  display: block;
}

.cc-clarification-head strong {
  font-size: 12px;
}

.cc-clarification-head span,
.cc-clarification-source span,
.cc-clarification-question span,
.cc-clarification-answer span,
.cc-clarification-answer small,
.cc-clarification-readonly {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.cc-clarification-head em {
  padding: 5px 7px;
  border-radius: 999px;
  background: #fff0c9;
  color: #8a5200;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.cc-clarification.answered .cc-clarification-head em {
  background: #dff5e8;
  color: #087443;
}

.cc-clarification-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #fff0c9;
  color: #9a5b00;
}

.cc-clarification.answered .cc-clarification-mark {
  background: #dff5e8;
  color: #087443;
}

.cc-clarification-mark svg {
  width: 17px;
  height: 17px;
}

.cc-clarification-source,
.cc-clarification-question,
.cc-clarification-answer {
  padding-left: 44px;
}

.cc-clarification-source p,
.cc-clarification-question p {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.5;
}

.cc-clarification-answer strong {
  margin: 4px 0;
  font-size: 12px;
}

.cc-clarification-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding-left: 44px;
}

.cc-clarification-form label {
  min-width: 0;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}

.cc-clarification-form textarea {
  width: 100%;
  min-height: 74px;
  margin-top: 5px;
  resize: vertical;
}

.cc-clarification-form button {
  min-height: 42px;
  white-space: nowrap;
}

.cc-clarification-readonly {
  margin: 0;
  padding-left: 44px;
}

.cc-actions {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 22px 0 0 18px;
}

.cc-actions .primary-button,
.cc-actions .secondary-button {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  gap: 9px;
  font-size: 12px;
}

.cc-actions .primary-button {
  justify-content: space-between;
}

.cc-actions .primary-button > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.cc-actions svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

@media (max-width: 1320px) {
  .cc-body-grid {
    grid-template-columns: 175px minmax(0, 1fr);
  }

  .cc-evidence {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .cc-evidence > section {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .cc-evidence > section:last-child {
    border-right: 0;
  }
}

@media (max-width: 1060px) {
  .topbar {
    flex-wrap: wrap;
  }

  .search-box {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dash-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-kpi:nth-child(2) {
    border-right: 0;
  }

  .dash-kpi:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .dash-cols {
    grid-template-columns: 1fr;
  }

  .cc-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-stat-strip article:nth-child(2) {
    border-right: 0;
  }

  .cc-stat-strip article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .cc-stat-strip article:nth-child(3) {
    padding-left: 0;
  }

  .cc-current-task,
  .cc-commercial-grid {
    grid-template-columns: 1fr;
  }

  .cc-task-consequence,
  .cc-pricing-ledger {
    padding-top: 13px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    padding: 10px 12px;
    gap: 9px;
  }

  .brand {
    min-height: 34px;
  }

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

  .brand span {
    display: none;
  }

  .nav-list {
    display: flex;
    gap: 5px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav-item {
    flex: 0 0 auto;
    width: auto;
    min-height: 36px;
    padding: 7px 10px;
  }

  .nav-item span {
    white-space: nowrap;
  }

  .sidebar-card,
  .account-switcher {
    display: none;
  }

  .main-shell {
    padding: 0 14px 28px;
  }

  .topbar {
    position: static;
    gap: 10px;
    padding: 10px 0;
  }

  .view.active {
    padding-top: 17px;
  }

  body.cc-dossier-active #requestView.view.active {
    padding-top: 0;
  }

  .cc-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .cc-title-row h1 {
    font-size: 26px;
  }

  .cc-body-grid {
    grid-template-columns: 1fr;
  }

  .cc-cycle {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .cc-cycle ol {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .cc-cycle li {
    flex: 0 0 145px;
    min-height: 48px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
  }

  .cc-cycle li:not(:last-child)::after {
    display: none;
  }

  .cc-cycle li.current {
    border-color: rgba(21, 94, 239, 0.4);
    background: var(--blue-soft);
  }

  .cc-workspace {
    padding: 18px 0 22px;
  }

  .cc-evidence {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .cc-evidence > section {
    padding-inline: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .cc-bottom-grid {
    grid-template-columns: 1fr;
  }

  .cc-record {
    padding-right: 0;
    border-right: 0;
  }

  .cc-actions {
    grid-row: 1;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .nav-list {
    width: 100%;
  }

  .nav-item {
    flex: 0 0 84px;
    width: 84px;
    min-width: 84px;
    padding: 7px 4px;
    flex-direction: column;
    gap: 4px;
  }

  .nav-item span {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    text-align: center;
    font-size: 10px;
    line-height: 1.15;
  }

  .topbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .search-box,
  .topbar-actions {
    width: 100%;
    max-width: none;
  }

  .user-chip {
    padding-left: 0;
  }

  .user-chip span {
    display: none;
  }

  .cc-context-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding: 9px 0;
  }

  .cc-context-actions {
    width: 100%;
    justify-content: space-between;
  }

  .cc-context-actions time {
    margin-right: auto;
  }

  .dash-topline,
  .dash-actions,
  .dash-callout {
    align-items: stretch;
    flex-direction: column;
  }

  .dash-callout-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .dash-actions .primary-button,
  .dash-actions .secondary-button,
  .dash-callout > button {
    width: 100%;
  }

  .dash-kpis,
  .cc-stat-strip {
    grid-template-columns: 1fr;
  }

  .dash-kpis > .dash-kpi,
  .cc-stat-strip > article {
    min-height: 0;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dash-kpis > .dash-kpi:last-child,
  .cc-stat-strip > article:last-child {
    border-bottom: 0;
  }

  .cc-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-meta span::after {
    display: none;
  }

  .cc-current-task {
    padding: 14px;
  }

  .cc-commercial dl > div,
  .cc-pricing-ledger > div {
    grid-template-columns: 1fr !important;
    gap: 4px;
  }

  .cc-pricing-ledger dd {
    text-align: left;
  }

  .cc-work-tabs {
    gap: 20px;
  }

  .cc-activity-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .cc-clarification-head {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .cc-clarification-head em {
    grid-column: 2;
    justify-self: start;
  }

  .cc-clarification-source,
  .cc-clarification-question,
  .cc-clarification-answer,
  .cc-clarification-form,
  .cc-clarification-readonly {
    padding-left: 0;
  }

  .cc-clarification-form {
    grid-template-columns: 1fr;
  }

  .cc-clarification-form button {
    width: 100%;
    justify-content: center;
  }

  .cc-detail-grid {
    grid-template-columns: 1fr;
  }

  .cc-detail-grid > div,
  .cc-detail-grid > div:nth-child(3n) {
    border-right: 0;
  }
}

@media (max-width: 360px) {
  .role-switcher {
    min-width: 0;
    flex: 1 1 130px;
  }

  .topbar-actions .ghost-button,
  .topbar-actions .icon-button {
    width: 44px;
    min-width: 44px;
    flex-basis: 44px;
  }

  .user-chip {
    flex: 0 0 34px;
    padding-left: 0;
  }
}

@media print {
  .sidebar,
  .cc-context-bar,
  .cc-actions {
    display: none !important;
  }

  .app-shell,
  .cc-bottom-grid {
    grid-template-columns: 1fr;
  }

  .main-shell {
    padding: 0;
  }

  .cc-record {
    padding-right: 0;
    border-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
