:root {
  --ink: #17212b;
  --muted: #657282;
  --line: #d9e1e8;
  --page: #f4f7fa;
  --surface: #ffffff;
  --nav: #122333;
  --teal: #147d7f;
  --green: #2f8a5b;
  --amber: #b87510;
  --red: #b94b4b;
  --blue: #3267a8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--page);
}

a {
  color: var(--teal);
  text-decoration: none;
}

.app {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100vh;
  overflow-y: auto;
  padding: 20px;
  background: var(--nav);
  color: #eef6f8;
}

.sidebar a {
  padding: 12px;
  border-radius: 8px;
  color: #d5e2eb;
}

.sidebar a:hover {
  background: #1c3448;
  color: #fff;
}

.sidebar a.active {
  background: #e8f4f2;
  color: var(--teal);
  font-weight: 800;
  box-shadow: inset 3px 0 0 var(--teal);
}

.sidebar a.active:hover {
  background: #eefaf7;
  color: var(--teal);
}

.sidebar .module-switch {
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 700;
}

.health-sidebar {
  background: #17302f;
}

.health-sidebar a:hover,
.health-sidebar .nav-menu[open] summary {
  background: #244a47;
}

.health-sidebar .brand span {
  background: #e1f1e9;
  color: #23704f;
}

.portal-sidebar {
  background: #1c2834;
}

.nav-menu {
  border-radius: 8px;
}

.nav-menu summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: 8px;
  color: #d5e2eb;
  cursor: pointer;
}

.nav-menu summary::marker,
.nav-menu summary::-webkit-details-marker {
  display: none;
  content: "";
}

.nav-menu summary::after {
  content: "+";
  color: #a7b8c5;
  font-weight: 800;
}

.nav-menu[open] summary {
  background: #1c3448;
  color: #fff;
}

.nav-menu[open] summary::after {
  content: "-";
}

.nav-submenu {
  display: grid;
  gap: 4px;
  padding: 6px 0 0 12px;
}

.nav-section {
  display: grid;
  gap: 3px;
  padding: 6px 0 8px;
}

.nav-section + .nav-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
  padding-top: 10px;
}

.nav-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  padding: 2px 12px 4px;
  border-radius: 6px;
  color: #9fb3c2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-section summary::marker,
.nav-section summary::-webkit-details-marker {
  display: none;
  content: "";
}

.nav-section summary::after {
  content: "+";
  color: #9fb3c2;
  font-size: 13px;
}

.nav-section[open] summary {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-section[open] summary::after {
  content: "-";
}

.nav-section-links {
  display: grid;
  gap: 3px;
  padding-top: 4px;
}

.nav-submenu a {
  min-height: 36px;
  padding: 9px 12px;
  font-size: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.brand span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e8f4f2;
  color: var(--teal);
  font-weight: 800;
}

.brand small,
.userbox small {
  display: block;
  margin-top: 3px;
  color: #a7b8c5;
}

.userbox {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.main {
  min-width: 0;
  padding: 24px;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 14px;
  margin: -24px -24px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 247, 250, 0.94);
  backdrop-filter: blur(10px);
}

.environment-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -10px 0 18px;
  padding: 10px 14px;
  border: 1px solid rgba(184, 117, 16, 0.35);
  border-left: 5px solid var(--amber);
  border-radius: 8px;
  background: #fff7e6;
  color: #6f4300;
  font-weight: 800;
}

.environment-banner span {
  color: #7c5a1a;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.app-topbar-title {
  min-width: 0;
}

.app-topbar-title strong {
  display: block;
  font-size: 15px;
}

.app-topbar-title span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.quick-search input {
  height: 40px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.quick-search button {
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.presence-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.presence-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.status-light {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 2px rgba(101, 114, 130, 0.18);
}

.current-account {
  display: grid;
  gap: 1px;
  min-width: 170px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.current-account label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.current-account strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.1;
}

.current-account span {
  color: var(--muted);
  font-size: 12px;
}

.presence-picker label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.presence-picker select {
  min-width: 150px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.presence-picker.status-available .status-light {
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(47, 138, 91, 0.22);
}

.presence-picker.status-warning .status-light {
  background: var(--amber);
  box-shadow: 0 0 0 2px rgba(184, 117, 16, 0.22);
}

.presence-picker.status-unavailable .status-light {
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(185, 75, 75, 0.22);
}

.presence-picker.status-offline .status-light {
  background: var(--muted);
  box-shadow: 0 0 0 2px rgba(101, 114, 130, 0.18);
}

.presence-picker select.status-available {
  border-color: rgba(47, 138, 91, 0.35);
  background: #f3fbf7;
  color: var(--green);
}

.presence-picker select.status-warning {
  border-color: rgba(184, 117, 16, 0.35);
  background: #fff8eb;
  color: var(--amber);
}

.presence-picker select.status-unavailable {
  border-color: rgba(185, 75, 75, 0.38);
  background: #fff4f4;
  color: var(--red);
}

.presence-picker select.status-offline {
  border-color: rgba(101, 114, 130, 0.28);
  background: #f7f9fb;
  color: var(--muted);
}

.notification-center {
  position: relative;
  flex: 0 0 auto;
}

.notification-center summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  box-shadow: 0 8px 20px rgba(23, 33, 43, 0.06);
}

.notification-center summary::marker,
.notification-center summary::-webkit-details-marker {
  display: none;
  content: "";
}

.notification-center summary span {
  font-weight: 800;
}

.notification-center summary strong {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
}

.notification-center.is-empty summary strong {
  background: var(--green);
}

.notification-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(23, 33, 43, 0.16);
  overflow: hidden;
}

.notification-menu-head,
.notification-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.notification-menu-head small,
.notification-empty small {
  color: var(--muted);
  font-weight: 700;
}

.notification-empty {
  display: block;
  border-bottom: 0;
}

.notification-empty strong,
.notification-empty small {
  display: block;
}

.notification-empty small {
  margin-top: 4px;
}

.notification-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f5;
  color: var(--ink);
}

.notification-row:hover {
  background: #f7fafc;
}

.notification-row > strong {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 34px;
  border-radius: 8px;
  background: #e8f0f7;
  color: var(--blue);
  font-size: 15px;
}

.notification-row.warn > strong {
  background: #fff2dd;
  color: var(--amber);
}

.notification-row.danger > strong {
  background: #fae8e8;
  color: var(--red);
}

.notification-row.info > strong {
  background: #e6f2f7;
  color: var(--teal);
}

.notification-row b,
.notification-row small {
  display: block;
}

.notification-row small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.notification-all {
  display: block;
  padding: 12px 14px;
  background: #f7fafc;
  color: var(--teal);
  font-weight: 900;
  text-align: center;
}

.notification-page-grid {
  display: grid;
  gap: 14px;
}

.notification-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: #fff;
}

.notification-card.warn {
  border-left-color: #d79a00;
  background: #fffaf0;
}

.notification-card.danger {
  border-left-color: #d92d20;
  background: #fff5f5;
}

.notification-card.info {
  border-left-color: var(--teal);
}

.notification-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.notification-card strong {
  display: block;
  margin-top: 5px;
  font-size: 21px;
}

.notification-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.notification-card-action {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.notification-card-action b {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: #e8f4f2;
  color: var(--teal);
  font-size: 18px;
}

.validation-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 0.45fr);
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--green);
  border-radius: 8px;
  background: #fff;
}

.validation-hero.warn {
  border-left-color: #d79a00;
  background: #fffaf0;
}

.validation-hero span,
.validation-hero p {
  color: var(--muted);
  font-weight: 800;
}

.validation-hero span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
}

.validation-hero strong {
  display: block;
  font-size: 28px;
}

.validation-hero p {
  margin: 8px 0 0;
}

.validation-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.validation-summary {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.validation-summary.warn {
  border-left-color: #d79a00;
  background: #fffaf0;
}

.validation-summary.danger {
  border-left-color: #d92d20;
  background: #fff5f5;
}

.validation-summary span,
.validation-summary small {
  color: var(--muted);
  font-weight: 800;
}

.validation-summary span {
  font-size: 12px;
  text-transform: uppercase;
}

.validation-summary strong {
  font-size: 26px;
}

.validation-panel-actions {
  justify-content: flex-end;
  margin-bottom: 12px;
}

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

.top p {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.panel,
.login-card,
.cards article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(23, 33, 43, 0.06);
}

.panel {
  padding: 18px;
  margin-bottom: 18px;
  overflow: auto;
}

.compact-panel {
  padding: 14px 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.collapsible-panel {
  padding: 0;
  overflow: visible;
}

.collapsible-summary {
  margin: 0;
  padding: 18px;
  cursor: pointer;
  list-style: none;
}

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

.collapsible-summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #edf4f8;
  color: var(--teal);
  font-weight: 900;
}

.collapsible-panel[open] .collapsible-summary {
  border-bottom: 1px solid var(--line);
}

.collapsible-panel[open] .collapsible-summary::after {
  content: "-";
}

.collapsible-summary h2 {
  margin: 0;
}

.collapsible-content {
  padding: 18px;
}

.summary-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.panel-title-row h2 {
  margin: 0;
}

.settings-summary-cards {
  margin-bottom: 0;
}

.policy-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.policy-hero div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.policy-hero span,
.policy-hero small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.policy-hero span {
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
}

.policy-hero strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.action-card {
  min-height: 150px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  background: #fbfdfd;
}

.action-card strong {
  font-size: 17px;
}

.action-card span {
  color: var(--muted);
  line-height: 1.45;
}

.action-card.is-disabled {
  border-left-color: #d3a11d;
  background: #fffaf0;
}

.action-card.is-disabled strong,
.action-card.is-disabled span {
  color: #6d5a28;
}

.action-card .button,
.action-card .badge {
  justify-self: start;
  margin-top: auto;
}

.policy-alert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.policy-alert {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: #fff;
}

.policy-alert span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.policy-alert strong {
  display: block;
  color: var(--ink);
  line-height: 1.35;
}

.policy-alert a {
  display: inline-flex;
  margin-top: 12px;
  color: var(--green);
  font-weight: 900;
  text-decoration: none;
}

.policy-alert.warn {
  border-left-color: #f59e0b;
  background: #fffaf0;
}

.policy-alert.danger {
  border-left-color: #b91c1c;
  background: #fff5f5;
}

.policy-alert.ok {
  border-left-color: var(--green);
  background: #f4fbf7;
}

.document-center-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
}

.document-tile {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--green);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.document-tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.document-tile h2 {
  margin: 0;
  font-size: 20px;
}

.document-tile p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.document-status {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf4f8;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.document-status.ok {
  background: #dff3e8;
  color: #11784c;
}

.document-status.warn {
  background: #fff1d6;
  color: #9a6500;
}

.document-tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.review-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.review-decision {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--green);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.review-decision.warn {
  border-left-color: #d79a00;
  background: #fffaf0;
}

.review-decision.danger {
  border-left-color: #d92d20;
  background: #fff5f5;
}

.review-decision span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.review-decision strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.review-decision p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.review-score {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 10px;
  min-width: 340px;
}

.review-score article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.review-score strong {
  font-size: 22px;
}

.review-hero div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.review-hero span,
.review-hero small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.review-hero span {
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
}

.review-hero strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.review-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.review-check {
  min-height: 104px;
  padding: 15px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: #fff;
}

.review-check.warn {
  border-left-color: #d79a00;
  background: #fffaf0;
}

.review-check.danger {
  border-left-color: #d92d20;
  background: #fff5f5;
}

.review-check.info {
  border-left-color: var(--teal);
  background: #f2fbfa;
}

.review-check span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.review-check strong {
  display: block;
  line-height: 1.35;
}

.review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

.review-actions form {
  margin: 0;
}

.review-actions form:last-child {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: end;
  gap: 12px;
  flex: 1 1 520px;
}

.review-validation-note {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.review-validation-note textarea {
  min-height: 78px;
  resize: vertical;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-event {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  background: #fff;
}

.timeline-event.ok {
  border-left-color: var(--green);
}

.timeline-event.warn {
  border-left-color: #d79a00;
  background: #fffaf0;
}

.timeline-event.danger {
  border-left-color: #d92d20;
  background: #fff5f5;
}

.timeline-date {
  display: grid;
  align-content: start;
  gap: 4px;
  color: var(--muted);
  font-weight: 800;
}

.timeline-date strong {
  color: var(--ink);
}

.timeline-content span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.timeline-content h3 {
  margin: 4px 0 6px;
  font-size: 18px;
}

.timeline-content p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.timeline-content a {
  display: inline-flex;
  margin-top: 10px;
  color: var(--green);
  font-weight: 900;
}

.manager-report {
  display: grid;
  gap: 18px;
}

.report-letterhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--green);
  border-radius: 8px;
  background: #fff;
}

.report-letterhead p {
  margin: 0 0 6px;
  color: var(--green);
  font-weight: 900;
  text-transform: uppercase;
}

.report-letterhead h1 {
  margin: 0;
  font-size: 28px;
}

.report-letterhead span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.report-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.report-kpis article {
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.report-kpis span,
.report-kpis small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.report-kpis strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 22px;
}

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

.pilot-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.55fr) minmax(240px, 0.75fr);
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--green);
  border-radius: 8px;
  background: #fff;
}

.pilot-hero.warn {
  border-left-color: #d79a00;
  background: #fffaf0;
}

.pilot-hero.danger {
  border-left-color: #d92d20;
  background: #fff5f5;
}

.pilot-hero span,
.pilot-hero p {
  color: var(--muted);
  font-weight: 800;
}

.pilot-hero span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
}

.pilot-hero strong {
  display: block;
  font-size: 25px;
}

.pilot-hero p {
  margin: 8px 0 0;
  line-height: 1.45;
}

.pilot-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.pilot-check {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.pilot-check.warn {
  border-left-color: #d79a00;
  background: #fffaf0;
}

.pilot-check.danger {
  border-left-color: #d92d20;
  background: #fff5f5;
}

.pilot-check span,
.pilot-check small {
  color: var(--muted);
  font-weight: 800;
}

.pilot-check span {
  font-size: 12px;
  text-transform: uppercase;
}

.pilot-check strong {
  font-size: 22px;
}

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

.cards article {
  padding: 18px;
  border-top: 4px solid var(--blue);
}

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

.cards strong {
  display: block;
  margin-top: 10px;
  font-size: 26px;
}

.cards small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}

.dashboard-charts {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-preferences {
  margin-bottom: 18px;
}

.dashboard-preferences summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 900;
}

.dashboard-preferences form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.dashboard-preference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

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

.search-results-grid > section {
  display: grid;
  align-content: start;
  gap: 12px;
}

.search-result-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(23, 33, 43, 0.05);
}

.search-result-card > div:first-child span,
.search-result-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.search-result-card strong {
  display: block;
  margin: 4px 0 8px;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.search-result-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.search-result-meta {
  display: grid;
  gap: 6px;
}

.search-result-card .inline-actions {
  grid-column: 1 / -1;
}

.chart-panel {
  min-height: 260px;
}

.chart-wide {
  grid-column: span 1;
}

.dashboard-chart {
  display: block;
  width: 100%;
  min-height: 240px;
}

.monthly-chart line {
  stroke: #d6dee8;
  stroke-width: 1;
}

.monthly-chart rect {
  fill: var(--teal);
}

.monthly-chart .axis-label {
  fill: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.monthly-chart .bar-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.monthly-chart .bar-value {
  fill: var(--ink);
  font-size: 10px;
  font-weight: 700;
}

.dashboard-donut {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.dashboard-donut svg {
  width: 132px;
  height: 132px;
}

.dashboard-donut circle {
  fill: none;
}

.dashboard-donut .donut-track {
  stroke: #e6edf3;
}

.dashboard-donut .donut-value {
  stroke: var(--green);
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
}

.dashboard-donut text:first-of-type {
  fill: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.dashboard-donut text:last-of-type {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.dashboard-donut strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
}

.dashboard-donut span {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.manager-cockpit {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  margin-bottom: 18px;
}

.manager-target {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 0.58fr);
  gap: 18px;
  align-items: stretch;
  border-top: 4px solid var(--green);
}

.manager-target-head {
  display: grid;
  align-content: start;
  gap: 10px;
}

.manager-target-head h2 {
  margin: 0;
  font-size: 24px;
}

.manager-target-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.manager-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: #e7f7ee;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.manager-status.warn {
  background: #fff5db;
  color: #936500;
}

.manager-status.danger {
  background: #ffe8e8;
  color: #b42318;
}

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

.manager-metrics div {
  min-height: 88px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.manager-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.manager-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.manager-metrics .positive {
  color: var(--green);
}

.manager-metrics .negative {
  color: #b42318;
}

.manager-priorities {
  border-top: 4px solid var(--teal);
}

.decision-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.decision-list li {
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #fff;
}

.decision-list li.warn {
  border-left-color: #d79a00;
}

.decision-list li.danger {
  border-left-color: #d92d20;
}

.decision-list li.ok {
  border-left-color: var(--green);
}

.decision-list li.info {
  border-left-color: var(--teal);
}

.decision-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  color: var(--ink);
}

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

.decision-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.decision-list em {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef6f8;
  color: var(--teal);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.branch-bars {
  display: grid;
  gap: 12px;
}

.branch-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.6fr) minmax(140px, 1fr) minmax(100px, auto);
  gap: 12px;
  align-items: center;
}

.branch-bar-row strong,
.branch-bar-row span,
.branch-bar-row em {
  display: block;
}

.branch-bar-row span,
.branch-bar-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.branch-bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf2;
}

.branch-bar-track span {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

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

.dashboard-actions a {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 16px 34px rgba(23, 33, 43, 0.05);
}

.dashboard-actions a:hover {
  border-color: var(--teal);
  background: #f4fbfa;
}

.dashboard-actions span,
.dashboard-actions small {
  color: var(--muted);
  font-weight: 700;
}

.dashboard-actions strong {
  font-size: 24px;
}

.dashboard-year-filter {
  display: inline-flex;
  align-items: center;
}

.dashboard-year-filter label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-year-filter select {
  min-width: 112px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.dashboard-details {
  padding: 0;
}

.dashboard-details summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px;
  color: var(--ink);
  cursor: pointer;
  font-size: 17px;
  font-weight: 800;
  list-style: none;
}

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

.dashboard-details summary::after {
  content: "+";
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #edf4f8;
  color: var(--teal);
  font-weight: 900;
}

.dashboard-details[open] summary {
  border-bottom: 1px solid var(--line);
}

.dashboard-details[open] summary::after {
  content: "-";
}

.dashboard-details table,
.dashboard-details .grid {
  margin: 0 18px 18px;
  width: calc(100% - 36px);
}

.reass-reference-stack {
  display: grid;
  gap: 18px;
  margin: 0 18px 18px;
  width: calc(100% - 36px);
}

.reass-reference-block {
  min-width: 0;
}

.reass-reference-block h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.reass-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.reass-reference-table {
  min-width: 980px;
  table-layout: fixed;
}

.reass-reference-table th,
.reass-reference-table td {
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.4;
}

.reass-rules-table th:nth-child(1),
.reass-rules-table td:nth-child(1) {
  width: 120px;
}

.reass-rules-table th:nth-child(2),
.reass-rules-table td:nth-child(2) {
  width: 210px;
}

.reass-rules-table th:nth-child(3),
.reass-rules-table td:nth-child(3) {
  width: 250px;
}

.reass-rules-table th:nth-child(5),
.reass-rules-table td:nth-child(5) {
  width: 230px;
}

.reass-exclusions-table th:nth-child(1),
.reass-exclusions-table td:nth-child(1) {
  width: 110px;
}

.reass-exclusions-table th:nth-child(2),
.reass-exclusions-table td:nth-child(2) {
  width: 120px;
}

.reass-exclusions-table th:nth-child(4),
.reass-exclusions-table td:nth-child(4) {
  width: 180px;
}

.reass-exclusions-table th:nth-child(5),
.reass-exclusions-table td:nth-child(5) {
  width: 260px;
}

.compact-details {
  min-width: 260px;
}

.compact-details summary {
  cursor: pointer;
  color: var(--teal);
  font-weight: 800;
}

.compact-details table {
  margin-top: 10px;
  min-width: 780px;
}

.compact-details th,
.compact-details td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.statement-tracking-form {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(110px, 0.75fr) minmax(120px, 0.75fr) minmax(140px, 0.9fr) minmax(160px, 1fr) auto;
  gap: 8px;
  margin: 10px 0;
  align-items: center;
}

.statement-tracking-form input,
.statement-tracking-form select {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 13px;
}

.statement-tracking-form .button {
  min-height: 34px;
  padding: 0 10px;
}

.settings-reference-table input,
.settings-reference-table select {
  min-width: 110px;
}

.settings-reference-table td:first-child {
  min-width: 150px;
}

.settings-create-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #b9dfcf;
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: #f4fbf7;
}

.settings-create-box h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.settings-create-box .form-grid {
  margin-top: 12px;
}

.chart-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--teal);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.button.ghost,
button.ghost {
  background: #edf3f7;
  color: var(--ink);
  border-color: var(--line);
}

.button.is-active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.button.whatsapp {
  background: #187c54;
  color: #fff;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  padding-top: 10px;
  resize: vertical;
}

input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

input[readonly] {
  background: #f4f7fa;
}

.field-needs-completion {
  background: #fff7df;
  border: 1px solid #e7bd54;
  border-radius: 10px;
  padding: 8px;
  color: #7a4b00;
}

.field-needs-completion input,
.field-needs-completion select,
.field-needs-completion textarea {
  background: #fffdf7;
  border-color: #d99a1e;
}

.avenant-detail-panel {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid #cfe1dc;
  border-left: 5px solid var(--teal);
  border-radius: 10px;
  background: #f7fcfa;
}

.avenant-detail-panel[hidden] {
  display: none;
}

.avenant-detail-panel h2 {
  margin: 0;
}

.avenant-detail-panel .hint {
  margin: -4px 0 2px;
}

.avenant-detail-panel label[hidden] {
  display: none;
}

.proposal-transform-notice {
  border-left: 5px solid #d99a1e;
}

.checkline {
  align-content: start;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: var(--ink);
  font-weight: 700;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  margin: 8px 0 12px;
}

.check-grid label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--ink);
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px 12px;
  min-width: 380px;
}

.module-access-grid {
  grid-template-columns: repeat(2, minmax(190px, 1fr));
}

.role-grid .checkline {
  margin: 0;
  font-size: 12px;
}

.role-grid .check-row {
  min-height: 32px;
}

.form-subtitle {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.provider-lot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.provider-lot-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.provider-lot-head h3 {
  margin: 0;
  font-size: 16px;
}

.provider-lot-head small {
  color: var(--muted);
}

.provider-policy-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.2fr;
  gap: 10px;
  align-items: end;
  padding: 10px 0;
  border-top: 1px solid #eef2f5;
}

.provider-policy-row:first-child {
  border-top: 0;
}

.provider-policy-row small {
  grid-column: 1 / -1;
  margin-top: 0;
}

.select-cell {
  width: 42px;
  text-align: center;
}

.commission-document {
  max-width: 1100px;
  margin-right: auto;
  margin-left: auto;
  color: #111827;
}

.commission-letter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  font-weight: 700;
}

.commission-logo {
  width: 118px;
  height: auto;
}

.commission-document h1 {
  margin: 10px 0 22px;
  text-align: center;
  font-size: 24px;
  text-transform: uppercase;
}

.commission-document h2 {
  margin: 24px 0 12px;
  text-align: center;
  font-size: 16px;
  text-transform: uppercase;
}

.commission-fields {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  font-size: 15px;
}

.commission-fields p,
.payment-lines p {
  margin: 0;
}

.commission-decompte {
  display: grid;
  gap: 8px;
  max-width: 740px;
  margin: 0 auto;
  font-size: 15px;
}

.commission-decompte div {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, auto);
  gap: 20px;
  align-items: center;
}

.commission-decompte strong {
  text-align: right;
}

.net-line,
.total-line {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--ink);
  font-size: 17px;
}

.total-line {
  font-weight: 800;
}

.payment-lines {
  display: grid;
  gap: 16px;
  margin-top: 38px;
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin-top: 54px;
  text-align: center;
}

.commission-state {
  page-break-before: always;
}

.commission-table {
  min-width: 980px;
  font-size: 12px;
}

.commission-table th,
.commission-table td {
  padding: 8px;
  white-space: normal;
}

.commission-table th {
  background: #e8f4f2;
  color: #17212b;
}

.commission-table td:nth-child(6),
.commission-table td:nth-child(7),
.commission-table td:nth-child(10),
.commission-table td:nth-child(11),
.commission-table td:nth-child(12) {
  text-align: right;
}

.total-row td {
  border-top: 2px solid #17212b;
  font-weight: 800;
}

.proposal-rating {
  margin-top: 18px;
  overflow-x: auto;
}

.proposal-rating h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.proposal-lines-table {
  min-width: 1240px;
}

.proposal-lines-table th,
.proposal-lines-table td {
  padding: 8px;
  white-space: normal;
}

.proposal-lines-table input {
  min-height: 34px;
}

.proposal-lines-table input[readonly] {
  background: #f6f8fa;
  color: var(--muted);
}

.proposal-line-choice {
  width: 90px;
}

.choice-check {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  white-space: nowrap;
}

.choice-check input {
  width: auto;
  min-height: auto;
}

.proposal-lines-table tr.excluded {
  opacity: 0.55;
}

.proposal-lines-table tr.tariff-missing {
  outline: 2px solid #d97706;
  outline-offset: -2px;
  background: #fff7ed;
}

.proposal-lines-table tfoot td {
  text-align: right;
}

.proposal-lines-table tfoot td:first-child {
  text-align: left;
}

.proposal-lines-table.rating-global-only th:nth-child(6),
.proposal-lines-table.rating-global-only th:nth-child(7),
.proposal-lines-table.rating-global-only tbody td:nth-child(6),
.proposal-lines-table.rating-global-only tbody td:nth-child(7) {
  display: none;
}

.muted-cell {
  color: var(--muted);
  font-size: 12px;
}

.proposal-lines-summary {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  min-width: 260px;
  white-space: normal;
}

.proposal-lines-summary span {
  color: var(--muted);
  font-size: 12px;
}

.compact-table {
  min-width: 760px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.inline-actions,
.filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-actions form {
  display: inline-flex;
  gap: 8px;
}

.stacked-actions {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.stacked-actions select,
.stacked-actions textarea,
.stacked-actions input {
  width: 100%;
}

.inline-actions .button,
.inline-actions button {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.payment-form {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(130px, 0.9fr) minmax(130px, 1fr) minmax(120px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 760px;
}

.payment-form input,
.payment-form select {
  min-height: 34px;
}

.payment-form .button {
  min-height: 34px;
  padding: 0 10px;
}

.filters {
  justify-content: flex-start;
}

.filters label {
  min-width: 260px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 18px;
}

.production-entry-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.production-entry-grid > aside {
  min-width: 0;
}

.production-entry-form {
  min-width: 0;
  overflow: visible;
}

.production-entry-form .avenant-detail-panel {
  width: 100%;
  overflow-x: auto;
}

.production-entry-form .renewal-guarantee-editor {
  width: 100%;
  overflow-x: auto;
}

.production-entry-form .renewal-guarantee-editor .proposal-lines-table {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
}

.production-entry-form .renewal-guarantee-editor .proposal-lines-table th,
.production-entry-form .renewal-guarantee-editor .proposal-lines-table td {
  padding: 7px;
}

.production-entry-form .renewal-guarantee-editor .proposal-lines-table th:nth-child(1),
.production-entry-form .renewal-guarantee-editor .proposal-lines-table td:nth-child(1) {
  width: 96px;
}

.production-entry-form .renewal-guarantee-editor .proposal-lines-table th:nth-child(2),
.production-entry-form .renewal-guarantee-editor .proposal-lines-table td:nth-child(2) {
  width: 245px;
}

.production-entry-form .renewal-guarantee-editor .proposal-lines-table th:nth-child(4),
.production-entry-form .renewal-guarantee-editor .proposal-lines-table td:nth-child(4),
.production-entry-form .renewal-guarantee-editor .proposal-lines-table th:nth-child(5),
.production-entry-form .renewal-guarantee-editor .proposal-lines-table td:nth-child(5) {
  width: 150px;
}

.production-entry-form .renewal-guarantee-editor .proposal-lines-table th:nth-child(6),
.production-entry-form .renewal-guarantee-editor .proposal-lines-table td:nth-child(6),
.production-entry-form .renewal-guarantee-editor .proposal-lines-table th:nth-child(7),
.production-entry-form .renewal-guarantee-editor .proposal-lines-table td:nth-child(7) {
  width: 118px;
}

.production-entry-form .renewal-guarantee-editor .proposal-lines-table th:nth-child(8),
.production-entry-form .renewal-guarantee-editor .proposal-lines-table td:nth-child(8) {
  width: 42px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.badge.ok {
  background: #dceee5;
  color: var(--green);
}

.badge.warn {
  background: #f4e4ca;
  color: var(--amber);
}

.badge.danger {
  background: #f4dada;
  color: var(--red);
}

.presence-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.declared-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  margin-right: 6px;
  margin-bottom: 5px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e6f2f7;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.declared-status i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.declared-status.status-available {
  background: #dceee5;
  color: var(--green);
}

.declared-status.status-warning {
  background: #f4e4ca;
  color: var(--amber);
}

.declared-status.status-unavailable {
  background: #f4dada;
  color: var(--red);
}

.declared-status.status-offline {
  background: #e6ebf0;
  color: var(--muted);
}

.presence-status i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.presence-status.online {
  background: #dceee5;
  color: var(--green);
}

.presence-status.pause {
  background: #f4e4ca;
  color: var(--amber);
}

.presence-status.offline {
  background: #e6ebf0;
  color: var(--muted);
}

.presence-status + small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.notice,
.alert {
  margin-bottom: 16px;
  padding: 13px;
  border-radius: 8px;
}

.notice {
  border: 1px solid #9ec9b1;
  background: #eef8f2;
}

.alert {
  border: 1px solid #ddb3b3;
  background: #fff1f1;
  color: var(--red);
}

.login-card {
  width: min(440px, 100%);
  margin: 10vh auto;
  padding: 24px;
}

.module-login .app,
.app:has(.login-card) {
  grid-template-columns: minmax(0, 1fr);
}

.module-login .main,
.app:has(.login-card) .main {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.module-login .login-card,
.app:has(.login-card) .login-card {
  margin: 0;
  text-align: center;
}

.module-login .login-card form,
.app:has(.login-card) .login-card form {
  justify-items: center;
}

.module-login .login-card label,
.app:has(.login-card) .login-card label {
  width: min(360px, 100%);
  text-align: left;
}

.module-login .login-card button,
.app:has(.login-card) .login-card button {
  width: min(360px, 100%);
}

.login-card p {
  color: var(--muted);
}

.login-card form {
  display: grid;
  gap: 14px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 1040px;
}

.module-applications .main {
  display: grid;
  align-content: center;
  min-height: 100vh;
}

.home-shell {
  width: min(1060px, 100%);
}

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

.home-header p {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-header h1 {
  margin: 0;
  font-size: 42px;
}

.home-header span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
}

.module-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--teal);
  border-radius: 8px;
  padding: 24px;
  background: var(--surface);
  box-shadow: 0 16px 34px rgba(23, 33, 43, 0.06);
  color: var(--ink);
}

.module-card:hover {
  border-color: #aebbc6;
  box-shadow: 0 18px 38px rgba(23, 33, 43, 0.11);
}

.module-card-health {
  border-top-color: var(--green);
}

.module-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.module-monogram {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: #e8f4f2;
  color: var(--teal);
  font-size: 19px;
  font-weight: 800;
}

.module-card-health .module-monogram {
  background: #e1f1e9;
  color: #23704f;
}

.module-card h2 {
  margin-bottom: 9px;
  font-size: 22px;
}

.module-card p {
  max-width: 48ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.module-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.module-card-footer strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 38px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
}

.module-card-health .module-card-footer strong {
  background: var(--green);
}

.menu-home-section {
  overflow: visible;
}

.menu-home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.menu-home-card {
  display: grid;
  min-height: 112px;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 16px;
  background: #fbfdfe;
  color: var(--ink);
}

.menu-home-card:hover {
  border-color: rgba(20, 125, 127, 0.45);
  background: #f4fbfb;
}

.menu-home-card strong {
  font-size: 16px;
}

.menu-home-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.module-sante .top p {
  color: var(--green);
}

.health-kpis article {
  border-top-color: var(--green);
}

.health-decision-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.health-decision-grid a {
  min-height: 118px;
  padding: 15px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.health-decision-grid a:hover {
  border-left-color: var(--teal);
  background: #f2fbfa;
}

.health-decision-grid span,
.health-decision-grid small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.health-decision-grid strong {
  display: block;
  margin: 8px 0;
  font-size: 28px;
}

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

.health-domain-grid a {
  display: grid;
  gap: 6px;
  min-height: 92px;
  align-content: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 6px;
  padding: 15px;
  background: #fbfdfc;
  color: var(--ink);
}

.health-domain-grid a:hover {
  border-color: #a8c8b8;
  background: #f2f8f5;
}

.health-domain-grid span,
.health-section-intro p {
  color: var(--muted);
}

.sp-meter {
  width: 100%;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: #e8edf1;
  overflow: hidden;
}

.sp-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.sp-meter span.warn {
  background: #d88a12;
}

.sp-meter span.danger {
  background: #c44545;
}

.health-pathway-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.provider-invoice-panel {
  grid-column: 1 / -1;
}

.provider-invoice-panel:fullscreen {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 24px;
  overflow: auto;
  border-radius: 0;
  background: var(--surface);
}

.provider-invoice-panel:fullscreen .pharmacy-order-table {
  min-width: 1280px;
  font-size: 15px;
}

.provider-invoice-panel:fullscreen .pharmacy-order-table th:nth-child(7),
.provider-invoice-panel:fullscreen .pharmacy-order-table td:nth-child(7) {
  width: 190px;
}

.provider-invoice-panel > .form-grid {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.health-calculation-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.health-calculation-preview span {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf8;
  color: var(--muted);
  font-weight: 700;
}

.health-calculation-preview strong {
  color: var(--green);
  font-size: 22px;
}

.claim-filter-bar {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 0;
}

.claim-act-detail {
  margin-top: 8px;
}

.claim-act-detail summary {
  color: var(--teal);
  font-weight: 800;
  cursor: pointer;
}

.claim-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
  min-width: 520px;
}

.claim-detail-grid article {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.claim-detail-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.claim-detail-grid p {
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.provider-portal-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: center;
  border-left: 4px solid var(--green);
}

.provider-portal-intro p {
  margin: 0 0 4px;
  color: var(--green);
  font-weight: 900;
  text-transform: uppercase;
}

.provider-portal-intro h2 {
  margin: 0 0 6px;
}

.provider-portal-intro small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.provider-action-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.provider-action-tags span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7fbf8;
  color: #18583d;
  font-size: 12px;
  font-weight: 800;
}

.provider-eligibility-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.provider-eligibility-card div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.provider-eligibility-card span,
.provider-prescription-detail span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.provider-eligibility-card strong {
  overflow-wrap: anywhere;
}

.provider-prescription-detail,
.provider-execution-fields {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.provider-prescription-detail .claim-detail-grid p {
  white-space: pre-wrap;
}

.pharmacy-order-panel {
  display: none;
}

.pharmacy-order-panel .table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.pharmacy-order-panel .table-wrap table {
  margin: 0;
  border: 0;
}

.pharmacy-order-table {
  width: 100%;
  min-width: 1040px;
  table-layout: fixed;
}

.pharmacy-order-table th,
.pharmacy-order-table td {
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.pharmacy-order-table th:nth-child(1),
.pharmacy-order-table td:nth-child(1) {
  width: 76px;
  text-align: center;
}

.pharmacy-order-table th:nth-child(2),
.pharmacy-order-table td:nth-child(2) {
  width: 210px;
}

.pharmacy-order-table th:nth-child(3),
.pharmacy-order-table td:nth-child(3),
.pharmacy-order-table th:nth-child(4),
.pharmacy-order-table td:nth-child(4) {
  width: 180px;
}

.pharmacy-order-table th:nth-child(5),
.pharmacy-order-table td:nth-child(5),
.pharmacy-order-table th:nth-child(6),
.pharmacy-order-table td:nth-child(6) {
  width: 105px;
}

.pharmacy-order-table th:nth-child(7),
.pharmacy-order-table td:nth-child(7) {
  width: 150px;
}

.pharmacy-order-table th:nth-child(8),
.pharmacy-order-table td:nth-child(8) {
  width: 120px;
}

.pharmacy-price-input {
  width: 100%;
  min-width: 0;
  font-weight: 800;
}

.import-help {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.import-help summary {
  color: var(--teal);
  font-weight: 900;
  cursor: pointer;
}

.import-help table {
  margin-top: 12px;
}

.doctor-prescription-preview pre {
  min-height: 140px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  white-space: pre-wrap;
  font-family: "Century Gothic", Arial, sans-serif;
  line-height: 1.55;
}

.doctor-consultation {
  grid-column: 1 / -1;
}

.doctor-section {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.doctor-section h3,
.doctor-section h4 {
  margin: 0 0 12px;
}

.doctor-lookup {
  margin-top: 10px;
  border-left: 4px solid var(--green);
}

.beneficiary-summary,
.doctor-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.beneficiary-summary div,
.doctor-summary-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.beneficiary-summary span,
.doctor-summary-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.beneficiary-summary strong,
.doctor-summary-grid strong {
  overflow-wrap: anywhere;
}

.doctor-info-panels {
  margin-top: 12px;
}

.doctor-info-panel {
  display: none;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.doctor-info-panel.active {
  display: block;
}

.doctor-prescription-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.doctor-prescription-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.doctor-prescription-tab.active {
  border-color: var(--green);
  background: #e7f4ed;
  color: #18583d;
}

.doctor-prescription-pane {
  display: none;
}

.doctor-prescription-pane.active {
  display: block;
}

.health-prescription-table {
  min-width: 900px;
}

.health-prescription-table input,
.health-prescription-table select {
  min-width: 120px;
}

.doctor-alert-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #f0d89a;
  border-radius: 8px;
  background: #fff9e8;
}

.doctor-alert-box p {
  margin: 0;
}

.doctor-actions {
  flex-wrap: wrap;
}

.health-section-intro p {
  margin: 0;
  line-height: 1.55;
}

.health-premium-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.health-premium-summary div {
  min-width: 0;
  padding: 15px;
  border-right: 1px solid var(--line);
}

.health-premium-summary div:last-child {
  border-right: 0;
}

.health-premium-summary span,
.health-premium-summary strong {
  display: block;
}

.health-premium-summary span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.health-premium-summary strong {
  font-size: 17px;
}

.health-premium-summary .health-total-line {
  background: #edf7f2;
  color: #18583d;
}

.form-section {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
}

.form-section h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.nested-panel {
  margin: 14px 0;
  box-shadow: none;
}

.health-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.health-category-proposal-table {
  min-width: 980px;
}

.readonly-input {
  background: #f3f7f6;
  color: var(--muted);
}

.is-locked {
  opacity: 0.72;
}

.is-locked input,
.is-locked select {
  cursor: not-allowed;
}

.stack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 220px;
}

.stack-actions form {
  margin: 0;
}

.button.compact {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}

.compact-field {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compact-field input {
  width: 132px;
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}

.compact-form {
  margin-bottom: 14px;
}

.compact-editor {
  box-shadow: none;
}

.payment-slip {
  background: #fff;
}

.payment-slip-signatures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.payment-slip-signatures div {
  min-height: 88px;
  border-top: 1px solid var(--ink);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: var(--muted);
  font-weight: 800;
}

.health-document-preview {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.health-doc-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 2px solid #17302f;
}

.health-doc-head img {
  width: 72px;
  height: auto;
  object-fit: contain;
}

.health-doc-head strong,
.health-doc-head span {
  display: block;
}

.doc-kv-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}

.doc-kv-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
}

.doc-kv-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.doc-kv-grid strong {
  display: block;
  margin-top: 4px;
  white-space: normal;
}

.health-guarantee-table {
  min-width: 760px;
}

.health-editable-guarantee-table {
  min-width: 920px;
}

.health-editable-guarantee-table input,
.health-editable-guarantee-table textarea {
  width: 100%;
  min-width: 120px;
  margin: 0;
  padding: 8px;
  border-radius: 6px;
}

.health-editable-guarantee-table textarea {
  min-height: 54px;
  resize: vertical;
}

.free-text-block {
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfc;
  color: var(--ink);
  line-height: 1.55;
  white-space: normal;
}

.health-sp-clause {
  display: grid;
  gap: 10px;
}

.health-sp-clause p {
  margin: 0;
}

.health-sp-clause table {
  margin-top: 4px;
}

.health-doc-page-break {
  break-before: page;
  page-break-before: always;
  height: 0;
}

.health-document-preview table,
.health-premium-summary,
.health-sp-clause {
  break-inside: avoid;
  page-break-inside: avoid;
}

.signature-note {
  margin-top: 18px;
  color: var(--ink);
}

.health-contract-action {
  min-width: 300px;
}

.health-contract-action label {
  min-width: 145px;
}

.contract-editor-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.contract-editor {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.contract-editor-tabs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-right: 1px solid var(--line);
  background: #f5f8f6;
}

.contract-editor-tab {
  min-height: 38px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 4px;
  padding: 8px 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.contract-editor-tab:hover,
.contract-editor-tab.active {
  border-left-color: var(--green);
  background: #e7f2eb;
  color: var(--green);
}

.contract-editor-workspace {
  min-width: 0;
  padding: 20px;
}

.contract-editor-pane {
  display: none;
}

.contract-editor-pane.active {
  display: block;
}

.contract-editor-pane h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.contract-editor-pane textarea {
  width: 100%;
  min-height: 410px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
}

.contract-editor-pane textarea:focus {
  border-color: var(--green);
  outline: 2px solid #d8ecdf;
}

.contract-editor-actions {
  grid-column: 2;
  margin: 0;
  padding: 0 20px 20px;
}

.contract-page-editor {
  padding: 0;
  overflow: hidden;
}

.contract-page-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #f5f8f6;
}

.contract-page-tab {
  min-height: 58px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 3px solid transparent;
  padding: 8px 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.contract-page-tab:last-child {
  border-right: 0;
}

.contract-page-tab strong,
.contract-page-tab span {
  display: block;
}

.contract-page-tab strong {
  font-size: 14px;
}

.contract-page-tab span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.contract-page-tab:hover,
.contract-page-tab.active {
  border-bottom-color: var(--green);
  background: #e7f2eb;
  color: var(--green);
}

.contract-page-body {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(460px, 1.1fr);
  min-height: 720px;
}

.contract-page-fields {
  min-width: 0;
  max-height: 78vh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding: 20px;
}

.contract-page-pane {
  display: none;
}

.contract-page-pane.active {
  display: block;
}

.contract-page-pane > h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.contract-fixed-fields {
  margin: 0;
}

.contract-fixed-fields > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.contract-fixed-fields dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.contract-fixed-fields dd {
  margin: 0;
  font-weight: 700;
}

.contract-article-editor + .contract-article-editor {
  margin-top: 22px;
}

.contract-article-editor h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.contract-article-editor textarea {
  width: 100%;
  min-height: 145px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
}

.contract-article-editor textarea:focus {
  border-color: var(--green);
  outline: 2px solid #d8ecdf;
}

.contract-word-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f8f6;
}

.contract-word-toolbar .button {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

.contract-word-page {
  display: block;
  width: 100%;
  min-height: 430px;
  padding: 28px 32px;
  border: 1px solid #cbd5dd;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  font-family: "Century Gothic", Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  outline: none;
  resize: vertical;
  white-space: pre-wrap;
}

.contract-word-page:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px #d8ecdf, 0 12px 30px rgba(15, 23, 42, 0.08);
}

.contract-client-preview {
  min-width: 0;
  padding: 16px;
  background: #e9eef1;
}

.contract-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.contract-preview-heading h2 {
  margin: 0;
  font-size: 16px;
}

.contract-client-preview iframe {
  display: block;
  width: 100%;
  height: 70vh;
  min-height: 650px;
  border: 1px solid #b8c2ca;
  border-radius: 4px;
  background: #fff;
}

.contract-page-actions {
  margin: 0;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.attestation-editor {
  padding: 0;
  overflow: hidden;
}

.attestation-editor-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(480px, 1.1fr);
  min-height: 720px;
}

.attestation-fields {
  padding: 20px;
  overflow-y: auto;
  max-height: 78vh;
  border-right: 1px solid var(--line);
}

.attestation-fields > h2:first-child {
  margin-top: 0;
}

.attestation-guarantee-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.attestation-guarantee-choice label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 82px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.attestation-guarantee-choice input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.attestation-guarantee-choice span,
.attestation-guarantee-choice small {
  display: block;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 12px 0;
}

.pagination span {
  color: var(--muted);
  font-weight: 700;
}

.quality-cards a {
  color: inherit;
  text-decoration: none;
}

.quality-cards article {
  height: 100%;
  border-left: 4px solid transparent;
}

.quality-cards article.quality-active {
  border-left-color: var(--green);
  background: #f3f8f5;
}

.presentation-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.38fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid #cddce8;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #eef7f5 100%);
  box-shadow: 0 16px 34px rgba(23, 33, 43, 0.06);
}

.presentation-hero p {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.presentation-hero h1 {
  margin-bottom: 10px;
  font-size: 34px;
}

.presentation-hero span {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.presentation-hero-card {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px;
  border: 1px solid #b9d7d0;
  border-radius: 8px;
  background: #ffffff;
}

.presentation-hero-card strong {
  font-size: 30px;
}

.presentation-hero-card span,
.presentation-hero-card small {
  color: var(--muted);
  font-weight: 700;
}

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

.presentation-kpis article {
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(23, 33, 43, 0.06);
}

.presentation-kpis span,
.presentation-kpis small {
  color: var(--muted);
  font-weight: 700;
}

.presentation-kpis strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 25px;
}

.presentation-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.presentation-strip a {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 14px;
  border: 1px solid #cddce8;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.presentation-strip a:hover {
  border-color: var(--teal);
  background: #f2fbfa;
}

.presentation-strip strong {
  font-size: 14px;
}

.presentation-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.presentation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 18px;
}

.presentation-flow {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.presentation-flow li {
  padding-left: 4px;
}

.presentation-flow strong,
.presentation-flow span {
  display: block;
}

.presentation-flow span {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
}

.module-status-list {
  display: grid;
  gap: 10px;
}

.module-status-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.presentation-note p {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.selected-row {
  background: #edf8f3;
}

.health-card-workbench {
  overflow: visible;
}

.health-card-status {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}

.health-card-status label {
  max-width: 260px;
  margin: 0;
}

.health-card-photo-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin: -6px 0 20px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.health-card-photo-form label {
  margin: 0;
}

.health-card-photo-form small {
  align-self: center;
  color: var(--muted);
  font-weight: 700;
}

.health-card-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
  gap: 22px;
  align-items: start;
}

.health-card-svg-frame {
  width: 100%;
  max-width: 856px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 30px rgba(18, 32, 43, 0.18);
}

.health-card-svg-frame svg {
  display: block;
  width: 100%;
  height: auto;
}

.health-id-card {
  position: relative;
  width: 100%;
  max-width: 850px;
  aspect-ratio: 1.556;
  overflow: hidden;
  border: 1px solid rgba(13, 111, 70, 0.18);
  border-radius: 38px;
  background: #fff;
  box-shadow: 0 20px 30px rgba(18, 32, 43, 0.28);
  color: #23303f;
  font-family: Montserrat, Gotham, "Aptos Display", "Century Gothic", Arial, Helvetica, sans-serif;
}

.health-id-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 92% 8%, rgba(0, 143, 87, 0.12), transparent 26%),
    repeating-linear-gradient(116deg, transparent 0, transparent 9px, rgba(0, 125, 76, 0.035) 10px, transparent 12px);
  pointer-events: none;
}

.health-card-top {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 34px;
  height: 27.5%;
  padding: 24px 58px 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at 0 20%, rgba(255, 255, 255, 0.10), transparent 28%),
    linear-gradient(135deg, #009460 0%, #007848 52%, #008f67 100%);
  color: #fff;
}

.health-id-card-front .health-card-top::before {
  content: "";
  position: absolute;
  right: -5%;
  bottom: 2px;
  width: 52%;
  height: 32px;
  transform: rotate(-7deg);
  transform-origin: right center;
  border-radius: 999px;
  background: #8fd173;
  opacity: 0.95;
}

.health-card-top::after {
  content: "";
  position: absolute;
  right: -7%;
  bottom: -48px;
  left: -10%;
  height: 74px;
  border-radius: 0 0 56% 56%;
  background: #fff;
  box-shadow: 0 -5px 13px rgba(23, 33, 43, 0.18);
}

.health-card-top > * {
  position: relative;
  z-index: 1;
}

.cnart-card-logo {
  display: grid;
  position: relative;
  min-width: 178px;
  padding: 0 30px 0 32px;
  border-right: 2px solid rgba(255, 255, 255, 0.78);
  line-height: 1;
  text-align: center;
}

.cnart-card-logo::before,
.cnart-card-logo::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 5px;
  height: 82px;
  border-radius: 999px;
  background: #fff;
}

.cnart-card-logo::before {
  left: 3px;
  transform: rotate(26deg);
}

.cnart-card-logo::after {
  right: 28px;
  transform: rotate(-26deg);
}

.cnart-card-logo span {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0;
}

.cnart-card-logo small {
  margin-top: 5px;
  font-size: 18px;
  font-weight: 500;
}

.health-card-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-width: 0;
}

.health-card-title strong {
  font-size: 43px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  line-height: 1;
}

.health-card-title span {
  font-size: 21px;
  font-weight: 900;
  white-space: nowrap;
}

.health-card-body {
  position: absolute;
  top: 30.5%;
  right: 6.8%;
  bottom: 12%;
  left: 6.8%;
  display: grid;
  grid-template-columns: 23% minmax(0, 1fr) 25%;
  gap: 30px;
  align-items: center;
}

.health-card-avatar {
  position: relative;
  width: 100%;
  aspect-ratio: 0.86;
  border: 1px solid #bac6d2;
  border-radius: 22px;
  background: linear-gradient(145deg, #f9fbfd, #e8eef5);
  box-shadow: inset 0 1px 8px rgba(23, 33, 43, 0.05);
}

.health-card-avatar span,
.health-card-avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #c9d2dd;
}

.health-card-avatar span {
  top: 16%;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
}

.health-card-avatar::after {
  bottom: 3%;
  width: 72%;
  height: 43%;
  border-radius: 50% 50% 0 0;
}

.health-card-info {
  display: grid;
  gap: 9px;
  align-self: stretch;
  align-content: center;
}

.health-card-field,
.health-card-beneficiary-block {
  display: grid;
  gap: 3px;
}

.health-card-beneficiary-block {
  margin: 0 0 5px;
  padding: 12px 16px 13px;
  border: 1px solid #cfe4dd;
  border-radius: 16px;
  background: #e4f8f1;
}

.health-card-info span,
.health-card-right span {
  color: #6f7d8d;
  font-size: 18px;
  font-weight: 500;
}

.health-card-beneficiary-block strong {
  color: #243040;
  font-size: 31px;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.health-card-info strong {
  color: #243040;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

.health-card-info b {
  color: #128450;
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
}

.health-card-info .policy {
  display: block;
  width: 100%;
  font-size: 21px;
  line-height: 1.12;
  text-transform: uppercase;
}

.health-card-policy-field {
  margin-top: 2px;
}

.health-card-right {
  display: grid;
  justify-items: center;
  align-self: center;
  gap: 18px;
}

.health-card-right span {
  color: #168451;
  font-size: 19px;
  font-weight: 800;
}

.health-card-right strong {
  min-width: 178px;
  padding: 13px 18px;
  border-radius: 15px;
  background: linear-gradient(180deg, #0e9960, #007043);
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  text-align: center;
  box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.12);
}

.health-card-right img {
  width: 156px;
  height: 156px;
  padding: 8px;
  border: 1px solid #cfd7df;
  border-radius: 13px;
  background: #fff;
}

.health-card-footer {
  position: absolute;
  right: 6.8%;
  bottom: 4.8%;
  left: 6.8%;
  display: flex;
  align-items: center;
  min-height: 38px;
  padding-top: 10px;
  border-top: 1px solid #239060;
  color: #168451;
  font-size: 22px;
  font-weight: 900;
}

.health-card-footer span::before {
  content: "☎";
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, #0e9960, #007043);
  color: #fff;
  font-size: 19px;
}

.health-card-back-body {
  position: absolute;
  top: 31.5%;
  right: 6%;
  left: 6%;
  display: grid;
  gap: 18px;
}

.health-card-check {
  position: relative;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  min-height: 116px;
  padding: 20px 30px;
  border: 1px solid rgba(21, 117, 76, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
}

.health-card-check::after {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 118px;
  width: 2px;
  background: rgba(21, 117, 76, 0.18);
}

.health-card-check h3 {
  margin: 0 0 8px;
  color: #0f8551;
  font-size: 27px;
  font-weight: 900;
}

.health-card-check p {
  margin: 4px 0;
  color: #243040;
  font-size: 20px;
  line-height: 1.28;
  font-weight: 500;
}

.health-card-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(180deg, #0e9960, #007043);
  color: #fff;
  font-size: 38px;
  font-weight: 900;
  box-shadow: inset 0 -5px 12px rgba(0, 0, 0, 0.10);
}

.health-card-back-footer {
  position: absolute;
  right: 6.2%;
  bottom: 4.8%;
  left: 6.2%;
  padding: 14px 22px;
  border-radius: 15px;
  background:
    repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 9px, transparent 10px, transparent 20px),
    linear-gradient(135deg, #008f57, #007043);
  color: #fff;
  font-size: 23px;
  font-weight: 900;
  text-align: center;
}

.health-card-back-footer span {
  margin: 0 20px;
  opacity: 0.78;
}

.health-card-control {
  overflow: visible;
}

.health-control-status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.health-control-status {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.health-control-status span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.health-control-status strong {
  font-size: 22px;
}

.health-control-status.is-ok {
  border-color: rgba(47, 138, 91, 0.32);
  background: #edf8f3;
}

.health-control-status.is-ok strong {
  color: var(--green);
}

.health-control-status.is-alert {
  border-color: rgba(184, 117, 16, 0.32);
  background: #fff7e8;
}

.health-control-status.is-alert strong {
  color: var(--amber);
}

.health-control-decision {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: #f7fbf9;
}

.health-control-decision.is-warn {
  border-left-color: var(--amber);
  background: #fff8ea;
}

.health-control-decision.is-danger {
  border-left-color: var(--red);
  background: #fff1f1;
}

.health-control-decision span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.health-control-decision strong {
  display: block;
  margin: 4px 0;
  font-size: 22px;
}

.health-control-decision p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.health-control-identity {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.health-control-photo {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(0, 158, 105, 0.08), rgba(0, 125, 88, 0.02)),
    #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.health-control-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.health-control-photo span {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #ffffff;
  font-size: 30px;
  font-weight: 900;
}

.health-control-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
    min-width: 0;
  }
  .module-applications .main {
    align-content: start;
    min-height: auto;
  }
  .home-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .home-header h1 {
    font-size: 34px;
  }
  .cards,
  .grid,
  .review-hero,
  .validation-hero,
  .validation-summary-grid,
  .report-kpis,
  .report-grid,
  .pilot-hero,
  .pilot-check-grid,
  .dashboard-charts,
  .dashboard-actions,
  .dashboard-donut,
  .manager-cockpit,
  .manager-target,
  .manager-metrics,
  .branch-bar-row,
  .search-results-grid,
  .search-result-card,
  .form-grid,
  .provider-policy-row,
  .module-grid,
  .menu-home-grid,
  .health-domain-grid,
  .health-decision-grid,
  .health-pathway-grid,
  .health-calculation-preview,
  .claim-detail-grid,
  .provider-portal-intro,
  .provider-eligibility-card,
  .beneficiary-summary,
  .doctor-summary-grid,
  .health-premium-summary,
  .presentation-hero,
  .presentation-kpis,
  .presentation-strip,
  .presentation-grid,
  .payment-slip-signatures {
    grid-template-columns: 1fr;
  }
  .health-control-status-grid,
  .health-control-summary,
  .health-control-identity,
  .health-control-decision,
  .review-decision,
  .review-score,
  .timeline-event {
    grid-template-columns: 1fr;
  }
  .review-decision {
    flex-direction: column;
  }
  .review-score {
    min-width: 0;
  }
  .health-premium-summary div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .health-premium-summary div:last-child {
    border-bottom: 0;
  }
  .decision-list a {
    grid-template-columns: 1fr;
  }
  .notification-card {
    grid-template-columns: 1fr;
  }
  .notification-card-action {
    justify-items: stretch;
  }
  .review-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .review-actions .button,
  .review-actions form {
    width: 100%;
  }
  .review-actions form:last-child {
    grid-template-columns: 1fr;
  }
  .app-topbar {
    align-items: stretch;
    flex-direction: column;
    margin: -24px -24px 18px;
  }
  .report-letterhead {
    flex-direction: column;
  }
  .presence-picker {
    align-items: stretch;
    flex-direction: column;
    margin-left: 0;
  }
  .quick-search {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .quick-search button {
    width: 100%;
  }
  .current-account {
    min-width: 0;
    width: 100%;
  }
  .presence-picker select {
    width: 100%;
  }
  .notification-center,
  .notification-center summary {
    width: 100%;
  }
  .notification-center summary {
    justify-content: space-between;
  }
  .notification-menu {
    left: 0;
    right: auto;
    width: 100%;
  }
  .top,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }
  .payment-form {
    grid-template-columns: 1fr;
    min-width: 0;
  }
  .contract-editor {
    grid-template-columns: 1fr;
  }
  .contract-editor-tabs {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .contract-editor-tab {
    flex: 0 0 auto;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }
  .contract-editor-tab:hover,
  .contract-editor-tab.active {
    border-left-color: transparent;
    border-bottom-color: var(--green);
  }
  .contract-editor-actions {
    grid-column: 1;
  }
  .contract-page-tabs {
    display: flex;
    overflow-x: auto;
  }
  .contract-page-tab {
    flex: 0 0 150px;
  }
  .contract-page-body {
    grid-template-columns: 1fr;
  }
  .attestation-editor-layout,
  .attestation-guarantee-choice {
    grid-template-columns: 1fr;
  }
  .attestation-fields {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .contract-page-fields {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .contract-client-preview iframe {
    min-height: 560px;
  }
  .health-card-preview {
    grid-template-columns: minmax(0, 1fr);
  }
  .health-card-svg-frame {
    border-radius: 18px;
  }
  .health-card-status {
    align-items: stretch;
    flex-direction: column;
  }
  .health-card-status label {
    max-width: none;
  }
  .health-card-photo-form {
    grid-template-columns: 1fr;
  }
  .health-id-card {
    border-radius: 18px;
  }
  .health-card-top {
    gap: 14px;
    padding: 16px 22px 22px;
  }
  .cnart-card-logo {
    min-width: 104px;
    padding: 0 14px 0 18px;
  }
  .cnart-card-logo::before,
  .cnart-card-logo::after {
    top: -4px;
    width: 3px;
    height: 52px;
  }
  .cnart-card-logo::before {
    left: 2px;
  }
  .cnart-card-logo::after {
    right: 14px;
  }
  .cnart-card-logo span {
    font-size: 21px;
  }
  .cnart-card-logo small {
    font-size: 13px;
  }
  .health-card-title {
    display: grid;
    gap: 0;
  }
  .health-card-title strong {
    font-size: 24px;
  }
  .health-card-title span {
    font-size: 14px;
  }
  .health-card-body {
    right: 5%;
    left: 5%;
    grid-template-columns: 25% minmax(0, 1fr) 25%;
    gap: 12px;
  }
  .health-card-info span,
  .health-card-right span {
    font-size: 11px;
  }
  .health-card-beneficiary-block {
    margin-bottom: 2px;
    padding: 5px 7px 6px;
    border-radius: 9px;
  }
  .health-card-beneficiary-block strong {
    font-size: 18px;
  }
  .health-card-info {
    gap: 4px;
  }
  .health-card-info b,
  .health-card-info .policy {
    font-size: 13px;
  }
  .health-card-right {
    gap: 10px;
  }
  .health-card-right strong {
    min-width: 0;
    padding: 8px 10px;
    font-size: 15px;
  }
  .health-card-right img {
    width: 82px;
    height: 82px;
    padding: 5px;
  }
  .health-card-footer,
  .health-card-back-footer {
    font-size: 13px;
  }
  .health-card-footer span::before {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    font-size: 13px;
  }
  .health-card-back-body {
    gap: 10px;
  }
  .health-card-check {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
  }
  .health-card-check::after {
    top: 10px;
    bottom: 10px;
    left: 70px;
  }
  .health-card-icon {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }
  .health-card-check h3 {
    font-size: 16px;
  }
  .health-card-check p {
    font-size: 12px;
  }
}

@media print {
  body {
    background: #fff;
  }
  .app {
    display: block;
  }
  .sidebar,
  .no-print {
    display: none !important;
  }
  .main {
    padding: 0;
  }
  .panel {
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
    overflow: visible;
  }
  .print-page {
    min-height: 100vh;
    page-break-after: always;
  }
  .commission-document {
    max-width: none;
    padding: 24px 22px;
  }
  .commission-table {
    width: 100%;
    min-width: 0;
    font-size: 10px;
  }
  .commission-table th,
  .commission-table td {
    padding: 5px;
  }
  .manager-report {
    gap: 12px;
    padding: 12mm;
  }
  .report-letterhead,
  .report-kpis article {
    break-inside: avoid;
  }
  .report-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .report-grid {
    grid-template-columns: 1fr;
  }
  a {
    color: inherit;
  }
}
