:root {
  --font-sans: "Inter", "Geist", "Manrope", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --flux-navy: #022651;
  --flux-navy-deep: #0C4D75;
  --flux-teal: #029BA9;
  --flux-teal-action: #007C88;
  --flux-teal-pressed: #006F7B;
  --flux-bg: #F7FBFC;
  --flux-surface: #FFFFFF;
  --flux-aqua-light: #EAF7F8;
  --flux-cyan-soft: #81CBD3;
  --flux-border: #D7EEF2;
  --flux-divider: #E6F2F4;
  --flux-text-primary: #0A1728;
  --flux-text-brand: #022651;
  --flux-text-secondary: #516B82;
  --flux-text-muted: #6F8796;
  --flux-placeholder: #8BA3B0;
  --flux-success: #007C88;
  --flux-success-bg: #EAF7F8;
  --flux-error: #D92D20;
  --flux-error-bg: #FFF1F0;
  --flux-warning: #8A4F00;
  --flux-warning-bg: #FFF7E6;
  --flux-info: #0C4D75;
  --flux-info-bg: #EAF7F8;
  --flux-disabled-bg: #B9D7DE;
  --flux-disabled-text: #6F8796;
  --flux-gradient-brand: linear-gradient(135deg, #022651 0%, #0C4D75 45%, #029BA9 100%);
  --bg: var(--flux-bg);
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-muted: var(--flux-bg);
  --line: var(--flux-border);
  --line-strong: #B9D7DE;
  --ink: var(--flux-text-primary);
  --muted: var(--flux-text-secondary);
  --hospital-green: var(--flux-teal-action);
  --hospital-green-deep: var(--flux-navy-deep);
  --hospital-green-soft: rgba(2, 155, 169, 0.09);
  --accent: var(--flux-teal-action);
  --accent-soft: var(--flux-aqua-light);
  --accent-deep: var(--flux-teal-pressed);
  --brand-blue: var(--flux-navy-deep);
  --brand-blue-deep: var(--flux-navy);
  --brand-blue-soft: var(--flux-info-bg);
  --brand-green: var(--flux-teal);
  --brand-green-soft: var(--flux-aqua-light);
  --warm: var(--flux-teal);
  --danger: var(--flux-error);
  --shadow: 0 8px 20px rgba(15, 23, 42, 0.045);
  --shadow-strong: 0 18px 40px rgba(15, 23, 42, 0.075);
  --radius-xl: 10px;
  --radius-lg: 8px;
  --radius-md: 6px;
  --radius-sm: 6px;
  --max-width: 1240px;
  font-family: var(--font-sans);
}

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

.dashboard-topbar,
.dashboard-metrics,
.dashboard-roster {
  display: none;
}

@media (min-width: 721px) {
  .dashboard-page-shell {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .dashboard-page-shell > .site-header,
  .dashboard-page-shell > main > .flash:not(.flash--toast) {
    display: none;
  }

  .dashboard-page-shell > main {
    width: 100%;
  }

  .dashboard-shell.dashboard-shell--saas {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 0;
    width: 100%;
    min-height: 100vh;
    margin: 0;
  }

  .dashboard-shell--saas .dashboard-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 320px;
    min-height: 100vh;
    padding: 28px 24px;
    border: 0;
    border-right: 1px solid rgba(2, 155, 169, 0.18);
    border-radius: 0;
    color: var(--flux-aqua-light);
    background:
      radial-gradient(circle at 18% 12%, rgba(2, 155, 169, 0.28), transparent 26%),
      radial-gradient(circle at 70% 68%, rgba(2, 155, 169, 0.18), transparent 30%),
      linear-gradient(160deg, #022651 0%, #0C4D75 42%, #021A36 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
  }

  .dashboard-shell--saas .dashboard-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.45;
  }

  .dashboard-sidebar > * {
    position: relative;
    z-index: 1;
  }

  .dashboard-sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 78px;
    text-decoration: none;
  }

  .dashboard-sidebar__brand img {
    width: 214px;
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.26));
  }

  .dashboard-shell--saas .dashboard-nav {
    display: grid;
    gap: 8px;
  }

  .dashboard-shell--saas .dashboard-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.86);
    background: transparent;
    font: 700 0.94rem/1.1 var(--font-sans);
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
  }

  .dashboard-shell--saas .dashboard-nav__link:hover,
  .dashboard-shell--saas .dashboard-nav__link--active {
    color: #ffffff;
    border-color: rgba(2, 155, 169, 0.58);
    background: linear-gradient(135deg, rgba(2, 155, 169, 0.22), rgba(2, 155, 169, 0.2));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
  }

  .dashboard-nav__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: var(--flux-cyan-soft);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    flex: 0 0 auto;
  }

  .dashboard-sidebar__profile,
  .dashboard-sidebar__context,
  .dashboard-sidebar__footer {
    border: 1px solid rgba(2, 155, 169, 0.24);
    border-radius: 12px;
    background: rgba(3, 42, 34, 0.62);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.14);
  }

  .dashboard-sidebar__profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding: 14px;
  }

  .dashboard-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--flux-teal-action), var(--flux-teal-pressed));
    font-weight: 900;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 20px rgba(2, 38, 81, 0.22);
  }

  .dashboard-sidebar__profile strong,
  .dashboard-sidebar__profile span {
    display: block;
  }

  .dashboard-sidebar__profile strong {
    color: #ffffff;
    font-size: 0.96rem;
  }

  .dashboard-sidebar__profile span,
  .dashboard-sidebar__context small,
  .dashboard-sidebar__context span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
  }

  .dashboard-sidebar__context {
    display: grid;
    gap: 8px;
    padding: 16px;
  }

  .dashboard-sidebar__context strong {
    color: #ffffff;
    font-size: 0.96rem;
    line-height: 1.35;
  }

  .dashboard-sidebar__status-dot {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--flux-cyan-soft) !important;
    font-weight: 800;
  }

  .dashboard-sidebar__status-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--flux-teal);
    box-shadow: 0 0 0 5px rgba(2, 155, 169, 0.12);
  }

  .dashboard-sidebar__footer {
    display: grid;
    gap: 6px;
    padding: 10px;
  }

  .dashboard-sidebar__footer form {
    margin: 0;
  }

  .dashboard-main {
    min-width: 0;
    padding: 0 28px 34px;
    background: #f7f9fb;
  }

  .dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 116px;
    margin: 0 -28px 28px;
    padding: 24px 34px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.82);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
  }

  .dashboard-topbar h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(1.34rem, 1.6vw, 1.72rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
  }

  .dashboard-topbar p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 0.98rem;
  }

  .dashboard-topbar__actions {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .dashboard-bell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid #dbe4ec;
    color: #475569;
    background: #ffffff;
    font-weight: 900;
  }

  .dashboard-topbar__user {
    display: grid;
    gap: 3px;
    padding-left: 2px;
  }

  .dashboard-topbar__user strong {
    color: #111827;
    font-size: 0.95rem;
  }

  .dashboard-topbar__user span {
    color: #64748b;
    font-size: 0.84rem;
  }

  .dashboard-hero--mobile {
    display: none;
  }

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

  .dashboard-metric-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-height: 128px;
    padding: 22px;
    border: 1px solid #dbe4ec;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.045);
  }

  .dashboard-metric-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    color: var(--flux-teal-action);
    background: var(--flux-aqua-light);
    font-weight: 900;
  }

  .dashboard-metric-card span,
  .dashboard-metric-card small {
    display: block;
    color: #56657a;
  }

  .dashboard-metric-card span {
    font-size: 0.94rem;
    line-height: 1.3;
  }

  .dashboard-metric-card strong {
    display: block;
    margin-top: 5px;
    color: #111827;
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -0.04em;
  }

  .dashboard-metric-card small {
    margin-top: 8px;
    font-size: 0.82rem;
  }

  .dashboard-metric-card i {
    display: block;
    width: 100%;
    height: 7px;
    margin-top: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--flux-teal-action) var(--value), #dbe4ec 0);
  }

  .dashboard-clinical-grid {
    display: grid;
    grid-template-columns: minmax(330px, 0.72fr) minmax(0, 1.68fr);
    gap: 22px;
    align-items: start;
  }

  .dashboard-roster {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 16px;
    padding: 20px;
    border: 1px solid #dbe4ec;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.045);
  }

  .dashboard-roster__header {
    display: grid;
    gap: 14px;
  }

  .dashboard-roster__header h2 {
    margin: 0;
    color: #111827;
    font-size: 1.12rem;
    letter-spacing: -0.02em;
  }

  .dashboard-roster__filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 142px;
    gap: 10px;
  }

  .dashboard-roster__filters input,
  .dashboard-roster__filters select {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #d5e0e8;
    border-radius: 8px;
    color: #1f2937;
    background: #ffffff;
    font: 600 0.82rem/1.2 var(--font-sans);
  }

  .dashboard-roster__list {
    display: grid;
    margin: 0 -20px;
    border-top: 1px solid #e4ebf1;
  }

  .dashboard-roster__item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 82px;
    padding: 14px 20px;
    border-bottom: 1px solid #e4ebf1;
    color: inherit;
    text-decoration: none;
    transition: background 160ms ease;
  }

  .dashboard-roster__item:hover,
  .dashboard-roster__item--selected {
    background: var(--flux-aqua-light);
  }

  .dashboard-roster__item.is-hidden {
    display: none;
  }

  .dashboard-roster__bed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--flux-border);
    border-radius: 8px;
    color: var(--flux-teal-action);
    background: var(--flux-aqua-light);
    font-weight: 900;
  }

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

  .dashboard-roster__copy strong {
    overflow: hidden;
    color: #111827;
    font-size: 0.93rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-roster__copy small {
    overflow: hidden;
    color: #64748b;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-roster__status {
    display: inline-flex;
    align-items: center;
    min-width: 64px;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 9px;
    color: #475569;
    background: #eef2f7;
    font-size: 0.72rem;
    font-weight: 800;
  }

  .dashboard-roster__status--critico {
    color: #9b1c1c;
    background: #f9e4e4;
  }

  .dashboard-roster__status--atencao,
  .dashboard-roster__status--aten-o {
    color: #8a4b13;
    background: #fff1db;
  }

  .dashboard-roster__status--estavel {
    color: #1d4ed8;
    background: #eff6ff;
  }

  .dashboard-roster__status--discharge,
  .dashboard-roster__status--alta {
    color: var(--flux-teal-action);
    background: var(--flux-aqua-light);
  }

  .dashboard-roster__load {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    color: #64748b;
    background: #f5f7fa;
    font: 800 0.84rem/1 var(--font-sans);
  }

  .dashboard-roster__empty {
    display: grid;
    gap: 5px;
    padding: 22px;
    border-radius: 10px;
    color: #64748b;
    background: #f8fafc;
  }

  .dashboard-roster__empty strong {
    color: #111827;
  }

  .dashboard-workbench.panel {
    padding: 20px;
    border: 1px solid #dbe4ec;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.045);
  }

  .dashboard-workbench .dashboard-controls {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.72fr);
    gap: 18px;
    align-items: center;
    padding: 0 0 18px;
    border-bottom: 1px solid #e1e8ee;
  }

  .dashboard-workbench .dashboard-controls__copy {
    display: grid;
    gap: 6px;
  }

  .dashboard-workbench .dashboard-controls__copy .eyebrow {
    color: var(--flux-teal);
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    text-transform: none;
  }

  .dashboard-workbench .dashboard-controls__copy h2 {
    margin: 0;
    color: #111827;
    font-size: 1.54rem;
    letter-spacing: -0.03em;
  }

  .dashboard-workbench .dashboard-controls__actions {
    display: flex;
    justify-content: flex-end;
  }

  .dashboard-workbench #patient-search {
    width: min(100%, 620px);
    min-height: 52px;
    border: 1px solid #c8d6e1;
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    font-size: 1rem;
    box-shadow: none;
  }

  .dashboard-workbench .composer-panel__body {
    margin: 18px 0;
    border: 1px dashed rgba(2, 155, 169, 0.36);
    border-radius: 12px;
    background: #fbfefd;
  }

  .dashboard-workbench .patient-table {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid #dbe4ec;
    border-radius: 12px;
    background: #ffffff;
  }

  .dashboard-workbench .patient-table__head {
    display: grid;
    grid-template-columns: 128px minmax(280px, 1fr) minmax(230px, 0.82fr) minmax(180px, 0.52fr);
    gap: 24px;
    align-items: center;
    padding: 17px 22px;
    color: #64748b;
    background: #f8fafc;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: none;
  }

  .dashboard-workbench .patient-list {
    display: grid;
  }

  .dashboard-workbench .patient-card {
    border: 0;
    border-top: 1px solid #e1e8ee;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
  }

  .dashboard-workbench .patient-card:first-child {
    border-top: 0;
  }

  .dashboard-workbench .patient-card__summary {
    min-height: 104px;
    padding: 0;
  }

  .dashboard-workbench .patient-card__summary::-webkit-details-marker {
    display: none;
  }

  .dashboard-workbench .patient-card__summary-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.52fr);
    gap: 22px;
    align-items: center;
    padding: 24px 22px;
  }

  .dashboard-workbench .patient-card__identity {
    display: grid;
    grid-template-columns: 128px minmax(280px, 1fr) minmax(230px, 0.82fr);
    gap: 24px;
    align-items: center;
  }

  .dashboard-workbench .patient-card__identity > .eyebrow {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    color: var(--flux-teal-action);
    font-size: 1.02rem;
    letter-spacing: 0.04em;
    text-transform: none;
  }

  .dashboard-workbench .patient-card__identity > .eyebrow::before {
    content: "";
    width: 9px;
    height: 9px;
    margin-right: 12px;
    border-radius: 999px;
    background: #029BA9;
  }

  .dashboard-workbench .patient-card__title-row h3 {
    margin: 0;
    color: #111827;
    font-size: 1.18rem;
    line-height: 1.18;
    letter-spacing: -0.02em;
  }

  .dashboard-workbench .patient-diagnosis {
    margin: 0;
    color: #4b5563;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.3;
  }

  .dashboard-workbench .patient-card__badges {
    display: grid;
    justify-items: stretch;
    gap: 8px;
    width: 100%;
    max-width: 220px;
    margin-left: auto;
  }

  .dashboard-workbench .severity,
  .dashboard-workbench .status-pill,
  .dashboard-workbench .patient-card__summary-isolation {
    min-height: 34px;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
  }

  .dashboard-workbench .severity--critico {
    color: #9b1c1c;
    border-color: #f4b8b8;
    background: #fae8e8;
  }

  .dashboard-workbench .severity--atencao,
  .dashboard-workbench .severity--aten-o {
    color: #8a4b13;
    border-color: #f6d7aa;
    background: #fff4e5;
  }

  .dashboard-workbench .severity--estavel {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #eff6ff;
  }

  .dashboard-workbench .status-pill--discharge {
    color: var(--flux-teal-action);
    border-color: var(--flux-border);
    background: var(--flux-aqua-light);
  }

  .dashboard-workbench .patient-card__summary-isolation {
    color: #85462b;
    border-color: #eac6b5;
    background: #fff1e8;
  }

  .dashboard-workbench .patient-card__body {
    padding: 20px 22px 26px;
    border-top: 0;
    background: #ffffff;
  }

  .dashboard-workbench .patient-card__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: 8px 0 22px;
  }

  .dashboard-workbench .patient-card__action-duti {
    margin-right: auto;
    min-width: 0;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #cbd8e3;
    border-radius: 10px;
    color: #1f2937;
    background: #f9fbfd;
    font-size: 0.84rem;
  }

  .dashboard-workbench .patient-card__action-duti span,
  .dashboard-workbench .patient-card__action-duti strong {
    display: inline;
    color: inherit;
    font-size: inherit;
    letter-spacing: 0;
    text-transform: none;
  }

  .dashboard-workbench .patient-card__actions .button {
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    box-shadow: none;
  }

  .dashboard-workbench .patient-card__actions .button--danger {
    color: #ffffff;
    border-color: #cf3d3d;
    background: #cf3d3d;
  }

  .dashboard-workbench .patient-form .form-grid,
  .dashboard-workbench .patient-form .form-grid--single {
    gap: 14px 18px;
  }

  .dashboard-workbench .patient-form .form-field span,
  .dashboard-workbench .patient-form .checkbox-field span {
    color: #111827;
    font-size: 0.94rem;
    font-weight: 800;
  }

  .dashboard-workbench .patient-form input,
  .dashboard-workbench .patient-form select,
  .dashboard-workbench .patient-form textarea {
    min-height: 46px;
    border: 1px solid #cbd8e3;
    border-radius: 8px;
    background: #edf2f7;
    color: #26364d;
    font-size: 0.96rem;
    box-shadow: none;
  }

  .dashboard-workbench .patient-form textarea {
    overflow: hidden;
    resize: vertical;
  }

  .dashboard-workbench .patient-form:not(.is-editing) textarea {
    min-height: 46px;
  }

  .dashboard-workbench .patient-form.is-editing textarea {
    min-height: 92px;
    background: #ffffff;
  }

  .dashboard-workbench .patient-form.is-editing input,
  .dashboard-workbench .patient-form.is-editing select {
    background: #ffffff;
  }

  .dashboard-workbench .patient-card__meta {
    margin-top: 18px;
    color: #64748b;
    font-size: 0.86rem;
  }

  .dashboard-workbench .patient-expanded-days {
    display: none;
  }

  .dashboard-workbench .empty-state--patients {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.45;
}

.background-orbit {
  display: none;
}

.background-orbit--one {
  width: 260px;
  height: 260px;
  left: -90px;
  top: 15%;
  background: rgba(203, 213, 225, 0.22);
}

.background-orbit--two {
  width: 220px;
  height: 220px;
  right: -60px;
  bottom: 10%;
  background: rgba(148, 163, 184, 0.14);
}

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 28px 0 48px;
  position: relative;
  z-index: 1;
}

.page-shell--print {
  width: min(calc(100% - 24px), 1700px);
  max-width: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.site-header--public {
  margin-bottom: 6px;
}

.page-shell--marketing {
  width: min(calc(100% - 40px), 1320px);
  padding-top: 22px;
  padding-bottom: 56px;
}

.marketing-header-shell {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.marketing-header-brand {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
}

.marketing-header-brand__logo {
  width: min(100%, 380px);
  height: auto;
  display: block;
}

.site-header--marketing {
  gap: 24px;
  align-items: center;
  padding: 14px 18px;
  margin-bottom: 0;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.04);
}

.marketing-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.marketing-brand__logo {
  width: 76px;
  height: auto;
  display: block;
  flex: 0 0 auto;
}

.marketing-brand__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.marketing-brand__copy strong {
  font-size: 1.04rem;
  line-height: 1.08;
  color: var(--brand-blue-deep);
}

.marketing-brand__copy span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.marketing-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.marketing-nav__link {
  color: var(--brand-blue-deep);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
}

.marketing-nav__link:hover {
  color: var(--hospital-green-deep);
}

.marketing-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.button--marketing-login {
  padding-inline: 18px;
}

.marketing-home {
  display: grid;
  gap: 20px;
}

.marketing-home-topline {
  display: grid;
  gap: 12px;
  padding: 22px 4px 34px;
}

.marketing-home-topline h1 {
  margin: 0;
  color: var(--brand-blue-deep);
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 5.2vw, 4.9rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.marketing-home-topline p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  line-height: 1.3;
}

.marketing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 20px;
  align-items: stretch;
  padding: 30px;
}

.marketing-hero--home {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.marketing-hero__copy {
  display: grid;
  gap: 14px;
  align-content: start;
}

.marketing-hero__copy h1,
.marketing-section__intro h2,
.marketing-legal__intro h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.3rem);
  line-height: 0.98;
  letter-spacing: 0;
  color: var(--brand-blue-deep);
  text-wrap: balance;
}

.marketing-hero__copy p,
.marketing-section__content p,
.marketing-contact p,
.marketing-card p,
.marketing-legal__intro p,
.marketing-legal__section p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.marketing-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.marketing-hero__link {
  color: var(--brand-blue-deep);
}

.marketing-hero__highlights,
.marketing-card-grid {
  display: grid;
  gap: 14px;
}

.marketing-hero__highlights--compact {
  align-content: center;
}

.marketing-highlight-card,
.marketing-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #ffffff;
}

.marketing-highlight-card strong,
.marketing-card strong,
.marketing-legal__section h3,
.marketing-section__intro h2 {
  color: var(--brand-blue-deep);
}

.marketing-highlight-card strong,
.marketing-card strong {
  font-size: 1.02rem;
}

.marketing-highlight-card span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.marketing-section,
.marketing-legal {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.marketing-summary {
  display: grid;
  gap: 18px;
  padding: 28px;
}

.marketing-summary__intro {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.marketing-summary__intro h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.2vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: 0;
  color: var(--brand-blue-deep);
}

.marketing-summary__intro p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.marketing-section__intro,
.marketing-legal__intro {
  display: grid;
  gap: 10px;
}

.marketing-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.marketing-card-grid--compact .marketing-card {
  align-content: start;
}

.marketing-section__content,
.marketing-contact,
.marketing-legal__content {
  display: grid;
  gap: 14px;
}

.marketing-legal--terms {
  gap: 22px;
}

.marketing-terms-card {
  display: grid;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #ffffff;
}

.marketing-legal__section--terms {
  gap: 12px;
}

.marketing-legal__section--terms + .marketing-legal__section--terms {
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.marketing-legal__section--terms p {
  color: var(--muted);
}

.marketing-terms-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.marketing-terms-list li::marker {
  color: var(--brand-green);
}

.marketing-terms-alert {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(2, 155, 169, 0.18);
  background: rgba(2, 155, 169, 0.05);
}

.marketing-terms-alert strong {
  color: var(--brand-blue-deep);
}

.marketing-terms-alert p {
  margin: 0;
}

.site-footer--marketing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: center;
  margin-top: 22px;
  padding: 22px 26px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.04);
}

.marketing-footer__brand {
  display: grid;
  gap: 4px;
}

.marketing-footer__brand strong {
  color: var(--brand-blue-deep);
  font-size: 1rem;
}

.marketing-footer__brand span,
.marketing-footer__link {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.marketing-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

.marketing-footer__link {
  text-decoration: none;
}

.marketing-footer__link:hover {
  color: var(--hospital-green-deep);
}

.brand {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.brand--public {
  display: grid;
  grid-template-columns: minmax(210px, 248px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(12px, 1.8vw, 22px);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.brand strong,
.brand span,
.header-user strong,
.header-user span {
  display: block;
}

.brand span,
.header-user span,
.meta,
.helper-note span,
.section-heading p,
.patient-section span,
.patient-section p,
.toolbar p,
.empty-state p {
  color: var(--muted);
}

.brand__logo {
  width: min(182px, 22vw);
  height: auto;
  display: block;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.08));
}

.brand__logo-link {
  display: block;
  line-height: 0;
  text-decoration: none;
}

.brand--public .brand__logo-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.brand__logo--public {
  width: min(250px, 16vw);
  justify-self: end;
}

.brand__logo--compact {
  width: min(360px, 30vw);
}

.brand--context {
  display: grid;
  gap: 6px;
  align-items: start;
  justify-items: center;
  text-align: center;
}

.brand__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brand__copy--public {
  gap: 8px;
  width: 100%;
  max-width: none;
  align-content: center;
  padding-left: 4px;
}

.brand__copy strong {
  font-size: 1.05rem;
  color: var(--brand-blue-deep);
  line-height: 1.2;
}

.brand__copy--public strong {
  font-size: clamp(1.4rem, 2.1vw, 2.15rem);
  line-height: 1.04;
  letter-spacing: 0;
  max-width: none;
}

.brand__copy span {
  max-width: 34ch;
}

.brand__copy--public .brand__tagline {
  font-size: clamp(0.98rem, 1.18vw, 1.14rem);
  line-height: 1.24;
  color: var(--muted);
  max-width: none;
}

.brand__copy--context strong {
  font-size: 1.05rem;
  color: var(--ink);
}

.brand__copy--context .brand__tagline,
.brand__copy--context span:last-child {
  max-width: none;
}

.brand__tagline--header {
  display: block;
  margin-left: 0;
  font-size: 0.9rem;
  line-height: 1.1;
  color: var(--muted);
  max-width: none;
  white-space: nowrap;
  width: 100%;
  text-align: center;
}

.brand__eyebrow {
  color: var(--brand-green) !important;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand__copy--public .brand__eyebrow {
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  max-width: none;
  white-space: nowrap;
}

.site-header--public .brand {
  align-items: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user {
  display: grid;
  gap: 2px;
  justify-items: start;
  align-content: center;
  text-align: left;
}

.header-user strong {
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.1;
}

.header-user span {
  font-size: 0.92rem;
  line-height: 1.1;
}

.panel {
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.22);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-xl);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.05);
}

.hero,
.toolbar,
.admin-panel,
.empty-state,
#novo-paciente,
.context-copy,
.context-panel {
  padding: 28px;
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 22px;
}

.hero h1,
.auth-copy h1,
.context-copy h1 {
  font-family: var(--font-sans);
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 0.96;
  margin: 10px 0 14px;
  letter-spacing: 0;
}

.hero p,
.auth-copy p,
.context-copy p {
  font-size: 1.02rem;
  max-width: 62ch;
}

.auth-layout,
.context-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.88fr;
  gap: 24px;
  align-items: stretch;
}

.context-layout--stacked {
  grid-template-columns: 1fr;
  gap: 18px;
}

.auth-layout--single {
  grid-template-columns: minmax(0, 640px);
  justify-content: center;
  margin: 2px auto 14px;
}

.auth-copy,
.auth-panel,
.context-copy,
.context-panel {
  padding: 28px;
}

.context-copy,
.context-panel {
  width: 100%;
}

.context-copy__header {
  display: grid;
  grid-template-columns: minmax(360px, 1.2fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: center;
}

.context-copy__intro {
  display: grid;
  gap: 10px;
  align-content: center;
}

.context-copy h1 {
  font-size: clamp(1.72rem, 2.7vw, 2.7rem);
  line-height: 0.98;
  margin-bottom: 2px;
}

.context-copy__intro p {
  margin: 0;
  max-width: none;
}

.auth-panel--focus {
  width: 100%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(226, 232, 240, 0.96);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.auth-copy {
  display: grid;
  gap: 18px;
  align-content: start;
}

.auth-copy__intro {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: none;
}

.auth-copy .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}

.auth-copy h1 {
  font-family: var(--font-sans);
  font-size: clamp(1.72rem, 2.35vw, 2.65rem);
  line-height: 1.02;
  letter-spacing: 0;
  margin: 2px 0 0;
  max-width: none;
  width: 100%;
  text-wrap: pretty;
}

.auth-copy p {
  font-size: 1rem;
  line-height: 1.62;
  margin: 0;
  max-width: none;
}

.registration-form {
  gap: 16px;
}

.registration-pane {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #ffffff;
}

.registration-pane[hidden] {
  display: none;
}

.registration-pane__copy {
  display: grid;
  gap: 6px;
}

.registration-pane__copy strong {
  font-size: 1rem;
  color: var(--brand-blue-deep);
}

.registration-pane__copy p,
.registration-pane__copy .registration-hint {
  margin: 0;
  max-width: none;
}

.registration-hint {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.context-list {
  display: grid;
  gap: 12px;
  align-content: center;
}

.context-pill {
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
}

.context-pill strong,
.context-pill span {
  display: block;
}

.context-pill strong {
  margin-bottom: 6px;
}

.context-panel .section-heading {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.context-panel .section-heading > div,
.context-panel .section-heading p {
  min-width: 0;
}

.context-panel .section-heading p {
  margin: 0;
  max-width: none;
  align-self: center;
}

.context-panel .form-grid--compact {
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr);
}

.context-panel__actions {
  margin-top: 18px;
  justify-content: flex-end;
}

.feature-list,
.auth-summary-list {
  margin-top: 2px;
  display: grid;
  gap: 10px;
}

.feature-card,
.stat-card,
.admin-card {
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #ffffff;
}

.feature-card strong,
.stat-card strong,
.admin-card h3 {
  display: block;
  margin-bottom: 6px;
}

.auth-summary-item {
  display: grid;
  gap: 4px;
  padding: 0 0 0 14px;
  border-left: 2px solid rgba(2, 155, 169, 0.2);
}

.auth-summary-item strong {
  color: var(--brand-blue-deep);
  font-size: 0.96rem;
}

.auth-summary-item span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.admin-card__top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.admin-card__top h3 {
  margin: 6px 0 0;
}

.admin-card--directory {
  display: grid;
  gap: 16px;
}

.admin-card__actions {
  display: flex;
  justify-content: flex-end;
}

.admin-user-status {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--warm);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: 1.55rem;
}

.auth-panel .section-heading {
  display: grid;
  grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.auth-panel .section-heading > div,
.auth-panel .section-heading p {
  min-width: 0;
}

.auth-panel .section-heading h2 {
  font-size: clamp(1.45rem, 1.9vw, 1.9rem);
  line-height: 1.06;
  max-width: none;
  text-wrap: pretty;
}

.auth-panel .section-heading p {
  margin: 0;
  max-width: none;
  font-size: 0.98rem;
  line-height: 1.56;
  text-wrap: pretty;
}

.auth-panel .section-heading--stacked {
  grid-template-columns: 1fr;
  gap: 12px;
}

.auth-panel .section-heading--stacked p {
  width: 100%;
  max-width: none;
}

.auth-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 8px;
}

.auth-trust-strip--footer {
  margin: 14px 0 0;
}

.auth-trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(2, 155, 169, 0.16);
  background: rgba(2, 155, 169, 0.1);
  color: var(--brand-blue-deep);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.auth-trust-chip strong {
  font: inherit;
}

.auth-trust-chip--soft {
  background: rgba(2, 155, 169, 0.08);
  border-color: rgba(2, 155, 169, 0.14);
}

.auth-trust-chip__icon {
  width: 13px;
  height: 13px;
  color: var(--accent);
  flex: 0 0 auto;
}

.auth-trust-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.auth-secondary-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #ffffff;
}

.auth-secondary-cta__copy {
  display: grid;
  gap: 4px;
}

.auth-secondary-cta__copy strong {
  color: var(--brand-blue-deep);
  font-size: 0.98rem;
}

.auth-secondary-cta__copy span {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

.auth-about-link-row {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(2, 155, 169, 0.1);
}

.auth-about-link-row span {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.56;
}

.toolbar-link--important {
  color: var(--hospital-green);
  font-size: 0.98rem;
}

.toolbar-link--important:hover {
  color: var(--hospital-green-deep);
}

.auth-about-panel {
  width: min(100%, 880px);
  margin: 0 auto;
  padding: 24px 28px;
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 18px;
}

.auth-about-panel--page {
  width: min(100%, 960px);
}

.auth-about-panel__intro {
  display: grid;
  gap: 10px;
}

.auth-about-panel__intro h3 {
  margin: 0;
  font-size: clamp(1.24rem, 1.7vw, 1.56rem);
  line-height: 1.18;
  color: var(--brand-blue-deep);
  letter-spacing: 0;
}

.auth-about-panel__intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.68;
  max-width: none;
}

.auth-about-panel__highlights {
  display: grid;
  gap: 12px;
}

.auth-about-panel__item {
  display: grid;
  gap: 4px;
  padding-left: 14px;
  border-left: 2px solid rgba(2, 155, 169, 0.18);
}

.auth-about-panel__item strong {
  color: var(--brand-blue-deep);
  font-size: 0.96rem;
}

.auth-about-panel__item span {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.54;
}

.auth-footer-link {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.auth-footer-link strong {
  color: var(--brand-blue-deep);
  font-size: 0.96rem;
}

.auth-footer-link a {
  color: var(--hospital-green);
  font-weight: 700;
  text-decoration: none;
}

.auth-footer-link a:hover {
  text-decoration: underline;
  color: var(--hospital-green-deep);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stat-card span {
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 1.65rem;
}

.dashboard-hero {
  padding: 22px 26px;
  gap: 22px;
  margin-bottom: 14px;
  align-items: start;
}

.dashboard-hero .hero__copy {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-left: 10px;
}

.dashboard-hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(1.18rem, 1.78vw, 1.82rem);
  font-weight: 700;
  line-height: 1.06;
  margin: 0;
  max-width: none;
  letter-spacing: 0;
  text-wrap: pretty;
}

.dashboard-hero p {
  margin: 0;
  max-width: 48ch;
  font-size: 0.98rem;
  line-height: 1.4;
}

.dashboard-hero .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
  width: min(100%, 360px);
  justify-self: end;
  align-self: start;
  overflow: visible;
}

.dashboard-hero .stat-card {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 104px;
  padding: 14px 16px;
}

.dashboard-hero .stat-card span {
  margin-bottom: 8px;
  font-size: 0.84rem;
  line-height: 1.2;
  max-width: none;
}

.dashboard-hero .stat-card strong {
  font-size: 1.82rem;
  line-height: 1.12;
}

.dashboard-hero .stat-card--updated {
  flex-basis: 182px;
  min-width: 182px;
  max-width: 182px;
}

.dashboard-mobile-update {
  display: none;
}

.dashboard-mobile-compose {
  display: none;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 22px;
}

.toolbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.dashboard-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 8px 0 8px;
}

.dashboard-controls__copy h2 {
  margin: 0;
  font-size: 1.55rem;
}

.dashboard-controls__actions {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: min(460px, 100%);
}

.toolbar-link {
  color: var(--brand-blue-deep);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.toolbar-link:hover {
  text-decoration: underline;
  color: var(--brand-blue);
}

.auth-panel .toolbar-link {
  color: var(--hospital-green);
}

.auth-panel .toolbar-link:hover {
  color: var(--hospital-green-deep);
}

.unit-browser-list {
  display: grid;
  gap: 10px;
}

.unit-browser-list--meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.directory-list {
  display: grid;
  gap: 12px;
}

.directory-row {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 251, 252, 0.72));
  overflow: hidden;
}

.directory-row > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
}

.directory-row > summary::-webkit-details-marker {
  display: none;
}

.directory-row__summary-main {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.6fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.directory-row__identity,
.directory-row__meta,
.directory-row__summary-actions {
  min-width: 0;
}

.directory-row__identity strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 1.02rem;
  color: var(--brand-blue-deep);
}

.directory-row__identity span:last-child {
  color: var(--muted);
  font-size: 0.92rem;
}

.directory-row__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.directory-row__meta-item,
.directory-row__detail {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.directory-row__meta-item strong,
.directory-row__detail strong {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.directory-row__meta-item span,
.directory-row__detail span {
  font-size: 0.94rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.directory-row__summary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.directory-row__body {
  padding: 0 18px 18px;
  border-top: 1px solid rgba(2, 155, 169, 0.08);
  animation: rise-in 220ms ease both;
}

.directory-row__details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.directory-row__body-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.directory-row__editor {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(2, 155, 169, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(248, 250, 252, 0.82);
}

.directory-row__editor--compact {
  margin-top: 12px;
  padding: 14px 16px;
}

.directory-row__editor h3 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink);
}

.history-toolbar {
  display: grid;
  gap: 16px;
}

.history-toolbar__group {
  display: grid;
  gap: 10px;
}

.history-toolbar__group strong {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.history-patient-list {
  display: grid;
  gap: 16px;
}

.history-patient-card {
  display: grid;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.history-patient-card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.history-patient-card__header h3 {
  margin: 4px 0 6px;
  font-size: 1.14rem;
  color: var(--brand-blue-deep);
}

.history-patient-card__header p,
.history-patient-card__meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.history-patient-card__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.history-patient-card__meta {
  display: flex;
  gap: 12px 18px;
  flex-wrap: wrap;
}

.history-patient-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.history-field {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #ffffff;
}

.history-field--wide {
  grid-column: 1 / -1;
}

.history-field strong {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.history-field span {
  color: var(--ink);
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.unit-browser-form {
  margin: 0;
}

.unit-browser-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.unit-browser-item__content {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.unit-browser-link {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  text-align: left;
  border-radius: var(--radius-md);
  border: 1px solid rgba(2, 155, 169, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, opacity 160ms ease;
  position: relative;
}

.unit-browser-link strong {
  margin: 0;
  font-size: 1rem;
}

.unit-browser-link span {
  color: var(--muted);
  font-size: 0.92rem;
}

.unit-browser-link:hover,
.unit-browser-link:focus {
  outline: none;
  border-color: rgba(2, 155, 169, 0.52);
  box-shadow: 0 0 0 4px rgba(2, 155, 169, 0.1);
  transform: translateY(-1px);
  background: rgba(234, 247, 248, 0.98);
}

.unit-browser-link.is-loading {
  pointer-events: none;
}

.unit-browser-link.is-loading strong,
.unit-browser-link.is-loading span {
  opacity: 0;
}

.unit-browser-link.is-loading::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  margin-left: -9px;
  border-radius: 999px;
  border: 2px solid rgba(2, 155, 169, 0.2);
  border-top-color: rgba(2, 38, 81, 0.92);
  animation: button-spin 720ms linear infinite;
}

.unit-browser-link--static {
  cursor: default;
}

.unit-browser-delete {
  align-self: center;
}

.unit-browser-link--static:hover,
.unit-browser-link--static:focus {
  border-color: rgba(2, 155, 169, 0.12);
  box-shadow: none;
  transform: none;
}

#patient-search,
input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(71, 85, 105, 0.24);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: #7b8798;
}

#patient-search {
  min-width: 280px;
}

textarea {
  resize: vertical;
  min-height: 64px;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus,
#patient-search:focus {
  outline: none;
  border-color: rgba(2, 155, 169, 0.72);
  box-shadow: 0 0 0 3px rgba(2, 155, 169, 0.12);
}

.structured-form {
  display: grid;
  gap: 18px;
}

.structured-form--directory {
  gap: 12px;
}

.structured-form--patient {
  gap: 12px;
}

.structured-form--patient input,
.structured-form--patient select,
.structured-form--patient textarea {
  padding: 8px 10px;
  background: #f4f5f7;
  border-color: rgba(15, 23, 42, 0.24);
  color: #111827;
}

.structured-form--patient textarea {
  min-height: 64px;
  white-space: pre-wrap;
}

.structured-form--patient input::placeholder,
.structured-form--patient textarea::placeholder {
  color: #6b7280;
}

.structured-form--patient input:focus,
.structured-form--patient select:focus,
.structured-form--patient textarea:focus {
  border-color: rgba(17, 24, 39, 0.6);
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.18);
}

.patient-form-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-inline-size: 0;
  display: grid;
  gap: 12px;
}

.patient-form-fields:disabled input,
.patient-form-fields:disabled select,
.patient-form-fields:disabled textarea {
  color: var(--ink);
  opacity: 1;
  background: #eceff3;
  border-color: rgba(15, 23, 42, 0.1);
  cursor: default;
}

.patient-form-fields:disabled .checkbox-field {
  opacity: 1;
  background: #eceff3;
}

.patient-form-fields:disabled .form-field--edit-only {
  display: none;
}

.patient-form-fields:disabled .checkbox-field--discharge:not(.checkbox-field--checked) {
  display: none;
}

@media (min-width: 721px) {
  .patient-form-fields:disabled .form-field--duti {
    display: none;
  }

  .patient-form-fields:disabled .checkbox-field--discharge {
    display: none;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

.form-grid--compact {
  grid-template-columns: 1.2fr 0.7fr 0.7fr;
}

.form-grid--compact-admin {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid--patient-meta {
  grid-template-columns: 0.7fr 1fr 0.9fr 0.9fr 0.95fr;
  align-items: end;
}

.patient-expanded-days {
  display: none;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.patient-expanded-days__duti {
  display: none;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field span {
  font-weight: 700;
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.84rem;
  line-height: 1.45;
}

.field-error--form {
  margin-top: -2px;
}

.login-identity-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(2, 155, 169, 0.16);
  border-radius: var(--radius-md);
  background: rgba(248, 250, 252, 0.9);
}

.login-identity-chip__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.login-identity-chip__copy span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.login-identity-chip__copy strong {
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.password-toggle:hover {
  background: rgba(2, 155, 169, 0.08);
  color: var(--brand-blue-deep);
}

.password-toggle:focus {
  outline: none;
  background: rgba(2, 155, 169, 0.1);
  color: var(--brand-blue-deep);
  box-shadow: 0 0 0 3px rgba(2, 155, 169, 0.16);
}

.password-toggle__icon {
  width: 20px;
  height: 20px;
}

.password-toggle__slash {
  opacity: 0;
  transition: opacity 160ms ease;
}

.password-toggle.is-visible .password-toggle__slash {
  opacity: 1;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  font-weight: 600;
  color: var(--ink);
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--hospital-green);
}

.login-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.form-actions--inline {
  justify-content: flex-start;
  margin-top: -4px;
}

.social-auth {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

.social-auth__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.social-auth__divider::before,
.social-auth__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(2, 155, 169, 0.14);
}

.social-auth__buttons {
  display: grid;
  gap: 10px;
}

.social-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(2, 155, 169, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.social-auth-button:hover {
  transform: translateY(-1px);
  border-color: rgba(2, 155, 169, 0.3);
  box-shadow: 0 12px 24px rgba(2, 38, 81, 0.08);
}

.social-auth-button__mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 155, 169, 0.08);
  color: var(--brand-blue-deep);
  font-size: 0.92rem;
  line-height: 1;
}

.social-auth-button--google .social-auth-button__mark {
  background: rgba(66, 133, 244, 0.12);
  color: #2563eb;
}

.social-auth-button--facebook .social-auth-button__mark {
  background: rgba(24, 119, 242, 0.12);
  color: #1877f2;
}

.social-auth-button--apple .social-auth-button__mark {
  background: rgba(17, 24, 39, 0.08);
  color: #111827;
}

.button {
  appearance: none;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 13px 18px;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled,
.button.is-loading {
  cursor: wait;
}

.button--primary {
  color: white;
  background: var(--flux-teal-action);
  box-shadow: 0 8px 18px rgba(0, 124, 136, 0.16);
}

.button--primary:hover {
  background: var(--flux-teal-pressed);
  box-shadow: 0 10px 22px rgba(2, 38, 81, 0.18);
}

.button--secondary {
  color: var(--brand-blue-deep);
  background: rgba(2, 155, 169, 0.12);
}

.button--secondary:hover {
  background: rgba(2, 155, 169, 0.2);
  box-shadow: 0 10px 20px rgba(2, 38, 81, 0.08);
}

.button--ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.button--ghost:hover {
  background: rgba(241, 245, 249, 0.98);
  border-color: rgba(148, 163, 184, 0.35);
}

.button--subtle {
  color: var(--hospital-green);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(2, 155, 169, 0.24);
  box-shadow: none;
  padding: 11px 16px;
}

.button--subtle:hover {
  background: rgba(234, 247, 248, 0.96);
  border-color: rgba(2, 155, 169, 0.34);
  box-shadow: 0 10px 22px rgba(2, 155, 169, 0.1);
}

.button--login-cta {
  color: white;
  background: var(--hospital-green);
  box-shadow: 0 10px 22px rgba(2, 155, 169, 0.18);
}

.button--login-cta:hover {
  background: var(--flux-teal-action);
  box-shadow: 0 12px 24px rgba(2, 155, 169, 0.2);
}

.button--danger {
  color: white;
  background: var(--danger);
}

.button--danger:hover {
  background: #a92f2f;
}

.button--full {
  width: 100%;
}

.button--compact {
  padding: 10px 14px;
  min-height: auto;
}

.button.is-loading {
  color: transparent !important;
  pointer-events: none;
}

.button.is-loading::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  margin-left: -9px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-top-color: rgba(255, 255, 255, 0.96);
  animation: button-spin 720ms linear infinite;
}

.patient-list {
  display: grid;
  gap: 14px;
  margin: 10px 0;
}

.patient-card {
  border-radius: var(--radius-xl);
  background: #ffffff;
  border: 2px solid #111827;
  box-shadow: none;
  transition: transform 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
  overflow: hidden;
}

.patient-card:hover {
  transform: translateY(-1px);
  box-shadow: none;
}

.patient-card > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 18px;
  display: grid;
  gap: 6px;
  position: relative;
}

.patient-card > summary::-webkit-details-marker {
  display: none;
}

.patient-card.is-hidden {
  display: none;
}

.patient-card__summary-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.patient-card__identity h3 {
  margin: 2px 0 0;
  font-size: 1.16rem;
  color: #111111;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.15;
}

.patient-card__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.patient-card__title-row h3 {
  margin: 0;
}

.patient-inline-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.patient-inline-meta:empty {
  display: none;
}

.patient-inline-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #f8fafc;
  color: var(--brand-blue-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.patient-inline-pill--duti,
.patient-inline-pill--days {
  padding: 4px 8px;
  font-size: 0.7rem;
}

.patient-inline-pill--days {
  background: #f1f5f9;
  color: var(--ink);
}

.patient-diagnosis {
  margin: 4px 0 0;
  color: #4a5560;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.2;
}

.patient-card__badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.patient-card__summary-discharge {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.patient-card__summary-discharge:empty {
  display: none;
}

.patient-card__summary-isolation {
  position: absolute;
  top: 10px;
  right: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #eef2f7;
  color: var(--brand-blue-deep);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.patient-card__summary-isolation--kcp {
  border-color: #c4b5fd;
  background: #ede9fe;
  color: #5b21b6;
}

.patient-card__summary-isolation--ndm {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.patient-card__summary-isolation--acineto {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #5b21b6;
}

.patient-card__summary-isolation--tb {
  border-color: #e9d5ff;
  background: #f3e8ff;
  color: #7e22ce;
}

.patient-card__summary-isolation--default {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #5b21b6;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.status-pill--discharge {
  color: var(--flux-teal-action);
  background: var(--flux-aqua-light);
}

.status-pill--isolation {
  color: #5b21b6;
  background: #f5f3ff;
}

.status-pill--isolation-empty {
  color: #405860;
  background: #e7eef3;
}

.expand-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #ffffff;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.patient-card__body {
  padding: 18px 24px 24px;
  background: #ffffff;
  animation: rise-in 220ms ease both;
}

.patient-card--history .patient-card__body {
  display: grid;
  gap: 16px;
}

.patient-card__meta {
  margin-top: 8px;
  color: #667085;
  font-size: 0.92rem;
}

.patient-card--history .patient-card__meta {
  margin-top: 0;
}

.patient-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 0;
}

.patient-card__action-duti {
  display: none;
}

.body--modal-open {
  overflow: hidden;
}

.patient-summary-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.patient-summary-modal:not([open]) {
  display: none;
}

.patient-summary-modal::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
}

.patient-summary-modal__dialog {
  position: relative;
  width: min(760px, calc(100vw - 32px));
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.22);
  box-shadow: 0 32px 72px rgba(15, 23, 42, 0.24);
  border-radius: 14px;
  padding: 24px;
}

.patient-summary-modal__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.patient-summary-modal__header h3 {
  margin: 6px 0 4px;
  font-size: 1.45rem;
}

.patient-summary-modal__header p {
  margin: 0;
  color: var(--muted);
}

.patient-summary-modal__feedback {
  margin: 0 0 14px;
}

.patient-summary-modal__form textarea {
  min-height: 280px;
  resize: vertical;
}

.composer-link-row {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.composer-panel {
  margin: 2px 0;
}

.composer-panel__body {
  margin-top: 8px;
}

.composer-panel__body p {
  margin: 0 0 14px;
  color: var(--muted);
}

.link-button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 800;
  font-size: 1.15rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  align-self: center;
}

.link-button:hover {
  color: var(--brand-blue-deep);
}

.print-panel {
  padding: 28px;
}

.print-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 18px;
}

.print-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 12px;
}

.print-brand-block {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  min-width: 0;
}

.print-brand-logo {
  width: 228px;
  height: auto;
  display: block;
  flex: 0 0 auto;
}

.print-brand-copy {
  min-width: 0;
}

.print-header h1 {
  margin: 8px 0 0;
  font-size: 1.5rem;
  line-height: 1.12;
}

.print-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
  color: var(--muted);
}

.print-note {
  margin: 0 0 18px;
  color: var(--muted);
}

.print-table-wrap {
  overflow-x: auto;
}

.print-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.print-col-bed {
  width: 4%;
}

.print-col-patient {
  width: 13%;
}

.print-col-diagnosis {
  width: 11.5%;
}

.print-col-discharge {
  width: 4.5%;
}

.print-col-tgi {
  width: 9%;
}

.print-col-renal {
  width: 9%;
}

.print-table th,
.print-table td {
  vertical-align: top;
  font-size: 0.8rem;
  line-height: 1.35;
  padding: 10px 8px;
}

.print-table th {
  font-size: 0.66rem;
  line-height: 1.05;
  padding: 8px 6px;
  white-space: nowrap;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(15, 23, 42, 0.28);
}

.print-table th.print-col-bed,
.print-table td.print-col-bed {
  border-right: 1px solid rgba(15, 23, 42, 0.28);
  padding-left: 6px;
  padding-right: 6px;
}

.print-table th.print-col-discharge,
.print-table td.print-col-discharge {
  padding-left: 4px;
  padding-right: 4px;
  text-align: center;
}

.print-table th.print-col-hemato,
.print-table td.print-col-hemato {
  padding-right: 14px;
}

.print-table th.print-col-devices,
.print-table td.print-col-devices {
  padding-left: 14px;
}

.print-row-main td {
  border-bottom: 0;
}

.print-row-exams td {
  padding-top: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.24);
}

.print-col-exams-spacer {
  padding-left: 0;
  padding-right: 0;
}

.print-col-exams-bed-spacer {
  padding: 0;
}

.print-col-exams {
  padding-left: 8px;
  padding-right: 8px;
}

.print-full-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px;
  align-items: start;
}

.print-full-row__label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--brand-blue-deep);
  padding-top: 2px;
}

.print-full-row__label--subtle {
  font-weight: 500;
}

.print-col-exams .print-cell-text {
  font-size: 0.68rem;
  line-height: 1.22;
}

.print-full-row__value {
  min-width: 0;
  font-size: 0.68rem;
  line-height: 1.22;
  word-break: break-word;
}

.print-cell-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  min-height: calc(2 * 1.35em);
}

.print-cell-text--stacked {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: auto;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.print-cell-line {
  display: block;
}

.print-patient-cell strong,
.print-patient-cell span {
  display: block;
}

.print-patient-cell span {
  color: var(--muted);
}

.print-empty {
  text-align: center;
  color: var(--muted);
}

.print-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  font-size: 0.64rem;
  color: var(--muted);
}

.print-panel--complete {
  background: #ffffff;
}

.print-complete-screen-header {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.print-complete-screen-header h1 {
  margin: 0;
  color: var(--brand-blue-deep);
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.1;
}

.print-complete-screen-header p {
  margin: 0;
  color: var(--muted);
}

.print-complete-pages {
  display: grid;
  gap: 18px;
}

.print-complete-page {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.print-complete-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 360px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.print-complete-card--empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  border-style: dashed;
}

.print-complete-card__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

.print-complete-card__context {
  display: block;
  margin-bottom: 4px;
  color: var(--hospital-green);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.print-complete-card__title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.print-complete-card__bed {
  color: var(--hospital-green);
  font-size: 0.82rem;
  font-weight: 900;
}

.print-complete-card h2 {
  margin: 0;
  color: var(--brand-blue-deep);
  font-size: 1.05rem;
  line-height: 1.12;
}

.print-complete-card__header p {
  margin: 4px 0 0;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
}

.print-complete-card__badges {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.print-complete-badge {
  display: inline-flex;
  justify-content: center;
  min-width: 72px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--brand-blue-deep);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.print-complete-badge--isolation {
  background: #f5f3ff;
  color: #5b21b6;
}

.print-complete-badge--discharge {
  background: var(--flux-aqua-light);
  color: var(--flux-teal-pressed);
}

.print-complete-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.print-complete-card__meta span {
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  color: #334155;
  font-size: 0.72rem;
  line-height: 1.15;
}

.print-complete-card__meta strong {
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.print-complete-grid {
  column-count: 2;
  column-gap: 6px;
  min-height: 0;
}

.print-complete-field {
  display: inline-block;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 6px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #f8fafc;
  break-inside: avoid;
  page-break-inside: avoid;
  overflow: hidden;
}

.print-complete-field--wide {
  display: block;
  column-span: all;
}

.print-complete-field strong {
  display: block;
  margin-bottom: 2px;
  color: var(--brand-blue-deep);
  font-size: 0.54rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.print-complete-text {
  color: #111827;
  font-size: 0.68rem;
  line-height: 1.24;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.meta {
  margin: 0;
}

.severity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 11px;
  min-width: 92px;
  font-size: 0.78rem;
  font-weight: 800;
}

.severity--estavel {
  color: #1d4ed8;
  background: #eff6ff;
}

.severity--atencao,
.severity--aten-o {
  color: #9a5b12;
  background: #fff7ed;
}

.severity--critico {
  color: #7f1d1d;
  background: #fee2e2;
}

.severity--sem-classificacao {
  color: #405860;
  background: #e7eef3;
}

.patient-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.patient-section {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(246, 252, 248, 0.96);
  border: 1px solid rgba(2, 155, 169, 0.08);
}

.patient-section span {
  display: block;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.patient-section p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.5;
}

.danger-form {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.danger-form--inline {
  margin-top: 0;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.admin-hero,
.admin-toolbar {
  margin-bottom: 22px;
}

.admin-hero {
  grid-template-columns: minmax(0, 1.95fr) auto;
  gap: 18px;
  padding: 18px 22px;
  align-items: start;
}

.admin-hero .hero__copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.admin-hero h1 {
  font-size: clamp(1.92rem, 2.45vw, 2.72rem);
  line-height: 0.98;
  margin: 0;
  max-width: none;
  text-wrap: balance;
}

.admin-hero p {
  margin: 0;
  max-width: none;
  font-size: 0.98rem;
  line-height: 1.35;
}

.admin-hero .stats-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-self: start;
  overflow-x: auto;
  scrollbar-width: thin;
}

.admin-hero .stat-card {
  flex: 1 1 0;
  min-width: 118px;
  padding: 12px 14px;
}

.admin-hero .stat-card span {
  margin-bottom: 6px;
  font-size: 0.78rem;
  line-height: 1.12;
  max-width: none;
  text-wrap: balance;
}

.admin-hero .stat-card strong {
  font-size: 1.18rem;
}

@media (min-width: 1240px) {
  .dashboard-hero h1,
  .dashboard-hero p,
  .dashboard-hero .stat-card span {
    white-space: nowrap;
    text-wrap: nowrap;
  }

  .admin-hero h1,
  .admin-hero p,
  .admin-hero .stat-card span {
    white-space: nowrap;
    text-wrap: nowrap;
  }
}

.admin-table {
  margin-top: 22px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(2, 155, 169, 0.08);
}

th {
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.flash {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  border: 1px solid transparent;
  animation: rise-in 280ms ease both;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.flash--success {
  color: var(--flux-teal-action);
  background: var(--brand-green-soft);
  border-color: rgba(45, 144, 80, 0.18);
}

.flash--toast {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 80;
  width: min(360px, calc(100vw - 32px));
  margin: 0;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.flash--toast.is-dismissing {
  opacity: 0;
  transform: translateY(-8px);
}

.flash--error {
  color: #7f1d1d;
  background: #fee2e2;
  border-color: rgba(127, 29, 29, 0.14);
}

.status-pill--inactive {
  color: #7f1d1d;
  background: #fee2e2;
  border-color: rgba(127, 29, 29, 0.14);
}

.helper-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(2, 155, 169, 0.08);
}

.helper-note--inline {
  margin-top: 0;
}

.helper-note strong {
  display: block;
  margin-bottom: 4px;
}

.empty-state {
  text-align: center;
}

/* Premium SaaS hospital design system.
   This keeps the Flask-rendered UI intact while giving existing primitives
   the same visual grammar expected from a Tailwind/shadcn-style interface. */
:is(.panel, .auth-panel, .auth-copy, .context-panel, .context-copy, .admin-card, .stat-card, .feature-card, .directory-row, .patient-card, .history-patient-card, .patient-summary-modal__dialog) {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

:is(.panel, .auth-panel, .auth-copy, .context-panel, .context-copy) {
  backdrop-filter: none;
}

:is(.marketing-hero__copy h1, .marketing-section__intro h2, .marketing-legal__intro h1, .hero h1, .auth-copy h1, .context-copy h1, .dashboard-hero h1, .admin-hero h1, .auth-about-panel__intro h3) {
  font-family: var(--font-sans);
  letter-spacing: 0;
  color: var(--brand-blue-deep);
}

.marketing-hero__copy h1,
.marketing-section__intro h2,
.marketing-legal__intro h1 {
  line-height: 1.04;
}

.marketing-hero,
.marketing-summary,
.marketing-section,
.marketing-legal {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.marketing-highlight-card,
.marketing-card,
.marketing-terms-card,
.auth-secondary-cta,
.login-identity-chip,
.registration-pane,
.history-field,
.unit-browser-link,
.context-pill {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: none;
}

.site-header--marketing {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.marketing-nav__link,
.toolbar-link,
.auth-panel .toolbar-link,
.link-button {
  color: var(--hospital-green);
}

.marketing-nav__link:hover,
.toolbar-link:hover,
.auth-panel .toolbar-link:hover,
.link-button:hover {
  color: var(--hospital-green-deep);
}

.auth-layout--single {
  grid-template-columns: minmax(0, 560px);
  margin-top: 10px;
}

.auth-panel--focus {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-strong);
}

.auth-panel .section-heading {
  gap: 18px;
}

.auth-panel .section-heading h2 {
  font-size: clamp(1.6rem, 2vw, 2rem);
  line-height: 1.08;
}

.auth-secondary-cta {
  background: #f8fafc;
}

.auth-about-link-row {
  border-top-color: var(--line);
}

.auth-trust-chip {
  border-color: rgba(2, 155, 169, 0.2);
  background: rgba(2, 155, 169, 0.08);
  color: var(--brand-blue-deep);
}

input,
select,
textarea,
#patient-search {
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

input::placeholder,
textarea::placeholder {
  color: #8a94a6;
}

input:focus,
select:focus,
textarea:focus,
#patient-search:focus {
  border-color: var(--hospital-green);
  box-shadow: 0 0 0 3px rgba(2, 155, 169, 0.16);
}

.structured-form--patient input,
.structured-form--patient select,
.structured-form--patient textarea {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--ink);
}

.patient-form-fields:disabled input,
.patient-form-fields:disabled select,
.patient-form-fields:disabled textarea,
.patient-form-fields:disabled .checkbox-field {
  background: #f1f5f9;
  border-color: #d8e1e8;
}

.button {
  border-radius: var(--radius-md);
  font-weight: 800;
}

.button--primary,
.button--login-cta {
  color: #ffffff;
  background: var(--hospital-green);
  border: 1px solid var(--hospital-green);
  box-shadow: 0 10px 22px rgba(2, 155, 169, 0.18);
}

.button--primary:hover,
.button--login-cta:hover {
  background: var(--hospital-green-deep);
  border-color: var(--hospital-green-deep);
  box-shadow: 0 12px 26px rgba(23, 143, 88, 0.22);
}

.button--secondary,
.button--subtle {
  color: var(--hospital-green-deep);
  background: #eefaf4;
  border: 1px solid rgba(2, 155, 169, 0.22);
  box-shadow: none;
}

.button--secondary:hover,
.button--subtle:hover {
  color: #0f6f43;
  background: #e0f5ea;
  border-color: rgba(2, 155, 169, 0.36);
}

.button--ghost {
  color: var(--brand-blue-deep);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: none;
}

.button--ghost:hover {
  color: var(--hospital-green-deep);
  background: #f8fafc;
  border-color: #b8c8d5;
}

.button--danger {
  background: var(--danger);
  border: 1px solid var(--danger);
  box-shadow: 0 10px 22px rgba(199, 53, 53, 0.14);
}

.button--danger:hover {
  background: #a92f2f;
  border-color: #a92f2f;
}

.dashboard-hero,
.admin-hero {
  border-color: var(--line);
  background: #ffffff;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.dashboard-sidebar {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 18px;
  padding: 20px;
  background: #ffffff;
}

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

.dashboard-sidebar__section h2 {
  margin: 0;
  color: var(--brand-blue-deep);
  font-size: 1.08rem;
  line-height: 1.2;
  font-weight: 800;
}

.dashboard-sidebar__section p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.dashboard-sidebar__section--meta {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.dashboard-sidebar__section--meta span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.dashboard-sidebar__section--meta strong {
  color: var(--brand-blue-deep);
  font-size: 0.98rem;
  line-height: 1.25;
}

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

.dashboard-nav__link {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--brand-blue-deep);
  background: #ffffff;
  font: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.dashboard-nav__link:hover,
.dashboard-nav__link:focus-visible {
  color: var(--hospital-green-deep);
  background: #f8fafc;
  border-color: rgba(2, 155, 169, 0.3);
  transform: translateY(-1px);
}

.dashboard-nav__link--primary {
  color: #ffffff;
  border-color: var(--hospital-green);
  background: var(--hospital-green);
  box-shadow: 0 10px 22px rgba(2, 155, 169, 0.16);
}

.dashboard-nav__link--primary:hover,
.dashboard-nav__link--primary:focus-visible {
  color: #ffffff;
  background: var(--hospital-green-deep);
  border-color: var(--hospital-green-deep);
}

.dashboard-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.dashboard-hero h1 {
  font-size: clamp(1.12rem, 1.55vw, 1.58rem);
  font-weight: 700;
  letter-spacing: 0;
}

.dashboard-hero {
  margin-bottom: 0;
  padding: 20px;
}

.dashboard-hero .hero__copy {
  padding-left: 0;
}

.dashboard-hero .hero__copy .eyebrow {
  color: var(--hospital-green);
}

.dashboard-hero p {
  max-width: 48ch;
  color: var(--muted);
}

.dashboard-hero .stat-card,
.admin-hero .stat-card {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: none;
}

.dashboard-hero .stat-card strong,
.admin-hero .stat-card strong {
  color: var(--brand-blue-deep);
  font-weight: 800;
}

.dashboard-controls__copy h2 {
  letter-spacing: 0;
}

.dashboard-workbench {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: #ffffff;
}

.dashboard-workbench .dashboard-controls {
  margin: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.dashboard-controls__copy {
  display: grid;
  gap: 4px;
}

.dashboard-controls__copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.dashboard-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-action-row .button {
  min-height: 40px;
  padding-inline: 16px;
}

.dashboard-workbench #novo-paciente {
  padding: 12px 14px;
  border: 1px dashed rgba(2, 155, 169, 0.34);
  border-radius: var(--radius-lg);
  background: #fbfdfc;
}

.dashboard-workbench .composer-link-row {
  justify-content: flex-start;
  text-align: left;
}

.dashboard-workbench .link-button {
  font-size: 0.95rem;
}

.patient-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.patient-table__head {
  display: grid;
  grid-template-columns: 74px minmax(220px, 1.2fr) minmax(190px, 0.8fr) 172px;
  gap: 14px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.patient-table .patient-list {
  gap: 0;
  margin: 0;
}

.patient-table .patient-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.patient-table .patient-card + .patient-card {
  border-top: 1px solid var(--line);
}

.patient-table .empty-state {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.directory-row {
  background: #ffffff;
}

.directory-row__body {
  border-top-color: var(--line);
}

.directory-row__editor {
  border-color: var(--line);
  background: #f8fafc;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-bottom-color: var(--line);
}

th {
  background: #f8fafc;
  color: #667085;
  letter-spacing: 0.04em;
}

tr:hover td {
  background: #fbfdfc;
}

.patient-card {
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.patient-card:hover {
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.patient-card > summary {
  min-height: 86px;
  background: #ffffff;
}

.patient-card__identity h3 {
  color: #111827;
  letter-spacing: 0;
}

.patient-diagnosis {
  color: #475569;
}

.patient-card__body {
  background: #ffffff;
  border-top: 0;
}

.patient-section {
  border-color: var(--line);
  background: #f8fafc;
}

.severity--estavel {
  background: #eff6ff;
  color: #1d4ed8;
}

.severity--atencao,
.severity--aten-o {
  background: #fff7ed;
  color: #9a5b12;
}

.status-pill--discharge {
  background: #e8f7ef;
  color: #176b42;
}

.severity--critico {
  background: #fee2e2;
  color: #8a1f1f;
}

.flash {
  border-radius: var(--radius-lg);
}

.flash--success {
  background: #e8f7ef;
  border-color: rgba(2, 155, 169, 0.22);
}

.helper-note {
  background: #f3faf6;
  border: 1px solid rgba(2, 155, 169, 0.14);
}

@media (min-width: 721px) {
  .patient-card > summary {
    padding-right: 18px;
  }

  .patient-card__summary-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 172px;
    gap: 14px;
    align-items: center;
    padding-right: 0;
  }

  .patient-table .patient-card__identity {
    display: grid;
    grid-template-columns: 74px minmax(220px, 1.2fr) minmax(190px, 0.8fr);
    gap: 14px;
    align-items: center;
    min-width: 0;
  }

  .patient-table .patient-card__identity .eyebrow {
    margin: 0;
  }

  .patient-table .patient-card__title-row {
    min-width: 0;
  }

  .patient-table .patient-card__identity h3,
  .patient-table .patient-diagnosis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .patient-table .patient-diagnosis {
    margin: 0;
  }

  .patient-card__badges {
    position: static;
    width: 148px;
    transform: none;
    align-items: stretch;
    gap: 6px;
  }

  .patient-card__badges .severity {
    width: 100%;
    min-width: 0;
  }

  .patient-table .patient-card__summary-isolation {
    position: static;
    min-width: 0;
    min-height: 0;
    max-width: none;
    width: 100%;
    padding: 6px 10px;
    z-index: auto;
  }

  .patient-table .status-pill--discharge {
    width: 100%;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes button-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

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

  .dashboard-sidebar {
    position: static;
  }

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

  .hero,
  .auth-layout,
  .admin-grid,
  .marketing-hero {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .dashboard-controls,
  .section-heading,
  .site-header,
  .header-actions,
  .toolbar-actions,
  .composer-link-row,
  .site-footer--marketing {
    flex-direction: column;
    align-items: stretch;
  }

  .brand {
    align-items: stretch;
  }

  .brand__copy span {
    max-width: none;
  }

  .directory-row > summary,
  .directory-row__summary-main,
  .directory-row__meta,
  .directory-row__details,
  .directory-row__summary-actions,
  .directory-row__body-actions,
  .unit-browser-item {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .auth-copy__intro,
  .auth-copy p,
  .auth-copy h1 {
    max-width: none;
  }

  .auth-layout--single {
    grid-template-columns: 1fr;
  }

  .context-copy__header,
  .context-panel .section-heading {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .stats-grid,
  .patient-sections,
  .form-grid,
  .form-grid--compact,
  .form-grid--compact-admin,
  .form-grid--patient-meta {
    grid-template-columns: 1fr;
  }

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

  .patient-expanded-days {
    display: flex;
    justify-content: flex-start;
    margin: -10px 0 2px;
    font-size: 0.72rem;
    line-height: 1.1;
  }

  .patient-expanded-days + .patient-card__actions {
    margin-top: 4px;
  }

  .form-grid--patient-meta .checkbox-field {
    grid-column: 1 / -1;
  }

  .dashboard-controls__actions {
    min-width: 0;
    justify-items: stretch;
  }

  .dashboard-action-row {
    justify-content: stretch;
  }

  .dashboard-action-row .button {
    flex: 1 1 160px;
  }

  .site-header--marketing {
    display: grid;
    justify-items: center;
    text-align: center;
  }

  .marketing-header-brand {
    justify-content: center;
    width: 100%;
  }

  .marketing-nav,
  .marketing-footer__links {
    justify-content: center;
  }

  .marketing-header__actions {
    justify-content: center;
    width: 100%;
  }

  .marketing-card-grid,
  .site-footer--marketing {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 16px), var(--max-width));
    padding-top: 18px;
    overflow-x: clip;
  }

  .dashboard-shell {
    display: block;
  }

  .dashboard-sidebar {
    display: none;
  }

  .dashboard-main {
    gap: 8px;
  }

  .dashboard-workbench {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .dashboard-workbench .dashboard-controls {
    padding: 0;
    border-bottom: 0;
  }

  .dashboard-controls__copy,
  .patient-table__head,
  .dashboard-action-row,
  #patient-search {
    display: none;
  }

  .dashboard-workbench #novo-paciente {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .dashboard-workbench .composer-link-row {
    justify-content: center;
    text-align: center;
  }

  .patient-table {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .patient-table .patient-list {
    gap: 12px;
  }

  .patient-table .patient-card,
  .patient-table .patient-card + .patient-card {
    border: 2px solid #111827;
    border-radius: var(--radius-xl);
  }

  .page-shell--print {
    width: min(calc(100% - 16px), 100%);
  }

  .page-shell--marketing {
    width: min(calc(100% - 16px), 100%);
    padding-top: 16px;
    padding-bottom: 28px;
  }

  .hero,
  .toolbar,
  .admin-panel,
  .empty-state,
  #novo-paciente,
  .auth-copy,
  .auth-panel,
  .context-copy,
  .context-panel {
    padding: 18px;
  }

  .patient-card > summary,
  .patient-card__body {
    padding: 20px;
  }

  .structured-form--patient textarea {
    min-height: 44px;
    overflow-y: hidden;
    resize: none;
  }

  .patient-form-fields:disabled .form-field--empty {
    display: none;
  }

  .patient-card__actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
    margin-top: 14px;
  }

  .history-patient-card__header,
  .history-patient-card__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .history-patient-card__badges {
    justify-content: flex-start;
  }

  .history-patient-grid {
    grid-template-columns: 1fr;
  }

  .patient-card__actions > * {
    min-width: 0;
  }

  .patient-card__actions .danger-form--inline {
    display: block;
    width: 100%;
  }

  .patient-card__actions .button {
    width: 100%;
    min-width: 0;
    padding: 10px 6px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .patient-card__summary-main,
  .patient-card__badges,
  .print-actions,
  .print-header,
  .print-brand-block,
  .context-panel__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .patient-card__summary-isolation {
    top: 14px;
    right: 20px;
    min-width: 28px;
    min-height: 28px;
    padding: 4px 7px;
    border: 0;
    box-shadow: none;
    font-size: 0.6rem;
  }

  .patient-card > summary .severity {
    min-height: 24px;
    padding: 4px 8px;
    font-size: 0.68rem;
    line-height: 1;
  }

  .context-copy__header,
  .context-panel .section-heading {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .context-copy,
  .context-panel,
  .context-list,
  .context-pill,
  .context-copy__intro,
  .context-panel .section-heading > div,
  .context-panel .section-heading p,
  .context-panel .structured-form,
  .context-panel .form-field,
  .context-panel select,
  .context-panel button,
  .context-copy h1,
  .context-copy p {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .context-copy h1 {
    font-size: clamp(1.7rem, 7vw, 2.18rem);
    line-height: 1.04;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  .context-copy p,
  .context-panel .section-heading p {
    font-size: 0.94rem;
    line-height: 1.48;
    max-width: none;
  }

  .context-panel .form-grid--compact {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .context-panel__actions {
    margin-top: 12px;
    justify-content: stretch;
  }

  .context-panel__actions .button {
    width: 100%;
  }

  .context-pill {
    padding: 14px 16px;
  }

  .context-copy,
  .context-panel {
    overflow: hidden;
  }

  .brand {
    gap: 12px;
  }

  .site-header {
    align-items: center;
    text-align: center;
  }

  .brand--public {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
  }

  .site-header--marketing,
  .marketing-section,
  .marketing-hero,
  .marketing-summary,
  .marketing-legal,
  .site-footer--marketing {
    padding: 18px;
  }

  .marketing-header-shell {
    gap: 14px;
  }

  .marketing-header-brand__logo {
    width: min(100%, 280px);
  }

  .marketing-nav {
    gap: 8px 14px;
  }

  .marketing-nav__link {
    font-size: 0.9rem;
  }

  .marketing-hero__copy h1,
  .marketing-home-topline h1,
  .marketing-section__intro h2,
  .marketing-legal__intro h1 {
    font-size: 1.85rem;
    line-height: 1.02;
  }

  .marketing-home-topline {
    padding: 10px 0 20px;
    text-align: left;
  }

  .marketing-home-topline p {
    font-size: 1.05rem;
  }

  .marketing-hero__copy p,
  .marketing-section__content p,
  .marketing-contact p,
  .marketing-card p,
  .marketing-legal__intro p,
  .marketing-legal__section p {
    font-size: 0.96rem;
    line-height: 1.6;
  }

  .marketing-card-grid {
    grid-template-columns: 1fr;
  }

  .marketing-terms-card {
    padding: 18px;
    gap: 16px;
  }

  .marketing-legal__section--terms + .marketing-legal__section--terms {
    padding-top: 16px;
  }

  .brand--public .brand__logo-link {
    justify-content: center;
  }

  .brand__logo,
  .brand__logo--compact {
    width: min(100%, 320px);
  }

  .brand__logo--public {
    width: min(100%, 232px);
    justify-self: center;
  }

  .brand__copy--public {
    justify-items: center;
    text-align: center;
    padding-left: 0;
  }

  .brand--context {
    justify-items: center;
    text-align: center;
    width: 100%;
  }

  .brand--context .brand__logo-link {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .brand--context .brand__logo--compact {
    margin-inline: auto;
  }

  .brand__tagline--header {
    margin-left: 0;
    max-width: none;
    white-space: nowrap;
    font-size: 0.76rem;
    text-align: center;
  }

  .brand__copy strong {
    font-size: 0.96rem;
  }

  .header-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 16px;
    width: 100%;
  }

  .header-actions .header-user {
    width: 100%;
    justify-items: center;
    text-align: center;
    margin-bottom: 2px;
  }

  .header-actions > .button,
  .header-actions > a,
  .header-actions > form {
    width: auto;
  }

  .header-actions > form {
    display: flex;
    justify-content: center;
    margin: 0;
  }

  .header-actions > a.button--ghost,
  .header-actions > form .button--ghost,
  .header-actions > .button.button--ghost {
    width: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--brand-blue-deep);
    font-size: 0.94rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.14em;
  }

  .header-actions > a.button--ghost:hover,
  .header-actions > form .button--ghost:hover,
  .header-actions > .button.button--ghost:hover {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    color: var(--brand-blue);
    transform: none;
  }

  .dashboard-hero {
    padding: 12px 14px;
    gap: 8px;
    margin-bottom: 6px;
  }

  .dashboard-hero .hero__copy {
    padding-left: 0;
    gap: 3px;
    justify-items: center;
    text-align: center;
  }

  .dashboard-hero h1 {
    font-size: clamp(0.98rem, 4.6vw, 1.14rem);
    line-height: 1.08;
    letter-spacing: 0;
    width: 100%;
  }

  .dashboard-hero .stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(112px, 142px));
    gap: 8px;
    width: 100%;
    overflow: visible;
    justify-content: center;
    justify-items: stretch;
  }

  .dashboard-hero .stat-card,
  .dashboard-hero .stat-card--updated {
    min-width: 0;
    max-width: none;
    flex: initial;
    flex-basis: auto;
    padding: 5px 6px;
  }

  .dashboard-hero .stat-card--updated {
    display: none;
  }

  .dashboard-hero .stat-card span {
    margin-bottom: 1px;
    font-size: 0.58rem;
    line-height: 1.1;
  }

  .dashboard-hero .stat-card span {
    text-align: center;
  }

  .dashboard-hero .stat-card strong {
    font-size: 1.08rem;
    line-height: 1.02;
    overflow-wrap: anywhere;
  }

  .dashboard-hero .stat-card strong {
    text-align: center;
  }

  .dashboard-hero .stat-card--updated strong {
    font-size: 0.78rem;
    line-height: 1.05;
    font-weight: 700;
  }

  .dashboard-mobile-update {
    display: block;
    margin: 18px auto 8px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.35;
    text-align: center;
  }

  .dashboard-mobile-update strong {
    color: var(--text);
    font-weight: 700;
  }

  .flash--toast {
    top: 12px;
    left: 50%;
    right: auto;
    width: min(320px, calc(100vw - 24px));
    padding: 12px 14px;
    font-size: 0.92rem;
    transform: translateX(-50%);
    text-align: center;
  }

  .flash--toast.is-dismissing {
    transform: translate(-50%, -8px);
  }

  .auth-secondary-cta {
    grid-template-columns: 1fr;
  }

  .auth-about-panel {
    padding: 20px;
  }

  .auth-footer-link {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-identity-chip {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand__copy--public {
    gap: 6px;
  }

  .brand__copy--public .brand__eyebrow {
    white-space: normal;
  }

  .brand__copy--public strong {
    font-size: 1.45rem;
    max-width: none;
  }

  .brand__copy--public .brand__tagline {
    font-size: 0.98rem;
    max-width: none;
  }

  .brand__eyebrow {
    font-size: 0.68rem;
  }

  .brand__copy--public .brand__eyebrow {
    font-size: 0.68rem;
  }

  .page-shell--login .site-header--public {
    padding-bottom: 0;
  }

  .page-shell--login .brand--public {
    gap: 4px;
  }

  .page-shell--login .brand__logo--public {
    width: min(52vw, 188px);
  }

  .page-shell--login .brand__copy--public {
    margin-top: -2px;
  }

  .page-shell--login .brand__copy--public strong,
  .page-shell--login .brand__copy--public .brand__tagline {
    display: none;
  }

  .page-shell--login .brand__copy--public .brand__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    white-space: normal;
  }

  .auth-copy {
    gap: 18px;
  }

  .auth-copy__intro {
    gap: 12px;
  }

  .auth-copy h1 {
    font-size: clamp(1.8rem, 7vw, 2.55rem);
    line-height: 1.01;
  }

  .auth-copy p {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .print-meta {
    justify-items: start;
  }

  #patient-search {
    min-width: 0;
  }

  .dashboard-controls {
    display: none;
  }

  .dashboard-hero {
    margin-bottom: 4px;
  }

  .composer-panel {
    margin: 0 0 2px;
  }

  .composer-link-row {
    margin-top: 0;
    padding-top: 0;
  }
}

/* Institutional SaaS refinement: lighter surfaces, calmer typography, and consistent 4/8px spacing. */
body {
  background:
    radial-gradient(circle at 12% 0%, rgba(2, 155, 169, 0.055), transparent 28%),
    linear-gradient(180deg, #f7fafb 0%, #f2f6f7 100%);
}

body::before {
  background-size: 40px 40px;
  opacity: 0.22;
}

.page-shell {
  padding-top: 24px;
  padding-bottom: 40px;
}

.site-header {
  gap: 16px;
  margin-bottom: 20px;
}

.brand {
  gap: 16px;
}

.brand__logo {
  filter: none;
}

.brand__logo--public {
  width: min(214px, 15vw);
}

.brand__logo--compact {
  width: min(300px, 25vw);
}

.brand__tagline--header {
  color: #667085;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0;
}

.brand__eyebrow,
.eyebrow,
.patient-table__head,
.patient-section span,
.print-complete-field strong,
th {
  text-transform: none;
  letter-spacing: 0.04em;
}

.eyebrow,
.brand__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hospital-green) !important;
  font-size: 0.76rem;
  font-weight: 700;
}

:is(.marketing-hero__copy h1, .marketing-home-topline h1, .marketing-section__intro h2, .marketing-legal__intro h1, .hero h1, .auth-copy h1, .context-copy h1, .dashboard-hero h1, .admin-hero h1, .auth-about-panel__intro h3) {
  font-family: var(--font-sans);
  letter-spacing: -0.025em;
}

:is(.panel, .auth-panel, .auth-copy, .context-panel, .context-copy, .admin-card, .stat-card, .feature-card, .directory-row, .patient-card, .history-patient-card, .patient-summary-modal__dialog, .marketing-hero, .marketing-summary, .marketing-section, .marketing-legal) {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.site-header--marketing {
  padding: 12px 16px;
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.marketing-header-shell {
  gap: 14px;
  margin-bottom: 20px;
}

.marketing-header-brand__logo {
  width: min(100%, 320px);
}

.marketing-home-topline {
  gap: 8px;
  padding: 16px 0 26px;
}

.marketing-home-topline h1 {
  font-size: clamp(2.15rem, 4.2vw, 4.15rem);
  line-height: 1.04;
}

.marketing-home-topline p {
  font-size: clamp(1.05rem, 1.55vw, 1.45rem);
  line-height: 1.45;
}

.marketing-hero,
.marketing-summary,
.marketing-section,
.marketing-legal,
.auth-copy,
.auth-panel,
.context-copy,
.context-panel,
.admin-panel,
.hero,
.toolbar,
.empty-state {
  padding: 24px;
}

.auth-layout--single {
  grid-template-columns: minmax(0, 520px);
}

.auth-panel--focus {
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.07);
}

.auth-panel .section-heading h2 {
  font-size: clamp(1.45rem, 1.7vw, 1.82rem);
  line-height: 1.12;
}

.header-user {
  gap: 3px;
}

.header-user strong {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 700;
}

.header-user span {
  color: var(--muted);
  font-size: 0.86rem;
}

input,
select,
textarea,
#patient-search {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.45;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

textarea {
  min-height: 92px;
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

input:focus,
select:focus,
textarea:focus,
#patient-search:focus {
  border-color: var(--hospital-green);
  box-shadow: 0 0 0 3px rgba(2, 155, 169, 0.14);
  outline: none;
}

.structured-form--patient input,
.structured-form--patient select,
.structured-form--patient textarea {
  background: #f8fafc;
  border-color: #ccd6df;
}

.patient-form-fields:disabled input,
.patient-form-fields:disabled select,
.patient-form-fields:disabled textarea,
.patient-form-fields:disabled .checkbox-field {
  background: #eef2f6;
  border-color: #d5dee7;
  color: #334155;
  opacity: 1;
}

.form-field {
  gap: 6px;
}

.form-field span {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.field-error,
.form-error {
  display: block;
  color: #b42318;
  font-size: 0.82rem;
  line-height: 1.45;
}

.button,
.dashboard-nav__link {
  min-height: 42px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
}

.button {
  padding: 10px 16px;
}

.button:hover,
.dashboard-nav__link:hover {
  transform: none;
}

.button--primary,
.button--login-cta,
.dashboard-nav__link--primary {
  color: #ffffff;
  background: var(--hospital-green);
  border-color: var(--hospital-green);
  box-shadow: 0 8px 18px rgba(2, 155, 169, 0.16);
}

.button--primary:hover,
.button--login-cta:hover,
.dashboard-nav__link--primary:hover {
  color: #ffffff;
  background: var(--hospital-green-deep);
  border-color: var(--hospital-green-deep);
  box-shadow: 0 10px 22px rgba(23, 143, 88, 0.18);
}

.button--secondary,
.button--subtle {
  color: #126c45;
  background: #eefaf4;
  border-color: rgba(2, 155, 169, 0.24);
  box-shadow: none;
}

.button--ghost,
.dashboard-nav__link {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: none;
}

.button--ghost:hover,
.dashboard-nav__link:hover {
  color: var(--hospital-green-deep);
  background: #f8fafc;
  border-color: #c6d3dc;
}

.button--danger {
  color: #ffffff;
  background: #c93a3a;
  border-color: #c93a3a;
  box-shadow: 0 8px 18px rgba(201, 58, 58, 0.13);
}

.button--danger:hover {
  background: #a92f2f;
  border-color: #a92f2f;
}

.button.is-loading {
  cursor: wait;
}

.button.is-loading::after {
  width: 16px;
  height: 16px;
  margin-top: -8px;
  margin-left: -8px;
}

.dashboard-shell {
  grid-template-columns: minmax(212px, 244px) minmax(0, 1fr);
  gap: 16px;
}

.dashboard-sidebar {
  top: 16px;
  gap: 16px;
  padding: 18px;
}

.dashboard-sidebar__section h2 {
  font-size: 1rem;
  font-weight: 700;
}

.dashboard-main {
  gap: 16px;
}

.dashboard-hero,
.admin-hero {
  padding: 20px 22px;
  border-color: var(--line);
}

.dashboard-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  align-items: center;
}

.dashboard-hero h1,
.admin-hero h1 {
  color: var(--ink);
  font-size: clamp(1.45rem, 2.1vw, 2.05rem);
  font-weight: 740;
  line-height: 1.12;
}

.dashboard-hero p,
.admin-hero p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.dashboard-hero .stats-grid {
  gap: 12px;
  width: min(100%, 420px);
}

.stat-card,
.dashboard-hero .stat-card,
.admin-hero .stat-card {
  min-height: 96px;
  padding: 16px;
  border-color: var(--line);
  background: #ffffff;
  box-shadow: none;
}

.stat-card span,
.dashboard-hero .stat-card span,
.admin-hero .stat-card span {
  color: #667085;
  margin-bottom: 6px;
  font-size: 0.86rem;
  line-height: 1.25;
}

.stat-card strong,
.dashboard-hero .stat-card strong,
.admin-hero .stat-card strong {
  color: var(--ink);
  font-size: 2rem;
  font-weight: 760;
  line-height: 1;
}

.dashboard-workbench {
  gap: 16px;
  padding: 18px;
}

.dashboard-controls {
  gap: 16px;
}

.dashboard-controls__copy h2 {
  color: var(--ink);
  font-size: clamp(1.25rem, 1.7vw, 1.72rem);
  font-weight: 740;
}

.dashboard-controls__copy p {
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-action-row .button {
  min-height: 40px;
}

.dashboard-workbench #novo-paciente {
  padding: 10px 12px;
  border-color: rgba(2, 155, 169, 0.24);
  background: #fbfdfc;
}

.patient-table {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: none;
}

.patient-table__head {
  grid-template-columns: 72px minmax(210px, 1.2fr) minmax(180px, 0.86fr) 160px;
  gap: 12px;
  padding: 10px 16px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 740;
}

.patient-list {
  gap: 12px;
}

.patient-card,
.patient-table .patient-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: none;
}

.patient-table .patient-card {
  border-width: 0;
}

.patient-table .patient-card + .patient-card {
  border-top: 1px solid var(--line);
}

.patient-card:hover {
  transform: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.patient-card > summary {
  min-height: 72px;
  padding: 14px 16px;
  gap: 6px;
}

.patient-card__identity h3 {
  color: var(--ink);
  font-size: clamp(1rem, 1.1vw, 1.12rem);
  font-weight: 760;
  line-height: 1.2;
}

.patient-diagnosis {
  color: #475569;
  font-size: 0.9rem;
  font-weight: 640;
}

.patient-card__body {
  padding: 16px 18px 20px;
  background: #ffffff;
  border-top: 0;
}

.patient-card__actions {
  gap: 8px;
  margin-top: 14px;
}

.patient-section {
  padding: 12px;
  border-color: var(--line);
  background: #f8fafc;
}

.patient-section span {
  margin-bottom: 6px;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
}

.patient-section p {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.52;
}

.severity,
.status-pill,
.patient-inline-pill,
.patient-card__summary-isolation {
  min-width: 0;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.1;
}

.severity--estavel {
  background: #eff6ff;
  color: #1d4ed8;
}

.severity--atencao,
.severity--aten-o {
  background: #fff7ed;
  color: #9a5b12;
}

.status-pill--discharge {
  background: var(--flux-aqua-light);
  color: #176b42;
}

.severity--critico {
  background: #fde8e8;
  color: #8a1f1f;
}

.severity--sem-classificacao,
.status-pill--isolation-empty {
  background: #eef2f7;
  color: #475569;
}

.patient-card__summary-isolation {
  min-width: 30px;
  min-height: 30px;
  font-size: 0.66rem;
}

.expand-hint {
  display: none;
}

.directory-row,
.history-patient-card,
.registration-pane,
.context-pill,
.marketing-highlight-card,
.marketing-card,
.marketing-terms-card {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: none;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

th {
  background: #f8fafc;
  color: #667085;
  font-size: 0.8rem;
  font-weight: 740;
}

td {
  color: var(--ink);
}

tr:hover td {
  background: #fbfdfc;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.empty-state::before {
  content: "";
  width: 40px;
  height: 40px;
  border: 1px solid rgba(2, 155, 169, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(2, 155, 169, 0.16), rgba(255, 255, 255, 0.8));
}

.empty-state h3,
.empty-state h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.12rem;
  font-weight: 740;
}

.empty-state p {
  max-width: 54ch;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.flash {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.flash--success {
  background: var(--flux-aqua-light);
  border-color: rgba(2, 155, 169, 0.24);
  color: #176b42;
}

.flash--error {
  background: #fff7f7;
  border-color: rgba(201, 58, 58, 0.22);
  color: #991b1b;
}

.page-loading-skeleton {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(2, 155, 169, 0.12), transparent 28%),
    rgba(244, 247, 248, 0.72);
  backdrop-filter: blur(6px);
}

body.is-navigating .page-loading-skeleton {
  display: grid;
}

body.is-navigating .page-shell {
  opacity: 0.62;
  transition: opacity 120ms ease;
}

.page-loading-skeleton__card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(390px, 86vw);
  padding: 18px 20px;
  border: 1px solid rgba(2, 155, 169, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(232, 247, 239, 0.78), rgba(255, 255, 255, 0.96)),
    #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

.page-loading-skeleton__icon {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--hospital-green), var(--hospital-green-deep));
  box-shadow: 0 14px 30px rgba(2, 155, 169, 0.26);
}

.page-loading-skeleton__icon::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(2, 155, 169, 0.22);
  border-radius: 18px;
}

.page-loading-skeleton__icon svg {
  width: 23px;
  height: 23px;
  animation: loading-refresh-rotate 0.95s linear infinite;
}

.page-loading-skeleton__icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-loading-skeleton__card strong,
.page-loading-skeleton__card small {
  display: block;
}

.page-loading-skeleton__card strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
}

.page-loading-skeleton__card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

@keyframes loading-refresh-rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes skeleton-shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

@media (min-width: 721px) {
  .patient-table .patient-card__identity {
    grid-template-columns: 72px minmax(210px, 1.2fr) minmax(180px, 0.86fr);
  }

  .patient-card__badges {
    width: 136px;
  }

  .patient-card__actions {
    align-items: center;
    gap: 8px;
    margin: 18px 0 28px;
  }

  .patient-card__actions .button {
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 0.84rem;
  }

  .patient-card__action-duti {
    display: inline-flex;
    align-items: center;
    align-content: center;
    gap: 4px;
    min-height: 36px;
    min-width: 124px;
    margin-right: auto;
    padding: 7px 12px;
    border: 1px solid #cbd7e0;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--ink);
    white-space: nowrap;
  }

  .patient-card.is-editing .patient-card__action-duti {
    display: none;
  }

  .patient-card__action-duti span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    text-transform: none;
  }

  .patient-card__action-duti span::after {
    content: ":";
  }

  .patient-card__action-duti strong {
    font-size: 0.84rem;
    font-weight: 680;
    line-height: 1.1;
  }
}

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

  .dashboard-hero .stats-grid {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 16px), var(--max-width));
    padding-top: 14px;
    padding-bottom: 28px;
  }

  .site-header {
    gap: 10px;
    margin-bottom: 14px;
  }

  .brand--context {
    gap: 0;
  }

  .brand__logo--compact {
    width: min(100%, 282px);
  }

  .brand__tagline--header {
    margin-top: -4px;
    white-space: normal;
    font-size: 0.74rem;
  }

  .header-actions {
    gap: 6px 14px;
  }

  .dashboard-main {
    gap: 8px;
  }

  .dashboard-mobile-compose {
    display: flex;
    justify-content: center;
    margin: 0 0 8px;
    text-align: center;
  }

  .dashboard-hero {
    padding: 12px;
    gap: 8px;
  }

  .dashboard-hero h1 {
    font-size: 1.02rem;
    font-weight: 720;
  }

  .dashboard-hero .stats-grid {
    grid-template-columns: repeat(2, minmax(108px, 136px));
    justify-content: center;
    gap: 8px;
  }

  .dashboard-hero .stat-card {
    min-height: 64px;
    padding: 6px 8px;
  }

  .dashboard-hero .stat-card span {
    font-size: 0.58rem;
    line-height: 1.12;
  }

  .dashboard-hero .stat-card strong {
    font-size: 1.22rem;
  }

  .dashboard-workbench {
    gap: 8px;
  }

  .dashboard-workbench #novo-paciente:has(.composer-panel__body[hidden]) {
    display: none;
  }

  .patient-table .patient-list {
    gap: 10px;
  }

  .patient-table .patient-card,
  .patient-table .patient-card + .patient-card {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
  }

  .patient-card > summary,
  .patient-card__body {
    padding: 16px;
  }

  .patient-card > summary {
    min-height: 0;
  }

  .patient-card__identity h3 {
    font-size: 1rem;
    line-height: 1.18;
  }

  .patient-diagnosis {
    font-size: 0.82rem;
  }

  .patient-card__actions {
    gap: 6px;
    margin-top: 10px;
  }

  .patient-card__actions .button {
    min-height: 38px;
    padding: 8px 5px;
    font-size: 0.76rem;
  }

  .structured-form--patient input,
  .structured-form--patient select,
  .structured-form--patient textarea {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 0.9rem;
  }

  .structured-form--patient textarea {
    min-height: 40px;
  }

  .marketing-home-topline {
    padding: 8px 0 18px;
  }

  .marketing-header-brand__logo {
    width: min(100%, 240px);
  }

  .marketing-home-topline h1 {
    font-size: 1.72rem;
    line-height: 1.08;
  }

  .marketing-home-topline p {
    font-size: 0.98rem;
  }
}

.context-copy {
  padding-top: 22px;
  padding-bottom: 22px;
}

/* Patient list polish: sober table rhythm and clinical status tones. */
@media (min-width: 721px) {
  .dashboard-workbench #novo-paciente:has(.composer-panel__body[hidden]) {
    display: none;
  }

  .patient-table {
    border-color: #cbd7e0;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  }

  .patient-table__head {
    grid-template-columns: 108px minmax(260px, 1.08fr) minmax(220px, 0.9fr) 188px;
    gap: 16px;
    padding: 12px 20px;
    background: #f6f8fa;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 680;
    letter-spacing: 0.02em;
  }

  .patient-table .patient-card > summary {
    min-height: 78px;
    padding: 14px 20px;
  }

  .patient-table .patient-card__summary-main {
    grid-template-columns: minmax(0, 1fr) 188px;
    gap: 16px;
  }

  .patient-table .patient-card__identity {
    grid-template-columns: 108px minmax(260px, 1.08fr) minmax(220px, 0.9fr);
    gap: 16px;
  }

  .patient-table .patient-card__identity .eyebrow {
    display: grid;
    grid-template-columns: 8px 3ch;
    justify-content: start;
    align-items: center;
    gap: 10px;
    width: 100%;
    color: #1f8f5b !important;
    font-size: 0.82rem;
    font-weight: 680;
    letter-spacing: 0.03em;
    line-height: 1;
  }

  .patient-table .patient-card__identity .eyebrow::before {
    width: 7px;
    height: 7px;
    background: #029BA9;
  }

  .patient-table .patient-card__identity h3 {
    color: #1f2937;
    font-size: clamp(0.95rem, 1vw, 1.05rem);
    font-weight: 700;
    letter-spacing: -0.012em;
    line-height: 1.22;
  }

  .patient-table .patient-diagnosis {
    color: #4b5563;
    font-size: 0.88rem;
    font-weight: 620;
  }

  .patient-card__badges {
    width: 188px;
    gap: 7px;
  }

  .patient-card__badges .severity,
  .patient-table .status-pill--discharge,
  .patient-table .patient-card__summary-isolation {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 680;
    letter-spacing: 0;
  }
}

.severity--estavel {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.severity--atencao,
.severity--aten-o {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a5b12;
}

.severity--critico {
  background: #fae9e9;
  border-color: #f1caca;
  color: #8f2d2d;
}

.severity--sem-classificacao {
  background: #f3f6f8;
  border-color: #dde5eb;
  color: #526173;
}

.status-pill--discharge {
  background: var(--flux-aqua-light);
  border-color: #cfe8da;
  color: #1f6f46;
}

.patient-card__summary-isolation--kcp {
  border-color: #d8ccff;
  background: #f3efff;
  color: #5f3dc4;
}

.patient-card__summary-isolation--ndm {
  border-color: #ced8ff;
  background: #eef2ff;
  color: #39446f;
}

.patient-card__summary-isolation--acineto {
  border-color: #ddd3eb;
  background: #f3eef9;
  color: #55406f;
}

.patient-card__summary-isolation--tb {
  border-color: #e4d4ef;
  background: #f7edfb;
  color: #6f3c86;
}

.patient-card__summary-isolation--default {
  border-color: #ddd3eb;
  background: #f3eef9;
  color: #55406f;
}

/* Professional feedback states for clinical workflows. */
body.has-patient-list.is-navigating .page-loading-skeleton {
  display: none;
}

body.has-patient-list.is-navigating .page-shell {
  opacity: 1;
}

.patient-list.is-loading {
  display: grid;
  gap: 10px;
}

.patient-list.is-loading > * {
  display: none;
}

.patient-list.is-loading::before,
.patient-list.is-loading::after {
  content: "";
  display: block;
  min-height: 92px;
  border: 1px solid #d6e0e8;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.64) 45%, transparent 80%),
    linear-gradient(#eef2f6 0 0) 20px 22px / 72px 14px no-repeat,
    linear-gradient(#eef2f6 0 0) 124px 22px / 240px 18px no-repeat,
    linear-gradient(#eef2f6 0 0) calc(100% - 220px) 22px / 168px 28px no-repeat,
    #ffffff;
  background-size:
    220% 100%,
    72px 14px,
    240px 18px,
    168px 28px,
    auto;
  animation: skeleton-shimmer 1.1s ease-in-out infinite;
}

.patient-list.is-loading::after {
  opacity: 0.72;
}

.empty-state--patients {
  min-height: 188px;
  align-content: center;
  border: 1px dashed #c7d5df;
  border-radius: var(--radius-lg);
  background: #f8fafc;
  box-shadow: none;
}

.empty-state--patients::before {
  background: #eef8f2;
}

.flash {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.35;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.flash--toast {
  top: 16px;
  right: 16px;
  width: min(300px, calc(100vw - 32px));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.flash--success {
  background: #f2fbf6;
  border-color: #cfe8da;
  color: #176b42;
}

.flash--error {
  background: #fff6f6;
  border-color: #f1caca;
  color: #8f2d2d;
}

.structured-form--patient textarea {
  min-height: 42px;
  height: 42px;
  overflow: hidden;
  resize: none;
}

.patient-form-fields:disabled textarea {
  text-overflow: clip;
  white-space: pre-wrap;
}

.patient-form-fields:not(:disabled) textarea {
  min-height: 88px;
  overflow-y: auto;
  resize: vertical;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .page-shell:not(.page-shell--login) .brand__tagline--header {
    margin-top: 5px;
  }

  .page-shell--login .brand--public {
    gap: 0;
  }

  .page-shell--login .brand__copy--public {
    margin-top: -8px;
  }

  .dashboard-hero p,
  .dashboard-workbench .composer-panel__body > p {
    display: none;
  }

  .dashboard-mobile-compose .toolbar-link--important {
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .patient-table {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .patient-table .patient-card + .patient-card {
    border-top: 1px solid var(--line-strong);
  }

  .patient-form-fields:disabled .checkbox-field--discharge {
    display: none;
  }

  .patient-form-fields:disabled .form-field--duti {
    display: none;
  }

  .patient-expanded-days {
    align-items: center;
    margin: 4px 0 6px;
    font-size: 0.72rem;
  }

  .patient-expanded-days__days {
    display: none;
  }

  .patient-expanded-days__duti {
    display: inline;
  }

  .patient-expanded-days + .patient-card__actions {
    margin-top: 0;
  }

  .patient-card__actions {
    gap: 5px;
    margin: 0 0 12px;
  }

  .patient-card__actions .button {
    min-height: 34px;
    padding: 6px 5px;
    border-radius: 9px;
    font-size: 0.72rem;
  }

  .patient-form-fields:not(:disabled) .form-grid--patient-meta {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
  }

  .patient-form-fields:not(:disabled) .form-grid--patient-meta .form-field--bed {
    grid-column: 1 / -1;
  }

  .patient-form-fields:not(:disabled) .form-grid--patient-meta .form-field--duti {
    grid-column: 1 / 2;
  }

  .patient-form-fields:not(:disabled) .form-grid--patient-meta .checkbox-field--discharge {
    grid-column: 2 / 3;
    min-height: 40px;
    align-self: end;
    padding: 8px 10px;
  }

  .patient-form-fields:not(:disabled) .form-grid--patient-meta .form-field--gravity,
  .patient-form-fields:not(:disabled) .form-grid--patient-meta .form-field--isolation {
    grid-column: auto;
  }

  .patient-list.is-loading::before,
  .patient-list.is-loading::after {
    min-height: 132px;
    background:
      linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.64) 45%, transparent 80%),
      linear-gradient(#eef2f6 0 0) 16px 18px / 54px 12px no-repeat,
      linear-gradient(#eef2f6 0 0) 16px 44px / 210px 18px no-repeat,
      linear-gradient(#eef2f6 0 0) 16px 78px / calc(100% - 32px) 18px no-repeat,
      linear-gradient(#eef2f6 0 0) 16px 106px / calc(100% - 32px) 16px no-repeat,
      #ffffff;
    background-size:
      220% 100%,
      54px 12px,
      210px 18px,
      calc(100% - 32px) 18px,
      calc(100% - 32px) 16px,
      auto;
  }

  .flash--toast {
    top: 12px;
    left: 50%;
    right: auto;
    width: min(280px, calc(100vw - 28px));
    padding: 9px 11px;
    font-size: 0.82rem;
    transform: translateX(-50%);
    text-align: center;
  }

  .flash--toast.is-dismissing {
    transform: translate(-50%, -8px);
  }

  .structured-form--patient textarea {
    min-height: 40px;
    height: 40px;
  }

  .patient-form-fields:not(:disabled) textarea {
    min-height: 72px;
  }
}

/* Desktop SaaS clinical shell refinement. */
@media (min-width: 721px) {
  .dashboard-shell.dashboard-shell--saas {
    grid-template-columns: 300px minmax(0, 1fr);
    background: #f6f8fb;
  }

  .dashboard-shell--saas .dashboard-sidebar {
    width: 300px;
    gap: 16px;
    padding: 26px 22px;
    background:
      radial-gradient(circle at 16% 10%, rgba(2, 155, 169, 0.32), transparent 24%),
      radial-gradient(circle at 82% 82%, rgba(21, 128, 86, 0.22), transparent 28%),
      linear-gradient(165deg, #031f1a 0%, #063b30 48%, #021511 100%);
  }

  .dashboard-sidebar__brand {
    min-height: 70px;
    padding: 2px 4px 8px;
  }

  .dashboard-sidebar__brand img {
    width: 224px;
  }

  .dashboard-nav__group {
    display: grid;
    gap: 6px;
    padding: 8px 0 4px;
  }

  .dashboard-nav__section-label {
    display: block;
    padding: 0 14px 2px;
    color: rgba(217, 255, 233, 0.58);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .dashboard-shell--saas .dashboard-nav__link {
    min-height: 44px;
    border-radius: 12px;
    font-weight: 730;
  }

  .dashboard-shell--saas .dashboard-nav__link--sub {
    min-height: 38px;
    margin-left: 14px;
    padding-block: 8px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.86rem;
  }

  .dashboard-shell--saas .dashboard-nav__link--sub .dashboard-nav__icon {
    width: 24px;
    height: 24px;
    font-size: 0.58rem;
  }

  .dashboard-nav__icon {
    border: 1px solid rgba(126, 240, 173, 0.14);
    color: #bdf7d3;
    background: rgba(255, 255, 255, 0.075);
  }

  .dashboard-shell--saas .dashboard-nav__link:hover .dashboard-nav__icon,
  .dashboard-shell--saas .dashboard-nav__link--active .dashboard-nav__icon {
    color: #0C4D75;
    background: #8ef0b9;
  }

  .dashboard-sidebar__profile,
  .dashboard-sidebar__context,
  .dashboard-sidebar__footer {
    border-color: rgba(126, 240, 173, 0.18);
    border-radius: 14px;
    background: rgba(1, 34, 28, 0.62);
  }

  .dashboard-main {
    padding: 0 32px 38px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 320px),
      #f6f8fb;
  }

  .dashboard-topbar {
    min-height: 104px;
    margin: 0 -32px 26px;
    padding: 22px 34px;
  }

  .dashboard-metrics {
    gap: 16px;
    margin-bottom: 22px;
  }

  .dashboard-metric-card {
    min-height: 116px;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 14px;
    padding: 20px;
    border-color: #dce5ec;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  }

  .dashboard-metric-card__icon {
    width: 46px;
    height: 46px;
    color: var(--flux-teal-action);
    background: var(--flux-aqua-light);
  }

  .dashboard-metric-card strong {
    font-size: 1.78rem;
    font-weight: 770;
  }

  .dashboard-clinical-grid {
    grid-template-columns: minmax(330px, 0.72fr) minmax(0, 1.55fr);
    gap: 20px;
  }

  .dashboard-roster,
  .dashboard-workbench.panel {
    border-color: #dce5ec;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  }

  .dashboard-roster__item {
    min-height: 76px;
  }

  .dashboard-roster__status {
    font-weight: 720;
  }

  .dashboard-workbench .dashboard-controls {
    grid-template-columns: minmax(260px, 0.7fr) minmax(300px, 0.58fr);
    padding-bottom: 16px;
  }

  .dashboard-workbench .dashboard-controls__copy h2 {
    font-size: 1.42rem;
    font-weight: 780;
  }

  .dashboard-workbench #patient-search {
    min-height: 46px;
    border-radius: 10px;
    font-size: 0.96rem;
  }

  .dashboard-workbench .patient-table {
    border-color: #d4e0e8;
    border-radius: 14px;
  }

  .dashboard-workbench .patient-table__head,
  .patient-table__head {
    grid-template-columns: 110px minmax(260px, 1.04fr) minmax(220px, 0.92fr) 200px;
    padding: 13px 20px;
    color: #667085;
    background: #f8fafc;
    font-weight: 720;
  }

  .dashboard-workbench .patient-card__summary {
    min-height: 82px;
  }

  .dashboard-workbench .patient-card__summary-main,
  .patient-table .patient-card__summary-main {
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 18px;
    padding: 18px 20px;
  }

  .dashboard-workbench .patient-card__identity,
  .patient-table .patient-card__identity {
    grid-template-columns: 110px minmax(260px, 1.04fr) minmax(220px, 0.92fr);
    gap: 16px;
  }

  .dashboard-workbench .patient-card__title-row h3,
  .patient-table .patient-card__identity h3 {
    font-size: clamp(0.96rem, 1vw, 1.08rem);
    font-weight: 710;
  }

  .dashboard-workbench .patient-card__badges,
  .patient-card__badges {
    max-width: 200px;
    width: 200px;
    gap: 7px;
  }

  .dashboard-workbench .severity,
  .dashboard-workbench .status-pill,
  .dashboard-workbench .patient-card__summary-isolation,
  .patient-card__badges .severity,
  .patient-table .status-pill--discharge,
  .patient-table .patient-card__summary-isolation {
    min-height: 30px;
    padding: 6px 11px;
    border-width: 1px;
    font-size: 0.76rem;
    font-weight: 710;
  }

  .dashboard-workbench .patient-card__body {
    padding: 22px 20px 24px;
  }

  .dashboard-workbench .patient-card__actions,
  .patient-card__actions {
    align-items: center;
    gap: 8px;
    margin: 14px 0 24px;
    padding-bottom: 2px;
  }

  .dashboard-workbench .patient-card__action-duti,
  .patient-card__action-duti {
    min-height: 34px;
    min-width: 0;
    padding: 7px 11px;
    border-radius: 10px;
    font-size: 0.8rem;
  }

  .dashboard-workbench .patient-card__actions .button,
  .patient-card__actions .button {
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 720;
  }

  .dashboard-workbench .patient-form input,
  .dashboard-workbench .patient-form select,
  .dashboard-workbench .patient-form textarea {
    min-height: 42px;
    border-color: #cdd9e3;
    border-radius: 9px;
    background: #eef3f7;
    font-size: 0.92rem;
  }

  .dashboard-workbench .patient-form:not(.is-editing) textarea {
    height: auto !important;
    min-height: 42px;
    overflow: visible;
  }

  .dashboard-workbench .patient-form.is-editing textarea {
    min-height: 88px;
  }
}

/* Premium hospital dashboard final pass. Desktop only to preserve the mobile flow. */
.dashboard-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-filter-chip {
  min-height: 34px;
  border: 1px solid #d7e2ea;
  border-radius: 999px;
  padding: 7px 12px;
  color: #526174;
  background: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease,
    background 160ms ease;
}

.dashboard-filter-chip:hover,
.dashboard-filter-chip:focus-visible {
  border-color: rgba(2, 155, 169, 0.45);
  color: #007C88;
  box-shadow: 0 0 0 3px rgba(2, 155, 169, 0.12);
  outline: 0;
}

.dashboard-filter-chip--active {
  border-color: rgba(2, 155, 169, 0.34);
  color: #007C88;
  background: #EAF7F8;
}

@media (min-width: 721px) {
  .dashboard-shell.dashboard-shell--saas {
    --clinical-green: #029BA9;
    --clinical-green-deep: #0C4D75;
    --clinical-ink: #172132;
    --clinical-muted: #66758a;
    --clinical-border: #d8e2eb;
    grid-template-columns: 292px minmax(0, 1fr);
    min-height: 100vh;
    background: #F7FBFC;
    color: var(--clinical-ink);
  }

  .dashboard-shell--saas .dashboard-sidebar {
    position: sticky;
    top: 0;
    width: 292px;
    height: 100vh;
    border: 0;
    border-radius: 0;
    padding: 24px 20px;
    overflow-y: auto;
    background:
      radial-gradient(circle at 12% 6%, rgba(2, 155, 169, 0.28), transparent 26%),
      radial-gradient(circle at 88% 86%, rgba(2, 155, 169, 0.18), transparent 30%),
      linear-gradient(165deg, #021c18 0%, #06382f 52%, #01120f 100%);
    box-shadow: 18px 0 42px rgba(2, 23, 20, 0.18);
  }

  .dashboard-shell--saas .dashboard-sidebar::before {
    opacity: 0.26;
  }

  .dashboard-shell--saas .dashboard-sidebar__brand {
    min-height: auto;
    justify-content: flex-start;
    padding: 0 4px 18px;
  }

  .dashboard-shell--saas .dashboard-sidebar__brand img {
    width: 214px;
    max-height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.28));
  }

  .dashboard-shell--saas .dashboard-nav {
    gap: 8px;
  }

  .dashboard-shell--saas .dashboard-nav__link {
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 11px 14px;
    color: rgba(243, 255, 248, 0.86);
    letter-spacing: -0.01em;
    background: transparent;
  }

  .dashboard-shell--saas .dashboard-nav__link:hover,
  .dashboard-shell--saas .dashboard-nav__link:focus-visible {
    border-color: rgba(126, 240, 173, 0.18);
    color: #fff;
    background: rgba(255, 255, 255, 0.075);
  }

  .dashboard-shell--saas .dashboard-nav__link--active {
    border-color: rgba(126, 240, 173, 0.34);
    color: #fff;
    background: linear-gradient(135deg, rgba(2, 155, 169, 0.34), rgba(17, 117, 81, 0.42));
    box-shadow: inset 0 0 0 1px rgba(126, 240, 173, 0.16), 0 14px 26px rgba(0, 0, 0, 0.16);
  }

  .dashboard-shell--saas .dashboard-nav__icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 0.64rem;
  }

  .dashboard-shell--saas .dashboard-sidebar__profile,
  .dashboard-shell--saas .dashboard-sidebar__context,
  .dashboard-shell--saas .dashboard-sidebar__footer {
    border: 1px solid rgba(126, 240, 173, 0.18);
    border-radius: 16px;
    background: rgba(2, 44, 36, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  }

  .dashboard-shell--saas .dashboard-main {
    min-width: 0;
    padding: 0 30px 38px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 249, 0.78) 260px),
      #F7FBFC;
  }

  .dashboard-shell--saas .dashboard-topbar {
    min-height: 96px;
    margin: 0 -30px 24px;
    padding: 22px 32px;
    border-bottom: 1px solid #e1e8ef;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  }

  .dashboard-shell--saas .dashboard-topbar h1 {
    margin-bottom: 4px;
    font-size: clamp(1.18rem, 1.45vw, 1.55rem);
    font-weight: 760;
    letter-spacing: -0.025em;
  }

  .dashboard-shell--saas .dashboard-topbar p {
    color: var(--clinical-muted);
    font-size: 0.96rem;
  }

  .dashboard-shell--saas .dashboard-topbar__actions {
    gap: 14px;
  }

  .dashboard-shell--saas .dashboard-bell,
  .dashboard-shell--saas .dashboard-avatar {
    border-color: #d8e5ee;
    background: #fff;
  }

  .dashboard-shell--saas .dashboard-avatar {
    color: #fff;
    background: linear-gradient(135deg, #0b8b57, #007C88);
  }

  .dashboard-shell--saas .dashboard-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
  }

  .dashboard-shell--saas .dashboard-metric-card {
    min-height: 118px;
    border: 1px solid var(--clinical-border);
    border-radius: 18px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.055);
  }

  .dashboard-shell--saas .dashboard-metric-card__icon {
    color: var(--flux-teal-action);
    background: var(--flux-aqua-light);
  }

  .dashboard-shell--saas .dashboard-metric-card span {
    color: #536277;
    font-weight: 650;
  }

  .dashboard-shell--saas .dashboard-metric-card strong {
    color: #111827;
    font-size: 1.92rem;
    font-weight: 760;
    letter-spacing: -0.03em;
  }

  .dashboard-shell--saas .dashboard-metric-card small {
    color: #64748b;
  }

  .dashboard-shell--saas .dashboard-clinical-grid {
    grid-template-columns: minmax(360px, 0.78fr) minmax(0, 1.7fr);
    gap: 22px;
    align-items: start;
  }

  .dashboard-shell--saas .dashboard-roster,
  .dashboard-shell--saas .dashboard-workbench.panel {
    border: 1px solid var(--clinical-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.055);
  }

  .dashboard-shell--saas .dashboard-roster {
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 144px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .dashboard-shell--saas .dashboard-roster__header {
    gap: 14px;
    padding: 22px;
    border-bottom: 1px solid #e4ebf1;
  }

  .dashboard-shell--saas .dashboard-roster__header h2 {
    font-size: 1.14rem;
    font-weight: 760;
    letter-spacing: -0.02em;
  }

  .dashboard-shell--saas .dashboard-roster__filters {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dashboard-shell--saas .dashboard-roster__filters select {
    display: none;
  }

  .dashboard-shell--saas .dashboard-roster__filters input {
    min-height: 42px;
    border-color: #d7e2ea;
    border-radius: 10px;
    background: #fff;
    font-size: 0.9rem;
  }

  .dashboard-shell--saas .dashboard-roster__list {
    overflow-y: auto;
  }

  .dashboard-shell--saas .dashboard-roster__item {
    min-height: 84px;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 14px;
    padding: 15px 18px;
    border-bottom: 1px solid #edf2f6;
    border-radius: 0;
    background: #fff;
  }

  .dashboard-shell--saas .dashboard-roster__item:hover {
    background: #f8fbfa;
  }

  .dashboard-shell--saas .dashboard-roster__item--selected {
    background: linear-gradient(90deg, var(--flux-aqua-light), #fff);
    box-shadow: inset 3px 0 0 var(--clinical-green);
  }

  .dashboard-shell--saas .dashboard-roster__bed {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    color: var(--flux-teal-action);
    background: var(--flux-aqua-light);
    font-size: 0.94rem;
    font-weight: 760;
  }

  .dashboard-shell--saas .dashboard-roster__copy {
    min-width: 0;
  }

  .dashboard-shell--saas .dashboard-roster__copy strong {
    display: block;
    color: #172132;
    font-size: 0.96rem;
    font-weight: 760;
    line-height: 1.2;
  }

  .dashboard-shell--saas .dashboard-roster__copy small,
  .dashboard-shell--saas .dashboard-roster__copy em {
    display: block;
    margin-top: 4px;
    color: #65758a;
    font-size: 0.78rem;
    font-style: normal;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-shell--saas .dashboard-roster__status {
    min-width: 74px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.72rem;
    font-weight: 720;
    text-align: center;
  }

  .dashboard-shell--saas .dashboard-roster__load {
    margin: 16px 18px 18px;
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    color: #526174;
    background: #f3f6f8;
    font-weight: 700;
  }

  .dashboard-shell--saas .dashboard-workbench.panel {
    padding: 24px;
  }

  .dashboard-shell--saas .dashboard-controls {
    grid-template-columns: minmax(270px, 0.8fr) minmax(320px, 0.75fr);
    align-items: end;
    gap: 22px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e1e8ef;
  }

  .dashboard-shell--saas .dashboard-controls__copy .eyebrow,
  .dashboard-shell--saas .hero .eyebrow {
    color: #118452;
    font-size: 0.84rem;
    letter-spacing: 0.035em;
    text-transform: none;
  }

  .dashboard-shell--saas .dashboard-controls__copy h2 {
    margin-top: 6px;
    font-size: clamp(1.42rem, 2vw, 1.9rem);
    font-weight: 760;
    letter-spacing: -0.035em;
  }

  .dashboard-shell--saas .dashboard-controls__actions {
    justify-self: stretch;
  }

  .dashboard-shell--saas #patient-search {
    min-height: 48px;
    border: 1px solid #b9c8d5;
    border-radius: 12px;
    background: #fff;
    color: #172132;
    font-size: 0.96rem;
    box-shadow: none;
  }

  .dashboard-shell--saas .composer-panel {
    border: 1px dashed rgba(2, 155, 169, 0.34);
    border-radius: 14px;
    margin-bottom: 18px;
  }

  .dashboard-shell--saas .patient-table {
    border: 1px solid var(--clinical-border);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
  }

  .dashboard-shell--saas .patient-table__head {
    grid-template-columns: 110px minmax(260px, 1fr) minmax(220px, 0.95fr) 220px;
    padding: 14px 20px;
    color: #64748b;
    background: #f8fafc;
    font-size: 0.86rem;
    font-weight: 740;
    letter-spacing: 0.01em;
  }

  .dashboard-shell--saas .patient-card {
    border: 0;
    border-top: 1px solid #e4ebf1;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .dashboard-shell--saas .patient-card:first-child {
    border-top: 0;
  }

  .dashboard-shell--saas .patient-card[open] {
    background: linear-gradient(180deg, #fff, #fbfdfc 52%, #fff);
  }

  .dashboard-shell--saas .patient-card__summary {
    min-height: 96px;
  }

  .dashboard-shell--saas .patient-card__summary-main {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 20px;
    padding: 20px;
    align-items: center;
  }

  .dashboard-shell--saas .patient-card__identity {
    grid-template-columns: 110px minmax(260px, 1fr) minmax(220px, 0.95fr);
    gap: 18px;
    align-items: center;
  }

  .dashboard-shell--saas .patient-card__identity .eyebrow {
    justify-self: start;
    width: 64px;
    color: #11985d;
    font-size: 0.92rem;
    font-weight: 760;
  }

  .dashboard-shell--saas .patient-card__title-row h3 {
    color: #172132;
    font-size: clamp(0.98rem, 1.05vw, 1.12rem);
    font-weight: 720;
    letter-spacing: -0.02em;
  }

  .dashboard-shell--saas .patient-diagnosis {
    color: #4b5a6d;
    font-size: 0.94rem;
    font-weight: 650;
  }

  .dashboard-shell--saas .patient-card__badges {
    width: 220px;
    max-width: 220px;
    gap: 7px;
  }

  .dashboard-shell--saas .severity,
  .dashboard-shell--saas .status-pill,
  .dashboard-shell--saas .patient-card__summary-isolation {
    min-height: 30px;
    border-width: 1px;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 720;
  }

  .dashboard-shell--saas .severity--critico {
    color: #9f1239;
    border-color: #fecdd3;
    background: #fff1f2;
  }

  .dashboard-shell--saas .severity--aten-o,
  .dashboard-shell--saas .severity--atencao {
    color: #9a5b12;
    border-color: #fed7aa;
    background: #fff7ed;
  }

  .dashboard-shell--saas .severity--estavel {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #eff6ff;
  }

  .dashboard-shell--saas .status-pill--discharge {
    color: #176b46;
    border-color: #bcebd0;
    background: #eefaf4;
  }

  .dashboard-shell--saas .patient-card__summary-isolation--kcp,
  .dashboard-shell--saas .patient-card__summary-isolation--ndm,
  .dashboard-shell--saas .patient-card__summary-isolation--tb,
  .dashboard-shell--saas .patient-card__summary-isolation--default {
    color: #5b21b6;
    border-color: #ddd6fe;
    background: #f5f3ff;
  }

  .dashboard-shell--saas .patient-card__summary-isolation--acineto {
    color: #3730a3;
    border-color: #c7d2fe;
    background: #eef2ff;
  }

  .dashboard-shell--saas .patient-card__body {
    padding: 20px 20px 24px;
  }

  .dashboard-shell--saas .patient-card__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 22px;
  }

  .dashboard-shell--saas .patient-card__action-duti {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    min-height: 38px;
    min-width: 134px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #fff;
  }

  .dashboard-shell--saas .patient-card__action-duti span,
  .dashboard-shell--saas .patient-card__action-duti strong {
    font-size: 0.86rem;
    line-height: 1;
  }

  .dashboard-shell--saas .patient-card__action-duti span::after {
    content: ":";
  }

  .dashboard-shell--saas .patient-card__actions .button {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 720;
  }

  .dashboard-shell--saas .patient-form .form-grid,
  .dashboard-shell--saas .patient-form .form-grid--single {
    gap: 14px 18px;
  }

  .dashboard-shell--saas .patient-form .form-field span,
  .dashboard-shell--saas .patient-form .checkbox-field span {
    color: #172132;
    font-size: 0.86rem;
    font-weight: 720;
  }

  .dashboard-shell--saas .patient-form input,
  .dashboard-shell--saas .patient-form select,
  .dashboard-shell--saas .patient-form textarea {
    min-height: 42px;
    border: 1px solid #cfdbe6;
    border-radius: 10px;
    background: #eef3f7;
    color: #27364a;
    font-size: 0.94rem;
    line-height: 1.42;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  }

  .dashboard-shell--saas .patient-form:not(.is-editing) textarea {
    overflow: hidden;
  }

  .dashboard-shell--saas .patient-form.is-editing textarea {
    min-height: 96px;
    background: #fff;
  }

  .dashboard-shell--saas .patient-form.is-editing input,
  .dashboard-shell--saas .patient-form.is-editing select {
    background: #fff;
  }

  .dashboard-shell--saas .patient-card__meta {
    margin-top: 18px;
    color: #64748b;
    font-size: 0.84rem;
  }

  .dashboard-shell--saas .empty-state--patients {
    min-height: 260px;
    border: 1px dashed rgba(2, 155, 169, 0.34);
    background: #fbfefc;
  }

  .dashboard-shell--patients-page .dashboard-metrics--patients {
    margin-bottom: 24px;
  }

  .dashboard-shell--patients-page .dashboard-workbench--full {
    max-width: 1480px;
    margin: 0 auto;
  }

  .dashboard-shell--patients-page .patient-table {
    margin-top: 18px;
  }
}

.dashboard-patients-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
}

@media (max-width: 720px) {
  .dashboard-patients-actions {
    justify-content: center;
    margin-top: 10px;
  }

  .dashboard-shell--patients-page .dashboard-workbench--full {
    padding-inline: 16px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 8mm;
  }

  html,
  body {
    width: 297mm;
    min-width: 297mm;
    height: 210mm;
  }

  body {
    background: white;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body::before,
  .background-orbit,
  .site-header,
  .flash,
  .no-print,
  .patient-summary-modal {
    display: none !important;
  }

  .page-shell {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .panel,
  .print-panel {
    border: 0;
    box-shadow: none;
    background: white;
    padding: 0;
  }

  .print-panel {
    padding-bottom: 12mm;
  }

  .print-note {
    margin-bottom: 10px;
    font-size: 9pt;
  }

  .print-brand-block {
    gap: 8px;
  }

  .print-brand-logo {
    width: 46mm;
  }

  .print-table-wrap {
    overflow: visible;
  }

  .print-table {
    width: 100%;
  }

  .print-table th,
  .print-table td {
    padding: 6px 5px;
    font-size: 7.4pt;
    border-color: rgba(0, 0, 0, 0.16);
  }

  .print-full-row {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 4px;
  }

  .print-panel--complete {
    padding-bottom: 0;
  }

  .print-complete-pages {
    gap: 0;
  }

  .print-complete-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    gap: 4mm;
    width: 100%;
    height: 190mm;
    padding: 0 0 8mm;
    border: 0;
    border-radius: 0;
    page-break-after: always;
    break-after: page;
  }

  .print-complete-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .print-complete-card {
    min-height: 0;
    height: 100%;
    padding: 3mm;
    border-color: rgba(0, 0, 0, 0.42);
    border-radius: 2mm;
    break-inside: avoid;
  }

  .print-complete-card--empty {
    visibility: hidden;
  }

  .print-complete-card__header {
    gap: 2.5mm;
    padding-bottom: 2mm;
  }

  .print-complete-card__context {
    font-size: 5.8pt;
    margin-bottom: 1mm;
  }

  .print-complete-card h2 {
    font-size: 10pt;
  }

  .print-complete-card__header p {
    font-size: 7.4pt;
  }

  .print-complete-card__bed {
    font-size: 7.5pt;
  }

  .print-complete-badge {
    min-width: 16mm;
    padding: 1mm 1.8mm;
    font-size: 5.8pt;
  }

  .print-complete-card__meta {
    gap: 2mm;
  }

  .print-complete-card__meta span {
    padding: 1.4mm 1.8mm;
    border-radius: 1.5mm;
    font-size: 6.6pt;
  }

  .print-complete-card__meta strong {
    font-size: 5.2pt;
  }

  .print-complete-grid {
    column-gap: 1.6mm;
  }

  .print-complete-field {
    margin-bottom: 1.4mm;
    padding: 1.25mm 1.5mm;
    border-radius: 1.5mm;
  }

  .print-complete-field strong {
    font-size: 5.1pt;
  }

  .print-complete-text {
    font-size: 6.1pt;
    line-height: 1.16;
  }

  .print-footer {
    position: fixed;
    right: 0;
    bottom: 4mm;
    justify-content: flex-end;
    width: 100%;
    padding-right: 8mm;
    margin-top: 0;
    font-size: 6.8pt;
  }
}

/* Final production stabilization for the Flask dashboard served on Render.
   Keep this block at the end so it wins over older iterative dashboard rules. */
@media screen and (min-width: 721px) {
  html,
  body {
    overflow-x: hidden;
  }

  .dashboard-page-shell {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
  }

  .dashboard-page-shell > .site-header,
  .dashboard-page-shell > main > .flash:not(.flash--toast),
  .dashboard-hero--mobile,
  .dashboard-mobile-compose,
  .dashboard-mobile-update {
    display: none !important;
  }

  .dashboard-page-shell > main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .dashboard-shell.dashboard-shell--saas {
    --clinical-green: #029BA9;
    --clinical-green-dark: #029BA9;
    --clinical-sidebar: #002d28;
    --clinical-sidebar-2: #003b2f;
    --clinical-ink: #172132;
    --clinical-muted: #65758a;
    --clinical-border: #d7e3ec;
    display: grid !important;
    grid-template-columns: 360px minmax(0, 1fr) !important;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    color: var(--clinical-ink);
    background: #F7FBFC;
  }

  .dashboard-shell--saas .dashboard-sidebar {
    position: sticky;
    top: 0;
    display: flex !important;
    flex-direction: column;
    width: auto !important;
    height: 100vh;
    min-height: 100vh;
    padding: 34px 28px 28px;
    gap: 18px;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    color: #f4fff8;
    background:
      radial-gradient(circle at 18% 8%, rgba(37, 217, 130, 0.26), transparent 27%),
      radial-gradient(circle at 72% 47%, rgba(37, 217, 130, 0.16), transparent 30%),
      linear-gradient(160deg, #001b18 0%, var(--clinical-sidebar) 48%, #00110f 100%);
    box-shadow: inset -1px 0 0 rgba(126, 240, 173, 0.12), 18px 0 46px rgba(1, 20, 17, 0.18);
  }

  .dashboard-shell--saas .dashboard-sidebar::before {
    opacity: 0.22;
  }

  .dashboard-shell--saas .dashboard-sidebar__brand {
    display: flex;
    justify-content: flex-start;
    min-height: auto;
    padding: 2px 4px 22px;
  }

  .dashboard-shell--saas .dashboard-sidebar__brand img {
    width: 230px;
    max-height: 84px;
    object-fit: contain;
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.32));
  }

  .dashboard-shell--saas .dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 9px;
  }

  .dashboard-shell--saas .dashboard-nav__link {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 54px;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: rgba(244, 255, 248, 0.86);
    background: transparent;
    font-size: 0.98rem;
    font-weight: 760;
    letter-spacing: -0.02em;
    text-decoration: none;
    box-shadow: none;
  }

  .dashboard-shell--saas .dashboard-nav__link:hover,
  .dashboard-shell--saas .dashboard-nav__link:focus-visible {
    color: #fff;
    border-color: rgba(126, 240, 173, 0.2);
    background: rgba(255, 255, 255, 0.08);
  }

  .dashboard-shell--saas .dashboard-nav__link--active {
    color: #fff;
    border-color: rgba(37, 217, 130, 0.66);
    background:
      linear-gradient(135deg, rgba(37, 217, 130, 0.32), rgba(9, 128, 79, 0.46));
    box-shadow:
      inset 0 0 0 1px rgba(164, 255, 202, 0.14),
      0 14px 30px rgba(0, 0, 0, 0.18),
      0 0 26px rgba(37, 217, 130, 0.18);
  }

  .dashboard-shell--saas .dashboard-nav__icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #dfffee;
    border: 1px solid rgba(126, 240, 173, 0.18);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.66rem;
    font-weight: 800;
  }

  .dashboard-shell--saas .dashboard-nav__link--active .dashboard-nav__icon {
    color: #063b2c;
    background: #8dffc1;
    border-color: rgba(141, 255, 193, 0.78);
  }

  .dashboard-shell--saas .dashboard-nav__group {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(126, 240, 173, 0.13);
  }

  .dashboard-shell--saas .dashboard-nav__section-label {
    padding: 0 16px;
    color: rgba(213, 255, 229, 0.58);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .dashboard-shell--saas .dashboard-sidebar__profile,
  .dashboard-shell--saas .dashboard-sidebar__context,
  .dashboard-shell--saas .dashboard-sidebar__footer {
    border: 1px solid rgba(126, 240, 173, 0.18);
    border-radius: 16px;
    background: rgba(3, 58, 47, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .dashboard-shell--saas .dashboard-sidebar__profile {
    margin-top: auto;
    padding: 16px;
  }

  .dashboard-shell--saas .dashboard-sidebar__context {
    padding: 18px;
  }

  .dashboard-shell--saas .dashboard-sidebar__footer {
    padding: 10px;
  }

  .dashboard-shell--saas .dashboard-sidebar__footer .dashboard-nav__link {
    justify-content: flex-start;
    min-height: 48px;
  }

  .dashboard-shell--saas .dashboard-main {
    min-width: 0;
    overflow: hidden;
    padding: 0 34px 36px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 249, 0.92) 300px),
      #F7FBFC;
  }

  .dashboard-shell--saas .dashboard-topbar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 108px;
    margin: 0 -34px 28px;
    padding: 26px 42px;
    border-bottom: 1px solid #dfe8ef;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  }

  .dashboard-shell--saas .dashboard-topbar h1 {
    margin: 0 0 6px;
    color: #101828;
    font-size: clamp(1.45rem, 1.8vw, 2rem);
    font-weight: 760;
    letter-spacing: -0.035em;
    line-height: 1.06;
  }

  .dashboard-shell--saas .dashboard-topbar p,
  .dashboard-shell--saas .dashboard-topbar__user span {
    color: var(--clinical-muted);
    font-size: 0.98rem;
  }

  .dashboard-shell--saas .dashboard-topbar__actions {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .dashboard-shell--saas .dashboard-bell {
    width: 50px;
    height: 50px;
    border: 1px solid #d7e3ec;
    border-radius: 50%;
    color: #59677a;
    background: #fff;
    font-weight: 800;
  }

  .dashboard-shell--saas .dashboard-avatar {
    width: 52px;
    height: 52px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #0C4D75, #029BA9);
    font-weight: 800;
  }

  .dashboard-shell--saas .dashboard-topbar__user strong {
    color: #101828;
    font-size: 1rem;
    font-weight: 760;
  }

  .dashboard-shell--saas .dashboard-metrics {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin: 0 0 28px;
  }

  .dashboard-shell--saas .dashboard-metric-card {
    min-height: 134px;
    border: 1px solid var(--clinical-border);
    border-radius: 16px;
    padding: 22px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(16, 24, 40, 0.06);
  }

  .dashboard-shell--saas .dashboard-metric-card strong {
    font-size: 2rem;
    line-height: 1;
  }

  .dashboard-shell--saas .dashboard-clinical-grid {
    display: grid !important;
    grid-template-columns: minmax(360px, 0.58fr) minmax(0, 1fr);
    gap: 26px;
    align-items: start;
    width: 100%;
    min-width: 0;
  }

  .dashboard-shell--saas .dashboard-roster,
  .dashboard-shell--saas .dashboard-workbench.panel {
    display: block !important;
    min-width: 0;
    border: 1px solid var(--clinical-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(16, 24, 40, 0.055);
  }

  .dashboard-shell--saas .dashboard-roster {
    position: sticky;
    top: 128px;
    max-height: calc(100vh - 154px);
    overflow: hidden;
  }

  .dashboard-shell--saas .dashboard-roster__header {
    padding: 22px;
  }

  .dashboard-shell--saas .dashboard-roster__list {
    max-height: calc(100vh - 370px);
    overflow-y: auto;
  }

  .dashboard-shell--saas .dashboard-workbench.panel {
    overflow: hidden;
    padding: 24px;
  }

  .dashboard-shell--saas .dashboard-controls {
    display: grid;
    grid-template-columns: minmax(260px, 0.78fr) minmax(320px, 0.72fr);
    gap: 24px;
    align-items: end;
    padding: 0 0 20px;
    margin: 0 0 20px;
    border-bottom: 1px solid #dfe8ef;
  }

  .dashboard-shell--saas .dashboard-controls__copy h2 {
    max-width: 100%;
    margin: 6px 0 0;
    font-size: clamp(1.55rem, 2.15vw, 2.2rem);
    line-height: 1.08;
  }

  .dashboard-shell--saas .dashboard-controls__actions {
    justify-self: stretch;
    width: 100%;
  }

  .dashboard-shell--saas #patient-search {
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    box-sizing: border-box;
    border: 1px solid #b9c8d5;
    border-radius: 12px;
    background: #fff;
    color: #172132;
    font-size: 0.98rem;
    box-shadow: none;
  }

  .dashboard-shell--saas .composer-panel {
    display: none;
  }

  .dashboard-shell--saas .patient-table {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--clinical-border);
    border-radius: 16px;
    background: #fff;
  }

  .dashboard-shell--saas .patient-table__head {
    display: grid;
    grid-template-columns: 92px minmax(210px, 1fr) minmax(180px, 0.78fr) minmax(150px, 220px);
    gap: 16px;
    align-items: center;
    padding: 14px 20px;
    color: #64748b;
    background: #f8fafc;
    font-size: 0.84rem;
    font-weight: 760;
  }

  .dashboard-shell--saas .patient-list,
  .dashboard-shell--saas .patient-card {
    min-width: 0;
  }

  .dashboard-shell--saas .patient-card {
    border: 0;
    border-top: 1px solid #dfe8ef;
    border-radius: 0;
    box-shadow: none;
  }

  .dashboard-shell--saas .patient-card:first-child {
    border-top: 0;
  }

  .dashboard-shell--saas .patient-card__summary-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
    gap: 18px;
    align-items: center;
    min-width: 0;
    padding: 20px;
  }

  .dashboard-shell--saas .patient-card__identity {
    display: grid;
    grid-template-columns: 92px minmax(210px, 1fr) minmax(180px, 0.78fr);
    gap: 16px;
    align-items: center;
    min-width: 0;
  }

  .dashboard-shell--saas .patient-card__identity .eyebrow {
    justify-self: start;
    width: auto;
    min-width: 58px;
    color: #118452;
    font-size: 0.9rem;
    font-weight: 760;
    text-align: left;
  }

  .dashboard-shell--saas .patient-card__title-row h3 {
    color: #172132;
    font-size: clamp(1rem, 1.05vw, 1.16rem);
    font-weight: 720;
    line-height: 1.16;
    letter-spacing: -0.02em;
  }

  .dashboard-shell--saas .patient-diagnosis {
    min-width: 0;
    color: #4b5a6d;
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .dashboard-shell--saas .patient-card__badges {
    justify-self: stretch;
    width: 100%;
    max-width: 220px;
    gap: 7px;
  }

  .dashboard-shell--saas .severity,
  .dashboard-shell--saas .status-pill,
  .dashboard-shell--saas .patient-card__summary-isolation {
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 720;
  }

  .dashboard-shell--saas .patient-card__body {
    padding: 20px 20px 26px;
  }

  .dashboard-shell--saas .patient-card__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
    margin: 20px 0 22px;
  }

  .dashboard-shell--saas .patient-card__action-duti {
    display: inline-flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    width: fit-content;
    margin-right: auto;
    min-width: 0;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 12px;
    background: #fff;
  }

  .dashboard-shell--saas .patient-card__actions .button {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 720;
  }

  .dashboard-shell--saas .patient-form input,
  .dashboard-shell--saas .patient-form select,
  .dashboard-shell--saas .patient-form textarea {
    min-height: 42px;
    border: 1px solid #cfdbe6;
    border-radius: 10px;
    background: #eef3f7;
    color: #27364a;
    font-size: 0.94rem;
    line-height: 1.42;
  }

  .dashboard-shell--saas .patient-form textarea {
    height: auto;
    min-height: 42px;
    overflow: visible;
  }

  .dashboard-shell--saas .patient-form.is-editing textarea {
    min-height: 96px;
    background: #fff;
  }

  .dashboard-shell--saas .dashboard-roster__status--discharge,
  .dashboard-shell--saas .status-pill--discharge {
    color: #176b46;
    border-color: #bcebd0;
    background: #eefaf4;
  }

  .dashboard-shell--saas .dashboard-roster__status--kcp,
  .dashboard-shell--saas .dashboard-roster__status--ndm,
  .dashboard-shell--saas .dashboard-roster__status--acineto,
  .dashboard-shell--saas .dashboard-roster__status--tb,
  .dashboard-shell--saas .patient-card__summary-isolation--kcp,
  .dashboard-shell--saas .patient-card__summary-isolation--ndm,
  .dashboard-shell--saas .patient-card__summary-isolation--acineto,
  .dashboard-shell--saas .patient-card__summary-isolation--tb,
  .dashboard-shell--saas .patient-card__summary-isolation--default {
    color: #5b21b6;
    border-color: #ddd6fe;
    background: #f5f3ff;
  }

  .dashboard-shell--saas .dashboard-roster__status--critico,
  .dashboard-shell--saas .severity--critico {
    color: #9f1239;
    border-color: #fecdd3;
    background: #fff1f2;
  }

  .dashboard-shell--saas .dashboard-roster__status--estavel,
  .dashboard-shell--saas .severity--estavel {
    color: #1d4ed8;
    border-color: #bfdbfe;
    background: #eff6ff;
  }

  .dashboard-shell--saas .dashboard-roster__status--atencao,
  .dashboard-shell--saas .severity--atencao,
  .dashboard-shell--saas .dashboard-roster__status--aten-o,
  .dashboard-shell--saas .severity--aten-o {
    color: #9a5b12;
    border-color: #fed7aa;
    background: #fff7ed;
  }
}

@media screen and (min-width: 721px) and (max-width: 1320px) {
  .dashboard-shell.dashboard-shell--saas {
    grid-template-columns: 300px minmax(0, 1fr) !important;
  }

  .dashboard-shell--saas .dashboard-main {
    padding-inline: 24px;
  }

  .dashboard-shell--saas .dashboard-topbar {
    margin-inline: -24px;
    padding-inline: 28px;
  }

  .dashboard-shell--saas .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-shell--saas .dashboard-clinical-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-shell--saas .dashboard-roster {
    position: static;
    max-height: none;
  }

  .dashboard-shell--saas .dashboard-roster__list {
    max-height: none;
  }
}

/* Public FluxaCare landing page */
.page-shell--marketing-home {
  width: 100%;
  max-width: none;
  padding: 0 0 58px;
  position: relative;
}

.page-shell--marketing-home main {
  overflow: hidden;
}

.marketing-header-shell--home {
  position: absolute;
  z-index: 10;
  top: 30px;
  left: 50%;
  width: min(calc(100% - 64px), 1250px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
  margin: 0;
  transform: translateX(-50%);
}

.passadex-home-header__brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.passadex-home-header__logo {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  filter: brightness(1.16) saturate(1.28) drop-shadow(0 0 18px rgba(31, 214, 121, 0.36));
}

.passadex-home-header__nav,
.passadex-home-header__actions {
  display: flex;
  align-items: center;
}

.passadex-home-header__nav {
  justify-content: center;
  gap: 34px;
  min-width: 0;
}

.passadex-home-header__link {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-weight: 740;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.18s ease, transform 0.18s ease;
}

.passadex-home-header__link:hover,
.passadex-home-header__link:focus-visible {
  color: #32e58a;
  transform: translateY(-1px);
}

.passadex-home-header__actions {
  justify-content: flex-end;
  gap: 14px;
}

.passadex-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid rgba(49, 229, 138, 0.36);
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 820;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.passadex-home-button:hover,
.passadex-home-button:focus-visible {
  transform: translateY(-1px);
}

.passadex-home-button--primary {
  border-color: rgba(71, 255, 151, 0.82);
  background: linear-gradient(180deg, #29d677 0%, #078d4e 100%);
  box-shadow: 0 0 0 1px rgba(94, 255, 167, 0.18) inset, 0 14px 34px rgba(17, 185, 96, 0.34);
}

.passadex-home-button--primary:hover,
.passadex-home-button--primary:focus-visible {
  border-color: #8cffbd;
  box-shadow: 0 0 0 1px rgba(184, 255, 209, 0.26) inset, 0 18px 44px rgba(17, 185, 96, 0.46);
}

.passadex-home-button--ghost {
  background: rgba(2, 9, 11, 0.42);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.passadex-home-button--ghost:hover,
.passadex-home-button--ghost:focus-visible {
  border-color: rgba(119, 255, 178, 0.8);
  background: rgba(4, 44, 32, 0.66);
}

.passadex-home {
  min-height: 100vh;
  color: #071319;
  background: #f8fafb;
}

.passadex-home-hero {
  position: relative;
  min-height: 710px;
  padding: 128px 0 72px;
  color: #ffffff;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(13, 255, 121, 0.16) 0 1px, transparent 1px 42%),
    radial-gradient(circle at 72% 44%, rgba(31, 214, 121, 0.24), rgba(31, 214, 121, 0.04) 33%, transparent 58%),
    linear-gradient(132deg, #03130f 0%, #010608 45%, #03251a 100%);
}

.passadex-home-hero::before,
.passadex-home-hero::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.passadex-home-hero::before {
  top: 116px;
  right: 11%;
  width: 620px;
  height: 430px;
  border: 1px solid rgba(43, 255, 136, 0.18);
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-13deg);
}

.passadex-home-hero::after {
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 78%, transparent 100%);
}

.passadex-home-hero__glow {
  position: absolute;
  left: 38%;
  bottom: 60px;
  width: 42%;
  height: 220px;
  border-top: 1px solid rgba(50, 229, 138, 0.32);
  border-radius: 50%;
  transform: rotate(-11deg);
  pointer-events: none;
}

.passadex-home-hero__inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 72px), 1250px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(330px, 0.72fr) minmax(570px, 1.28fr);
  gap: 52px;
  align-items: center;
}

.passadex-home-hero__copy {
  display: grid;
  gap: 26px;
  align-content: center;
  max-width: 470px;
}

.passadex-home-hero__copy h1 {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 4.15rem;
  font-weight: 880;
  line-height: 0.98;
  letter-spacing: 0;
}

.passadex-home-hero__copy h1 span,
.passadex-home-section-heading h2 span,
.passadex-home-cta h2 span {
  color: #23d879;
}

.passadex-home-hero__copy p {
  max-width: 440px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.14rem;
  font-weight: 510;
  line-height: 1.58;
}

.passadex-home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

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

.passadex-home-trust span,
.passadex-home-cta__actions > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.28;
}

.passadex-mini-icon {
  position: relative;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border: 2px solid #28df82;
  border-radius: 8px;
  box-shadow: 0 0 16px rgba(40, 223, 130, 0.22);
}

.passadex-mini-icon::before,
.passadex-mini-icon::after {
  content: "";
  position: absolute;
  background: #28df82;
}

.passadex-mini-icon--shield {
  border-radius: 9px 9px 12px 12px;
}

.passadex-mini-icon--shield::before {
  left: 7px;
  top: 5px;
  width: 10px;
  height: 15px;
  border: 2px solid #28df82;
  border-top: 0;
  border-left: 0;
  background: transparent;
  transform: rotate(38deg);
}

.passadex-mini-icon--sync::before {
  inset: 5px;
  border: 2px solid #28df82;
  border-left-color: transparent;
  border-radius: 50%;
  background: transparent;
}

.passadex-mini-icon--team::before,
.passadex-mini-icon--team::after {
  border-radius: 50%;
}

.passadex-mini-icon--team::before {
  left: 6px;
  top: 6px;
  width: 6px;
  height: 6px;
}

.passadex-mini-icon--team::after {
  right: 6px;
  top: 6px;
  width: 6px;
  height: 6px;
}

.passadex-dashboard-preview {
  min-width: 0;
  transform: perspective(1100px) rotateY(-6deg) rotateX(1deg);
  transform-origin: center left;
}

.passadex-dashboard-preview__chrome {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  min-height: 520px;
  padding: 16px;
  border: 1px solid rgba(93, 255, 166, 0.86);
  border-radius: 28px;
  background: rgba(2, 22, 18, 0.88);
  box-shadow:
    0 0 0 1px rgba(87, 255, 165, 0.16) inset,
    0 0 30px rgba(45, 241, 128, 0.5),
    0 26px 90px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(14px);
}

.passadex-dashboard-preview__sidebar {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  min-width: 0;
  padding: 18px 12px 12px;
  border-right: 1px solid rgba(97, 255, 167, 0.16);
}

.passadex-dashboard-preview__brand,
.passadex-dashboard-preview__profile {
  display: flex;
  align-items: center;
  min-width: 0;
}

.passadex-dashboard-preview__brand {
  gap: 8px;
  color: #48f392;
  font-size: 0.86rem;
  font-weight: 880;
}

.passadex-dashboard-preview__brand-mark {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.passadex-dashboard-preview__brand-mark::before,
.passadex-dashboard-preview__brand-mark::after {
  content: "";
  position: absolute;
  border-radius: 6px;
  background: linear-gradient(135deg, #54f78e, #079b52);
}

.passadex-dashboard-preview__brand-mark::before {
  inset: 3px 9px;
}

.passadex-dashboard-preview__brand-mark::after {
  inset: 9px 3px;
}

.passadex-dashboard-preview__sidebar nav {
  display: grid;
  gap: 6px;
}

.passadex-dashboard-preview__sidebar nav span {
  display: flex;
  min-height: 29px;
  align-items: center;
  padding: 0 10px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.68rem;
  font-weight: 760;
}

.passadex-dashboard-preview__sidebar nav span.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(39, 220, 116, 0.72), rgba(39, 220, 116, 0.14));
  box-shadow: 0 0 18px rgba(39, 220, 116, 0.3);
}

.passadex-dashboard-preview__profile {
  gap: 9px;
  align-self: end;
  padding: 10px;
  border: 1px solid rgba(124, 255, 184, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.passadex-dashboard-preview__avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 33%, #f4c6a0 0 18%, transparent 19%),
    radial-gradient(circle at 50% 88%, #ffffff 0 28%, transparent 29%),
    linear-gradient(135deg, #c8ecff, #eff8ff);
}

.passadex-dashboard-preview__profile div,
.passadex-dashboard-preview__unit {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.passadex-dashboard-preview__profile strong,
.passadex-dashboard-preview__unit strong {
  color: #ffffff;
  font-size: 0.66rem;
  line-height: 1.25;
}

.passadex-dashboard-preview__profile small,
.passadex-dashboard-preview__unit span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.6rem;
  line-height: 1.25;
}

.passadex-dashboard-preview__unit {
  padding: 11px;
  border: 1px solid rgba(124, 255, 184, 0.13);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.passadex-dashboard-preview__main {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 20px 0 0 18px;
}

.passadex-dashboard-preview__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.passadex-dashboard-preview__topbar h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 840;
}

.passadex-dashboard-preview__topbar div {
  display: inline-flex;
  gap: 10px;
}

.passadex-dashboard-preview__topbar div span {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(134, 255, 190, 0.66);
  border-radius: 999px;
}

.passadex-preview-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.passadex-preview-kpis article {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 82px;
  padding: 13px;
  border: 1px solid rgba(108, 255, 174, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.passadex-preview-kpis span,
.passadex-preview-kpis small,
.passadex-preview-filters span,
.passadex-preview-table,
.passadex-dashboard-preview__footer {
  color: rgba(255, 255, 255, 0.66);
}

.passadex-preview-kpis span {
  font-size: 0.62rem;
  font-weight: 760;
}

.passadex-preview-kpis strong {
  color: #ffffff;
  font-size: 1.38rem;
  line-height: 1;
}

.passadex-preview-kpis small {
  font-size: 0.57rem;
}

.passadex-preview-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.passadex-preview-filters span,
.passadex-preview-filters button {
  min-height: 38px;
  border: 1px solid rgba(108, 255, 174, 0.2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
}

.passadex-preview-filters span {
  display: flex;
  align-items: center;
  padding: 0 13px;
  font-size: 0.66rem;
}

.passadex-preview-filters button {
  padding: 0 18px;
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 820;
  box-shadow: 0 0 16px rgba(37, 224, 123, 0.22);
}

.passadex-preview-table {
  overflow: hidden;
  border: 1px solid rgba(108, 255, 174, 0.15);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
  font-size: 0.64rem;
  line-height: 1.25;
}

.passadex-preview-table__head,
.passadex-preview-table__row {
  display: grid;
  grid-template-columns: 0.48fr 1.15fr 0.76fr 1.42fr 0.9fr 0.72fr 0.88fr;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.passadex-preview-table__head {
  padding: 10px 10px;
  color: rgba(255, 255, 255, 0.56);
  font-weight: 820;
  background: rgba(255, 255, 255, 0.035);
}

.passadex-preview-table__row {
  min-height: 45px;
  padding: 0 10px;
  border-top: 1px solid rgba(108, 255, 174, 0.09);
  color: rgba(255, 255, 255, 0.82);
}

.passadex-preview-table__row strong {
  color: #35e689;
  font-size: 0.8rem;
}

.passadex-preview-table__row span,
.passadex-preview-table__head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.passadex-preview-table__row em {
  justify-self: start;
  min-width: 54px;
  padding: 4px 8px;
  border-radius: 6px;
  font-style: normal;
  font-weight: 820;
  text-align: center;
}

.passadex-preview-table__row .is-high {
  color: #ffb8b8;
  background: rgba(239, 68, 68, 0.2);
}

.passadex-preview-table__row .is-medium {
  color: #ffd494;
  background: rgba(245, 158, 11, 0.18);
}

.passadex-preview-table__row .is-low {
  color: #9dffbf;
  background: rgba(34, 197, 94, 0.18);
}

.passadex-dashboard-preview__footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  font-size: 0.65rem;
}

.passadex-dashboard-preview__footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: 190px;
  padding: 0 18px;
  border: 1px solid rgba(113, 255, 177, 0.38);
  border-radius: 8px;
  color: #ffffff;
  font-weight: 820;
  text-decoration: none;
}

.passadex-home-feature-grid,
.passadex-home-process,
.passadex-home-cta {
  width: min(calc(100% - 72px), 1160px);
  margin-left: auto;
  margin-right: auto;
}

.passadex-home-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-top: 42px;
}

.passadex-home-card,
.passadex-home-process__steps article {
  border: 1px solid #e4ebef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.055);
}

.passadex-home-card {
  display: grid;
  gap: 16px;
  min-height: 246px;
  padding: 30px 28px;
}

.passadex-home-card h2,
.passadex-home-process__steps h3,
.passadex-home-section-heading h2,
.passadex-home-cta h2 {
  margin: 0;
  color: #061318;
  font-family: var(--font-sans);
  letter-spacing: 0;
}

.passadex-home-card h2 {
  font-size: 1.32rem;
  font-weight: 850;
  line-height: 1.15;
}

.passadex-home-card p,
.passadex-home-process__steps p,
.passadex-home-section-heading p,
.passadex-home-cta p {
  margin: 0;
  color: #50606f;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.62;
}

.passadex-home-card__icon {
  position: relative;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(0, 133, 75, 0.42);
  border-radius: 10px;
  background: linear-gradient(180deg, #effbf4, #ffffff);
  box-shadow: 0 10px 24px rgba(0, 133, 75, 0.12);
}

.passadex-home-card__icon::before,
.passadex-home-card__icon::after {
  content: "";
  position: absolute;
  background: #078d4e;
}

.passadex-home-card__icon--monitor::before {
  left: 12px;
  right: 12px;
  top: 14px;
  height: 20px;
  border: 2px solid #078d4e;
  border-radius: 4px;
  background: transparent;
}

.passadex-home-card__icon--monitor::after {
  left: 20px;
  bottom: 12px;
  width: 18px;
  height: 3px;
  border-radius: 999px;
}

.passadex-home-card__icon--list::before {
  left: 17px;
  top: 15px;
  width: 24px;
  height: 3px;
  box-shadow: 0 10px 0 #078d4e, 0 20px 0 #078d4e;
}

.passadex-home-card__icon--list::after {
  left: 9px;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  box-shadow: 0 10px 0 #078d4e, 0 20px 0 #078d4e;
}

.passadex-home-card__icon--lock::before {
  left: 17px;
  top: 23px;
  width: 24px;
  height: 20px;
  border-radius: 5px;
}

.passadex-home-card__icon--lock::after {
  left: 21px;
  top: 12px;
  width: 16px;
  height: 18px;
  border: 4px solid #078d4e;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: transparent;
}

.passadex-home-card__icon--user::before {
  left: 19px;
  top: 11px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: transparent;
  border: 3px solid #078d4e;
}

.passadex-home-card__icon--user::after {
  left: 13px;
  bottom: 10px;
  width: 32px;
  height: 18px;
  border: 3px solid #078d4e;
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: transparent;
}

.passadex-home-card__icon--server::before {
  left: 10px;
  top: 12px;
  width: 38px;
  height: 8px;
  border-radius: 3px;
  box-shadow: 0 13px 0 #078d4e, 0 26px 0 #078d4e;
}

.passadex-home-card__icon--document::before {
  left: 16px;
  top: 10px;
  width: 26px;
  height: 36px;
  border: 3px solid #078d4e;
  border-radius: 4px;
  background: transparent;
}

.passadex-home-card__icon--document::after {
  left: 22px;
  top: 22px;
  width: 18px;
  height: 3px;
  box-shadow: 0 9px 0 #078d4e;
}

.passadex-home-card__icon--check::before {
  left: 16px;
  top: 24px;
  width: 26px;
  height: 14px;
  border: 4px solid #078d4e;
  border-top: 0;
  border-right: 0;
  background: transparent;
  transform: rotate(-45deg);
}

.passadex-home-process {
  display: grid;
  gap: 30px;
  margin-top: 52px;
}

.passadex-home-section-heading {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.passadex-home-section-heading h2 {
  font-size: 2.25rem;
  font-weight: 880;
  line-height: 1.08;
}

.passadex-home-section-heading p {
  font-size: 1.05rem;
}

.passadex-home-process__steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.passadex-home-process__steps article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  min-height: 156px;
  padding: 26px 28px;
}

.passadex-home-process__steps h3 {
  font-size: 1.18rem;
  font-weight: 850;
  line-height: 1.15;
}

.passadex-home-process__steps article div {
  display: grid;
  gap: 8px;
}

.passadex-home-process__arrow {
  color: #647380;
  font-size: 2.3rem;
  line-height: 1;
}

.passadex-home-cta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 34px;
  align-items: center;
  margin-top: 50px;
  padding: 34px 48px;
  border: 1px solid rgba(96, 255, 169, 0.24);
  border-radius: 12px;
  color: #ffffff;
  background:
    linear-gradient(120deg, rgba(20, 185, 103, 0.18), transparent 44%),
    linear-gradient(135deg, #05261d 0%, #03100d 52%, #06442d 100%);
  box-shadow: 0 24px 60px rgba(2, 22, 18, 0.22);
}

.passadex-home-cta__seal {
  width: 156px;
  height: 156px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(89, 255, 166, 0.78);
  border-radius: 46% 46% 50% 50%;
  background: linear-gradient(180deg, rgba(52, 237, 132, 0.18), rgba(52, 237, 132, 0.04));
  box-shadow: 0 0 34px rgba(52, 237, 132, 0.24), inset 0 0 18px rgba(52, 237, 132, 0.12);
}

.passadex-home-cta__seal span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(180deg, #4cf18f, #079b52);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.22);
}

.passadex-home-cta h2 {
  max-width: 620px;
  color: #ffffff;
  font-size: 2.55rem;
  font-weight: 890;
  line-height: 1.08;
}

.passadex-home-cta p {
  max-width: 620px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.08rem;
}

.passadex-home-cta__actions {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.passadex-home-footer {
  width: 100%;
  margin-top: 58px;
  padding: 48px max(36px, calc((100vw - 1160px) / 2)) 44px;
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(280px, 1fr) minmax(220px, 0.58fr);
  gap: 54px;
  align-items: start;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(2, 20, 18, 0.92), rgba(4, 38, 31, 0.94)),
    linear-gradient(135deg, #011711 0%, #05281f 100%);
  box-shadow: inset 0 1px 0 rgba(92, 255, 166, 0.16);
}

.passadex-home-footer a {
  color: inherit;
  text-decoration: none;
}

.passadex-home-footer__brand,
.passadex-home-footer__compliance,
.passadex-home-footer__links {
  min-width: 0;
}

.passadex-home-footer__brand {
  display: grid;
  gap: 18px;
}

.passadex-home-footer__logo-link {
  display: inline-flex;
  width: fit-content;
}

.passadex-home-footer__logo {
  display: block;
  width: 224px;
  max-width: 100%;
  height: auto;
  filter: brightness(1.14) saturate(1.24) drop-shadow(0 0 18px rgba(31, 214, 121, 0.32));
}

.passadex-home-footer__brand p,
.passadex-home-footer__compliance p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  font-weight: 520;
  line-height: 1.55;
}

.passadex-home-footer__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.passadex-home-footer__contact a,
.passadex-home-footer__badges span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(86, 255, 164, 0.22);
  border-radius: 999px;
  background: rgba(15, 185, 103, 0.09);
  color: #bfffd8;
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.2;
}

.passadex-home-footer__contact a {
  padding: 0 12px;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.passadex-home-footer__contact a:hover,
.passadex-home-footer__contact a:focus-visible {
  border-color: rgba(129, 255, 186, 0.56);
  background: rgba(15, 185, 103, 0.18);
  color: #ffffff;
}

.passadex-home-footer__copyright {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  font-weight: 620;
}

.passadex-home-footer__compliance {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.passadex-home-footer__eyebrow {
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.2;
}

.passadex-home-footer__compliance strong {
  color: #ffffff;
  font-size: 1.34rem;
  font-weight: 860;
  line-height: 1.18;
}

.passadex-home-footer__compliance strong span {
  color: #32e58a;
}

.passadex-home-footer__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.passadex-home-footer__badges span {
  padding: 0 13px;
}

.passadex-home-footer__links {
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

.passadex-home-footer__links strong {
  margin-bottom: 6px;
  color: #ffffff;
  font-size: 1.12rem;
  font-weight: 880;
  text-transform: uppercase;
}

.passadex-home-footer__links a {
  color: #32e58a;
  font-size: 0.92rem;
  font-weight: 720;
  line-height: 1.25;
  transition: color 0.18s ease, transform 0.18s ease;
}

.passadex-home-footer__links a:hover,
.passadex-home-footer__links a:focus-visible {
  color: #ffffff;
  transform: translateX(-2px);
}

@media (max-width: 1180px) {
  .marketing-header-shell--home {
    width: min(calc(100% - 42px), 960px);
    grid-template-columns: 1fr auto;
    gap: 18px;
  }

  .passadex-home-header__nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 22px;
  }

  .passadex-home-hero {
    padding-top: 158px;
  }

  .passadex-home-hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .passadex-home-hero__copy {
    max-width: 760px;
  }

  .passadex-dashboard-preview {
    transform: none;
  }

  .passadex-home-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .passadex-home-process__steps {
    grid-template-columns: 1fr;
  }

  .passadex-home-process__arrow {
    display: none;
  }

  .passadex-home-cta {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .passadex-home-cta__actions {
    grid-column: 2;
  }

  .passadex-home-footer {
    grid-template-columns: 1fr 1fr;
    gap: 34px;
    padding-inline: 28px;
  }

  .passadex-home-footer__links {
    grid-column: 1 / -1;
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 760px) {
  .page-shell--marketing-home {
    padding-bottom: 34px;
  }

  .marketing-header-shell--home {
    top: 18px;
    width: min(calc(100% - 28px), 520px);
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .passadex-home-header__brand {
    justify-content: center;
  }

  .passadex-home-header__logo {
    width: 190px;
  }

  .passadex-home-header__nav {
    justify-content: center;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .passadex-home-header__link {
    font-size: 0.9rem;
  }

  .passadex-home-header__actions {
    justify-content: center;
    gap: 10px;
  }

  .passadex-home-button {
    min-height: 44px;
    padding: 0 16px;
    font-size: 0.9rem;
  }

  .passadex-home-hero {
    min-height: 0;
    padding: 220px 0 44px;
  }

  .passadex-home-hero__inner,
  .passadex-home-feature-grid,
  .passadex-home-process,
  .passadex-home-cta {
    width: min(calc(100% - 28px), 520px);
  }

  .passadex-home-hero__copy {
    gap: 20px;
  }

  .passadex-home-hero__copy h1 {
    font-size: 2.62rem;
  }

  .passadex-home-hero__copy p {
    font-size: 1rem;
  }

  .passadex-home-trust {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .passadex-dashboard-preview__chrome {
    grid-template-columns: 1fr;
    padding: 12px;
    min-height: 0;
    border-radius: 20px;
  }

  .passadex-dashboard-preview__sidebar {
    display: none;
  }

  .passadex-dashboard-preview__main {
    padding: 10px 0 0;
  }

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

  .passadex-preview-table {
    overflow-x: auto;
  }

  .passadex-preview-table__head,
  .passadex-preview-table__row {
    min-width: 650px;
  }

  .passadex-dashboard-preview__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .passadex-dashboard-preview__footer a {
    min-width: 0;
  }

  .passadex-home-feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 28px;
  }

  .passadex-home-card {
    min-height: 0;
    padding: 24px;
  }

  .passadex-home-section-heading h2 {
    font-size: 1.82rem;
  }

  .passadex-home-process__steps article {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 24px;
  }

  .passadex-home-cta {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 24px;
  }

  .passadex-home-cta__seal {
    width: 112px;
    height: 112px;
  }

  .passadex-home-cta__seal span {
    width: 64px;
    height: 64px;
    font-size: 2.25rem;
  }

  .passadex-home-cta h2 {
    font-size: 2rem;
  }

  .passadex-home-cta__actions {
    grid-column: auto;
  }

  .passadex-home-footer {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 38px;
    padding: 36px 20px 34px;
  }

  .passadex-home-footer__logo {
    width: 190px;
  }

  .passadex-home-footer__compliance {
    justify-items: start;
    text-align: left;
  }

  .passadex-home-footer__badges {
    justify-content: flex-start;
  }

  .passadex-home-footer__links {
    grid-column: auto;
    justify-items: start;
    text-align: left;
  }
}

/* Account menu and personal account page */
.account-menu {
  position: relative;
  min-width: 0;
}

.account-menu > summary {
  list-style: none;
}

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

.account-menu__trigger {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.account-menu__trigger--topbar {
  gap: 12px;
  min-height: 60px;
  padding: 6px 8px 6px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #101828;
  background: transparent;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.account-menu__trigger--topbar:hover,
.account-menu[open] .account-menu__trigger--topbar {
  border-color: #dbe7ef;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.account-menu__trigger--sidebar {
  width: 100%;
  justify-content: flex-start;
  color: inherit;
}

.account-menu--sidebar {
  margin-top: auto;
}

.dashboard-shell--saas .account-menu--sidebar .dashboard-sidebar__profile {
  margin-top: 0;
}

.account-menu__identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-menu__identity strong,
.account-menu__identity span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu__trigger--topbar .account-menu__identity {
  justify-items: end;
  text-align: right;
}

.account-menu__trigger--topbar .account-menu__identity strong {
  max-width: 260px;
  color: #101828;
  font-size: 0.96rem;
  font-weight: 780;
}

.account-menu__trigger--topbar .account-menu__identity span {
  color: #64748b;
  font-size: 0.84rem;
}

.account-menu__trigger--sidebar .account-menu__identity strong {
  color: #fff;
  font-size: 0.98rem;
  font-weight: 800;
}

.account-menu__trigger--sidebar .account-menu__identity span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
}

.account-menu__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: currentColor;
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 160ms ease;
}

.account-menu[open] .account-menu__chevron {
  transform: rotate(180deg);
}

.account-menu__popover {
  position: absolute;
  z-index: 80;
  right: 0;
  top: calc(100% + 10px);
  display: grid;
  gap: 6px;
  min-width: 210px;
  padding: 8px;
  border: 1px solid #dce7ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.15);
}

.account-menu--sidebar .account-menu__popover {
  top: auto;
  right: 0;
  bottom: calc(100% + 10px);
  left: 0;
  min-width: 0;
}

.account-menu__popover form {
  margin: 0;
}

.account-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  color: #172132;
  background: transparent;
  font: 760 0.92rem/1.2 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
}

.account-menu__item:hover,
.account-menu__item:focus-visible {
  background: #eefaf4;
  color: #08764c;
}

.account-menu__item--danger:hover,
.account-menu__item--danger:focus-visible {
  background: #fff1f2;
  color: #be123c;
}

.account-menu__item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  color: #078d4e;
  background: #eafaf2;
  font-size: 0.66rem;
  font-weight: 900;
}

.account-menu__item--danger .account-menu__item-icon {
  color: #be123c;
  background: #fff1f2;
}

.dashboard-avatar--photo {
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.dashboard-avatar--photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-page-shell {
  width: min(calc(100% - 48px), 1180px);
  padding-top: 26px;
  padding-bottom: 58px;
}

.account-page {
  display: grid;
  gap: 24px;
}

.account-page__header,
.account-page__header-actions,
.account-page__brand,
.account-hero,
.account-profile-card__identity,
.account-security-note {
  min-width: 0;
}

.account-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.account-page__brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.account-page__brand img {
  display: block;
  width: 218px;
  height: auto;
}

.account-page__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.account-page__header-actions form {
  margin: 0;
}

.account-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  border: 1px solid #dce7ef;
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 10%, rgba(2, 155, 169, 0.14), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f5faf7 100%);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.account-hero h1 {
  margin: 6px 0 8px;
  color: #101828;
  font-size: clamp(2rem, 3vw, 3.4rem);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: 0;
}

.account-hero p {
  max-width: 680px;
  margin: 0;
  color: #64748b;
  font-size: 1.04rem;
  line-height: 1.55;
}

.account-hero__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #bdebd1;
  border-radius: 999px;
  color: #08764c;
  background: #eefaf4;
  font-weight: 800;
  white-space: nowrap;
}

.account-profile-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.account-profile-card,
.account-settings {
  padding: 26px;
}

.account-avatar-control {
  display: grid;
  gap: 14px;
}

.account-avatar-control input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.account-avatar-control__dropzone {
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 22px;
  border: 1px dashed #9edcb8;
  border-radius: 18px;
  background: linear-gradient(180deg, #f4fcf7, #ffffff);
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.account-avatar-control__dropzone:hover {
  border-color: #20bf73;
  box-shadow: 0 18px 34px rgba(16, 185, 129, 0.12);
  transform: translateY(-1px);
}

.account-avatar-preview {
  display: inline-grid;
  place-items: center;
  width: 132px;
  height: 132px;
  overflow: hidden;
  border: 4px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--flux-teal-action), var(--flux-teal-pressed));
  box-shadow: 0 20px 36px rgba(2, 38, 81, 0.2);
  font-size: 2.25rem;
  font-weight: 900;
}

.account-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-avatar-control__copy {
  display: grid;
  gap: 4px;
}

.account-avatar-control__copy strong {
  color: #101828;
  font-size: 1.02rem;
}

.account-avatar-control__copy small {
  color: #64748b;
  line-height: 1.4;
}

.account-avatar-control__remove {
  justify-self: center;
}

.account-profile-card__identity {
  display: grid;
  gap: 5px;
  margin: 22px 0;
  text-align: center;
}

.account-profile-card__identity strong {
  color: #101828;
  font-size: 1.32rem;
  line-height: 1.18;
}

.account-profile-card__identity span {
  color: #64748b;
  overflow-wrap: anywhere;
}

.account-profile-card__meta {
  display: grid;
  gap: 10px;
}

.account-profile-card__meta div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid #e0e9ef;
  border-radius: 12px;
  background: #f8fafc;
}

.account-profile-card__meta span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 760;
}

.account-profile-card__meta strong {
  min-width: 0;
  color: #172132;
  font-size: 0.92rem;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.account-settings {
  display: grid;
  gap: 22px;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.account-form-grid .form-field input:disabled {
  color: #64748b;
  background: #f1f5f9;
  cursor: not-allowed;
}

.account-security-note {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid #bdebd1;
  border-radius: 14px;
  background: #effaf4;
}

.account-security-note strong {
  color: #08764c;
}

.account-security-note span {
  color: #476174;
  line-height: 1.45;
}

.account-form-actions {
  justify-content: flex-end;
}

@media (max-width: 920px) {
  .account-profile-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .account-page-shell {
    width: min(calc(100% - 28px), 560px);
    padding-top: 18px;
  }

  .account-page__header,
  .account-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .account-page__header-actions {
    justify-content: stretch;
  }

  .account-page__header-actions .button,
  .account-page__header-actions form {
    flex: 1 1 0;
  }

  .account-page__header-actions form .button {
    width: 100%;
  }

  .account-page__brand img {
    width: 190px;
  }

  .account-hero,
  .account-profile-card,
  .account-settings {
    padding: 22px;
  }

  .account-hero h1 {
    font-size: 2rem;
  }

  .account-menu__trigger--topbar .account-menu__identity strong {
    max-width: 160px;
  }
}
