/*
 * Corte 1 — fundação visual
 *
 * Esta camada fica separada do protótipo original para que a reconstrução seja
 * reversível enquanto os módulos são migrados para telas próprias.
 */

:root {
  color-scheme: light;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17212b;
  background: #f6f7f9;
  --ink: #17212b;
  --ink-soft: #34414d;
  --muted: #6d7883;
  --muted-soft: #98a2ab;
  --line: #e1e6ea;
  --paper: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f1f4f6;
  --night: #17212b;
  --night-soft: #22313f;
  --blue: #4264df;
  --blue-dark: #304fc4;
  --blue-soft: #edf1ff;
  --lime: #d8ef86;
  --danger: #b4524d;
  --shadow-sm: 0 1px 2px rgba(23, 33, 43, 0.04), 0 8px 24px rgba(23, 33, 43, 0.04);
  --shadow-md: 0 12px 34px rgba(23, 33, 43, 0.09);
}

html {
  scroll-behavior: auto;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(66, 100, 223, 0.24);
  outline-offset: 2px;
}

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

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

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--night);
  padding: 24px 16px 20px;
}

.brand {
  gap: 10px;
  padding: 2px 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.67rem;
  letter-spacing: 0;
}

.brand-copy strong {
  color: #f8fafb;
  font-size: 0.98rem;
  letter-spacing: -0.025em;
}

.brand-copy small {
  color: #86929d;
  font-size: 0.57rem;
  letter-spacing: 0.17em;
}

.sidebar-section {
  margin-top: 46px;
}

.sidebar-label,
.kicker,
.metric-label,
.signal-label {
  font-size: 0.64rem;
  line-height: 1.25;
  letter-spacing: 0.13em;
}

.sidebar-label {
  margin: 0 10px 10px;
  color: #788591;
}

.nav-list {
  gap: 3px;
}

.nav-item {
  min-height: 40px;
  border-radius: 9px;
  color: #aab5bf;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0;
  padding: 0 10px;
}

.nav-item:hover:not(.is-muted) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.is-active {
  border-color: rgba(216, 239, 134, 0.15);
  color: #ffffff;
  background: rgba(216, 239, 134, 0.13);
  box-shadow: inset 3px 0 0 var(--lime);
}

.nav-index {
  width: 20px;
  color: #6e7b86;
  font-size: 0.59rem;
}

.is-active .nav-index {
  color: var(--lime);
}

.sidebar-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
  padding-top: 16px;
}

.sidebar-footer strong {
  color: #dce3e8;
  font-size: 0.67rem;
}

.sidebar-footer small {
  color: #778591;
  font-size: 0.6rem;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 68px;
  border-bottom: 1px solid rgba(225, 230, 234, 0.9);
  background: rgba(246, 247, 249, 0.9);
  padding: 0 clamp(24px, 4vw, 54px);
  backdrop-filter: blur(16px);
}

.breadcrumb {
  gap: 9px;
  color: var(--muted-soft);
  font-size: 0.72rem;
}

.breadcrumb strong {
  color: var(--ink-soft);
  font-weight: 700;
}

.topbar-actions {
  gap: 14px;
}

.preview-badge {
  color: var(--muted);
  font-size: 0.64rem;
}

.topbar-user {
  max-width: 190px;
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.avatar {
  width: 32px;
  height: 32px;
  border-color: var(--line);
  color: var(--ink-soft);
  background: var(--surface);
  font-size: 0.6rem;
}

.mobile-nav-picker {
  display: none;
}

.page-content {
  width: min(1380px, 100%);
  padding: 42px clamp(24px, 4vw, 54px) 72px;
}

.intro-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: start;
  gap: clamp(28px, 6vw, 88px);
}

.intro-copy {
  max-width: 760px;
}

.kicker {
  margin-bottom: 12px;
  color: var(--blue);
  font-weight: 800;
}

h1,
h2,
h3,
h4,
blockquote {
  color: var(--ink);
  letter-spacing: -0.035em;
  line-height: 1.12;
}

h1 {
  max-width: 780px;
  margin-bottom: 20px;
  font-size: clamp(3rem, 5.8vw, 5.5rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.55rem, 2.5vw, 2.1rem);
  line-height: 1.08;
}

h3 {
  line-height: 1.12;
}

.intro-text {
  max-width: 590px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.intro-actions {
  gap: 13px;
}

.button {
  min-height: 40px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0;
  padding: 10px 14px;
}

.button:hover:not(:disabled) {
  box-shadow: 0 8px 18px rgba(66, 100, 223, 0.18);
  transform: translateY(-1px);
}

.button-primary {
  background: var(--blue);
}

.button-primary:hover:not(:disabled) {
  background: var(--blue-dark);
}

.button-quiet {
  color: var(--muted);
}

.health-status {
  color: var(--muted-soft);
  font-size: 0.7rem;
}

.signal-card {
  min-height: 190px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px 18px;
}

.signal-header {
  margin-bottom: 28px;
}

.signal-label {
  color: var(--muted-soft);
}

.signal-title {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.signal-description {
  max-width: 320px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.progress-track {
  height: 4px;
  background: #e8ecef;
}

.progress-value {
  width: 78%;
  background: var(--blue);
}

.signal-meta {
  margin-top: 9px;
  color: var(--muted-soft);
  font-size: 0.59rem;
}

.metric-grid {
  gap: 12px;
  margin-top: 34px;
}

.metric-card {
  min-height: 128px;
  border-color: var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 19px 20px;
}

.metric-card-dark {
  border-color: var(--night);
  background: var(--night);
}

.metric-label {
  margin-bottom: 22px;
  color: var(--muted-soft);
}

.metric-card strong {
  margin-bottom: 5px;
  font-size: 1.12rem;
  letter-spacing: -0.035em;
}

.metric-detail {
  color: var(--muted);
  font-size: 0.7rem;
}

.lower-grid {
  gap: 12px;
  margin-top: 12px;
}

.roadmap-card,
.principle-card {
  min-height: 350px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 26px;
}

.roadmap-card {
  background: var(--surface);
}

.principle-card {
  background: var(--night);
}

.section-heading {
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.section-heading .kicker {
  margin-bottom: 9px;
}

.section-count {
  color: var(--muted-soft);
  font-size: 0.61rem;
}

.roadmap-row {
  min-height: 60px;
}

.roadmap-copy strong {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.roadmap-copy span {
  color: var(--muted-soft);
  font-size: 0.67rem;
}

.principle-card .kicker,
.principle-card blockquote {
  color: #f2f5f7;
}

blockquote {
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.08;
}

.page-footer {
  margin-top: 24px;
  color: var(--muted-soft);
  font-size: 0.62rem;
}

/* Cada hash agora representa uma tela. Os blocos de overview não competem
   visualmente com o módulo selecionado. */
.pending-section,
.people-section,
.cases-section,
.finance-section,
.agenda-section,
.documents-section,
.calculations-section,
.access-section {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.people-layout,
.pending-layout {
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 18px;
}

.people-list-card,
.people-form-card,
.people-detail-card,
.access-card,
.access-permission-card,
.access-admin-card {
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.people-form-card,
.access-admin-card {
  border-color: #d8e0ff;
  background: #f5f7ff;
}

.people-form-card h3,
.people-detail-card h3,
.access-admin-card h3 {
  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

.people-form-intro,
.access-admin-intro {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.people-heading-actions,
.people-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.people-heading-actions .button {
  min-height: 38px;
}

.people-detail-actions {
  align-items: flex-start;
}

.people-detail-actions .button-quiet {
  white-space: nowrap;
}

.cases-heading-actions,
.cases-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.cases-heading-actions .button {
  min-height: 38px;
}

.cases-detail-actions {
  align-items: flex-start;
}

.cases-detail-actions .button-quiet {
  white-space: nowrap;
}

.case-next-steps {
  margin-top: 22px;
}

.case-next-steps-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.case-next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 13px 14px;
}

.case-next-step-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.case-next-step-copy .metric-label {
  color: var(--blue);
  margin-bottom: 0;
}

.case-next-step-copy strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-next-step-copy span:not(.metric-label),
.case-next-step-copy small {
  color: var(--muted-soft);
  font-size: 0.66rem;
}

.case-next-step-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-input {
  min-height: 40px;
  border-color: #d8dfe4;
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.82rem;
  padding: 10px 12px;
}

textarea.field-input {
  min-height: 84px;
}

.people-filter-field > span,
.group-form-field > span,
.group-form-label {
  color: var(--muted);
  font-size: 0.61rem;
  line-height: 1.25;
  letter-spacing: 0.08em;
}

.people-toolbar,
.cases-toolbar,
.audit-toolbar {
  gap: 10px;
  margin-bottom: 16px;
}

.people-toolbar {
  grid-template-columns: minmax(240px, 1.45fr) repeat(3, minmax(135px, 0.72fr)) auto;
}

.cases-toolbar {
  grid-template-columns: minmax(240px, 1.45fr) repeat(3, minmax(135px, 0.72fr)) auto;
}

.pending-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) minmax(150px, 0.72fr) minmax(180px, 0.82fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
}

.pending-toolbar .people-filter-actions {
  grid-column: auto;
}

.pending-item-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) repeat(3, minmax(145px, 0.72fr));
  align-items: end;
  gap: 10px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 13px;
}

.pending-items-heading {
  align-items: flex-end;
}

.pending-list,
.pending-items-list {
  min-width: 0;
}

.pending-row .people-row-actions {
  flex-wrap: wrap;
}

.pending-item-actions {
  flex-wrap: wrap;
  align-items: center;
}

.pending-move-button {
  min-width: 22px;
  font-size: 0.92rem;
  line-height: 1;
}

.pending-item-overdue {
  border-left: 2px solid #c46b5d;
  padding-left: 11px;
}

.pending-item-overdue .pending-item-copy span {
  color: #a25249;
}

.people-empty {
  border: 1px dashed #d9e0e5;
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-soft);
  padding: 16px;
}

.people-row {
  border-top-color: var(--line);
  padding: 15px 0 5px;
}

.people-row-title strong,
.pending-item-copy strong,
.access-list-row strong {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.people-row-title span,
.people-row-details span,
.pending-item-copy span,
.pending-item-copy small {
  color: var(--muted-soft);
  font-size: 0.66rem;
}

.people-badge,
.pending-context-tags span,
.pending-context-tags button {
  font-size: 0.57rem;
  padding: 5px 8px;
}

.access-grid {
  gap: 14px;
}

.access-card {
  min-height: 150px;
}

.access-card strong {
  font-size: 1.08rem;
  letter-spacing: -0.025em;
}

.permission-inputs {
  background: rgba(255, 255, 255, 0.55);
  border-color: #d8e0ff;
  border-radius: 8px;
  padding: 12px;
}

.auth-story-copy h1 {
  max-width: 650px;
  font-size: clamp(3rem, 5.4vw, 5.6rem);
  letter-spacing: -0.055em;
  line-height: 0.99;
}

.auth-card h2 {
  font-size: clamp(2.15rem, 4vw, 3.4rem);
  letter-spacing: -0.045em;
  line-height: 1.03;
}

.auth-intro {
  color: var(--muted);
}

@media (min-width: 981px) {
  .people-form-card,
  .access-admin-card {
    align-self: start;
  }
}

@media (max-width: 980px) and (min-width: 721px) {
  .app-shell {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .sidebar {
    padding-right: 10px;
    padding-left: 10px;
  }

  .brand {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
  }

  .brand-copy,
  .sidebar-label,
  .nav-item > span:not(.nav-index),
  .nav-soon,
  .sidebar-footer div {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
  }

  .nav-index {
    width: auto;
  }

  .sidebar-footer {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
  }

  .sidebar-section {
    margin-top: 46px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 18px;
  }

  .brand {
    justify-content: flex-start;
    padding: 2px 0;
  }

  .brand-copy {
    display: flex;
  }

  .sidebar-section,
  .sidebar-footer {
    display: none;
  }

  .topbar {
    position: static;
    min-height: 62px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 18px;
  }

  .breadcrumb {
    flex: 1 1 auto;
  }

  .mobile-nav-picker {
    display: block;
    flex: 0 1 180px;
  }

  .mobile-nav-picker .field-input {
    min-height: 36px;
    padding: 7px 9px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 11px;
  }

  .preview-badge {
    display: none;
  }

  .page-content {
    padding: 32px 18px 54px;
  }

  .intro-grid,
  .lower-grid,
  .people-layout,
  .pending-layout,
  .access-grid,
  .group-form-grid {
    grid-template-columns: 1fr;
  }

  h1,
  .auth-story-copy h1 {
    font-size: clamp(2.8rem, 14vw, 4.8rem);
    line-height: 1;
  }

  .intro-grid {
    gap: 30px;
  }

  .signal-card {
    min-height: 0;
  }

  .metric-grid {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .metric-card {
    min-height: 112px;
  }

  .roadmap-card,
  .principle-card {
    min-height: 0;
    padding: 22px;
  }

  .people-toolbar,
  .cases-toolbar,
  .pending-toolbar,
  .pending-item-filter-form,
  .audit-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .people-filter-field:first-child,
  .pending-toolbar .people-filter-field:first-child,
  .pending-item-filter-form .people-filter-field:first-child,
  .audit-toolbar .people-filter-field:first-child,
  .people-filter-actions,
  .audit-toolbar .people-filter-actions {
    grid-column: 1 / -1;
  }

  .people-list-card,
  .people-form-card,
  .people-detail-card,
  .access-card,
  .access-permission-card,
  .access-admin-card {
    padding: 19px;
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 420px) {
  .mobile-nav-picker {
    flex-basis: 148px;
  }

  .topbar-user {
    max-width: 120px;
  }

  .people-toolbar,
  .cases-toolbar,
  .pending-toolbar,
  .pending-item-filter-form,
  .audit-toolbar {
    grid-template-columns: 1fr;
  }

  .people-filter-field:first-child,
  .pending-toolbar .people-filter-field:first-child,
  .pending-item-filter-form .people-filter-field:first-child,
  .audit-toolbar .people-filter-field:first-child,
  .people-filter-actions,
  .audit-toolbar .people-filter-actions {
    grid-column: auto;
  }
}

/* Corte 2 — dashboard operacional */

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 30px;
}

.dashboard-hero-copy {
  min-width: 0;
  max-width: 760px;
}

.dashboard-hero h1 {
  max-width: 680px;
  margin-bottom: 16px;
}

.dashboard-hero .intro-text {
  max-width: 560px;
  margin-bottom: 0;
}

.dashboard-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 330px;
  color: var(--muted);
}

.dashboard-date {
  width: 100%;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
  text-transform: capitalize;
}

.dashboard-hero-actions .button-quiet {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 9px 12px;
}

.dashboard-hero-actions .health-status {
  font-size: 0.64rem;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.dashboard-metric {
  min-width: 0;
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 18px 19px;
}

.dashboard-metric-dark {
  border-color: var(--night);
  color: #ffffff;
  background: var(--night);
}

.dashboard-metric .metric-label {
  margin-bottom: 17px;
}

.dashboard-metric strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 1.65rem;
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1;
}

.dashboard-metric-dark strong {
  color: #ffffff;
}

.dashboard-metric .metric-detail {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-metric-dark .metric-label,
.dashboard-metric-dark .metric-detail {
  color: #aeb9c2;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 12px;
  margin-top: 12px;
}

.dashboard-secondary-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
}

.dashboard-card {
  min-width: 0;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.dashboard-card-primary {
  border-color: #dce3ff;
  background: #fbfcff;
}

.dashboard-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.dashboard-card-heading .kicker {
  margin-bottom: 8px;
}

.dashboard-card-heading h2 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
}

.dashboard-card-link,
.dashboard-list-link {
  flex-shrink: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  font-size: 0.67rem;
  font-weight: 750;
  padding: 2px 0;
}

.dashboard-card-link:hover,
.dashboard-list-link:hover {
  color: var(--blue-dark);
}

.dashboard-list {
  display: grid;
  gap: 0;
}

.dashboard-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  border-top: 1px solid var(--line);
  padding: 11px 0;
}

.dashboard-list-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dashboard-list-copy strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-list-copy span {
  overflow: hidden;
  color: var(--muted-soft);
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-empty {
  margin: 0;
  border: 1px dashed #d9e0e5;
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.75rem;
  line-height: 1.5;
  padding: 15px;
}

.dashboard-empty.is-loading {
  color: var(--muted-soft);
}

.dashboard-empty.is-error {
  color: var(--danger);
  border-color: #efd5d2;
  background: #fff8f7;
}

.dashboard-empty.is-unavailable {
  color: var(--muted-soft);
}

.dashboard-quick-card {
  min-height: 300px;
}

.dashboard-actions {
  display: grid;
  gap: 8px;
}

.dashboard-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0 13px;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.dashboard-action span:last-child {
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 500;
}

.dashboard-action:hover {
  border-color: #bac7f6;
  color: var(--blue-dark);
  background: var(--blue-soft);
  transform: translateY(-1px);
}

@media (max-width: 1040px) {
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .dashboard-secondary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
    gap: 22px;
    padding-bottom: 24px;
  }

  .dashboard-hero-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .dashboard-date {
    width: auto;
    margin-right: auto;
    text-align: left;
  }

  .dashboard-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .dashboard-metric {
    min-height: 112px;
    padding: 15px;
  }

  .dashboard-metric strong {
    font-size: 1.45rem;
  }

  .dashboard-card {
    min-height: 0;
    padding: 19px;
  }

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

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

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

  .case-next-step {
    align-items: flex-start;
    flex-direction: column;
  }

  .case-next-step-copy {
    width: 100%;
  }

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

@media (max-width: 420px) {
  .dashboard-metrics {
    grid-template-columns: 1fr;
  }
}
