body[data-theme] {
  --sidebar-bg: #fbfdff;
  --sidebar-bg-2: #f8fbff;
  --sidebar-ink: #10213d;
  --sidebar-muted: #7181a1;
  --sidebar-accent: #2563eb;
  --sidebar-highlight: #eef3ff;
  --sidebar-panel-bg: #fff;
  --sidebar-pattern: none;
}

body[data-theme="melisa"] {
  --sidebar-bg: #fffafd;
  --sidebar-bg-2: #fff5fa;
  --sidebar-ink: #51233e;
  --sidebar-muted: #94647f;
  --sidebar-accent: #e85d9b;
  --sidebar-highlight: #fff0f7;
}

.tools-panel {
  min-height: calc(100vh - 104px);
  overflow: visible;
  border: 0;
  background: #f5f7fb;
  box-shadow: none;
}

.kawaii-mascot {
  display: block;
  width: 112px;
  height: 80px;
  margin: -10px 0 -20px 4px;
  background: url('/melisa-kawaii-mascot-v2.png') center / contain no-repeat;
}

.kawaii-mascot > svg {
  display: none !important;
}

.kawaii-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 10px;
  border: 1px solid #e4d8ef;
  border-radius: 14px;
  background: #fff;
  color: #735f82;
  box-shadow: 0 8px 20px rgba(93, 74, 122, .1);
}

.kawaii-toggle-face {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid #f0bed2;
  border-radius: 9px;
  background: #fff5fa;
  color: #e85d9b;
}

.kawaii-switch {
  width: 38px;
  height: 22px;
  padding: 2px;
  border-radius: 999px;
  background: #dce3ee;
  transition: background .2s ease;
}

.kawaii-switch span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(40, 52, 78, .18);
  transition: transform .2s ease;
}

.kawaii-toggle.active .kawaii-switch {
  background: linear-gradient(135deg, #ff9bc4, #9ebeff);
}

.kawaii-toggle.active .kawaii-switch span {
  transform: translateX(16px);
}

body[data-theme="melisa"][data-kawaii="true"] {
  background: linear-gradient(180deg, #f1f7ff, #fff8fc 46%, #f8fbff);
}

body[data-theme="melisa"][data-kawaii="true"] .content {
  background:
    radial-gradient(circle at 89% 15%, rgba(229, 205, 255, .35), transparent 18%),
    radial-gradient(circle at 73% 4%, rgba(191, 229, 255, .4), transparent 20%);
}

body[data-theme="melisa"][data-kawaii="true"] .topbar h1 {
  color: #172957;
}

body[data-theme="melisa"][data-kawaii="true"] .stat {
  border-color: #d9cdfa;
  background: linear-gradient(145deg, #fff, #faf6ff);
  box-shadow: 0 12px 28px rgba(111, 91, 170, .08);
}

body[data-theme="melisa"][data-kawaii="true"] .stat.stat-men {
  border-color: #afe7df;
  background: linear-gradient(145deg, #fff, #effcf9);
}

body[data-theme="melisa"][data-kawaii="true"] .stat.stat-women {
  border-color: #ffc4d9;
  background: linear-gradient(145deg, #fff, #fff2f7);
}

body[data-theme="melisa"][data-kawaii="true"] .stat::before,
body[data-theme="melisa"][data-kawaii="true"] .stat.stat-men::before,
body[data-theme="melisa"][data-kawaii="true"] .stat.stat-women::before {
  content: '•ᴗ•';
  border: 1px solid #d4c5ff;
  background: linear-gradient(145deg, #eee8ff, #fff);
  color: #6650d8;
  font-size: 13px;
  box-shadow: 0 5px 12px rgba(83, 68, 158, .1);
}

body[data-theme="melisa"][data-kawaii="true"] .stat.stat-men::before {
  border-color: #9fe0d5;
  background: linear-gradient(145deg, #ddfaf3, #fff);
  color: #168c7d;
}

body[data-theme="melisa"][data-kawaii="true"] .stat.stat-women::before {
  border-color: #ffb6cf;
  background: linear-gradient(145deg, #ffe3ed, #fff);
  color: #e54f8b;
}

body[data-theme="melisa"][data-kawaii="true"] .toolbar {
  position: relative;
  border-color: #cfe0f7;
  background: rgba(255, 255, 255, .94);
}

body[data-theme="melisa"][data-kawaii="true"] .toolbar::after {
  content: '✦   ✧';
  position: absolute;
  right: 18px;
  bottom: 8px;
  color: #d7a9ef;
  pointer-events: none;
}

body[data-theme="melisa"][data-kawaii="true"] .card {
  position: relative;
  overflow: visible;
  border-color: #d7e2f3;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 26px rgba(70, 103, 155, .08);
}

body[data-theme="melisa"][data-kawaii="true"] .card::after {
  content: '✦  🐾';
  position: absolute;
  right: 20px;
  bottom: 14px;
  color: #ffb8d1;
  font-size: 16px;
  opacity: .78;
  pointer-events: none;
}

body[data-theme="melisa"][data-kawaii="true"] .card:nth-of-type(even)::after {
  content: '🐾  ✧';
  color: #cab0f3;
}

body[data-theme="melisa"][data-kawaii="true"] .card::before {
  content: '✦';
  position: absolute;
  top: 14px;
  right: 18px;
  color: #ffd09e;
  font-size: 13px;
  pointer-events: none;
}

body[data-theme="melisa"][data-kawaii="true"] .card:nth-of-type(3n)::before {
  content: '♡';
  color: #efa4c5;
}

body[data-theme="melisa"][data-kawaii="true"] .card-name::after {
  content: '  ✿';
  color: #e9a0c0;
  font-size: 11px;
  vertical-align: 2px;
}

body[data-theme="melisa"][data-kawaii="true"] .card-block {
  border-color: #dfe2f5;
  background: linear-gradient(145deg, #fbfcff, #fff9fd);
}

body[data-theme="melisa"][data-kawaii="true"] .card .actions button {
  border-radius: 13px;
  box-shadow: 0 5px 12px rgba(87, 104, 160, .08);
}

body[data-theme="melisa"][data-kawaii="true"] .card-section-label::before {
  content: '♡';
  margin-right: 6px;
  color: #ed91ba;
}

body[data-theme="melisa"][data-kawaii="true"] .card-bed {
  background: linear-gradient(135deg, #f0edff, #fff5fa);
  color: #5261d8;
}

body[data-theme="melisa"][data-kawaii="true"] .card-bed::after {
  content: '  🐾';
  color: #efa3c1;
}

body[data-theme="melisa"][data-kawaii="true"] .patient-status::after,
body[data-theme="melisa"][data-kawaii="true"] .treatment-status::after {
  content: ' ·ᴗ·';
  margin-left: 3px;
  font-size: 9px;
}

body[data-theme="melisa"][data-kawaii="true"] .sidebar-user-avatar {
  position: relative;
  overflow: visible;
  border: 2px solid #e4c9fb;
  background: linear-gradient(145deg, #f4eaff, #fff);
  box-shadow: 0 5px 13px rgba(143, 101, 190, .13);
}

body[data-theme="melisa"][data-kawaii="true"] .sidebar-user-avatar::before,
body[data-theme="melisa"][data-kawaii="true"] .sidebar-user-avatar::after {
  display: none;
}

body[data-theme="melisa"][data-kawaii="true"] .sidebar .nav button.active {
  box-shadow: inset 4px 0 0 #ef77ad, 0 7px 16px rgba(224, 106, 159, .11);
}

body[data-theme="melisa"][data-kawaii="true"] .content::after {
  content: '✦   ･ﾟ   🐾   ･ﾟ   ✧';
  position: fixed;
  right: 24px;
  bottom: 18px;
  color: #d4b2ef;
  font-size: 13px;
  opacity: .6;
  pointer-events: none;
  z-index: 2;
}

@media (min-width: 981px) {
  body {
    background:
      radial-gradient(circle at 82% 0%, rgba(219, 234, 254, .7), transparent 28%),
      linear-gradient(180deg, #f8fafc, #f3f6fb);
  }

  .content {
    gap: 16px;
    padding: 24px;
  }

  .shell,
  .shell.sidebar-expanded {
    grid-template-columns: 94px minmax(0, 1fr);
    transition: none;
  }

  .sidebar {
    z-index: 60;
    width: 78px;
    height: calc(100vh - 20px);
    margin: 8px;
    padding: 14px 10px;
    gap: 20px;
    border: 1px solid #dce5f2;
    border-radius: 28px;
    background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
    color: var(--sidebar-ink);
    box-shadow: 0 18px 46px rgba(34, 58, 94, .1);
    transition: width .3s cubic-bezier(.22, 1, .36, 1), padding .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease;
    will-change: width;
  }

  .shell.sidebar-expanded .sidebar {
    width: 284px;
    padding: 20px 18px;
    box-shadow: 14px 0 42px rgba(34, 58, 94, .14);
  }

  .sidebar::before {
    display: none;
  }

  .sidebar .brandline {
    justify-content: center;
    padding: 18px 12px 22px;
  }

  .sidebar-head {
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  .sidebar h2 {
    color: var(--sidebar-ink);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -.03em;
  }

  .sidebar-title-group .muted {
    color: var(--sidebar-muted) !important;
    font-size: 16px;
    font-weight: 700;
  }

  .sidebar-title-group {
    justify-items: center;
  }

  .nav {
    gap: 8px;
  }

  .nav button {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 54px;
    padding: 10px 18px;
    border-radius: 17px;
    color: var(--sidebar-ink);
    font-size: 13px;
    font-weight: 750;
    overflow: visible;
  }

  .nav button:hover {
    background: color-mix(in srgb, var(--sidebar-accent) 7%, white);
    color: var(--sidebar-accent);
  }

  .nav button.active {
    background: var(--sidebar-highlight);
    color: var(--sidebar-accent);
    box-shadow: none;
  }

  .nav button.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    border-radius: 17px 0 0 17px;
    background: var(--sidebar-accent);
  }

  .sidebar-nav-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
  }

  .sidebar-nav-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .sidebar-nav-count {
    display: grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--sidebar-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
  }

  .userbox {
    gap: 0;
    padding: 18px;
    border: 1px solid #dce5f2;
    border-radius: 22px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 12px 30px rgba(34, 58, 94, .07);
  }

  body[data-theme="melisa"] .sidebar,
  body[data-theme="melisa"] .userbox {
    border-color: #f0d8e5;
  }

  .sidebar-user-head {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding-bottom: 16px;
  }

  .sidebar-user-avatar {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--sidebar-highlight);
    color: var(--sidebar-accent);
    font-size: 17px;
    font-weight: 850;
  }

  .sidebar-user-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  #userName {
    color: var(--sidebar-ink);
    font-size: 16px;
    font-weight: 900;
  }

  #userRole {
    color: var(--sidebar-muted);
    font-size: 13px;
    font-weight: 700;
  }

  body[data-theme="melisa"] #userName,
  body[data-theme="melisa"] #userRole {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  body[data-theme="melisa"] #userName {
    font-size: 15px;
  }

  body[data-theme="melisa"] #userRole {
    font-size: 11px;
    line-height: 1.3;
  }

  .sidebar-user-actions {
    display: grid;
    padding: 10px 0;
    border-top: 1px solid #dce5f2;
    border-bottom: 1px solid #dce5f2;
  }

  body[data-theme="melisa"] .sidebar-user-actions {
    border-color: #f0d8e5;
  }

  .userbox .secondary,
  .userbox .ghost {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 4px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--sidebar-muted);
    text-align: left;
    font-size: 13px;
  }

  .userbox .secondary:hover,
  .userbox .ghost:hover {
    background: var(--sidebar-highlight);
    color: var(--sidebar-accent);
  }

  .sidebar-action-icon {
    display: grid;
    place-items: center;
    color: currentColor;
  }

  .sidebar-action-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .sidebar-action-chevron {
    font-size: 24px;
    line-height: 1;
  }

  .userbox .sidebar-logout {
    margin-top: 8px;
    color: var(--sidebar-accent);
  }

  .shell:not(.sidebar-expanded) .sidebar .brandline {
    min-height: 58px;
    padding: 6px;
  }

  .shell:not(.sidebar-expanded) .nav {
    gap: 7px;
  }

  .shell:not(.sidebar-expanded) .nav button {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 52px;
    padding: 10px;
    color: var(--sidebar-ink);
  }

  .shell:not(.sidebar-expanded) .nav button::after,
  .shell:not(.sidebar-expanded) .sidebar-nav-label,
  .shell:not(.sidebar-expanded) .sidebar-nav-count,
  .shell:not(.sidebar-expanded) .sidebar-user-copy,
  .shell:not(.sidebar-expanded) .sidebar-user-actions {
    display: none;
  }

  .shell:not(.sidebar-expanded) .sidebar-nav-icon {
    margin: auto;
  }

  .shell:not(.sidebar-expanded) .userbox {
    padding: 8px;
  }

  .shell:not(.sidebar-expanded) .sidebar-user-head {
    display: block;
    padding: 0;
  }

  .shell:not(.sidebar-expanded) .sidebar-user-avatar {
    width: 44px;
    height: 44px;
    font-size: 13px;
  }

  .topbar h1 {
    color: #172033;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 30px;
    font-weight: 850;
    letter-spacing: -.045em;
  }

  #viewSubtitle {
    display: none;
  }

  .topbar-actions {
    gap: 10px;
  }

  .topbar-actions button {
    min-height: 44px;
    padding: 0 17px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
  }

  #printControls button {
    border: 1px solid #e1e8f1;
    background: rgba(255, 255, 255, .9);
  }

  #newPatientBtn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
  }

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

  .stat {
    position: relative;
    display: grid;
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    align-content: center;
    padding: 17px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .88);
    border-color: rgba(219, 228, 239, .9);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
  }

  .stat::before {
    content: '•';
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 29px;
    line-height: 1;
  }

  .stat.stat-men::before {
    content: '♂';
    background: #e7f7f4;
    color: #0f766e;
    font-size: 22px;
  }

  .stat.stat-women::before {
    content: '♀';
    background: #fcecf3;
    color: #be185d;
    font-size: 22px;
  }

  .stat b {
    color: #172033;
    align-self: end;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 27px;
    font-weight: 850;
    line-height: 1;
  }

  .stat span {
    align-self: start;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  .toolbar {
    grid-template-columns: minmax(300px, 1fr) auto 190px auto;
    gap: 9px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .05);
    backdrop-filter: none;
  }

  .toolbar input,
  .toolbar select,
  .toolbar button {
    min-height: 42px;
    border-radius: 14px;
  }

  #patientsPanel {
    border: 0;
    background: transparent;
  }

  #patientsTableWrap {
    display: none !important;
  }

  #patientsCards.cards {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
  }

  .card-section-label {
    display: flex;
    grid-column: 1 / -1;
    margin: 8px 4px 0;
    font-size: 12px;
  }

  .card {
    grid-template-columns: minmax(180px, 1.15fr) minmax(160px, 1fr) minmax(300px, 2.2fr) minmax(130px, .9fr) minmax(100px, .65fr);
    grid-template-areas: "head diagnosis treatment team actions";
    align-items: start;
    gap: 12px;
    padding: 16px;
    border-radius: 22px;
    border-color: #dfe7f1;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
    content-visibility: auto;
    contain-intrinsic-size: auto 250px;
  }

  .card.section-mujeres {
    border-left: 4px solid rgba(190, 24, 93, .48);
    box-shadow: 0 8px 22px rgba(190, 24, 93, .07);
  }

  .card.section-hombres {
    border-left: 4px solid rgba(15, 118, 110, .52);
    box-shadow: 0 8px 22px rgba(15, 118, 110, .07);
  }

  .card > .card-head {
    grid-area: head;
  }

  .card > .alert-stack,
  .card > .alert-empty {
    grid-area: alerts;
  }

  .card > .team-alerts-stack {
    grid-area: team;
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
  }

  .team-alerts-stack > .alert-stack,
  .team-alerts-stack > .alert-empty,
  .team-alerts-stack .alert-entry {
    width: 100%;
  }

  .card > .card-block:has(.diagnosis-preview) {
    grid-area: diagnosis;
  }

  .card > .card-block:has(.treatment-list) {
    grid-area: treatment;
  }

  .card > .card-block:has(.card-team-line) {
    grid-area: team;
  }

  .card > .actions {
    grid-area: actions;
    grid-template-columns: 1fr;
    align-content: start;
  }

  .card-bed {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
    letter-spacing: .07em;
    text-transform: uppercase;
  }

  .card-name {
    font-size: 21px;
    letter-spacing: -.02em;
  }

  .card-admission {
    color: #667085;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
  }

  .card-facts {
    gap: 7px;
  }

  .card-facts span {
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid #dbe4ef;
    border-radius: 999px;
    background: #fff;
    color: #344054;
    font-size: 12px;
    font-weight: 850;
  }

  .card-facts span::after {
    display: none;
  }

  .longitudinal-card.compact {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 7px;
    width: auto;
    margin-top: 2px;
    padding: 6px 12px 6px 10px;
    border-radius: 999px;
  }

  .longitudinal-card.compact .longitudinal-card-icon {
    width: 18px;
    height: 18px;
    font-size: 11px;
  }

  .longitudinal-card.compact .longitudinal-card-copy b {
    font-size: 12px;
    line-height: 1;
  }

  .card-block {
    gap: 6px;
    padding: 13px 14px;
    border: 1px solid #e1e8f1;
    border-radius: 18px;
    background: #f8fafc;
  }

  .treatment-block.fresh {
    border-color: #86efac;
    background: linear-gradient(180deg, #ecfdf5, #f5fff9);
  }

  .treatment-block.warning {
    border-color: #fcd34d;
    background: linear-gradient(180deg, #fffbeb, #fffdf5);
  }

  .treatment-block.danger {
    border-color: #fca5a5;
    background: linear-gradient(180deg, #fef2f2, #fff8f8);
  }

  .treatment-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .treatment-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
  }

  .treatment-status.fresh {
    color: #15803d;
    background: #dcfce7;
  }

  .treatment-status.warning {
    color: #b45309;
    background: #fef3c7;
  }

  .treatment-status.danger {
    color: #b91c1c;
    background: #fee2e2;
  }

  .card-block-label {
    font-size: 10px;
  }

  .card-block-copy {
    font-size: 14px;
    line-height: 1.4;
  }

  .treatment-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    color: #243047;
    font-size: 14px;
    line-height: 1.38;
  }

  .treatment-list-item {
    overflow-wrap: anywhere;
  }

  .card-block-copy.card-preview.diagnosis-preview {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
  }

  .card-team-line {
    font-size: 13px;
  }

  .card .alert-stack {
    display: grid;
    gap: 8px;
  }

  .card .alert-entry,
  .card .alert-empty {
    border-radius: 16px;
  }

  .card .actions {
    gap: 8px;
  }

  .card .actions button {
    min-height: 40px;
    border-radius: 14px;
  }

}

@media (min-width: 981px) and (max-width: 1180px) {
  .card {
    grid-template-columns: minmax(210px, 1fr) minmax(300px, 1.6fr) minmax(150px, .75fr);
    grid-template-areas:
      "head treatment actions"
      "diagnosis treatment actions"
      "team treatment actions";
  }
}

@media (min-width: 981px) {
  .card > .actions {
    gap: 9px;
    padding: 6px;
    border: 1px solid #e2e9f2;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfdff, #f5f8fc);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  }

  .card > .actions button,
  .patient-menu-button {
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: 12px;
    font-weight: 850;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
  }

  .card > .actions button:hover,
  .patient-menu-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 16px rgba(38, 63, 103, .12);
  }

  .patient-menu-button-edit,
  .card > .actions button.secondary {
    border-color: #dbe4ef;
    background: #fff;
    color: #26334d;
  }

  .patient-menu-button-incidence,
  .card > .actions button.btn-incidence {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
  }

  .patient-menu-button-pending,
  .card > .actions button.btn-pending {
    border-color: #bfd3ff;
    background: #eaf1ff;
    color: #1d4ed8;
  }

  .modal {
    border: 1px solid #dfe7f1;
    border-radius: 24px;
    background: #fbfdff;
    box-shadow: 0 26px 70px rgba(27, 48, 84, .18);
  }

  .modal-header {
    padding: 20px 22px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    border-bottom-color: #e4ebf3;
  }

  .modal-header h2 {
    color: #172033;
    font-size: 20px;
    letter-spacing: -.025em;
  }

  .modal-header .ghost {
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid #dbe4ef;
    border-radius: 11px;
    background: #f8fafc;
    color: #64748b;
  }

  .modal-body {
    padding: 22px;
    gap: 18px;
  }

  .patient-menu-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 6px;
    border: 1px solid #e2e9f2;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfdff, #f5f8fc);
  }

  .patient-detail-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .patient-detail-actions .danger {
    grid-column: 1 / -1;
  }

  .patient-form-actions {
    justify-content: end;
  }

  .patient-form-actions .btn-incidence {
    border-color: #dc2626;
    background: linear-gradient(135deg, #dc2626, #be123c);
    color: #fff;
  }

  .modal-body .todo {
    border-color: #dfe7f1;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(42, 67, 105, .05);
  }

  .modal-body .todo-actions button {
    min-height: 34px;
    border-radius: 11px;
  }
}
