:root {
  --bg: #f8f6f3;
  --card: #ffffff;
  --text: #2f241e;
  --muted: #7a6457;
  --line: #f0d9ca;

  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-soft: #fff0e6;
  --secondary: #fff3eb;

  --success-bg: #ecfdf3;
  --success-text: #027a48;
  --error-bg: #fef3f2;
  --error-text: #b42318;
  --role-admin-bg: #fff2e8;
  --role-admin-border: #f8c29d;
  --role-admin-text: #b45309;
  --role-doctor-bg: #eff6ff;
  --role-doctor-border: #bfdbfe;
  --role-doctor-text: #1d4ed8;
  --role-nutritionist-bg: #ecfdf3;
  --role-nutritionist-border: #bbf7d0;
  --role-nutritionist-text: #047857;
  --role-staff-bg: #f5f3ff;
  --role-staff-border: #c4b5fd;
  --role-staff-text: #6d28d9;

  --topbar: rgba(255, 250, 245, 0.95);
  --topbar-line: #ffd8bf;
  --topbar-text: #5e3b24;

  --shadow: 0 12px 28px rgba(124, 74, 33, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(249,115,22,0.06), transparent 22%),
    radial-gradient(circle at top left, rgba(251,146,60,0.05), transparent 18%),
    var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
}

.page { padding: 28px 0 48px; }
.narrow { width: min(720px, calc(100% - 32px)); }

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

.page-header h1 { margin: 0 0 6px; }
.page-header p { margin: 0; color: var(--muted); }

.topbar {
  background: var(--topbar);
  color: var(--topbar-text);
  border-bottom: 1px solid var(--topbar-line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  flex-wrap: wrap;
}

.brand-shell {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1 1 720px;
  min-width: 0;
  flex-wrap: wrap;
}

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

.brand__logos {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 8px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(234, 88, 12, 0.06);
}

.brand__logo img {
  display: block;
  max-height: 28px;
  max-width: 120px;
  object-fit: contain;
}

.brand__divider {
  width: 1px;
  height: 28px;
  background: var(--topbar-line);
  flex: 0 0 auto;
}

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

.brand__title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

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

.navlinks {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.navlinks a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #7a4b2a;
  font-weight: 700;
}

.navlinks a.active,
.navlinks a:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.topbar-reminder {
  border-bottom: 1px solid #f7c89d;
  background: linear-gradient(180deg, #fff2e4, #fff8f2);
}

.topbar-reminder__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.topbar-reminder__copy {
  display: grid;
  gap: 4px;
}

.topbar-reminder__copy strong {
  color: #9a3412;
  font-size: 14px;
}

.topbar-reminder__copy span {
  color: #7a6457;
  font-size: 13px;
  line-height: 1.45;
}

.topbar__email {
  color: var(--text);
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}

.break-anywhere {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(460px, 100%);
}

.auth-card__header {
  margin-bottom: 18px;
}

.auth-card__header h1 { margin: 0 0 8px; }
.auth-card__header p { margin: 0; color: var(--muted); }

.auth-shell--split {
  width: min(1480px, 100%);
  max-width: calc(100vw - 32px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 520px);
  gap: 28px;
  place-items: stretch;
  align-items: stretch;
}

.auth-shell--split .toast-stack {
  top: 20px;
  right: 20px;
}

.auth-hero,
.auth-login-panel {
  min-height: calc(100vh - 48px);
}

.auth-hero {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 28px;
  overflow: hidden;
  padding: clamp(28px, 4vw, 44px);
  border-radius: 32px;
  color: #fff6ef;
  background:
    radial-gradient(circle at top right, rgba(255, 180, 123, 0.22), transparent 24%),
    radial-gradient(circle at bottom left, rgba(255, 128, 0, 0.18), transparent 30%),
    linear-gradient(145deg, #6d3a17 0%, #4b2712 44%, #261711 100%);
  box-shadow: 0 30px 70px rgba(55, 28, 13, 0.28);
}

.auth-hero::before,
.auth-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.auth-hero::before {
  top: -120px;
  right: -120px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 192, 145, 0.22), rgba(255, 192, 145, 0));
}

.auth-hero::after {
  bottom: -160px;
  left: -80px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255, 141, 44, 0.16), rgba(255, 141, 44, 0));
}

.auth-hero__content,
.auth-metric-row {
  position: relative;
  z-index: 1;
}

.auth-hero__content {
  display: grid;
  gap: 28px;
}

.auth-brand-lockup {
  display: grid;
  gap: 14px;
}

.auth-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-hero .brand__logo {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px rgba(19, 10, 5, 0.2);
}

.auth-card__brand .brand__logo {
  border-color: #f1dfd2;
  box-shadow: 0 12px 30px rgba(83, 48, 24, 0.08);
}

.auth-brand-chip,
.auth-card__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-brand-chip {
  color: #fff2e7;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-hero__copy {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.auth-kicker {
  color: rgba(255, 226, 204, 0.82);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-hero__copy h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.auth-hero__copy p {
  margin: 0;
  max-width: 60ch;
  color: rgba(255, 234, 219, 0.82);
  font-size: 17px;
  line-height: 1.65;
}

.auth-feature-list {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.auth-feature-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.auth-feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex: 0 0 auto;
  background: linear-gradient(180deg, rgba(255, 160, 92, 0.95), rgba(234, 88, 12, 0.95));
  color: #fff8f3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.auth-feature-card__body {
  display: grid;
  gap: 6px;
}

.auth-feature-card__body strong {
  font-size: 17px;
  line-height: 1.2;
}

.auth-feature-card__body p {
  margin: 0;
  color: rgba(255, 233, 217, 0.82);
  line-height: 1.55;
}

.auth-metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.auth-metric {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(23, 12, 8, 0.22);
}

.auth-metric strong {
  font-size: 28px;
  line-height: 1;
}

.auth-metric span {
  color: rgba(255, 229, 209, 0.76);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-login-panel {
  display: grid;
  place-items: center;
}

.auth-card--showcase {
  width: min(480px, 100%);
  padding: 34px clamp(22px, 3vw, 34px);
  border-radius: 30px;
  border-color: #f2ddcf;
  box-shadow: 0 28px 60px rgba(83, 48, 24, 0.12);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.auth-card__header--showcase {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-card__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-card__eyebrow {
  color: #9a3412;
  background: #fff0e6;
  border: 1px solid #ffd9c2;
}

.auth-card__header--showcase h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.02;
}

.auth-card__header--showcase p {
  font-size: 15px;
  line-height: 1.65;
}

.auth-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-card__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid #f3dece;
  background: #fff9f5;
  color: #8d5d3d;
  font-size: 12px;
  font-weight: 700;
}

.auth-login-form {
  gap: 16px;
}

.auth-login-form label {
  gap: 8px;
}

.auth-login-form input {
  padding: 13px 14px;
  border-radius: 14px;
  background: #fffaf7;
}

.auth-login-form .btn {
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
}

.auth-login-form__hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.auth-card__note {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #f1dfd2;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.auth-shell--editorial {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  background: linear-gradient(90deg, #f7eee6 0%, #f7eee6 50%, #ffffff 50%, #ffffff 100%);
}

.auth-stage {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
}

.auth-stage--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  min-height: 100vh;
  min-height: 100dvh;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.auth-stage--split > * {
  min-width: 0;
}

.auth-stage__left,
.auth-stage__right {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(40px, 5vw, 72px);
}

.auth-stage__left {
  place-items: center;
  background: linear-gradient(180deg, #f7eee6 0%, #f3e5d8 100%);
}

.auth-stage__left-panel {
  width: min(100%, 640px);
  display: grid;
  gap: 0;
  align-content: center;
}

.auth-stage__left-content {
  display: grid;
  align-content: start;
  gap: 26px;
  width: 100%;
}

.auth-stage__right {
  place-items: center;
  background: #ffffff;
  border-left: 1px solid #efddcf;
}

.auth-editorial-brand {
  display: grid;
  gap: 16px;
}

.auth-editorial-logos,
.auth-editorial-card__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.auth-editorial-logos .brand__logo,
.auth-editorial-card__brand .brand__logo {
  height: 88px;
  padding: 16px 24px;
  border-radius: 18px;
  background: #fffaf6;
  border: 1px solid #efcdb8;
  box-shadow: 0 14px 28px rgba(124, 74, 33, 0.08);
}

.auth-editorial-logos .brand__logo img,
.auth-editorial-card__brand .brand__logo img {
  max-height: 46px;
  max-width: 176px;
}

.auth-editorial-brand__text {
  display: grid;
  gap: 4px;
}

.auth-editorial-brand__text strong {
  font-size: 20px;
  line-height: 1.2;
}

.auth-editorial-brand__text span {
  color: #5e4c40;
  font-size: 15px;
}

.auth-editorial-copy {
  display: grid;
  gap: 8px;
}

.auth-editorial-copy__eyebrow {
  margin: 0;
  color: #2f241d;
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.auth-editorial-copy h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(40px, 4.2vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.auth-editorial-copy p {
  margin: 0;
  max-width: 60ch;
  color: #43342a;
  font-size: 16px;
  line-height: 1.72;
}

.auth-editorial-copy__description {
  margin-top: 14px;
}

.auth-editorial-features {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.auth-editorial-feature {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(239, 205, 184, 0.9);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 28px rgba(124, 74, 33, 0.05);
}

.auth-editorial-feature__heading {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
}

.auth-editorial-feature__emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fff0e6;
  font-size: 20px;
}

.auth-editorial-feature__index {
  color: #8a5d41;
  font-size: 12px;
  line-height: 1.1;
  letter-spacing: 0.08em;
}

.auth-editorial-feature strong {
  font-size: 16px;
  line-height: 1.3;
}

.auth-editorial-feature p {
  margin: 0;
  color: #43342a;
  line-height: 1.6;
}

.auth-editorial-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: start;
  width: 100%;
}

.auth-editorial-metrics__item {
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(239, 205, 184, 0.9);
  background: rgba(255, 255, 255, 0.6);
}

.auth-editorial-metrics__item strong {
  font-size: 16px;
  line-height: 1.2;
}

.auth-editorial-metrics__item span {
  color: #5e4c40;
  font-size: 13px;
}

.auth-card--editorial {
  width: min(460px, 100%);
  margin: 0;
  padding: 30px clamp(20px, 3vw, 30px);
  border-radius: 28px;
  border: 1px solid #efcdb8;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 50px rgba(124, 74, 33, 0.12);
}

.auth-editorial-card__header {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
}

.auth-editorial-card__eyebrow {
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.auth-editorial-card__header h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.1;
}

.auth-editorial-card__header p {
  margin: 0;
  color: #5e4c40;
  font-size: 15px;
  line-height: 1.6;
}

.auth-editorial-card__capabilities {
  color: #47362b;
  font-size: 14px;
  line-height: 1.5;
}

.auth-card--editorial .auth-login-form {
  gap: 16px;
}

.auth-card--editorial .auth-login-form label {
  gap: 8px;
}

.auth-card--editorial .auth-login-form span {
  color: #3b2d24;
  font-size: 13px;
  font-weight: 700;
}

.auth-card--editorial .auth-login-form input {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #f2ad80;
  background: #eef4ff;
}

.auth-card--editorial .auth-login-form input:focus {
  outline: none;
  border-color: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.auth-card--editorial .auth-login-form .btn {
  width: 100%;
  min-height: 48px;
  margin-top: 2px;
  border-radius: 12px;
  box-shadow: 0 12px 22px rgba(249, 115, 22, 0.22);
}

.auth-card--editorial .auth-login-form__hint {
  margin: 4px 0 0;
  color: #665549;
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
}

@media (max-width: 1180px) {
  .auth-stage__left,
  .auth-stage__right {
    padding: 34px;
  }

  .auth-editorial-copy__eyebrow,
  .auth-editorial-copy h1 {
    font-size: clamp(24px, 3vw, 34px);
  }
}

@media (max-width: 900px) {
  .auth-stage {
    min-height: auto;
    min-height: unset;
  }

  .auth-stage--split {
    grid-template-columns: 1fr;
    min-height: auto;
    min-height: unset;
  }

  .auth-stage__left,
  .auth-stage__right {
    min-height: auto;
    min-height: unset;
    padding: 32px 24px;
  }

  .auth-stage__right {
    border-left: 0;
    border-top: 1px solid #efddcf;
  }

  .auth-editorial-copy__eyebrow,
  .auth-editorial-copy h1 {
    max-width: 16ch;
  }
}

@media (max-width: 540px) {
  .auth-stage__left,
  .auth-stage__right {
    padding: 22px 18px;
  }

  .auth-editorial-logos .brand__logo {
    height: 72px;
    padding: 12px 18px;
  }

  .auth-editorial-logos .brand__logo img {
    max-height: 36px;
    max-width: 144px;
  }

  .auth-editorial-copy__eyebrow,
  .auth-editorial-copy h1 {
    max-width: none;
    font-size: 28px;
  }

  .auth-editorial-feature {
    padding: 14px 14px;
  }

  .auth-editorial-feature__heading {
    grid-template-columns: auto 1fr;
  }

  .auth-editorial-feature__index {
    grid-column: 2;
  }

  .auth-editorial-feature strong {
    grid-column: 2;
  }

  .auth-editorial-metrics__item {
    min-width: 0;
    flex: 1 1 100%;
  }

  .auth-card--editorial {
    width: 100%;
    padding: 24px 18px;
  }
}

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

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

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

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

.form-grid label,
.subgrid label,
.stack-sm label,
.stack-md label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.form-grid span,
.subgrid span,
.stack-sm span,
.stack-md span {
  font-weight: 600;
}

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

[hidden] {
  display: none !important;
}

input, select, textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  accent-color: var(--primary-dark);
  box-shadow: none;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-weight: 700;
}

.check-row input {
  flex: 0 0 auto;
}

.security-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: end;
}

.security-grid .actions {
  grid-column: 1 / -1;
}

.captcha-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.captcha-check {
  display: flex !important;
  align-items: center;
  gap: 12px !important;
  padding: 12px 14px;
  border: 1px solid #f1dfd2;
  border-radius: 12px;
  background: #fffaf6;
  font-weight: 700;
}

.captcha-check input {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
}

.captcha-image-challenge {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid #f1dfd2;
  border-radius: 14px;
  background: #fffaf6;
}

.captcha-image-challenge legend {
  padding: 0 6px;
  color: var(--text);
  font-weight: 800;
}

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

.captcha-image-tile {
  position: relative;
  display: block !important;
  cursor: pointer;
}

.captcha-image-tile input {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  width: 18px;
  height: 18px;
}

.captcha-image-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 2px solid #f1dfd2;
  border-radius: 10px;
  background: #fff;
  object-fit: cover;
}

.captcha-image-tile input:checked + img {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(249, 115, 22, 0.18);
  border-color: rgba(249, 115, 22, 0.45);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.password-toggle-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-toggle-wrap input {
  padding-right: 46px;
}

.password-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  box-shadow: none;
}

.password-toggle-btn:hover {
  color: var(--primary-dark);
  background: rgba(249, 115, 22, 0.08);
}

.password-toggle-btn:focus-visible {
  outline: 2px solid rgba(249, 115, 22, 0.2);
}

.password-toggle-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

textarea.code,
pre.json-block {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 11px 15px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.18);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--primary-dark);
  border: 1px solid #ffd7bf;
}

.btn-secondary:hover {
  background: #ffe9db;
}

.btn-danger {
  background: #fee4e2;
  color: #b42318;
}

.btn-danger:hover {
  background: #fdd5d1;
}

.btn-sm {
  padding: 8px 11px;
  font-size: 13px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.col-span-2 { grid-column: 1 / -1; }

.toast-stack {
  position: fixed;
  top: 92px;
  right: 16px;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(440px, calc(100vw - 32px));
  pointer-events: none;
}

.flash {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  font-weight: 600;
  box-shadow: 0 18px 32px rgba(44, 29, 20, 0.12);
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.flash--closing {
  opacity: 0;
  transform: translateY(-8px);
}

.flash__body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.flash__close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: inherit;
  box-shadow: none;
  font-size: 18px;
  line-height: 1;
}

.flash__close:hover {
  background: rgba(255, 255, 255, 0.8);
}

.flash-success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: #b7ebcf;
}

.flash-error {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: #fecaca;
}

.field-missing > span {
  color: var(--error-text);
}

.input-missing {
  border-color: #fda29b;
  background: #fff7f6;
}

.input-missing:focus {
  outline: 2px solid rgba(180, 35, 24, 0.16);
  border-color: #f97066;
}

.field-error {
  color: var(--error-text);
  font-size: 12px;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.stat-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}

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

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(320px, 1.5fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: 26px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 38%),
    linear-gradient(135deg, #fffaf6, #ffffff 58%);
}

.dashboard-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: #b45309;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-hero__copy h1 {
  margin: 0 0 10px;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 0.95;
}

.dashboard-hero__copy p {
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 16px;
}

.dashboard-hero__summary {
  display: grid;
  gap: 12px;
}

.dashboard-summary-card {
  border: 1px solid #f3dfd0;
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.86);
}

.dashboard-summary-card__label {
  display: block;
  color: #8b5e3c;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
}

.dashboard-summary-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

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

.dashboard-indicator {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, #fffdfb, #ffffff);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.dashboard-indicator__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dashboard-indicator__label {
  color: #7a5b47;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-indicator__link {
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-indicator__value {
  font-size: 42px;
  line-height: 1;
}

.dashboard-indicator__hint {
  color: var(--muted);
  font-size: 13px;
}

.dashboard-indicator--primary {
  background: linear-gradient(180deg, #fff5ed, #ffffff 70%);
}

.dashboard-indicator--success {
  background: linear-gradient(180deg, #f3fbf7, #ffffff 72%);
}

.dashboard-indicator--alert {
  background: linear-gradient(180deg, #fff7ed, #ffffff 72%);
}

.dashboard-indicator--cool {
  background: linear-gradient(180deg, #f6fbff, #ffffff 72%);
}

.dashboard-indicator--warm {
  background: linear-gradient(180deg, #fffaf3, #ffffff 72%);
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1.15fr) minmax(260px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.dashboard-panel {
  display: grid;
  gap: 18px;
}

.dashboard-panel--full {
  grid-column: 1 / -1;
}

.dashboard-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.dashboard-panel__header h2 {
  margin: 0 0 6px;
}

.dashboard-panel__header p {
  margin: 0;
  color: var(--muted);
}

.dashboard-panel__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(240, 217, 202, 0.95);
  color: #9a3412;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-panel__summary {
  display: grid;
  gap: 2px;
  justify-items: end;
  align-content: start;
  padding: 10px 14px;
  min-width: 112px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(240, 217, 202, 0.92);
  box-shadow: 0 12px 24px rgba(121, 71, 30, 0.08);
}

.dashboard-panel__summary strong {
  font-size: 28px;
  line-height: 1;
  color: #9a3412;
}

.dashboard-panel__summary span {
  color: #8b6b57;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.dashboard-pulse {
  border: 1px solid #f0dccf;
  border-radius: 18px;
  padding: 16px;
  background: #fffaf6;
  display: grid;
  gap: 4px;
}

.dashboard-pulse strong {
  font-size: 30px;
  line-height: 1;
}

.dashboard-pulse span {
  font-weight: 800;
  color: #6f4f3c;
}

.dashboard-pulse small {
  color: var(--muted);
}

.dashboard-status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-status-chip {
  border-radius: 16px;
  padding: 14px;
  border: 1px solid #eed9cb;
  background: #fff;
  display: grid;
  gap: 6px;
}

.dashboard-status-chip span {
  color: #8b6a54;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-status-chip strong {
  font-size: 24px;
  line-height: 1;
}

.dashboard-status-chip--ok {
  background: #f3fbf7;
}

.dashboard-status-chip--warn {
  background: #fff7ed;
}

.dashboard-status-chip--off {
  background: #fff4f4;
}

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

.dashboard-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  font-weight: 800;
  transition: 0.18s ease;
}

.dashboard-action::after {
  content: '›';
  font-size: 22px;
  line-height: 1;
}

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

.dashboard-action--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}

.dashboard-action--secondary {
  background: var(--secondary);
  color: var(--primary-dark);
}

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

.dashboard-program-card {
  border: 1px solid #f0dccf;
  border-radius: 18px;
  padding: 16px;
  background: #fffaf6;
  display: grid;
  gap: 8px;
}

.dashboard-program-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dashboard-filter-card {
  gap: 16px;
}

.dashboard-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.dashboard-filter-form {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.dashboard-filter-form .field {
  min-width: 180px;
}

.dashboard-export-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-line-chart {
  border: 1px solid #f1dfd2;
  border-radius: 20px;
  padding: 12px;
  background: linear-gradient(180deg, #fffdfb, #ffffff);
}

.dashboard-line-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.dashboard-line-chart__grid {
  stroke: #f0e2d8;
  stroke-width: 1;
}

.dashboard-line-chart__axis {
  fill: #8b6b57;
  font-size: 11px;
  font-weight: 700;
}

.dashboard-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7a5b47;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-legend__swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
}

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

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

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

.dashboard-bar-row__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.dashboard-bar-row__top strong {
  font-size: 14px;
}

.dashboard-bar-row__top span {
  color: #7a5b47;
  font-weight: 800;
}

.dashboard-bar-row__track {
  height: 10px;
  border-radius: 999px;
  background: #f7ebe2;
  overflow: hidden;
}

.dashboard-bar-row__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8a26, #ff6a00);
}

.dashboard-panel--showcase {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.1), transparent 26%),
    linear-gradient(180deg, #fffdfa 0%, #fff8f2 100%);
}

.dashboard-panel--showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.56), rgba(255,255,255,0)),
    radial-gradient(circle at bottom left, rgba(255, 175, 92, 0.12), transparent 28%);
  pointer-events: none;
  z-index: 0;
}

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

.dashboard-panel--showcase-programs {
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 26%),
    linear-gradient(180deg, #fffdfa 0%, #fff6ef 100%);
}

.dashboard-panel--showcase-activity {
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.16), transparent 28%),
    linear-gradient(180deg, #fffdfb 0%, #fff8f4 100%);
}

.dashboard-bar-list--showcase {
  gap: 14px;
}

.dashboard-bar-row--showcase {
  position: relative;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(240, 217, 202, 0.96);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,247,240,0.96));
  box-shadow: 0 14px 28px rgba(124, 74, 33, 0.08);
  overflow: hidden;
}

.dashboard-bar-row--showcase::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--bar-accent, #ff9a3d), var(--bar-accent-strong, #ff6a00));
}

.dashboard-bar-row__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dashboard-bar-row__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bar-chip-bg, #fff5ec);
  color: var(--bar-accent-strong, #9a3412);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-bar-row__hint {
  color: #8b6b57;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-bar-row--showcase .dashboard-bar-row__top {
  align-items: center;
}

.dashboard-bar-row--showcase .dashboard-bar-row__top strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  line-height: 1.35;
}

.dashboard-bar-row__value-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), var(--bar-chip-bg, #fff5ec));
  border: 1px solid rgba(240, 217, 202, 0.96);
  color: var(--bar-accent-strong, #9a3412);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(124, 74, 33, 0.08);
}

.dashboard-bar-row--showcase .dashboard-bar-row__track {
  height: 14px;
  padding: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f9ede4, #f3e2d5);
  box-shadow: inset 0 1px 2px rgba(124, 74, 33, 0.08);
}

.dashboard-bar-row--showcase .dashboard-bar-row__track span {
  min-width: 14px;
  background: linear-gradient(90deg, var(--bar-accent, #ff9a3d), var(--bar-accent-strong, #ff6a00));
  box-shadow: 0 8px 16px rgba(249, 115, 22, 0.24);
}

.dashboard-bar-list--programs .dashboard-bar-row--showcase:nth-child(5n + 1),
.dashboard-bar-list--activity .dashboard-bar-row--showcase:nth-child(5n + 1) {
  --bar-accent: #ffb168;
  --bar-accent-strong: #ff6a00;
  --bar-chip-bg: #fff2e4;
}

.dashboard-bar-list--programs .dashboard-bar-row--showcase:nth-child(5n + 2),
.dashboard-bar-list--activity .dashboard-bar-row--showcase:nth-child(5n + 2) {
  --bar-accent: #ff9b5c;
  --bar-accent-strong: #f97316;
  --bar-chip-bg: #ffefe5;
}

.dashboard-bar-list--programs .dashboard-bar-row--showcase:nth-child(5n + 3),
.dashboard-bar-list--activity .dashboard-bar-row--showcase:nth-child(5n + 3) {
  --bar-accent: #f59e8b;
  --bar-accent-strong: #e76f51;
  --bar-chip-bg: #fff0ed;
}

.dashboard-bar-list--programs .dashboard-bar-row--showcase:nth-child(5n + 4),
.dashboard-bar-list--activity .dashboard-bar-row--showcase:nth-child(5n + 4) {
  --bar-accent: #ffd166;
  --bar-accent-strong: #f59e0b;
  --bar-chip-bg: #fff5df;
}

.dashboard-bar-list--programs .dashboard-bar-row--showcase:nth-child(5n),
.dashboard-bar-list--activity .dashboard-bar-row--showcase:nth-child(5n) {
  --bar-accent: #58c4be;
  --bar-accent-strong: #0f766e;
  --bar-chip-bg: #e9fbf8;
}

.dashboard-pyramid {
  display: grid;
  gap: 10px;
}

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

.dashboard-pyramid__header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-pyramid__side--female {
  text-align: right;
}

.dashboard-pyramid__side--male {
  text-align: left;
}

.dashboard-pyramid__middle,
.dashboard-pyramid__age {
  text-align: center;
  font-weight: 800;
  color: var(--text);
}

.dashboard-pyramid__half {
  display: grid;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.dashboard-pyramid__half--female {
  grid-template-columns: 44px minmax(0, 1fr);
}

.dashboard-pyramid__half--male {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.dashboard-pyramid__half--female .dashboard-pyramid__track {
  justify-content: flex-end;
}

.dashboard-pyramid__half:hover .dashboard-pyramid__count,
.dashboard-pyramid__extra:hover strong,
.dashboard-pyramid__extra:hover span {
  color: var(--primary-dark);
}

.dashboard-pyramid__track {
  display: flex;
  height: 22px;
  align-items: center;
}

.dashboard-pyramid__fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 999px;
}

.dashboard-pyramid__fill--female {
  background: linear-gradient(90deg, #f4a3b4, #e9809a);
}

.dashboard-pyramid__fill--male {
  background: linear-gradient(90deg, #88aee6, #5c87c7);
}

.dashboard-pyramid__count {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.dashboard-pyramid__extra {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #f0dccf;
  background: #fff8f3;
  color: var(--text);
  text-decoration: none;
}

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

.dashboard-metric-card {
  border: 1px solid #f0dccf;
  border-radius: 18px;
  padding: 14px 16px;
  background: #fffaf6;
  display: grid;
  gap: 6px;
}

.dashboard-metric-card span {
  color: #8b6b57;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-metric-card strong {
  font-size: 28px;
  line-height: 1;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(320px, 1fr);
}

.gap-xl { gap: 20px; }
.gap-lg { gap: 16px; }
.align-start { align-items: start; }
.top-gap { margin-top: 20px; }
.top-gap-xs { margin-top: 6px; }

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-wrap { overflow: auto; }

.email-log-table-wrap {
  width: 100%;
  overflow: auto;
  padding-bottom: 6px;
}

.email-log-table {
  width: 100%;
  min-width: 1720px;
  table-layout: auto;
}

.email-log-table th {
  white-space: nowrap;
}

.email-log-table td {
  min-width: 0;
  vertical-align: top;
}

.email-log-table th:nth-child(1),
.email-log-table td:nth-child(1) {
  width: 10%;
}

.email-log-table th:nth-child(2),
.email-log-table td:nth-child(2) {
  width: 14%;
}

.email-log-table th:nth-child(3),
.email-log-table td:nth-child(3) {
  width: 14%;
}

.email-log-table th:nth-child(4),
.email-log-table td:nth-child(4) {
  width: 12%;
}

.email-log-table th:nth-child(5),
.email-log-table td:nth-child(5) {
  width: 13%;
}

.email-log-table th:nth-child(6),
.email-log-table td:nth-child(6) {
  width: 13%;
}

.email-log-table th:nth-child(7),
.email-log-table td:nth-child(7) {
  width: 8%;
}

.email-log-table th:nth-child(8),
.email-log-table td:nth-child(8) {
  width: 16%;
}

.email-log-table__error-cell {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.email-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.email-settings-note {
  margin: 0;
}

.meta-card--source {
  grid-column: span 2;
}

.source-chip-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.source-chip {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #f1ddcf;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: anywhere;
}

.source-chip strong {
  color: var(--text);
  font-size: 12px;
}

.email-settings-actions {
  gap: 16px;
  margin-top: 8px;
}

.email-settings-actions form {
  margin: 0;
}

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

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

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

.table-sortable__header {
  position: relative;
  cursor: pointer;
  user-select: none;
  padding-right: 26px;
  transition: color 0.18s ease;
}

.table-sortable__header:hover {
  color: var(--primary-dark);
}

.table-sortable__header::after {
  content: "↕";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  opacity: 0.45;
  color: var(--muted);
}

.table-sortable__header[data-sort-direction="asc"] {
  color: var(--primary-dark);
}

.table-sortable__header[data-sort-direction="asc"]::after {
  content: "↑";
  opacity: 1;
  color: var(--primary-dark);
}

.table-sortable__header[data-sort-direction="desc"] {
  color: var(--primary-dark);
}

.table-sortable__header[data-sort-direction="desc"]::after {
  content: "↓";
  opacity: 1;
  color: var(--primary-dark);
}

.table-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
}

.table-sort-link:hover {
  color: var(--primary-dark);
}

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

.filters-inline .field {
  display: grid;
  gap: 6px;
}

.filters-inline .field--search {
  flex: 1 1 300px;
}

.filters-inline input[type="text"],
.filters-inline input[type="search"] {
  min-width: 280px;
}

.filters-inline select {
  min-width: 220px;
}

.selection-panel {
  display: grid;
  gap: 14px;
}

.selection-panel__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.selection-panel__field {
  min-width: 0;
}

.selection-panel__field select {
  min-width: 0;
}

.patient-picker {
  position: relative;
}

.patient-picker__control {
  position: relative;
}

.patient-picker__control input {
  padding-right: 44px;
}

.patient-picker__clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
  color: var(--primary-dark);
  box-shadow: none;
}

.patient-picker__clear:hover {
  background: rgba(249, 115, 22, 0.18);
}

.patient-picker__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #f1dfd2;
  border-radius: 18px;
  background: #fffdfa;
  box-shadow: 0 18px 32px rgba(44, 29, 20, 0.12);
  max-height: 320px;
  overflow: auto;
}

.patient-picker__hint {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.patient-picker__results {
  display: grid;
  gap: 8px;
}

.patient-picker__option {
  width: 100%;
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #f4e1d1;
  border-radius: 14px;
  background: #fff7f1;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.patient-picker__option:hover,
.patient-picker__option.is-active {
  background: #fff1e8;
  border-color: #fac7a6;
}

.patient-picker__option strong {
  font-size: 14px;
  font-weight: 700;
}

.patient-picker__option span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.patient-table-actions {
  display: grid;
  gap: 8px;
  min-width: 128px;
}

.container.patients-page {
  width: min(1680px, calc(100% - 32px));
}

.patients-page__header {
  align-items: center;
}

.section-heading--split {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.patients-page__summary {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.patients-page__summary strong {
  font-size: 28px;
  line-height: 1;
}

.patients-page__summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.patients-search-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(220px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.patients-search-row__clear {
  align-self: end;
}

.patients-search-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.patients-table-wrap {
  width: 100%;
  overflow: auto;
  padding-bottom: 6px;
}

.patients-table {
  width: 100%;
  min-width: 1420px;
  table-layout: auto;
  font-size: 14px;
}

.patients-table th,
.patients-table td {
  padding: 12px 10px;
}

.patients-table th {
  white-space: nowrap;
}

.patients-table td {
  min-width: 0;
  vertical-align: top;
  line-height: 1.45;
}

.patients-table th:nth-child(1),
.patients-table td:nth-child(1) {
  width: 13%;
}

.patients-table th:nth-child(2),
.patients-table td:nth-child(2) {
  width: 9%;
}

.patients-table th:nth-child(3),
.patients-table td:nth-child(3) {
  width: 10%;
}

.patients-table th:nth-child(4),
.patients-table td:nth-child(4) {
  width: 9%;
}

.patients-table th:nth-child(5),
.patients-table td:nth-child(5) {
  width: 8%;
}

.patients-table th:nth-child(6),
.patients-table td:nth-child(6) {
  width: 15%;
}

.patients-table th:nth-child(7),
.patients-table td:nth-child(7) {
  width: 7%;
}

.patients-table th:nth-child(8),
.patients-table td:nth-child(8) {
  width: 8%;
}

.patients-table th:nth-child(9),
.patients-table td:nth-child(9) {
  width: 13%;
}

.patients-table th:last-child,
.patients-table td:last-child {
  position: sticky;
  right: 0;
  width: 172px;
  min-width: 172px;
  background: #fffdfb;
  box-shadow: -14px 0 20px rgba(124, 74, 33, 0.08);
  z-index: 2;
}

.patients-table th:last-child {
  z-index: 3;
}

.patients-table__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.patients-table__actions .btn {
  white-space: nowrap;
  flex: 0 0 auto;
  padding-inline: 10px;
}

.patients-table__subnote {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
}

.patients-table__empty {
  padding: 22px 14px;
  text-align: center;
}

.patients-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.patients-tooltip:hover .patients-tooltip__content,
.patients-tooltip:focus-within .patients-tooltip__content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.patients-tooltip__content {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  z-index: 20;
  width: min(360px, 42vw);
  min-width: 240px;
  padding: 14px 16px;
  border: 1px solid #f0d9ca;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 34px rgba(70, 42, 20, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  pointer-events: none;
}

.patients-tooltip__content strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
}

.patients-tooltip__list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.patients-metric-badge,
.patients-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.patients-metric-badge {
  min-width: 28px;
  background: #fff7f1;
  border-color: #f3d6c0;
  color: #9a3412;
}

.patients-status-badge--success {
  background: #ecfdf3;
  border-color: #b7ebcf;
  color: #027a48;
}

.patients-status-badge--warning {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #b45309;
}

.patients-status-badge--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b42318;
}

.field--invalid input,
.field--invalid select,
.field--invalid textarea {
  border-color: #f97066;
  background: #fff7f6;
}

.field--invalid input:focus,
.field--invalid select:focus,
.field--invalid textarea:focus {
  outline: 2px solid rgba(180, 35, 24, 0.16);
  border-color: #f97066;
}

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

.plain-list.compact { gap: 8px; }

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

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1e8;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #ffd9c2;
}

.pill--ok,
.pill--status-active,
.pill--status-replaced {
  background: #ecfdf3;
  border: 1px solid #b7ebcf;
  color: #027a48;
}

.pill--off,
.pill--status-inactive,
.pill--status-expired,
.pill--status-cancelled {
  background: #fef3f2;
  border: 1px solid #fecaca;
  color: #b42318;
}

.pill--status-draft,
.pill--status-upcoming,
.pill--status-partial {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #b45309;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pill--role-admin,
.audit-role-pill--admin {
  background: var(--role-admin-bg);
  border-color: var(--role-admin-border);
  color: var(--role-admin-text);
}

.pill--role-doctor,
.audit-role-pill--doctor {
  background: var(--role-doctor-bg);
  border-color: var(--role-doctor-border);
  color: var(--role-doctor-text);
}

.pill--role-nutritionist,
.audit-role-pill--nutritionist {
  background: var(--role-nutritionist-bg);
  border-color: var(--role-nutritionist-border);
  color: var(--role-nutritionist-text);
}

.pill--role-staff,
.audit-role-pill--staff {
  background: var(--role-staff-bg);
  border-color: var(--role-staff-border);
  color: var(--role-staff-text);
}

.pill--role-default,
.audit-role-pill--default {
  background: #fff1e8;
  border-color: #ffd9c2;
  color: var(--primary-dark);
}

.detail-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 14px;
  margin: 0;
}

.detail-grid dt {
  color: var(--muted);
  font-weight: 600;
}

.detail-grid dd { margin: 0; }

.stack-sm { display: grid; gap: 10px; }
.stack-md { display: grid; gap: 14px; }
.stack-lg { display: grid; gap: 20px; }

.version-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fffaf6;
}

.attachment-upload__file {
  background: #fff;
}

.doctor-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.doctor-summary-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  min-width: 0;
}

.doctor-summary-item strong {
  font-size: 13px;
}

.doctor-summary-item span {
  font-size: 14px;
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.doctor-summary-item--missing {
  border-color: #fecaca;
  background: #fff4f3;
}

.doctor-summary-item--missing span {
  color: var(--error-text);
}

.guide-hero {
  display: grid;
  gap: 6px;
}

.guide-alert {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--error-bg);
  border: 1px solid #fecaca;
  color: var(--error-text);
  font-weight: 700;
}

.guide-section {
  display: grid;
  gap: 10px;
}

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

.guide-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fffaf6;
}

.guide-item span {
  font-weight: 600;
}

.guide-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.guide-item--missing {
  border-color: #fecaca;
  background: #fff4f3;
}

.guide-item--missing small {
  color: var(--error-text);
}

.version-card__header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.sticky-card {
  position: sticky;
  top: 20px;
}

summary {
  cursor: pointer;
  font-weight: 700;
  margin-top: 10px;
}

.collapse-panel > summary {
  margin-top: 0;
  list-style: none;
}

.collapse-panel > summary::-webkit-details-marker {
  display: none;
}

.collapse-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.collapse-summary__copy {
  display: grid;
  gap: 4px;
}

.collapse-summary__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #ffd9c2;
  background: #fffaf6;
  color: var(--primary-dark);
  flex: 0 0 auto;
  transition: transform 0.18s ease, background 0.18s ease;
}

.collapse-summary__icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.collapse-panel[open] .collapse-summary__icon {
  transform: rotate(180deg);
  background: #ffe9db;
}

pre.json-block {
  background: #2c1d14;
  color: #fff0e8;
  border-radius: 14px;
  padding: 12px;
  overflow: auto;
}

.section-heading h2,
.section-heading h3 {
  margin: 0 0 4px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

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

.no-margin { margin: 0; }

.license-row {
  display: grid;
  grid-template-columns: 120px 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf6;
}

.stacked-actions { align-items: stretch; }
.user-form { margin: 0; }
.doctor-only { display: grid; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff1e8;
  color: var(--primary-dark);
  font-weight: 800;
}

.avatar-sm {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  border-radius: 14px;
  font-size: 20px;
}

.avatar-xl {
  width: 110px;
  height: 110px;
  min-width: 110px;
  min-height: 110px;
  border-radius: 18px;
  font-size: 36px;
}

.avatar-fallback {
  background: linear-gradient(135deg, #ffe8d8, #fff2e8);
  color: #9a3412;
}

/* Usuarios */

.users-page__header {
  align-items: center;
}

.filters-card {
  padding: 18px 20px;
}

.filters-grid {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

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

.users-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.users-summary__item {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff4eb;
  border: 1px solid #ffd9c2;
}

.users-summary__item strong {
  font-size: 22px;
  color: var(--primary-dark);
}

.users-summary__item span {
  color: var(--muted);
  font-weight: 600;
}

.user-cards {
  display: grid;
  gap: 18px;
}

.user-card {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(360px, 1fr) 130px;
  gap: 18px;
  align-items: start;
  padding: 18px;
}

.user-card__identity {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.user-card__avatar-wrap {
  flex: 0 0 auto;
}

.user-card__avatar {
  width: 82px;
  height: 82px;
  min-width: 82px;
  min-height: 82px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
  border: 1px solid #f0d8c6;
  background: #fff;
}

.user-card__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffe8d8, #fff2e8);
  color: #9a3412;
  font-size: 28px;
  font-weight: 800;
}

.user-card__identity-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

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

.user-card__title-row h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.user-card__email {
  color: var(--muted);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.user-card__subnote {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #8b5e3c;
}

.user-card__subnote::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d8c3b5;
  flex: 0 0 auto;
}

.user-card__subnote--ok {
  color: var(--success-text);
}

.user-card__subnote--ok::before {
  background: #10b981;
}

.user-card__subnote--missing {
  color: var(--error-text);
}

.user-card__subnote--missing::before {
  background: #ef4444;
}

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

.meta-card {
  background: #fffaf6;
  border: 1px solid #f1ddcf;
  border-radius: 16px;
  padding: 14px;
  min-height: 100%;
}

.meta-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  color: #7a5b47;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mini-kv {
  display: grid;
  gap: 10px;
  margin: 0;
}

.mini-kv > div {
  display: grid;
  gap: 3px;
}

.mini-kv dt {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mini-kv dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.meta-label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.actions-stack {
  display: grid;
  gap: 10px;
  width: 100%;
}

.actions-stack .btn,
.actions-stack form {
  width: 100%;
}

.actions-stack .btn {
  justify-content: center;
}

.license-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fffaf6;
}

.license-card.compact {
  padding: 8px 10px;
  font-size: 13px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state {
  text-align: center;
  padding: 36px;
}

.empty-state h2 {
  margin: 0 0 8px;
}

/* Perfil */

.profile-hero {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf6 100%);
}

.profile-hero__media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-hero__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-hero__title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.profile-hero__title h2 {
  margin: 0;
  font-size: 28px;
}

.profile-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px 16px;
  font-size: 14px;
  color: var(--text);
}

.profile-summary > div {
  padding: 10px 12px;
  border: 1px solid #f1ddcf;
  border-radius: 14px;
  background: #fffaf6;
}

.profile-info-card {
  background: linear-gradient(180deg, #ffffff 0%, #fffaf6 100%);
}

.profile-info-card__heading,
.profile-medical-card__heading {
  display: grid;
  gap: 4px;
}

.profile-info-card__heading h2,
.profile-medical-card__heading h2 {
  margin: 0;
}

.profile-info-card__heading p,
.profile-medical-card__heading p {
  margin: 0;
  color: var(--muted);
}

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

.profile-fact {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #f1ddcf;
  border-radius: 16px;
  background: #fff;
}

.profile-fact dt {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-fact dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}

.profile-fact--wide {
  grid-column: span 2;
}

.profile-fact--status dd {
  display: flex;
  align-items: center;
}

.doctor-profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.signature-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fffaf6;
}

.signature-card--missing {
  border-color: #fecaca;
  background: #fff4f3;
}

.signature-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.signature-card h4 {
  margin-top: 0;
  margin-bottom: 12px;
}

.signature-preview {
  display: block;
  width: 100%;
  max-width: 320px;
  max-height: 180px;
  min-height: 96px;
  object-fit: contain;
  margin: 0 auto;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: white;
  padding: 10px;
}

.signature-card__status {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}

.signature-card__status--ok {
  color: var(--success-text);
}

.signature-card__status--missing {
  color: var(--error-text);
}

.choice-group {
  display: grid;
  gap: 8px;
  align-content: start;
}

.choice-item,
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.choice-item--card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf6;
}

.choice-item input,
.checkbox-row input {
  width: auto;
}

.repeater-builder {
  display: grid;
  gap: 10px;
}

.repeater-builder.input-missing {
  padding: 12px;
  border: 1px solid #fda29b;
  border-radius: 14px;
  background: #fff7f6;
}

.repeater-rows {
  display: grid;
  gap: 10px;
}

.repeater-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fffaf6;
  display: grid;
  gap: 10px;
}

.repeater-row__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.hidden {
  display: none !important;
}

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

.diabetes-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #fffaf6;
}

.diabetes-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.diabetes-panel__header h3,
.diabetes-panel__header h4 {
  margin: 0 0 4px;
}

.diabetes-panel__header p {
  margin: 0;
  color: var(--muted);
}

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

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

.diabetes-grid--treatment {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.diabetes-grid--supply {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.diabetes-grid--other-supply {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.diabetes-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  align-items: start;
}

.diabetes-mini-card,
.diabetes-complication,
.diabetes-treatment-row {
  border: 1px solid #f0dccf;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 12px;
}

.diabetes-complications {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.diabetes-label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.diabetes-warning {
  color: #b54708;
  font-size: 12px;
  font-weight: 700;
}

.choice-group--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.diabetes-form .checkbox-row,
.diabetes-form .choice-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.diabetes-form .checkbox-row span,
.diabetes-form .choice-item span {
  font-weight: 500;
}

.diabetes-form .checkbox-row input,
.diabetes-form .choice-item input {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

.res310-form .res310-diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  align-items: start;
}

.res310-form .res310-diagnosis-card {
  border: 1px solid #f0dccf;
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, #fffdfb, #ffffff);
  display: grid;
  gap: 12px;
  box-shadow: 0 8px 18px rgba(124, 74, 33, 0.04);
}

.res310-form .res310-diagnosis-card h4 {
  margin: 0;
  font-size: 16px;
}

.res310-form .res310-diagnosis-list {
  display: grid;
  gap: 10px;
}

.res310-form .res310-diagnosis-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid #f4e3d8;
  background: #fff8f3;
  font-size: 14px;
}

.res310-form .res310-diagnosis-item input {
  margin-top: 2px;
  flex: 0 0 auto;
}

.res310-form .res310-diagnosis-item span {
  font-weight: 600;
  line-height: 1.3;
}

.res310-treatment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tct-form .tct-treatment-table {
  border: 1px solid #f0dccf;
  border-radius: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fffdfb;
}

.tct-form .tct-treatment-table__head,
.tct-form .tct-treatment-table__row {
  display: grid;
  grid-template-columns: 110px 110px minmax(150px, 1fr) minmax(220px, 1.2fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.tct-form .tct-treatment-table__head {
  background: #fff1e7;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8e5c37;
}

.tct-form .tct-treatment-table__row {
  border-top: 1px solid #f5e6dc;
  font-size: 14px;
}

.tct-form .tct-treatment-table__row:nth-child(even) {
  background: #fffaf6;
}

.tct-form .tct-treatment-table__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tct-form .tct-treatment-table__check input {
  width: auto;
  height: auto;
  margin: 0;
}

.obesity-form .obesity-lab-table {
  border: 1px solid #f0dccf;
  border-radius: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fffdfb;
}

.obesity-form .obesity-lab-table__head,
.obesity-form .obesity-lab-table__row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(160px, 1fr) minmax(150px, 0.8fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.obesity-form .obesity-lab-table__head {
  background: #fff1e7;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8e5c37;
}

.obesity-form .obesity-lab-table__row {
  border-top: 1px solid #f5e6dc;
}

.obesity-form .obesity-lab-table__row:nth-child(even) {
  background: #fffaf6;
}

.signature-card .muted {
  margin: 0;
  text-align: center;
}

.enrollment-form-card,
.enrollment-history-card {
  width: 100%;
}

.enrollment-summary-card {
  width: 100%;
}

.enrollment-summary-grid {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.enrollment-current-version {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffaf6;
}

.enrollment-current-version__pdf-btn {
  min-width: 124px;
  padding: 10px 16px;
}

.enrollment-actions-card {
  width: 100%;
}

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

.app-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(560px, calc(100% - 24px));
  width: 100%;
}

.app-dialog::backdrop {
  background: rgba(35, 25, 19, 0.45);
  backdrop-filter: blur(3px);
}

.dialog-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 24px 48px rgba(70, 42, 20, 0.2);
  padding: 22px;
}

@media (max-width: 1280px) {
  .auth-shell--split {
    grid-template-columns: 1fr;
    max-width: calc(100vw - 24px);
    padding: 20px 0;
  }

  .auth-hero,
  .auth-login-panel {
    min-height: auto;
  }

  .auth-card--showcase {
    width: min(560px, 100%);
  }

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

  .user-card__actions {
    justify-content: flex-start;
  }

  .actions-stack {
    max-width: 220px;
  }

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

@media (max-width: 980px) {
  .stats-grid,
  .dashboard-indicator-grid,
    .form-grid,
    .subgrid,
    .license-row,
    .filters-grid,
    .user-card__details,
  .grid-2,
  .patients-search-row {
    grid-template-columns: 1fr;
  }

  .auth-hero__copy h1 {
    max-width: none;
  }

  .auth-metric-row {
    grid-template-columns: 1fr;
  }

  .col-span-2 {
    grid-column: auto;
  }

  .sticky-card {
    position: static;
  }

  .dashboard-hero,
  .dashboard-layout,
  .dashboard-layout--analytics,
  .dashboard-pulse-grid,
  .dashboard-status-strip {
    grid-template-columns: 1fr;
  }

  .section-heading--split {
    flex-direction: column;
    align-items: flex-start;
  }

  .patients-page__summary {
    justify-items: start;
    text-align: left;
  }

  .dashboard-panel__header,
  .dashboard-program-card__top,
  .dashboard-filter-row,
  .dashboard-filter-form,
  .dashboard-bar-row__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-panel__summary {
    justify-items: start;
  }

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

  .topbar__inner {
    align-items: stretch;
  }

  .topbar-reminder__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-shell {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .brand {
    width: 100%;
    flex-wrap: wrap;
  }

  .brand__divider {
    display: none;
  }

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

  .profile-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-hero__media {
    justify-content: center;
  }

  .profile-hero__title {
    justify-content: center;
  }

  .profile-summary {
    grid-template-columns: 1fr;
  }

  .profile-facts {
    grid-template-columns: 1fr;
  }

  .profile-fact--wide {
    grid-column: auto;
  }

  .license-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .diabetes-grid,
  .diabetes-grid--treatment,
  .diabetes-grid--supply,
  .diabetes-grid--other-supply,
  .enrollment-form-card .form-grid--compact {
    grid-template-columns: 1fr;
  }

  .diabetes-panel__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .toast-stack,
  .enrollment-summary-grid,
  .selection-panel__row {
    grid-template-columns: 1fr;
  }

  .toast-stack {
    top: 82px;
    right: 12px;
    width: calc(100vw - 24px);
  }

  .meta-card--source,
  .source-chip-list {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .auth-shell--split {
    max-width: calc(100vw - 16px);
  }

  .container.patients-page,
  .container.dashboard-page {
    width: calc(100% - 24px);
  }

  .auth-hero,
  .auth-card--showcase {
    border-radius: 24px;
  }

  .auth-hero {
    padding: 24px 20px;
  }

  .auth-card--showcase {
    padding: 24px 18px;
  }

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

  .auth-feature-card__icon {
    width: 40px;
    height: 40px;
  }
}

.wrap-mobile {
  flex-wrap: wrap;
}

.compact-grid {
  grid-template-columns: 150px 1fr;
}

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

@media (max-width: 980px) {
  .program-grid {
    grid-template-columns: 1fr;
  }
}

.container.dashboard-page {
  width: min(1680px, calc(100% - 32px));
}

.dashboard-page.stack-lg {
  gap: 16px;
}

.dashboard-header {
  margin-bottom: 0;
}

.dashboard-header h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 2.6vw, 38px);
  line-height: 1;
}

.dashboard-header p {
  margin: 0;
  max-width: 72ch;
  color: var(--muted);
  font-size: 15px;
}

.dashboard-toolbar {
  gap: 18px;
}

.dashboard-first-fold {
  gap: 12px;
}

.dashboard-toolbar--hero {
  padding: 14px 18px;
}

.dashboard-toolbar__row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dashboard-toolbar__row--hero {
  align-items: center;
  gap: 14px 18px;
}

.dashboard-toolbar--hero .dashboard-filter-form {
  gap: 10px;
  flex: 1 1 auto;
}

.dashboard-toolbar--hero .dashboard-filter-form .field {
  min-width: 146px;
}

.dashboard-toolbar--hero .dashboard-export-actions .btn {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

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

.dashboard-indicator-grid--hero {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-indicator--hero {
  min-height: 102px;
  padding: 12px 14px;
  gap: 6px;
  align-content: start;
}

.dashboard-indicator--hero .dashboard-indicator__top {
  gap: 8px;
}

.dashboard-indicator--hero .dashboard-indicator__label {
  font-size: 10px;
  letter-spacing: 0.06em;
}

.dashboard-indicator--hero .dashboard-indicator__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff4ec;
  border: 1px solid #f4d1bb;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-indicator__value {
  font-size: clamp(34px, 3vw, 42px);
}

.dashboard-indicator--hero .dashboard-indicator__value {
  font-size: clamp(24px, 2vw, 38px);
}

.dashboard-indicator--hero .dashboard-indicator__hint {
  display: block;
  line-height: 1.25;
  font-size: 12px;
}

.dashboard-panel--hero-timeline {
  gap: 8px;
  padding: 14px 18px 16px;
}

.dashboard-panel__header--compact {
  align-items: end;
}

.dashboard-panel__header--compact h2 {
  margin-bottom: 4px;
}

.dashboard-panel__header--compact p {
  font-size: 13px;
}

.dashboard-line-chart--hero {
  display: grid;
  justify-items: center;
  padding: 8px 10px 4px;
}

.dashboard-line-chart--hero svg {
  width: min(100%, 1180px);
  height: clamp(168px, 15vw, 220px);
}

.dashboard-legend--hero {
  gap: 6px 10px;
  justify-content: center;
  max-width: 1180px;
  margin: 0 auto;
}

.dashboard-legend--hero .dashboard-legend__item {
  font-size: 12px;
  gap: 6px;
}

.dashboard-legend--hero .dashboard-legend__swatch {
  width: 10px;
  height: 10px;
}

.dashboard-sections {
  display: grid;
  gap: 22px;
}

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

.dashboard-section__header h2 {
  margin: 0 0 6px;
}

.dashboard-section__header p {
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.dashboard-grid > .dashboard-panel {
  height: 100%;
}

.dashboard-col-4 {
  grid-column: span 4;
}

.dashboard-col-3 {
  grid-column: span 3;
}

.dashboard-col-6 {
  grid-column: span 6;
}

.dashboard-col-8 {
  grid-column: span 8;
}

.dashboard-col-12 {
  grid-column: 1 / -1;
}

.dashboard-layout--analytics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-bar-row--link {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #f3e1d5;
  border-radius: 16px;
  background: #fffaf6;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.dashboard-bar-row--link:hover strong,
.dashboard-bar-row--link:hover span {
  color: var(--primary-dark);
}

.dashboard-bar-row--link:hover {
  transform: translateY(-1px);
  background: #fff0e6;
  border-color: #f2c8a9;
}

.dashboard-demographic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.dashboard-demographic-card {
  border: 1px solid #f0dccf;
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, #fffdfb, #ffffff);
  display: grid;
  gap: 12px;
}

.dashboard-demographic-card__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.dashboard-demographic-card__top strong {
  font-size: 15px;
}

.dashboard-demographic-card__top span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-mini-bar-list {
  display: grid;
  gap: 10px;
}

.dashboard-mini-bar {
  display: grid;
  grid-template-columns: minmax(90px, 120px) minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #f3e1d5;
  background: #fffaf6;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.dashboard-mini-bar:hover {
  transform: translateY(-1px);
  background: #fff0e6;
  border-color: #f2c8a9;
}

.dashboard-mini-bar__label {
  font-size: 13px;
  font-weight: 700;
}

.dashboard-mini-bar__track {
  display: block;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #f7ebe2;
}

.dashboard-mini-bar__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8a26, #ff6a00);
}

.dashboard-mini-bar strong {
  text-align: right;
  font-size: 14px;
}

.dashboard-improvement-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.dashboard-improvement-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #f0dccf;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdfb, #ffffff);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.dashboard-improvement-card:hover {
  transform: translateY(-1px);
  background: #fff8f2;
  border-color: #f2c8a9;
}

.dashboard-improvement-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

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

.dashboard-improvement-card__copy strong {
  font-size: 16px;
}

.dashboard-improvement-card__copy span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-stacked-bar {
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #f4e6dc;
}

.dashboard-stacked-bar__segment {
  display: block;
  height: 100%;
}

.dashboard-stacked-bar__segment--good {
  background: linear-gradient(90deg, #34d399, #10b981);
}

.dashboard-stacked-bar__segment--stable {
  background: linear-gradient(90deg, #fdba74, #fb923c);
}

.dashboard-stacked-bar__segment--bad {
  background: linear-gradient(90deg, #fda4af, #ef4444);
}

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

.dashboard-stacked-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-stacked-legend__item strong {
  color: var(--text);
}

.dashboard-stacked-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.dashboard-stacked-legend__dot--good {
  background: #10b981;
}

.dashboard-stacked-legend__dot--stable {
  background: #fb923c;
}

.dashboard-stacked-legend__dot--bad {
  background: #ef4444;
}

.dashboard-heatmap {
  display: grid;
  gap: 10px;
}

.dashboard-heatmap__header,
.dashboard-heatmap__row {
  display: grid;
  grid-template-columns: 140px repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.dashboard-heatmap__header {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-heatmap__row strong {
  font-size: 14px;
}

.dashboard-heatmap__cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid #f0dccf;
  background: #fff8f3;
  font-weight: 800;
  color: var(--text);
}

.dashboard-heatmap__cell:hover {
  background: #fff0e6;
  color: var(--primary-dark);
}

.dashboard-improvement-list {
  display: grid;
  gap: 10px;
}

.dashboard-improvement-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(90px, 1fr));
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #f0dccf;
  border-radius: 16px;
  background: #fffaf6;
}

.dashboard-improvement-row:hover {
  background: #fff0e6;
}

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

@media (max-width: 1680px) {
  .dashboard-indicator-grid--hero {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .dashboard-indicator-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-indicator-grid--hero {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .dashboard-col-3 {
    grid-column: span 2;
  }

  .dashboard-col-4,
  .dashboard-col-6 {
    grid-column: span 3;
  }

  .dashboard-col-8 {
    grid-column: 1 / -1;
  }

  .dashboard-col-12 {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 980px) {
  .container.dashboard-page {
    width: calc(100% - 24px);
  }

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

  .dashboard-col-3,
  .dashboard-col-4,
  .dashboard-col-6,
  .dashboard-col-8,
  .dashboard-col-12 {
    grid-column: 1 / -1;
  }

  .dashboard-mini-bar,
  .dashboard-stacked-legend {
    grid-template-columns: 1fr;
  }

  .dashboard-toolbar__row,
  .dashboard-heatmap__header,
  .dashboard-heatmap__row,
  .dashboard-improvement-row,
  .dashboard-detail-form {
    grid-template-columns: 1fr;
  }

  .dashboard-toolbar--hero .dashboard-filter-form,
  .dashboard-toolbar--hero .dashboard-export-actions {
    width: 100%;
  }

  .dashboard-toolbar--hero .dashboard-export-actions {
    justify-content: flex-start;
  }

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

  .dashboard-panel--hero-timeline {
    padding: 16px 16px 18px;
  }

  .dashboard-line-chart--hero svg {
    height: 190px;
  }

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

  .dashboard-pyramid__side,
  .dashboard-pyramid__middle,
  .dashboard-pyramid__age {
    text-align: left;
  }

  .dashboard-pyramid__half--female,
  .dashboard-pyramid__half--male {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .dashboard-pyramid__half--male .dashboard-pyramid__track {
    order: 2;
  }

  .dashboard-pyramid__half--male .dashboard-pyramid__count {
    order: 1;
  }
}

.audit-row-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.audit-filter-panel {
  padding: 14px 18px;
}

.audit-filter-disclosure {
  display: grid;
  gap: 14px;
}

.audit-filter-disclosure > summary {
  list-style: none;
}

.audit-filter-disclosure > summary::-webkit-details-marker {
  display: none;
}

.audit-filter-disclosure__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  padding: 4px 2px;
  border-radius: 14px;
  outline: none;
}

.audit-filter-disclosure__summary:focus-visible {
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14);
}

.audit-filter-disclosure__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.audit-filter-disclosure__copy {
  display: grid;
  gap: 4px;
}

.audit-filter-disclosure__copy strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}

.audit-filter-disclosure__copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.audit-filter-disclosure__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #f2cfb5;
  background: #fff5ee;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(124, 74, 33, 0.05);
}

.audit-filter-disclosure__chevron {
  color: #8a5d41;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.audit-filter-disclosure[open] .audit-filter-disclosure__chevron {
  transform: rotate(180deg);
}

.audit-filter-form {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 14px;
  align-items: end;
}

.audit-filter-form .field {
  min-width: 0;
}

.audit-filter-form__actions {
  justify-content: flex-start;
}

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

.audit-indicator-grid .dashboard-indicator {
  min-height: 118px;
  padding: 14px 14px 12px;
  gap: 6px;
}

.audit-indicator-grid .dashboard-indicator__label {
  font-size: 11px;
  letter-spacing: 0.03em;
}

.audit-indicator-grid .dashboard-indicator__value {
  font-size: 28px;
}

.audit-indicator-grid .dashboard-indicator__hint {
  font-size: 12px;
  line-height: 1.35;
}

.audit-monitor-grid-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.audit-monitor-panel--wide {
  min-width: 0;
  min-height: 100%;
}

.audit-access-table-wrap {
  max-height: 440px;
  overflow: auto;
  border: 1px solid #f1dfd2;
  border-radius: 18px;
}

.audit-access-table-wrap--modal {
  max-height: min(68vh, 720px);
}

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

.audit-access-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff7f1;
}

.audit-access-table th,
.audit-access-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f3e7de;
  text-align: left;
  vertical-align: top;
}

.audit-access-table tbody tr:last-child td {
  border-bottom: 0;
}

.audit-monitor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.audit-monitor-panel {
  min-width: 0;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  overflow: hidden;
}

.audit-actor-list {
  display: grid;
  gap: 14px;
}

.audit-actor-list--preview {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.audit-actor-card {
  min-height: 0;
  align-self: start;
}

.audit-compact-table-wrap {
  max-height: 380px;
  overflow: auto;
  border: 1px solid #f1dfd2;
  border-radius: 18px;
}

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

.audit-compact-table th,
.audit-compact-table td {
  padding: 12px 12px;
  border-bottom: 1px solid #f3e7de;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.audit-compact-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff7f1;
}

.audit-compact-table tbody tr:last-child td {
  border-bottom: 0;
}

.audit-compact-table td strong {
  color: var(--text);
}

.audit-compact-table--wide {
  min-width: 980px;
  table-layout: auto;
}

.audit-compact-table th:nth-child(1),
.audit-compact-table td:nth-child(1) {
  width: 34%;
}

.audit-compact-table--wide th:nth-child(1),
.audit-compact-table--wide td:nth-child(1) {
  width: 30%;
}

.audit-compact-table th:nth-child(2),
.audit-compact-table td:nth-child(2) {
  width: 48%;
}

.audit-compact-table--wide th:nth-child(2),
.audit-compact-table--wide td:nth-child(2) {
  width: 58%;
}

.audit-compact-table th:nth-child(3),
.audit-compact-table td:nth-child(3) {
  width: 18%;
}

.audit-compact-table--wide th:nth-child(3),
.audit-compact-table--wide td:nth-child(3) {
  width: 12%;
}

.audit-compact-table__summary {
  color: var(--muted);
  line-height: 1.55;
}

.audit-compact-table__summary span {
  display: inline-block;
  margin: 0 6px;
  color: #c59a7b;
}

.audit-actor-card h3 {
  margin: 0 0 4px;
}

.audit-actor-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 14px;
  color: var(--muted);
}

.audit-actor-stats strong {
  color: var(--text);
}

.audit-vertical-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  align-items: end;
  height: 320px;
}

.audit-vertical-bars__item {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  justify-items: stretch;
  text-align: center;
}

.audit-vertical-bars__item strong {
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
  text-align: center;
}

.audit-vertical-bars__value {
  font-weight: 800;
  color: var(--text);
  text-align: center;
}

.audit-vertical-bars__track {
  display: flex;
  align-items: end;
  justify-content: center;
  width: 100%;
  height: 220px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff8f2 0%, #fff2e8 100%);
}

.audit-vertical-bars__track span {
  display: block;
  width: clamp(44px, 64%, 84px);
  min-height: 10px;
  border-radius: 999px 999px 10px 10px;
  background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.2);
}

.audit-vertical-bars--entity {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: 320px;
}

.audit-vertical-bars--entity .audit-vertical-bars__track {
  height: 210px;
}

.audit-vertical-bars--entity-modal {
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  height: 340px;
}

.audit-vertical-bars--entity-modal .audit-vertical-bars__track {
  height: 240px;
}

.audit-vertical-bars--entity .audit-vertical-bars__track {
  background: linear-gradient(180deg, #f4f8ff 0%, #e8f0ff 100%);
}

.audit-vertical-bars--entity .audit-vertical-bars__track span {
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.18);
}

.audit-vertical-bars--entity .audit-vertical-bars__item:nth-child(5n + 1) .audit-vertical-bars__track span {
  background: linear-gradient(180deg, #5b8def 0%, #3b82f6 100%);
}

.audit-vertical-bars--entity .audit-vertical-bars__item:nth-child(5n + 2) .audit-vertical-bars__track span {
  background: linear-gradient(180deg, #22c1c3 0%, #14b8a6 100%);
}

.audit-vertical-bars--entity .audit-vertical-bars__item:nth-child(5n + 3) .audit-vertical-bars__track span {
  background: linear-gradient(180deg, #a78bfa 0%, #8b5cf6 100%);
}

.audit-vertical-bars--entity .audit-vertical-bars__item:nth-child(5n + 4) .audit-vertical-bars__track span {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
}

.audit-vertical-bars--entity .audit-vertical-bars__item:nth-child(5n) .audit-vertical-bars__track span {
  background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
}

.dashboard-bar-list--compact {
  gap: 10px;
}

.audit-panel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 1680px) {
  .audit-indicator-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .audit-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .audit-monitor-grid-top {
    grid-template-columns: 1fr;
  }
}

.app-modal {
  width: min(1120px, calc(100% - 32px));
  max-width: none;
  max-height: min(86vh, 920px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.app-modal--wide {
  width: min(1320px, calc(100% - 32px));
}

.app-modal::backdrop {
  background: rgba(35, 25, 19, 0.45);
  backdrop-filter: blur(3px);
}

.app-modal__surface {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 24px 48px rgba(70, 42, 20, 0.2);
}

.app-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px 0;
}

.app-modal__header h2 {
  margin: 0 0 6px;
}

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

.app-modal__body {
  padding: 20px 24px 24px;
}

.app-modal__body--stack {
  padding-top: 16px;
}

.audit-modal-scroll {
  max-height: min(68vh, 720px);
  overflow: auto;
}

.audit-table__summary {
  min-width: 320px;
}

.audit-note-list {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.audit-json-block {
  margin-top: 10px;
}

.audit-json {
  max-height: 220px;
  overflow: auto;
}

@media (max-width: 860px) {
  .audit-filter-panel {
    padding: 16px;
  }

  .audit-filter-disclosure__summary {
    align-items: flex-start;
  }

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

  .audit-indicator-grid {
    grid-template-columns: 1fr;
  }

  .audit-monitor-grid {
    grid-template-columns: 1fr;
  }

  .audit-monitor-grid-top {
    grid-template-columns: 1fr;
  }

  .audit-access-table {
    min-width: 640px;
  }

  .audit-actor-stats {
    grid-template-columns: 1fr;
  }

  .audit-compact-table-wrap {
    max-height: 320px;
  }

  .audit-vertical-bars--entity {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    height: auto;
  }

  .app-modal,
  .app-modal--wide {
    width: calc(100% - 16px);
  }

  .app-modal__header {
    flex-direction: column;
    align-items: stretch;
  }
}

:root {
  --app-header-height: 108px;
  --app-sidebar-width: 286px;
  --app-sidebar-collapsed-width: 104px;
  --app-shell-gutter: 24px;
}

.app-shell__toggle {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}

.app-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  border-bottom: 1px solid var(--topbar-line);
  background: rgba(255, 250, 245, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 32px rgba(124, 74, 33, 0.06);
}

.app-topbar__inner {
  width: calc(100% - (var(--app-shell-gutter) * 2));
  margin: 0 auto;
  min-height: var(--app-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.app-topbar__left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  flex: 1 1 auto;
}

.app-topbar__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  border: 1px solid #f0d9ca;
  background: #fffaf6;
  color: #7a4b2a;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(124, 74, 33, 0.05);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.app-topbar__toggle:hover {
  transform: translateY(-1px);
  background: #fff0e6;
  border-color: #f2c8a9;
}

.app-topbar__toggle svg {
  width: 22px;
  height: 22px;
}

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

.app-brand__logos {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.app-brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  height: 68px;
  padding: 14px 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 12px 26px rgba(124, 74, 33, 0.08);
}

.app-brand__logo--medife {
  min-width: 92px;
}

.app-brand__logo--camdoctor {
  min-width: 116px;
}

.app-brand__logo img {
  display: block;
  max-height: 38px;
  max-width: 132px;
  object-fit: contain;
}

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

.app-brand__title {
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  color: var(--text);
}

.app-brand__subtitle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.app-user-card {
  min-width: 0;
  flex: 0 1 auto;
}

.app-user-card__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px 12px 18px;
  border-radius: 22px;
  border: 1px solid #f0dccf;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 30px rgba(124, 74, 33, 0.06);
}

.app-user-card__copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.app-user-card__identity {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.app-user-card__identity strong {
  font-size: 16px;
  line-height: 1.15;
  color: var(--text);
}

.app-user-card__login {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.app-user-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.app-user-card__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  overflow: hidden;
  flex: 0 0 auto;
  background: linear-gradient(180deg, #fff0e6, #ffe3d0);
  color: var(--primary-dark);
  font-size: 22px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px #f0d9ca;
}

.app-user-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-sidebar {
  position: fixed;
  top: calc(var(--app-header-height) + 20px);
  left: var(--app-shell-gutter);
  bottom: var(--app-shell-gutter);
  z-index: 70;
  width: var(--app-sidebar-width);
  transition: width 0.22s ease, transform 0.22s ease;
}

.app-sidebar__inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  border-radius: 28px;
  border: 1px solid #f0dccf;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 44px rgba(124, 74, 33, 0.09);
  backdrop-filter: blur(12px);
}

.app-sidebar__nav {
  display: grid;
  gap: 8px;
}

.app-sidebar__link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 18px;
  color: #7a4b2a;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  border: 1px solid transparent;
}

.app-sidebar__link:hover {
  transform: translateX(2px);
  background: #fff5ee;
  border-color: #f2d1bb;
  color: var(--primary-dark);
}

.app-sidebar__link.active {
  background: var(--primary-soft);
  border-color: #f2c8a9;
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.05);
}

.app-sidebar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid #f1dfd2;
  box-shadow: 0 8px 18px rgba(124, 74, 33, 0.05);
}

.app-sidebar__icon svg {
  width: 22px;
  height: 22px;
}

.app-sidebar__label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.16s ease, width 0.16s ease, margin 0.16s ease;
}

.app-shell__toggle ~ main.page {
  width: auto;
  max-width: none;
  margin-left: calc(var(--app-sidebar-width) + (var(--app-shell-gutter) * 2));
  margin-right: var(--app-shell-gutter);
  padding: var(--app-main-top-offset) 0 48px;
  transition: margin-left 0.22s ease;
}

.app-shell__toggle ~ main.page.narrow {
  max-width: 720px;
}

.topbar-reminder--shell {
  margin-left: calc(var(--app-sidebar-width) + (var(--app-shell-gutter) * 2));
  margin-right: var(--app-shell-gutter);
  padding-top: calc(var(--app-header-height) + 18px);
  transition: margin-left 0.22s ease;
}

.topbar-reminder--shell .topbar-reminder__inner {
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid #f7c89d;
  background: linear-gradient(180deg, #fff2e4, #fff8f2);
  box-shadow: 0 16px 30px rgba(154, 52, 18, 0.08);
}

.app-shell__toggle:checked ~ .app-sidebar {
  width: var(--app-sidebar-collapsed-width);
}

.app-shell__toggle:checked ~ .app-sidebar .app-sidebar__inner {
  padding-inline: 10px;
}

.app-shell__toggle:checked ~ .app-sidebar .app-sidebar__link {
  justify-content: center;
  padding-inline: 0;
}

.app-shell__toggle:checked ~ .app-sidebar .app-sidebar__label {
  width: 0;
  opacity: 0;
  margin: 0;
}

.app-shell__toggle:checked ~ main.page {
  margin-left: calc(var(--app-sidebar-collapsed-width) + (var(--app-shell-gutter) * 2));
}

.app-shell__toggle:checked ~ .topbar-reminder--shell {
  margin-left: calc(var(--app-sidebar-collapsed-width) + (var(--app-shell-gutter) * 2));
}

@media (max-width: 1180px) {
  :root {
    --app-header-height: 98px;
    --app-sidebar-width: 258px;
    --app-sidebar-collapsed-width: 92px;
  }

  .app-brand__logo {
    height: 60px;
    min-width: 78px;
    padding: 12px 14px;
  }

  .app-brand__logo img {
    max-height: 32px;
  }

  .app-brand__title {
    font-size: 21px;
  }
}

@media (max-width: 980px) {
  :root {
    --app-header-height: 94px;
    --app-shell-gutter: 12px;
  }

  .app-topbar__inner {
    width: calc(100% - 24px);
    align-items: flex-start;
    padding: 14px 0;
  }

  .app-topbar__left {
    align-items: flex-start;
  }

  .app-brand {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .app-brand__text {
    gap: 2px;
  }

  .app-user-card {
    width: 100%;
  }

  .app-user-card__meta {
    width: 100%;
    justify-content: space-between;
  }

  .app-sidebar {
    top: calc(var(--app-header-height) + 12px);
    left: 12px;
    bottom: 12px;
    width: min(320px, calc(100vw - 24px));
    transform: translateX(calc(-100% - 16px));
  }

  .app-shell__toggle:checked ~ .app-sidebar {
    width: min(320px, calc(100vw - 24px));
    transform: translateX(0);
  }

  .app-shell__toggle:checked ~ .app-sidebar .app-sidebar__inner,
  .app-shell__toggle:checked ~ .app-sidebar .app-sidebar__link {
    padding-inline: 14px;
  }

  .app-shell__toggle:checked ~ .app-sidebar .app-sidebar__label {
    width: auto;
    opacity: 1;
  }

  .app-shell__toggle ~ main.page,
  .app-shell__toggle:checked ~ main.page,
  .topbar-reminder--shell,
  .app-shell__toggle:checked ~ .topbar-reminder--shell {
    margin-left: 12px;
    margin-right: 12px;
  }

  .app-shell__toggle ~ main.page,
  .app-shell__toggle:checked ~ main.page {
    padding-top: var(--app-main-top-offset);
  }

  .topbar-reminder--shell {
    padding-top: calc(var(--app-header-height) + 12px);
  }
}

@media (max-width: 720px) {
  :root {
    --app-header-height: 146px;
  }

  .app-topbar__inner {
    gap: 12px;
  }

  .app-topbar__left {
    width: 100%;
  }

  .app-brand__logos {
    gap: 10px;
  }

  .app-brand__logo {
    min-width: 72px;
    height: 54px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .app-brand__logo img {
    max-height: 28px;
    max-width: 108px;
  }

  .app-brand__title {
    font-size: 18px;
  }

  .app-brand__subtitle {
    font-size: 12px;
  }

  .app-user-card__meta {
    align-items: flex-start;
  }

  .app-user-card__actions {
    justify-content: flex-start;
  }

  .app-user-card__avatar {
    width: 54px;
    height: 54px;
    font-size: 18px;
  }

  .topbar-reminder--shell .topbar-reminder__inner {
    align-items: flex-start;
  }
}

/* ─── OTP Input ─────────────────────────────────────────── */
.otp-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  letter-spacing: 0.35em !important;
  text-align: center !important;
  padding: 14px 12px !important;
}

/* ─── Captcha checkbox enhanced ─────────────────────────── */
.captcha-check__icon {
  flex: 0 0 auto;
  color: var(--primary);
  display: inline-flex;
}

.captcha-check__badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

/* ─── Chart baseline ─────────────────────────────────────── */
.dashboard-line-chart__baseline {
  stroke: #d6c4b8;
  stroke-width: 1.5;
}

/* ─── Static field (non-editable info) ───────────────────── */
.static-field {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ─── Section tabs (seguridad / auditoría) ───────────────── */
.section-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 8px;
}

.section-tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  border-radius: 8px 8px 0 0;
  margin-bottom: -2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.section-tab:hover {
  color: var(--text);
}

.section-tab.is-active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}

/* ─── Line chart card (shared partial) ───────────────────── */
.dashboard-line-chart-card {
  display: grid;
  gap: 14px;
}

.dashboard-line-chart-card__header {
  display: grid;
  gap: 4px;
}

.dashboard-line-chart-card__header strong {
  font-size: 16px;
  color: #2f241e;
}

.dashboard-line-chart-card__header span {
  color: #7a6457;
  font-size: 13px;
  font-weight: 600;
}
