/* Final brand bridge: loaded last while legacy modules are migrated to Nodly tokens. */
body.authenticated{
  --brand-ink:#17233a;
  --brand-action:#405f8f;
  --brand-action-strong:#334f79;
  --brand-action-soft:#e8eef6;
  --brand-action-softer:#f1f4f9;
  --brand-gold:#c39a42;
  --brand-gold-soft:#f1e2b8;
  --brand-border:#d8dde6;
  --brand-muted:#667085;
  --brand-surface:#fffdfa;
  --brand-canvas:#f4f1ea;
}

/* Stable viewport: internal filters and tabs never shift the page geometry. */
body.authenticated .main-area{scrollbar-gutter:stable}
body.authenticated .view{animation:none!important}
body.authenticated .view.view-soft-enter{animation:nodly-view-opacity .16s ease-out both!important}
@keyframes nodly-view-opacity{from{opacity:.78}to{opacity:1}}

/* Notifications used to retain the original eucalyptus palette. */
body.authenticated .notification-button{color:#dce4f0}
body.authenticated .notification-button:hover,
body.authenticated .notification-button.has-unread{border-color:rgba(229,201,134,.46);background:rgba(255,255,255,.14);color:#f3e3ad}
body.authenticated .notification-button>b{border-color:var(--nodly-sidebar);background:#c94f55}
body.authenticated .notification-popover{border-color:var(--brand-border);background:var(--brand-surface);color:var(--brand-ink);box-shadow:0 22px 55px rgba(23,35,58,.2)}
body.authenticated .notification-popover-head{border-bottom-color:#e7e9ee}
body.authenticated .notification-popover-head .eyebrow,
body.authenticated .notification-popover-head button{color:var(--brand-action)}
body.authenticated .notification-item{border-bottom-color:#e7e9ee;background:var(--brand-surface)}
body.authenticated .notification-item:hover{background:var(--brand-action-softer)}
body.authenticated .notification-item.unread{background:#eef2f8}
body.authenticated .notification-open b{color:var(--brand-ink)}
body.authenticated .notification-open small{color:var(--brand-muted)}
body.authenticated .notification-open time{color:#8791a3}
body.authenticated .notification-open>i{background:var(--brand-gold)}
body.authenticated .notification-delete{color:#8b96a8}
body.authenticated .notification-type-icon{background:var(--brand-action-soft);color:var(--brand-action)}
body.authenticated .notification-type-icon.success{background:#e9eef6;color:var(--brand-action)}
body.authenticated .notification-empty>span{background:var(--brand-action-soft);color:var(--brand-action)}
body.authenticated .notification-popover-foot{background:#f6f4ef;color:var(--brand-muted)}

/* Mobile closure: old eucalyptus surfaces must not leak through modules that
   predate the current ink, blue and gold Nodly system. Provider colors and
   semantic success/error states intentionally keep their conventional color. */
@media(max-width:768px){
  body.authenticated:not(.superadmin-mode) #modalBackdrop{background:rgba(23,35,58,.5)}
  body.authenticated:not(.superadmin-mode) #modalBackdrop>.modal{border-color:#d8dde6;background:#fffdfa;color:#17233a;box-shadow:0 26px 70px rgba(23,35,58,.24)}
  body.authenticated:not(.superadmin-mode) .patient-form-modal .patient-form-head{
    min-height:108px;
    padding:20px 62px 20px 18px;
    background:#263650!important;
    color:#fff!important;
    box-shadow:inset 0 -1px rgba(255,255,255,.08);
  }
  body.authenticated:not(.superadmin-mode) .patient-form-modal .patient-form-head .eyebrow{color:#f1dda3!important}
  body.authenticated:not(.superadmin-mode) .patient-form-modal .patient-form-head .eyebrow::before{border-top-color:#e0c77e!important}
  body.authenticated:not(.superadmin-mode) .patient-form-modal .patient-form-head .eyebrow::after{background:#e0c77e!important}
  body.authenticated:not(.superadmin-mode) .patient-form-modal .patient-form-head h2{margin:5px 0 6px!important;color:#fff!important;font-size:24px!important}
  body.authenticated:not(.superadmin-mode) .patient-form-modal .patient-form-head p{margin:0!important;color:#dbe4f4!important;font-size:12px!important;line-height:1.45!important}
  body.authenticated:not(.superadmin-mode) .patient-form-modal .modal-close{
    top:13px!important;right:13px!important;width:36px!important;height:36px!important;
    border-color:rgba(255,255,255,.34)!important;background:#fff!important;color:#334f79!important;
    box-shadow:0 4px 12px rgba(13,25,47,.2)!important;
  }
  body.authenticated:not(.superadmin-mode) .patient-create-form{background:#f7f8fb!important;scrollbar-color:#aebbd0 transparent}
  body.authenticated:not(.superadmin-mode) .patient-create-form .form-group label{color:#263650!important}
  body.authenticated:not(.superadmin-mode) .patient-create-form .form-group :is(input,select,textarea){
    width:100%;box-sizing:border-box;border-color:#d4dbe6!important;background:#fff!important;color:#17233a!important;
  }
  body.authenticated:not(.superadmin-mode) .patient-create-form .form-group :is(input,select,textarea):focus{border-color:#8298ba!important;box-shadow:0 0 0 3px rgba(64,95,143,.13)!important}
  body.authenticated:not(.superadmin-mode) .patient-create-form .field-help{color:#667085!important}
  body.authenticated:not(.superadmin-mode) .patient-create-form .modal-actions{border-top-color:#dfe3ea!important;background:rgba(255,253,250,.98)!important;box-shadow:0 -8px 22px rgba(23,35,58,.07)!important}
  body.authenticated:not(.superadmin-mode) .patient-create-form .secondary-button{border-color:#cbd4e2!important;background:#fff!important;color:#334f79!important}
  body.authenticated:not(.superadmin-mode) .patient-create-form .primary-button{background:#405f8f!important;color:#fff!important}

  body.mobile-view-agenda .agenda-toolbar{border-color:#d8dde6!important;background:#f1f4f9!important}
  body.mobile-view-agenda .week-calendar,
  body.mobile-view-agenda .week-calendar-scroll{background:#fffdfa!important}
  body.mobile-view-agenda .time-column{border-right-color:#d8dde6!important;background:#f3f5f8!important}
  body.mobile-view-agenda .time-column span{color:#667085!important}
  body.mobile-view-agenda .agenda-week-view .calendar-item{
    display:grid!important;grid-template-rows:auto minmax(0,1fr);align-content:start;gap:3px;
    min-width:0;margin:1px 2px;padding:5px 4px 4px!important;border-left-width:3px!important;border-radius:8px!important;
    box-shadow:0 2px 7px rgba(23,35,58,.08)!important;
  }
  body.mobile-view-agenda .agenda-week-view .calendar-item strong{display:block!important;min-width:0;margin:0;font-size:0!important;line-height:1!important}
  body.mobile-view-agenda .agenda-week-view .calendar-item strong::before{
    content:attr(data-start)!important;display:block;color:#334f79;font-size:9px!important;font-weight:850;line-height:1.1;letter-spacing:-.01em;
  }
  body.mobile-view-agenda .agenda-week-view .calendar-patient-name{
    display:block!important;min-width:0;margin:0!important;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;font-size:0!important;line-height:1.1!important;
  }
  body.mobile-view-agenda .agenda-week-view .calendar-patient-name::after{
    content:attr(data-short-name)!important;color:#17233a;font-size:9px!important;font-weight:800;line-height:1.1;
  }
  body.mobile-view-agenda .agenda-week-view .calendar-item :is(small,.patient-zone-mark){display:none!important}
  body.authenticated:not(.superadmin-mode) .patient-detail-modal .patient-record-tabs{background:#edf1f7!important}
  body.authenticated:not(.superadmin-mode) .patient-detail-modal .patient-record-tabs button.active{color:#334f79!important;box-shadow:0 2px 7px rgba(23,35,58,.08)!important}
  body.authenticated:not(.superadmin-mode) .mobile-pwa-entry span,
  body.authenticated:not(.superadmin-mode) .mobile-install-guide li>b{background:#e8eef6!important;color:#405f8f!important}
  body.authenticated:not(.superadmin-mode) .mobile-install-guide li{background:#f1f4f9!important;color:#263650!important}
}

/* Shared controls and decorative states from pre-refresh modules. */
body.authenticated :is(input,select,textarea):focus{border-color:#8ca0bf;box-shadow:0 0 0 3px rgba(64,95,143,.12)}
body.authenticated input[type="checkbox"],
body.authenticated input[type="radio"]{accent-color:var(--brand-action)}

/* The global 44px field rule must not overflow the compact top-bar search. */
body.authenticated .topbar .search{height:40px;min-height:40px;overflow:hidden;box-sizing:border-box;padding:0 10px;gap:8px;background:var(--nodly-field);border:1px solid var(--nodly-border);border-radius:11px}
body.authenticated .topbar .search:focus-within{border-color:#8ca0bf;box-shadow:0 0 0 3px rgba(64,95,143,.12)}
body.authenticated .topbar .search-icon{display:grid;place-items:center;width:18px;height:18px;flex:0 0 18px;color:var(--brand-action)}
body.authenticated .topbar .search-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
body.authenticated .topbar .search input{width:100%;height:38px!important;min-height:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:var(--brand-ink);line-height:38px!important;outline:0!important}
body.authenticated .topbar .search input:focus{border:0!important;box-shadow:none!important}
body.authenticated .topbar .search kbd{flex:0 0 auto;white-space:nowrap}
body.authenticated :is(.invoice-selection-bar,.patient-form-head,.platform-cost-total){background:var(--nodly-sidebar);color:#fff;box-shadow:0 12px 28px rgba(23,35,58,.2)}
body.authenticated :is(.billing-guide,.payment-method-intro,.admin-broadcast-toggle,.platform-check,.webhook-copy,.booking-save-feedback,.mp-cost-clarity){border-color:var(--brand-border);background:var(--brand-action-softer);color:var(--brand-ink)}
body.authenticated :is(.billing-section-title>span,.billing-setup-guide li>b,.billing-non-fiscal-button>span,.billing-bulk-index,.currency-scope-card>div>span,.platform-integration-status article>span,.platform-secure-provider header>span,.platform-review-shield,.session-action-menu>footer>span,.account-logo-preview){background:var(--brand-action-soft);color:var(--brand-action)}
body.authenticated :is(.billing-enable>input:checked+i,.switch input:checked+i,.toggle input:checked+i){background:var(--brand-action)}
body.authenticated :is(.invoice-summary footer,.currency-cash-preview-grid article.has-value,.divan-finance-card.mint){border-color:var(--brand-border);background:var(--brand-action-softer)}
body.authenticated :is(.agenda-settings-button,.agenda-focus-button,.divan-eye){color:var(--brand-action)}
body.authenticated :is(.agenda-settings-button,.agenda-focus-button,.divan-eye):is(:hover,:focus-visible){background:var(--brand-action-soft);color:var(--brand-action-strong)}
body.authenticated :is(.agenda-settings-button,.agenda-focus-button,.divan-eye):after{background:var(--nodly-sidebar)}
body.authenticated .divan-eye:before{border-bottom-color:var(--nodly-sidebar)}
/* Dark agenda headers need explicit foregrounds; generic eyebrow tokens are meant
   for light surfaces and previously made the title and close action fade away. */
body.authenticated .agenda-editor-head .eyebrow{color:#f0f4fb!important}
body.authenticated .agenda-editor-head h3{color:#fff!important}
body.authenticated .agenda-editor-head .row-action{
  border-color:rgba(255,255,255,.82)!important;
  background:#fff!important;
  color:#334f79!important;
  box-shadow:0 3px 10px rgba(17,31,52,.18);
}
body.authenticated .agenda-editor-head .row-action:hover,
body.authenticated .agenda-editor-head .row-action:focus-visible{background:#f1e2b8!important;color:#17233a!important;outline:3px solid rgba(255,255,255,.36)}
body.authenticated .agenda-editor>.editor-switch.personal{border-color:#b9a8d0;background:#f5f0fb;color:#563e7f}
body.authenticated :is(.session-drawer-kicker,.admin-notification-kpis strong,.billing-bulk-totals strong,.invoice-summary footer strong,.account-logo-preview){color:var(--brand-action)}
body.authenticated :is(.session-status-overview article>button,.session-status-overview article>a,.session-invoice-quick){border-color:#b9c6d9!important;background:#f8fafc!important;color:var(--brand-action)!important}
body.authenticated :is(.session-status-overview article>button,.session-status-overview article>a,.session-invoice-quick):hover{border-color:#8097b9!important;background:var(--brand-action-soft)!important}
body.authenticated .nav-item .agenda-today-count{border-color:#c9d2df;background:var(--brand-action-soft);color:var(--brand-action);box-shadow:0 2px 7px rgba(64,95,143,.08)}

/* Icons are pictograms or provider marks, never typographic initials. */
body.authenticated .nodly-ui-icon{display:block;width:22px;height:22px}
body.authenticated :is(.membership-method-icon,.provider-symbol,.mp-compact-mark,.integration-logo,.google-button-icon) svg{display:block;width:24px;height:24px}
body.authenticated .membership-method-icon{border:1px solid #d5dce7;background:var(--brand-action-soft);color:var(--brand-action)}
body.authenticated .membership-method-icon.renewal{border-radius:44% 56% 48% 52%/58% 45% 55% 42%;background:#e9f2ef;color:#3f7668}
body.authenticated .membership-method-icon.mp,
body.authenticated .mercadopago-symbol{border-color:#b9def1;background:#e8f6fc;color:#1683d8}
body.authenticated .membership-method-icon.card{border-color:#d8d4e8;background:#f1eef8;color:#65578f}
body.authenticated .mp-professional-brand>.provider-symbol{display:grid;place-items:center;background:#1683d8;color:#fff}
body.authenticated .mp-professional-brand>.paypal-mark,
body.authenticated .mp-link-review>.paypal-mark{background:#fff!important;color:#123f8c!important}
body.authenticated .mp-compact-mark.paypal{color:#123f8c}
body.authenticated .integration-logo svg,
body.authenticated .google-button-icon svg{width:20px;height:20px}
body.authenticated .google-button-icon{display:grid;place-items:center;width:21px;height:21px;font-style:normal}
body.authenticated .google-button-icon svg{fill:none;stroke:currentColor}
body.authenticated :is(.role-summary-grid>article>span,.account-loader,.account-referral-mark,.nodly-report-mark) svg{display:block;width:26px;height:26px;fill:none;stroke:currentColor}

/* Assistant refreshed to the same ink, warm-paper, gold and bloop language. */
body.authenticated .assistant-floating-launcher{border:1px solid #ccd5e2;border-radius:45% 55% 46% 54%/56% 43% 57% 44%;background:rgba(255,253,250,.97);color:var(--brand-action);box-shadow:0 12px 30px rgba(23,35,58,.18),0 2px 0 rgba(195,154,66,.2)}
body.authenticated .assistant-floating-launcher:hover{border-color:#aebbd0;background:#fff;box-shadow:0 15px 34px rgba(23,35,58,.22);color:var(--brand-action-strong)}
body.authenticated .assistant-floating-launcher:focus-visible{outline:3px solid rgba(64,95,143,.25)}
body.authenticated .assistant-floating-mark{border-radius:42% 58% 45% 55%/55% 43% 57% 45%;background:var(--brand-action-soft);color:var(--brand-action)}
body.authenticated .assistant-floating-launcher>i{border-color:#fff;background:var(--brand-gold)}
body.authenticated .assistant-floating-launcher>i:after{background:var(--brand-action-strong)}
body.authenticated .assistant-floating-label{border-color:var(--brand-border);background:var(--brand-surface);color:var(--brand-ink);box-shadow:0 9px 24px rgba(23,35,58,.14)}
body.authenticated .assistant-floating-label:before{position:absolute;top:-1px;right:15px;width:32px;height:2px;border-radius:99px;background:var(--brand-gold);content:''}
body.authenticated .assistant-floating-label small{color:var(--brand-muted)}
body.authenticated .assistant-floating-panel{border-color:var(--brand-border);background:var(--brand-canvas);box-shadow:0 28px 80px rgba(23,35,58,.24)}
body.authenticated .assistant-floating-head{border-bottom-color:var(--brand-border);background:var(--brand-surface)}
body.authenticated .assistant-floating-brand{border-radius:43% 57% 45% 55%/56% 43% 57% 44%;background:var(--brand-action-soft);color:var(--brand-action)}
body.authenticated .assistant-floating-head small{color:var(--brand-action)}
body.authenticated .assistant-floating-head strong{color:var(--brand-ink)}
body.authenticated .assistant-floating-actions button{border-color:var(--brand-border);background:#f7f8fb;color:var(--brand-action)}
body.authenticated .assistant-floating-actions button:hover{border-color:#aebbd0;background:var(--brand-action-soft);color:var(--brand-action-strong)}
body.authenticated .assistant-floating-body>.assistant-chat{border-color:var(--brand-border);background:var(--brand-surface)}
body.authenticated .assistant-floating-body .assistant-quick-row{border-bottom-color:var(--brand-border);background:#f8f7f3}
body.authenticated .assistant-quick-row button{border-color:#cdd6e3;background:var(--brand-action-soft);color:var(--brand-action)}
body.authenticated .assistant-quick-row button:hover{border-color:#9fadc3;background:#dfe7f2;color:var(--brand-action-strong)}
body.authenticated .assistant-floating-body .assistant-messages{background:#f3f1ec}
body.authenticated .assistant-message>span.assistant-message-brand{display:grid;place-items:center;border-radius:43% 57% 45% 55%/56% 43% 57% 44%;background:var(--brand-action);color:#fff}
body.authenticated .assistant-message-brand svg{width:21px;height:19px;fill:none;stroke:currentColor;stroke-width:2.35}
body.authenticated .assistant-copy{border-color:var(--brand-border);background:var(--brand-surface);box-shadow:0 5px 16px rgba(31,45,68,.055)}
body.authenticated .assistant-copy li{border-top-color:#e1e5ec;color:#3f4c60}
body.authenticated .assistant-message.user .assistant-bubble>p{background:var(--brand-action);color:#fff}
body.authenticated .assistant-message-action{border-color:#c5d0df;background:var(--brand-action-soft);color:var(--brand-action-strong)}
body.authenticated .assistant-followups button{border-color:#cdd6e3;color:var(--brand-action);background:#fff}
body.authenticated .assistant-mic{border-color:#c9d3e1;background:#f5f7fb;color:var(--brand-action)}
body.authenticated .assistant-mic:hover{border-color:#9fadc3;background:var(--brand-action-soft)}

/* Protected-space control and explanation belong to the same blue/gold system. */
body.authenticated .patient-security-control{min-height:38px;padding:0 13px;border:1px solid #cbd5e3;background:rgba(255,253,250,.96);color:var(--brand-action);box-shadow:0 3px 10px rgba(23,35,58,.05)}
body.authenticated .patient-security-control:hover,
body.authenticated .patient-security-control:focus-visible{border-color:#9eafc7;background:var(--brand-action-soft);color:var(--brand-action-strong);outline:0}
body.authenticated .patient-security-control>span{display:grid;place-items:center;width:21px;height:21px;border-radius:44% 56% 46% 54%/57% 44% 56% 43%;background:var(--brand-action-soft);color:var(--brand-action)}
body.authenticated .patient-security-control svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body.authenticated .patient-trust-modal{position:relative;max-width:600px;padding:10px 5px 4px;background:var(--brand-surface);color:var(--brand-ink);isolation:isolate}
body.authenticated .patient-trust-symbol{display:grid;place-items:center;width:54px;height:54px;margin-bottom:17px;border:1px solid #cbd6e5;border-radius:43% 57% 45% 55%/57% 43% 57% 43%;background:var(--brand-action-soft);color:var(--brand-action);box-shadow:0 7px 18px rgba(64,95,143,.11)}
body.authenticated .patient-trust-symbol svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
body.authenticated .patient-trust-bloop{position:absolute;top:-4px;right:40px;z-index:-1;width:96px;height:66px;border:1px solid rgba(195,154,66,.34);border-radius:62% 38% 61% 39%/43% 59% 41% 57%;background:#f7edcf;transform:rotate(-7deg);opacity:.72}
body.authenticated .patient-trust-bloop>i{position:absolute;right:12px;bottom:10px;width:26px;height:5px;border-radius:99px;background:var(--brand-gold)}
body.authenticated .patient-trust-modal>.eyebrow{color:var(--brand-action);letter-spacing:.13em}
body.authenticated .patient-trust-modal h2{margin:7px 0 10px;color:var(--brand-ink)}
body.authenticated .patient-trust-modal>p{max-width:470px;color:var(--brand-muted);font-size:12px;line-height:1.6}
body.authenticated .patient-trust-list{gap:9px;margin:21px 0 23px}
body.authenticated .patient-trust-list>div{gap:12px;padding:13px 14px;border:1px solid #dce2eb;border-radius:13px;background:#faf9f6}
body.authenticated .patient-trust-list>div>span{display:grid;place-items:center;width:30px;height:30px;border-radius:44% 56% 48% 52%/56% 45% 55% 44%;background:var(--brand-action-soft);color:var(--brand-action)}
body.authenticated .patient-trust-list>div>span svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body.authenticated .patient-trust-list strong{color:var(--brand-ink);font-size:12px}
body.authenticated .patient-trust-list small{margin-top:3px;color:var(--brand-muted);font-size:10px;line-height:1.45}
body.authenticated .patient-trust-modal .modal-actions{padding-top:17px;border-top:1px solid #e1e4ea}

/* Evaluations: real-data states, functional filters and non-typographic icons. */
body.authenticated .evaluation-metrics .metric-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
body.authenticated .evaluation-load-warning{display:flex;align-items:center;gap:13px;margin-bottom:16px;padding:15px 16px;border:1px solid #ead7a8;background:#fff9eb;color:#6f5221}
body.authenticated .evaluation-load-warning>span{display:grid;place-items:center;width:32px;height:32px;flex:none;border-radius:44% 56% 48% 52%/56% 45% 55% 44%;background:#f4dfad;color:#795817;font-weight:800}
body.authenticated .evaluation-load-warning>div{min-width:0;flex:1}
body.authenticated .evaluation-load-warning strong{display:block;color:var(--brand-ink);font-size:12px}
body.authenticated .evaluation-load-warning p{margin:3px 0 0;color:#796843;font-size:10px;line-height:1.45}
body.authenticated .evaluation-search{position:relative;display:flex;min-width:260px}
body.authenticated .evaluation-search>span{position:absolute;left:12px;top:50%;z-index:1;display:grid;place-items:center;width:16px;height:16px;color:var(--brand-action);transform:translateY(-50%);pointer-events:none}
body.authenticated .evaluation-search>span svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
body.authenticated .evaluation-search input{width:100%;padding-left:37px}

/* Status colours remain semantic; external provider identities keep their official colours. */
body.authenticated :is(.status-success,.state-success,.connected,.ready) .status-dot{background:#358166}
body.authenticated :is(.status-warning,.state-warning,.pending) .status-dot{background:#c58b32}
body.authenticated :is(.status-danger,.state-danger,.error) .status-dot{background:#c94f55}

@media(max-width:760px){
  body.authenticated .topbar .search{height:40px;min-height:40px;min-width:0;padding-inline:9px}
  body.authenticated .topbar .search input{height:38px!important;line-height:38px!important}
  body.authenticated .assistant-floating-launcher{background:#f3e3ad;color:var(--brand-action-strong);box-shadow:0 12px 28px rgba(23,35,58,.2)}
  body.authenticated .assistant-floating-mark{background:rgba(255,255,255,.45);color:var(--brand-action-strong)}
  body.authenticated .evaluation-load-warning{align-items:flex-start;flex-wrap:wrap}
  body.authenticated .evaluation-load-warning button{width:100%}
  body.authenticated .evaluation-search{width:100%;min-width:0}
}

@media(prefers-reduced-motion:reduce){
  body.authenticated .view.view-soft-enter{animation:none!important}
}

/* Identidad compacta: una sola tarjeta, sin avatar de iniciales ni estilos heredados. */
body.authenticated .sidebar .profile-card{grid-template-columns:36px minmax(0,1fr) 30px;gap:9px;margin:10px 4px 3px;padding:11px 9px;border:1px solid rgba(208,220,238,.15);border-radius:14px;background:rgba(255,255,255,.045);box-shadow:inset 0 1px 0 rgba(255,255,255,.025)}
body.authenticated .sidebar .profile-card .avatar.avatar-green{width:36px;height:36px;border:1px solid rgba(211,222,238,.2);border-radius:11px;background:rgba(232,238,248,.08)!important;color:#f0ca67!important;box-shadow:none}
body.authenticated .sidebar .profile-card .avatar svg{width:18px;height:18px}
body.authenticated .sidebar .profile-card .profile-mode{margin:0 0 4px;color:#c8d2e3!important;font-size:8px!important;line-height:1.2!important;letter-spacing:.1em!important}
body.authenticated .sidebar .profile-card .profile-name{color:#fff!important;font-size:11.5px!important;font-weight:720!important;line-height:1.25!important}
body.authenticated .sidebar .profile-card .profile-plan{margin-top:4px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#e8c875!important;font-size:9px!important;font-weight:650!important;line-height:1.2!important}
body.authenticated .sidebar .profile-card #profileMenu{width:30px;height:32px;padding-left:7px;color:#a9b9cf}
body.authenticated .sidebar .profile-card #profileMenu svg{width:16px;height:16px}

/* Encabezados estrechos de Disponibilidad conservan espacio para sus acciones. */
body.authenticated .availability-exceptions-card .card-title{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px 10px}
body.authenticated .availability-exceptions-card .card-title>div{min-width:0}
body.authenticated .availability-exceptions-card .card-title h3{margin:0;font-size:16px;line-height:1.25}
body.authenticated .availability-exceptions-card .card-title small{display:block;margin-top:4px;font-size:11px;line-height:1.45}
body.authenticated .availability-exceptions-card .card-title .soft-button{position:static;align-self:start;white-space:nowrap}
@media(max-width:420px){body.authenticated .availability-exceptions-card .card-title{grid-template-columns:1fr}body.authenticated .availability-exceptions-card .card-title .soft-button{justify-self:start}}

/* WhatsApp: el saldo consultado y su trazabilidad usan la paleta actual. */
body.authenticated .wa-module-status{border-color:#ccd7e7;background:linear-gradient(135deg,#eef2f8,#fffdfa);box-shadow:0 10px 30px rgba(23,35,58,.07)}
body.authenticated .wa-module-status>div:first-child>span{background:var(--brand-action);color:#fff}
body.authenticated .wa-module-status strong{color:var(--brand-ink)}
body.authenticated .wa-module-status.low{border-color:#e5cf98;background:linear-gradient(135deg,#fbf3dc,#fffdfa)}
body.authenticated .wa-module-status.unavailable{border-style:dashed;background:#f7f8fb}
body.authenticated .wa-balance-checked{margin-top:7px;color:#657186;font-size:11px;line-height:1.4}
body.authenticated .wa-balance-history .wa-section-head{align-items:flex-start}
body.authenticated .wa-credit-change{min-width:44px;padding:5px 8px;border-radius:999px;background:var(--brand-action-soft);color:var(--brand-action);font-size:11px;font-weight:800;text-align:center}
body.authenticated .wa-credit-change.negative{background:#f7e9e5;color:#9b5547}
body.authenticated .wa-balance-history .wa-history-list>div>strong{color:var(--brand-ink);font-size:12px;white-space:nowrap}
body.authenticated .wa-reconciliation{border-left:4px solid var(--brand-action)}
body.authenticated .wa-reconciliation.needs-review{border-left-color:#c48442;background:linear-gradient(135deg,#fffaf0,#fff)}
body.authenticated .wa-reconciliation-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
body.authenticated .wa-reconciliation-grid>div{padding:13px 14px;border:1px solid #d9e1eb;border-radius:12px;background:#f7f9fc}
body.authenticated .wa-reconciliation-grid small,body.authenticated .wa-reconciliation-grid strong{display:block}
body.authenticated .wa-reconciliation-grid small{min-height:32px;color:#657186;font-size:12px;line-height:1.35}
body.authenticated .wa-reconciliation-grid strong{margin-top:5px;color:var(--brand-ink);font-size:20px}
body.authenticated .wa-reconciliation-note{margin:14px 0 0;color:#59677b;font-size:13px;line-height:1.5}
@media(max-width:700px){body.authenticated .wa-reconciliation-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Owner onboarding: compact Bloop modal without inherited horizontal overflow. */
body.authenticated #modalBackdrop>.modal.admin-professional-create-modal{
  width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;overflow:hidden;
  border-color:#d8dfE9;border-radius:24px;background:var(--brand-surface);color:var(--brand-ink);
}
body.authenticated .admin-professional-create-modal>#modalContent{max-height:calc(100dvh - 32px);overflow-x:hidden;overflow-y:auto}
body.authenticated .admin-professional-create-head{position:relative;display:grid;grid-template-columns:48px minmax(0,1fr);gap:14px;padding:28px 64px 21px 28px;border-bottom:1px solid var(--brand-border);background:linear-gradient(135deg,#f7f9fc,#fffdfa)}
body.authenticated .admin-professional-create-head::after{position:absolute;right:48px;bottom:0;width:72px;height:2px;border-radius:99px;background:var(--brand-gold);content:""}
body.authenticated .admin-professional-create-symbol{display:grid;width:48px;height:48px;place-items:center;border:1px solid #ccd7e6;border-radius:43% 57% 46% 54%/56% 43% 57% 44%;background:var(--brand-action-soft);color:var(--brand-action)}
body.authenticated .admin-professional-create-symbol svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body.authenticated .admin-professional-create-head .eyebrow{margin:1px 0 6px;color:var(--brand-action);font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
body.authenticated .admin-professional-create-head h2{margin:0;color:var(--brand-ink);font:700 27px/1.12 Inter,sans-serif;letter-spacing:-.035em}
body.authenticated .admin-professional-create-head p{margin:7px 0 0;color:var(--brand-muted);font-size:12px;line-height:1.5}
body.authenticated .admin-professional-create-form{padding:21px 28px 0}
body.authenticated .admin-professional-create-form .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 14px;margin:0}
body.authenticated .admin-professional-create-form .form-group{min-width:0}
body.authenticated .admin-professional-create-form .form-group.full,
body.authenticated .admin-professional-create-form .admin-professional-timezone{grid-column:1/-1}
body.authenticated .admin-professional-create-form :is(input,select){box-sizing:border-box;width:100%;min-width:0;min-height:46px;border-color:#d4dce7;background:#fff;color:var(--brand-ink);font-size:13px}
body.authenticated .admin-professional-create-form select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.authenticated .admin-professional-create-form :is(input,select):focus{border-color:var(--brand-action);box-shadow:0 0 0 3px rgba(64,95,143,.14)}
body.authenticated .admin-professional-create-form input[aria-invalid="true"]{border-color:#b95f61;box-shadow:0 0 0 3px rgba(185,95,97,.1)}
body.authenticated .admin-professional-create-form .field-error{min-height:15px;color:#a34d51;font-size:10px;line-height:1.35}
body.authenticated .admin-professional-create-form .admin-create-feedback{min-height:18px;margin:12px 0 0;color:var(--brand-muted);font-size:11px}
body.authenticated .admin-professional-create-form>.modal-actions{position:sticky;bottom:0;margin:4px -28px 0;padding:14px 28px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--brand-border);background:rgba(255,253,250,.98);box-shadow:0 -8px 22px rgba(23,35,58,.06)}
body.authenticated .admin-professional-create-form>.modal-actions .primary-button{background:var(--brand-action);color:#fff}
body.authenticated .admin-professional-create-modal .admin-create-success>span{background:var(--brand-action-soft);color:var(--brand-action)}
body.authenticated .admin-professional-create-modal .activation-link code{border-color:#d5deeb;background:#f5f7fb;color:var(--brand-ink)}
@media(max-width:620px){
  body.authenticated #modalBackdrop>.modal.admin-professional-create-modal{width:100%;height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);border-radius:20px 20px 0 0}
  body.authenticated .admin-professional-create-modal>#modalContent{height:100%;max-height:none}
  body.authenticated .admin-professional-create-head{grid-template-columns:40px minmax(0,1fr);gap:11px;padding:22px 54px 18px 18px}
  body.authenticated .admin-professional-create-symbol{width:40px;height:40px}
  body.authenticated .admin-professional-create-head h2{font-size:23px}
  body.authenticated .admin-professional-create-form{padding:17px 18px 0}
  body.authenticated .admin-professional-create-form .form-grid{grid-template-columns:1fr;gap:11px}
  body.authenticated .admin-professional-create-form .form-group.full,body.authenticated .admin-professional-create-form .admin-professional-timezone{grid-column:auto}
  body.authenticated .admin-professional-create-form>.modal-actions{display:grid;grid-template-columns:1fr 1.35fr;margin-inline:-18px;padding-inline:18px}
  body.authenticated .admin-professional-create-form>.modal-actions button{width:100%}
}

/* Recovery and activation success states use the current ink, blue and gold language. */
.auth-gateway .auth-recovery-success{position:relative;margin-top:12px;padding:28px 0 3px;text-align:center;isolation:isolate}
.auth-gateway .auth-recovery-success::before{position:absolute;z-index:-1;top:4px;left:50%;width:116px;height:70px;border:1px solid rgba(195,154,66,.36);border-radius:61% 39% 56% 44%/43% 58% 42% 57%;background:#f8efd5;content:"";transform:translateX(-50%) rotate(-5deg);opacity:.72}
.auth-gateway .auth-recovery-success>span{display:grid;width:54px;height:54px;margin:0 auto 23px;place-items:center;border:1px solid #cbd6e5;border-radius:43% 57% 45% 55%/57% 43% 57% 43%;background:#e7edf6;color:#405f8f;font-size:23px;font-weight:700;box-shadow:0 8px 20px rgba(64,95,143,.12)}
.auth-gateway .auth-recovery-success h3{margin:0 0 9px;color:#313a4a;font:400 30px/1.1 "DM Serif Display",Georgia,serif;letter-spacing:-.015em}
.auth-gateway .auth-recovery-success p{max-width:390px;margin:0 auto 22px;color:#626c7c;font-size:13px;line-height:1.55}
.auth-gateway .auth-recovery-success .primary-button{width:100%;min-height:54px;border-radius:14px;background:#405f8f!important;color:#fff!important;box-shadow:0 8px 18px rgba(64,95,143,.17)}
.auth-gateway .auth-recovery-success .primary-button:hover{background:#334f79!important;transform:translateY(-1px)}
.auth-gateway .auth-recovery-success .primary-button:focus-visible{outline:3px solid rgba(226,199,118,.72);outline-offset:3px}

/* Patient records use the current blue/gold language, without the legacy green header. */
body.authenticated .patient-detail-modal .patient-detail-head{
  position:relative;
  border-bottom:3px solid var(--brand-gold);
  background:linear-gradient(135deg,#33445e 0%,#405f8f 100%)!important;
  color:#fff;
  box-shadow:0 12px 28px rgba(23,35,58,.18);
}
body.authenticated .patient-detail-modal .patient-detail-head:after{
  position:absolute;right:11%;bottom:-3px;width:82px;height:3px;border-radius:99px;background:#efd88f;content:"";
}
body.authenticated .patient-detail-modal .patient-detail-head :is(h2,.eyebrow,p){color:#fff!important}
body.authenticated .patient-detail-modal .patient-detail-head .eyebrow{color:#f0d98e!important}
body.authenticated .patient-detail-modal .patient-detail-head .avatar{
  border:1px solid rgba(255,255,255,.6);background:#edf1f7!important;color:var(--brand-action-strong)!important;box-shadow:0 5px 16px rgba(18,29,48,.18);
}
body.authenticated .patient-detail-modal .patient-detail-actions .secondary-button{border-color:rgba(255,255,255,.72);background:#fff;color:var(--brand-action-strong)}
body.authenticated .patient-detail-modal .patient-detail-actions .primary-button{border:1px solid #d7c078;background:var(--brand-gold-soft);color:var(--brand-ink)}

/* The inactivity dialog owns its geometry; opening it from a wide patient card
   must not inherit that card's height or scrolling rules. */
#modalBackdrop>.modal.patient-inactivity-modal{
  box-sizing:border-box;width:min(760px,100%);max-height:calc(100dvh - 32px);padding:30px 30px 0;overflow:hidden;
}
.patient-inactivity-modal>#modalContent{max-height:calc(100dvh - 64px);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:0 2px}
.patient-inactivity-modal form{display:flex;flex-direction:column;min-height:0}
.patient-inactivity-modal .patient-deactivate-note{flex:none}
.patient-inactivity-modal .modal-actions{
  position:sticky;bottom:0;z-index:4;flex:none;margin-inline:-2px;padding:17px 2px calc(18px + env(safe-area-inset-bottom,0px));background:linear-gradient(to bottom,rgba(255,255,255,.96),#fff 24%);box-shadow:0 -10px 24px rgba(23,35,58,.055);
}
.patient-inactivity-modal .modal-actions button{min-height:44px}
.patient-inactivity-modal .patient-future-appointments{margin:18px 0;padding:16px;border:1px solid #d7deea;border-radius:16px;background:#f7f9fc}
.patient-inactivity-modal .patient-future-appointments legend{padding:0 5px;color:var(--brand-ink);font-size:1rem;font-weight:800;line-height:1.35}
.patient-inactivity-modal .patient-future-summary{display:grid;gap:5px;margin:4px 0 14px;padding:11px 12px;border-radius:11px;background:#edf2fa;color:#40506a;font-size:.88rem}
.patient-inactivity-modal .patient-future-summary span{line-height:1.35}
.patient-inactivity-modal .patient-future-summary small{color:#66748a}
.patient-inactivity-modal .patient-future-option{display:flex;align-items:flex-start;gap:11px;margin-top:9px;padding:13px;border:1px solid #d7deea;border-radius:12px;background:#fff;cursor:pointer}
.patient-inactivity-modal .patient-future-option:has(input:checked){border-color:#5273a7;background:#eef3fb;box-shadow:0 0 0 1px #5273a7}
.patient-inactivity-modal .patient-future-option input{flex:none;margin-top:3px;accent-color:#46699f}
.patient-inactivity-modal .patient-future-option span{display:grid;gap:3px}
.patient-inactivity-modal .patient-future-option strong{color:var(--brand-ink);font-size:.94rem}
.patient-inactivity-modal .patient-future-option small{color:#607087;line-height:1.42}
.patient-inactivity-modal .field-error{margin:9px 0 0;color:#a53434;font-size:.86rem;font-weight:700}

/* Referral hero is a dark brand surface. Light-surface typography tokens load
   globally, so keep every explanatory label explicitly readable here. */
body.authenticated .account-referral-hero{background:linear-gradient(145deg,#33445e 0%,#405f8f 100%)}
body.authenticated .account-referral-hero .eyebrow{color:#f0d98e!important}
body.authenticated .account-referral-hero h2{color:#fff!important}
body.authenticated .account-referral-hero p,
body.authenticated .account-referral-hero>small{color:#f7f8fb!important;opacity:1}
body.authenticated .account-referral-hero .account-referral-link input{background:#fff;color:#243043}
body.authenticated .account-referral-hero .account-referral-link .primary-button{border-color:#e0b94f;background:#e0b94f;color:#263650}
body.authenticated .account-referral-hero :is(input,button):focus-visible{outline:3px solid #f0d98e;outline-offset:3px}

/* Consultorios: one compact visual language for physical and virtual spaces. */
body.authenticated .page-head [data-action="newOffice"]{display:inline-flex;gap:9px;align-items:center}
body.authenticated .page-head [data-action="newOffice"] svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7}
body.authenticated .office-overview{display:flex;align-items:center;gap:10px;margin:18px 0 14px;padding:12px 14px;border:1px solid var(--brand-border);border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(31,45,68,.05)}
body.authenticated .office-overview>div{display:flex;align-items:center;gap:9px;min-height:38px;padding:0 14px;border-left:1px solid #e3e7ee}
body.authenticated .office-overview>div:first-child{min-width:220px;padding-left:0;border-left:0}.office-overview svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7}.office-overview>div:first-child>span{display:grid;width:38px;height:38px;place-items:center;border-radius:12px;background:var(--brand-action-soft);color:var(--brand-action)}
body.authenticated .office-overview p{display:grid;margin:0}.office-overview strong,.office-overview b{color:var(--brand-ink);font-size:18px}.office-overview small,.office-overview>div>span{color:var(--brand-muted);font-size:11px}.office-overview>div:not(:first-child){display:grid;grid-template-columns:auto auto;gap:6px}
body.authenticated .office-grid{grid-template-columns:repeat(3,minmax(260px,1fr));gap:16px;margin-top:0}.office-card{position:relative;min-height:300px;padding:22px;border-color:#dce2ec;overflow:hidden;box-shadow:0 12px 30px rgba(31,45,68,.065)}.office-card-accent{position:absolute;inset:0 0 auto;height:4px;background:var(--brand-gold)}.office-card.is-virtual .office-card-accent{background:var(--brand-action)}
body.authenticated .office-card .entity-card-head{align-items:center}.office-card .entity-symbol{display:grid;width:48px;height:48px;place-items:center;border-radius:15px;background:var(--brand-action-soft);color:var(--brand-action)}.office-card.is-physical .entity-symbol{background:var(--brand-gold-soft);color:#8a681d}.office-card .entity-symbol svg,.office-address svg,.office-create-card svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.office-card .badge{display:inline-flex;align-items:center;gap:6px}.office-card .badge i{width:7px;height:7px;border-radius:50%;background:#35a27f}.office-card .badge.gray i{background:#8b96a6}
body.authenticated .office-kind{display:block;margin-top:20px;color:var(--brand-action);font-size:10px;font-weight:800;letter-spacing:.1em}.office-card h3{margin:6px 0 8px;color:var(--brand-ink);font-size:19px}.office-address{display:flex!important;align-items:center;gap:7px;min-height:34px;margin:0!important;color:var(--brand-muted)!important;font-size:12px}.office-address svg{width:16px;height:16px;flex:0 0 16px}.office-card .entity-facts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}.office-card .entity-facts>span{display:grid;gap:5px;padding:11px;border:1px solid #e3e7ee;border-radius:11px;background:#f8f9fb}.office-card .entity-facts small{color:var(--brand-muted);font-size:10px}.office-card .entity-facts strong{color:var(--brand-ink);font-size:12px}.office-card .entity-actions{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:auto}.office-card .entity-actions button{min-height:42px}.office-remove{padding:0 13px;border:1px solid #e5d3d0;border-radius:10px;background:#fff;color:#9a4d43;font-weight:700;cursor:pointer}.office-remove:hover{background:#fff4f2}
body.authenticated .office-create-card{display:grid;min-height:300px;place-items:center;align-content:center;gap:16px;padding:28px;border:1px dashed #aebbd0;background:linear-gradient(145deg,#f9fbfe,#f3f6fb);color:var(--brand-ink);text-align:center;cursor:pointer;box-shadow:none}.office-create-icon{display:grid;width:54px;height:54px;place-items:center;border-radius:17px;background:#fff3cb;color:#80631d;box-shadow:0 9px 22px rgba(31,45,68,.08)}.office-create-card>span:nth-child(2){display:grid;gap:7px}.office-create-card strong{font-size:16px}.office-create-card small{max-width:250px;color:var(--brand-muted);font-size:11px;line-height:1.5}.office-create-card em{padding:8px 13px;border-radius:9px;background:var(--brand-action);color:#fff;font-size:11px;font-style:normal;font-weight:750}.office-create-card:hover{border-color:var(--brand-action);transform:translateY(-2px)}
body.authenticated .currency-management-search{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:center;gap:8px;height:44px;padding:0 13px;border:1px solid var(--brand-border);border-radius:12px;background:#fff;color:var(--brand-action);cursor:text}
body.authenticated .currency-management-search>span{display:grid;place-items:center}.currency-management-search svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
body.authenticated .currency-management-search input{box-sizing:border-box;width:100%;height:40px!important;min-height:0!important;padding:0!important;border:0!important;background:transparent!important;color:var(--brand-ink)!important;box-shadow:none!important;font-size:13px!important;outline:0!important}.currency-management-search:focus-within{border-color:var(--brand-action)!important;box-shadow:0 0 0 3px rgba(64,95,143,.14)!important}.currency-search-empty{margin:18px 0;padding:18px;border:1px dashed #b8c3d4;border-radius:12px;background:#f7f9fc;color:var(--brand-muted);font-size:12px;text-align:center}
.patient-detail-head .patient-detail-avatar{display:grid;place-items:center;flex:0 0 56px;width:56px;height:56px}
.patient-detail-head .patient-detail-avatar .patient-directory-avatar{width:56px;height:56px;border:1px solid rgba(255,255,255,.55);background:#f4f7fb;box-shadow:none}
.patient-detail-head .patient-detail-avatar .patient-identicon svg{width:42px;height:42px;stroke:#31588f}

/* Regla de identidad: una persona se representa con foto o silueta, nunca con iniciales. */
.patient-directory-avatar.patient-identity-placeholder{border-radius:50%!important;border-color:#d7e0ed!important;background:#edf2fa!important;color:#405f8f!important}
.patient-directory-avatar.patient-identity-placeholder svg{width:68%;height:68%;fill:none;stroke:currentColor;stroke-width:1.65}
.patient-directory-avatar.patient-identity-placeholder .identity-accent{fill:#d6a72e;stroke:#d6a72e}
.sky-next-person>.patient-directory-avatar{flex:0 0 36px;width:36px;height:36px}
.map-patient-tooltip li>.patient-directory-avatar{flex:0 0 24px;width:24px;height:24px;border-color:rgba(255,255,255,.2)!important;background:rgba(255,255,255,.12)!important;color:#fff!important}
.diagnosis-patient>.patient-directory-avatar{flex:0 0 32px;width:32px;height:32px}
.payment-linked-person>.patient-directory-avatar{flex:0 0 40px;width:40px;height:40px;padding:0}
.identity-photo-placeholder{display:grid;place-items:center;width:100%;height:100%}
.identity-photo-placeholder svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.65}
.booking-lead-row>.patient-directory-avatar{flex-basis:38px;width:38px;height:38px}.lead-detail-head>.patient-directory-avatar{flex-basis:54px;width:54px;height:54px}
.preview-person-placeholder{display:grid;place-items:center!important}.preview-person-placeholder svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7}
.dashboard-period-explanation{display:block;margin-top:6px;color:#526278;font-size:11px;line-height:1.35}
body.authenticated .forecast-card{padding:28px 30px;border:1px solid var(--brand-border);border-left:4px solid var(--brand-action);border-radius:18px;box-shadow:0 14px 34px rgba(31,45,68,.07)}
body.authenticated .forecast-head{align-items:flex-start}.forecast-head .eyebrow{font-size:10px;letter-spacing:.11em}.forecast-head h3{margin:6px 0!important;color:var(--brand-ink);font-size:24px!important;line-height:1.15}.forecast-head p{max-width:620px;color:#4f5e72!important;font-size:13px!important;line-height:1.55!important}
body.authenticated .forecast-actions{align-items:flex-end;gap:12px}
body.authenticated .forecast-overview{gap:12px;margin:22px 0 16px}.forecast-overview article{min-height:86px;padding:17px 18px;border:1px solid #e0e5ec;background:#f7f9fc}.forecast-overview small{color:#536176;font-size:12px}.forecast-overview strong{margin-top:8px;color:var(--brand-ink);font-size:28px;line-height:1}
body.authenticated .forecast-currencies{grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}.forecast-currencies article{min-height:116px;padding:17px 18px;border-color:#d8dfe9;border-radius:13px;background:#fff}.forecast-currencies small{color:#526278;font-size:12px}.forecast-currencies strong{margin-top:7px;color:var(--brand-ink);font-size:22px}.forecast-currencies span,.forecast-currencies em{margin-top:10px;color:#526278;font-size:11px;line-height:1.4}.forecast-currencies em{color:#176e60;font-weight:700}
body.authenticated .forecast-list{margin-top:18px;border-top-color:#dbe1e9}.forecast-list>div{min-height:54px;grid-template-columns:120px minmax(180px,1fr) auto;padding:10px 8px;border-bottom-color:#e1e5ec}.forecast-list span{color:#526278;font-size:11px}.forecast-list strong{color:var(--brand-ink);font-size:13px}.forecast-list small{color:#40516a;font-size:12px;font-weight:650}.forecast-empty{font-size:12px}
.billing-duplicate-note{display:block;margin-top:7px;color:#8a5d17;font-size:12px;font-weight:700;line-height:1.4}.billing-table td:nth-child(2)>.session-subtext{display:block;margin-top:4px;color:#58677b;font-size:11px}
.billing-price-edit{display:inline-flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--brand-ink);font:inherit;font-size:12px;font-weight:700;cursor:pointer}.billing-price-edit span{color:var(--brand-action)}.billing-price-edit:hover:not(:disabled),.billing-price-edit:focus-visible{border-color:#b7c4d7;background:var(--brand-action-soft);outline:0}.billing-price-edit:disabled{cursor:default;opacity:1}
@media(max-width:760px){body.authenticated .forecast-card{padding:21px 17px}.forecast-list>div{grid-template-columns:92px 1fr}.forecast-list small{grid-column:2}.forecast-overview{grid-template-columns:1fr}.forecast-head h3{font-size:22px!important}}
@media(max-width:1100px){body.authenticated .office-grid{grid-template-columns:repeat(2,minmax(260px,1fr))}}
@media(max-width:700px){body.authenticated .office-overview{align-items:stretch;flex-wrap:wrap}.office-overview>div:first-child{width:100%;min-width:0}.office-overview>div:nth-child(2){padding-left:0;border-left:0}body.authenticated .office-grid{grid-template-columns:1fr}.office-card,.office-create-card{min-height:0}}

/* Final authentication bridge: obsolete registration styles cannot reintroduce green. */
.auth-gateway{
  --nodly-green:#405f8f;
  --nodly-green-hover:#334f79;
  --nodly-green-soft:#e8eef6;
}
.auth-gateway .auth-panel .auth-submit,
.auth-gateway .auth-panel .auth-submit:visited{background:#405f8f!important;color:#fff!important}
.auth-gateway .auth-panel .auth-submit:hover{background:#334f79!important;color:#fff!important;transform:none}
.auth-gateway .auth-panel .auth-submit:active{background:#2d456b!important;color:#fff!important;transform:none}
.auth-gateway .auth-panel .auth-submit:focus-visible{background:#405f8f!important;color:#fff!important;outline:3px solid rgba(195,154,66,.58);outline-offset:3px}
.auth-gateway .auth-panel .auth-submit:disabled{background:#8998b0!important;color:#fff!important;cursor:wait}
.auth-gateway .auth-role-tabs button.active{background:#405f8f;color:#fff}
.auth-gateway :is(.auth-input:focus-within,.auth-form input:focus,.auth-form select:focus){border-color:#8498b8;box-shadow:0 0 0 3px rgba(64,95,143,.13)}
.auth-gateway :is(input[type="checkbox"],input[type="radio"]){accent-color:#405f8f}
@media(max-width:640px){
  #modalBackdrop>.modal.patient-inactivity-modal{max-height:calc(100dvh - 16px)!important;padding:24px 18px 0!important}
  .patient-inactivity-modal>#modalContent{max-height:calc(100dvh - 40px)}
  .patient-inactivity-modal .modal-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:9px;padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))}
  .patient-inactivity-modal .modal-actions button{width:100%;min-width:0;padding-inline:9px;white-space:normal}
}
/* Reutilización rápida de colores de agenda y tipos de consulta. */
.color-memory{display:grid;gap:7px;margin-top:9px;padding:9px 10px;border:1px solid #d8e0e8;border-radius:12px;background:#f7f9fb}
.color-memory>small{font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#52677a}
.color-memory>div{display:flex;flex-wrap:wrap;gap:7px}
.color-memory button{width:26px;height:26px;padding:0;border:2px solid #fff;border-radius:50%;background:var(--saved-color);box-shadow:0 0 0 1px #b8c5d2;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}
.color-memory button:hover,.color-memory button:focus-visible{transform:scale(1.12);box-shadow:0 0 0 2px #405f8f;outline:0}

/* Cierre responsive: una sola superficie utilizable desde 320px hasta móviles grandes. */
@media(max-width:768px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  body.authenticated:not(.superadmin-mode) :is(.app-shell,.main-area,.view){box-sizing:border-box;width:100%;max-width:100%;min-width:0}
  body.authenticated:not(.superadmin-mode) .view{padding-inline:clamp(8px,3.4vw,16px)}
  body.authenticated:not(.superadmin-mode) .view :is(section,article,form,fieldset,header,footer,nav,div){min-width:0}
  body.authenticated:not(.superadmin-mode) :is(.card,.table-card,.billing-workspace,.account-content,.settings-hub,.mobile-home){box-sizing:border-box;max-width:100%}
  body.authenticated:not(.superadmin-mode) :is(input,select,textarea,button){max-width:100%}
  body.authenticated:not(.superadmin-mode) :is(input,select,textarea){font-size:16px}
  body.authenticated:not(.superadmin-mode) :is(.table-card,.billing-table-wrap,.data-table-wrap){overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}
  body.authenticated:not(.superadmin-mode) .mobile-bottom-nav{box-sizing:border-box;width:100%;max-width:100%;padding-bottom:max(var(--mobile-safe-bottom),env(safe-area-inset-bottom,0px))}
  body.authenticated:not(.superadmin-mode) .mobile-bottom-nav button{min-width:0;touch-action:manipulation}
  body.authenticated:not(.superadmin-mode) .page-head h1{font-size:clamp(25px,8vw,34px);overflow-wrap:anywhere}
  body.authenticated:not(.superadmin-mode) .page-head p{max-width:100%;overflow-wrap:anywhere}
  #modalBackdrop{box-sizing:border-box;max-width:100vw;overflow:hidden;padding:6px 6px 0}
  #modalBackdrop>.modal{box-sizing:border-box;max-width:100%;max-height:calc(100dvh - 6px);overscroll-behavior:contain}
}

@media(max-width:390px){
  body.authenticated:not(.superadmin-mode) .view{padding-inline:8px}
  body.authenticated:not(.superadmin-mode) .billing-kpis{grid-template-columns:1fr 1fr;gap:7px}
  body.authenticated:not(.superadmin-mode) .billing-kpis article{min-width:0;padding:11px}
  body.authenticated:not(.superadmin-mode) .billing-kpis strong{font-size:16px;overflow-wrap:anywhere}
  body.authenticated:not(.superadmin-mode) .mobile-bottom-nav button{padding-inline:2px;font-size:9px}
  body.authenticated:not(.superadmin-mode) .mobile-bottom-nav svg{max-width:21px}
  #modalBackdrop>.modal :is(.modal-actions,.billing-config-actions)>div{min-width:0}
  #modalBackdrop>.modal :is(.modal-actions,.billing-config-actions) button{min-width:0;white-space:normal}
}

@media(max-width:340px){
  body.authenticated:not(.superadmin-mode) .mobile-bottom-nav button{font-size:8px;letter-spacing:-.01em}
  body.authenticated:not(.superadmin-mode) .mobile-bottom-nav .mobile-create span{transform:scale(.92)}
  body.authenticated:not(.superadmin-mode) .billing-kpis{grid-template-columns:1fr}
}

/* Regla de marca: los flujos de comunicación usan azul Nodly y acento dorado, no verde genérico. */
#modalBackdrop>.modal.collection-reminder-modal{background:#fff;color:#17233a}
.collection-reminder-modal .collection-modal-symbol{border-radius:12px;background:#e9eef7;color:#405f8f;box-shadow:none}
.collection-reminder-modal .collection-modal-head .eyebrow{color:#405f8f}
.collection-reminder-modal .collection-modal-head .eyebrow::before{border-color:#7892ba}
.collection-reminder-modal .collection-modal-head .eyebrow::after{background:#d6aa3c}
.collection-reminder-modal .collection-modal-head h2{color:#17233a}
.collection-reminder-modal .collection-modal-head p{color:#526278}
.collection-reminder-modal .debt-summary{border-color:#d8dde6;background:#f8f9fc}
.collection-reminder-modal .debt-summary>div+div{border-color:#d8dde6}
.collection-reminder-modal .debt-summary small,.collection-reminder-modal .collection-toggle small,.collection-reminder-modal .collection-channels small{color:#65748a}
.collection-reminder-modal .debt-summary strong,.collection-reminder-modal .collection-toggle strong,.collection-reminder-modal .collection-channels button{color:#24324a}
.collection-reminder-modal .collection-toggle{border-color:#e1e5ec}
.collection-reminder-modal .collection-toggle input{accent-color:#405f8f}
.collection-reminder-modal .form-group textarea:focus{border-color:#7892ba;box-shadow:0 0 0 3px rgba(64,95,143,.12)}
.collection-reminder-modal .collection-channels button{border-color:#d8dde6;background:#fff}
.collection-reminder-modal .collection-channels button:hover{border-color:#9aacca;background:#f7f9fc}
.collection-reminder-modal .collection-channels button.selected{border-color:#7892ba;background:#eef2f8}
.collection-reminder-modal .collection-channel-icon{background:#e9eef7;color:#405f8f}
.collection-reminder-modal .collection-channel-check{border-color:#c6cfdd}
.collection-reminder-modal .collection-channels button.selected .collection-channel-check{border-color:#405f8f;background:#405f8f;color:#fff}
.collection-reminder-modal .collection-bot-option{border-color:#d8dde6;background:#f3f6fa;color:#24324a}
.collection-reminder-modal .collection-bot-option .nodly-bot-mark{background:#e5eaf3;color:#405f8f}
.collection-reminder-modal .collection-whatsapp{border-color:#bac7da;background:#e9eef7;color:#314f7d}
.collection-reminder-modal .collection-whatsapp:hover{background:#dfe6f1}
.collection-reminder-modal .collection-bot-send{background:#405f8f;color:#fff}
.collection-reminder-modal .collection-bot-send:hover{background:#334d76}

/* Regla visual global de analítica: azul Nodly, dorado y neutros; nunca verde heredado. */
body.authenticated .dashboard-period{border-color:#d9e0ea;box-shadow:0 7px 22px rgba(31,45,68,.05)}
body.authenticated :is(.dashboard-period,.map-mode-switch) button{color:#58677c}
body.authenticated :is(.dashboard-period,.map-mode-switch) button:hover{background:#eef2f8;color:#405f8f}
body.authenticated :is(.dashboard-period,.map-mode-switch) button.active{background:#405f8f;color:#fff}
body.authenticated .analytics-card{position:relative;border-color:#dce2eb;background:#fff;box-shadow:0 10px 30px rgba(31,45,68,.055)}
body.authenticated .analytics-card:before{content:"";position:absolute;inset:0 0 auto;height:3px;background:linear-gradient(90deg,#405f8f 0 72px,#d6aa3c 72px 96px,transparent 96px)}
body.authenticated :is(.analytics-icon,.analytics-loading>span){background:#edf2fa;color:#405f8f}
body.authenticated .patient-location-map{border-color:#d9e1ec;background:#dce5f0}
body.authenticated .patient-map-ranking i{background:#edf1f6}body.authenticated .patient-map-ranking em{background:linear-gradient(90deg,#405f8f,#7892ba)}
body.authenticated :is(.map-empty-overlay,.map-locality){border-color:#d9e1ec;background:#f7f9fc}body.authenticated .map-level-row{border-color:#e0e5ed}body.authenticated .map-level-row:hover{border-color:#aebbd0;background:#f3f6fb}body.authenticated .map-locality>span{background:#e8eef7;color:#405f8f}
body.authenticated .map-insights{border-color:#d9e1ec;background:linear-gradient(110deg,#eef2f8,#fbfcfe)}body.authenticated .map-insights-title>span{background:#e4eaf4;color:#405f8f}body.authenticated .map-insight-kpis span{border-left-color:#9cacc4}body.authenticated .map-insights>p{color:#526278}body.authenticated .map-privacy-note{border-top-color:#dce2eb;color:#65748a}
body.authenticated .patient-location-map .leaflet-tooltip.map-patient-tooltip-shell{background:#263a59;box-shadow:0 12px 30px rgba(31,45,68,.24)}body.authenticated .patient-location-map .leaflet-tooltip.map-patient-tooltip-shell:before{border-top-color:#263a59}body.authenticated .map-patient-tooltip header span{background:#e9eef7;color:#405f8f}body.authenticated :is(.map-patient-tooltip>small,.map-patient-tooltip footer){color:#c7d1df}
body.authenticated .income-ars>i{background:#405f8f}body.authenticated .income-ars>strong{color:#314f7d}body.authenticated .income-usd>i{background:#d6aa3c}body.authenticated .income-usd>strong,body.authenticated .dashboard-income-foot span:last-child{color:#80631d}
body.authenticated .sky-practice-status i.green{background:#7892ba}body.authenticated .sky-practice-status i.amber{background:#d6aa3c}body.authenticated .sky-practice-status i.blue{background:#405f8f}
body.authenticated .continuity-layout{display:grid;grid-template-columns:minmax(0,1fr) 245px;align-items:stretch;gap:18px}
body.authenticated .continuity-insight{display:flex;flex-direction:column;justify-content:center;min-width:0;margin:16px 0 28px;padding:20px;border:1px solid #d9e1ec;border-left:4px solid #d6aa3c;border-radius:13px;background:#f7f9fc}
body.authenticated .continuity-insight span{color:#405f8f;font-size:9px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}body.authenticated .continuity-insight strong{margin-top:9px;color:#1f2d44;font-size:18px;line-height:1.3}body.authenticated .continuity-insight p{margin:9px 0 0;color:#5c6a7e;font-size:11px;line-height:1.5}
body.authenticated .analytics-followup-card{align-self:start}.analytics-followup-card .continuity-layout{grid-template-columns:minmax(220px,1fr) minmax(180px,.62fr);gap:12px}.analytics-followup-card .analytics-chart{height:218px}.analytics-followup-card .continuity-insight{margin:10px 0 24px;padding:15px;border-left-width:3px}.analytics-followup-card .followup-insight{border-left-color:#7892ba;background:#f8f9fc}.analytics-followup-card .followup-insight strong{font-size:15px;line-height:1.35}.analytics-followup-card .followup-insight p{font-size:10px}.analytics-continuity-card .analytics-chart{height:250px}
.analytics-followup-card .analytics-kpi-link{appearance:none;border:0;background:transparent;padding:0;color:#59687d;font:inherit;font-size:10px;font-weight:600;line-height:1.35;text-align:left;cursor:pointer}.analytics-followup-card .analytics-kpi-link b{display:block;margin-bottom:4px;color:#17233a;font-size:17px;font-weight:800}.analytics-followup-card .analytics-kpi-link:hover b,.analytics-followup-card .analytics-kpi-link:focus-visible b{color:#405f8f}.analytics-followup-card .analytics-kpi-link:focus-visible,.analytics-followup-card .followup-link:focus-visible{outline:3px solid rgba(64,95,143,.22);outline-offset:3px}.analytics-followup-card .analytics-kpi-link:disabled{cursor:default;opacity:.68}.analytics-followup-card .followup-link{width:100%;border-top:1px solid #dbe2ed;border-right:1px solid #dbe2ed;border-bottom:1px solid #dbe2ed;text-align:left;cursor:pointer}.analytics-followup-card .followup-link em{display:block;margin-top:10px;color:#405f8f;font-size:11px;font-style:normal;font-weight:750}.analytics-followup-card .followup-link:hover{background:#f1f4f9;box-shadow:0 7px 18px rgba(48,67,96,.08)}.analytics-followup-card .followup-link:disabled{cursor:default}.analytics-followup-card .followup-link:disabled em{display:none}

/* Continuidad: recorrido anónimo y legible, sin exponer identidad clínica. */
body.authenticated .analytics-continuity-card{grid-column:1/-1;padding:24px}.analytics-continuity-card .continuity-card-head{align-items:center;margin-bottom:20px}.continuity-title{display:flex;align-items:center;gap:12px;min-width:230px}.continuity-summary{display:flex;align-items:center;justify-content:flex-end;gap:24px;min-width:0}.continuity-kpis{display:grid;grid-template-columns:repeat(4,minmax(82px,1fr));min-width:0}.continuity-kpis>span{min-height:52px;border-left:1px solid #dce3ed;padding:4px 18px;color:#5b6980;font-size:11px;font-weight:600;line-height:1.35}.continuity-kpis b{display:block;margin-bottom:3px;color:#17233a;font-size:22px;line-height:1}.continuity-recovery{display:grid;grid-template-columns:68px;justify-items:center;gap:4px;flex:none}.continuity-recovery>i{display:grid;place-items:center;width:64px;height:64px;border-radius:50%;background:conic-gradient(#405f8f calc(var(--recovery)*1%),#e6ebf2 0);font-style:normal}.continuity-recovery>i:before{content:"";grid-area:1/1;width:48px;height:48px;border-radius:50%;background:#fff}.continuity-recovery b{z-index:1;grid-area:1/1;color:#17233a;font-size:16px}.continuity-recovery>span{color:#526278;font-size:10px;font-weight:700}.analytics-continuity-card .continuity-layout{grid-template-columns:minmax(0,1fr) minmax(230px,290px);gap:18px}.analytics-continuity-card .continuity-insight{margin:0;padding:22px}.analytics-continuity-card .continuity-insight>small{display:block;margin-top:14px;border-top:1px solid #dfe5ed;padding-top:13px;color:#647287;font-size:11px;line-height:1.55}.analytics-continuity-card .continuity-insight p b{color:#243550}
.continuity-journeys{min-width:0;border:1px solid #dce3ed;border-radius:14px;background:#fbfcfe;padding:18px}.continuity-journeys>header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.continuity-journeys h4{margin:0;color:#17233a;font-size:16px}.continuity-legend{display:flex;gap:15px;color:#59687d;font-size:11px;font-weight:650}.continuity-legend span{display:flex;align-items:center;gap:6px}.continuity-legend i{width:10px;height:10px;border-radius:50%}.continuity-legend .cancel{background:#c96f65}.continuity-legend .rebook{background:#405f8f}.continuity-journey-list{display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none}.continuity-journey-row{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:center;gap:14px;min-height:78px}.journey-patient{border-radius:9px;background:#edf2fa;padding:10px;color:#263a59;font-size:12px;text-align:center;white-space:nowrap}.journey-track{position:relative;height:72px;min-width:0}.journey-rail{position:absolute;top:51px;right:0;left:0;height:2px;background:#dce3ed}.journey-rail:after{content:"";position:absolute;inset:-3px 0;background:radial-gradient(circle,#c6d0de 3px,transparent 4px) 0 0/20% 8px}.journey-connection{position:absolute;top:49px;left:var(--cancel);width:max(4px,calc(var(--rebook) - var(--cancel)));height:5px;border-top:2px solid #9eb0ca}.journey-connection:after{content:"";position:absolute;top:-5px;right:-1px;border-width:4px 0 4px 6px;border-style:solid;border-color:transparent transparent transparent #9eb0ca}.journey-event{position:absolute;top:0;left:var(--cancel);z-index:2;display:grid;min-width:72px;transform:translateX(-50%);border-radius:9px;padding:5px 8px;text-align:center;box-shadow:0 4px 10px rgba(31,45,68,.06)}.journey-event:after{content:"";position:absolute;bottom:-20px;left:50%;width:13px;height:13px;transform:translateX(-50%);border:3px solid #fff;border-radius:50%;box-shadow:0 2px 6px rgba(31,45,68,.16)}.journey-event em{font-size:10px;font-style:normal;font-weight:800}.journey-event small{margin-top:1px!important;font-size:10px!important;font-weight:650}.journey-cancel{background:#fbecea;color:#9c453d}.journey-cancel:after{background:#c96f65}.journey-rebook{left:var(--rebook);background:#eaf0f9;color:#31527f}.journey-rebook:after{background:#405f8f}.journey-pending{position:absolute;top:40px;right:0;z-index:2;border-radius:99px;background:#f2f4f7;padding:5px 8px;color:#69768a;font-size:10px;font-weight:700}.continuity-pager{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:12px}.continuity-pager button{display:grid;place-items:center;width:44px;height:44px;border:1px solid #d5deea;border-radius:10px;background:#fff;color:#405f8f;font-size:20px;cursor:pointer}.continuity-pager button:hover:not(:disabled),.continuity-pager button:focus-visible{border-color:#8fa2be;background:#edf2fa}.continuity-pager button:focus-visible{outline:3px solid rgba(64,95,143,.22);outline-offset:2px}.continuity-pager button:disabled{cursor:default;opacity:.38}.continuity-pager span{color:#607087;font-size:11px;font-weight:700}.continuity-accessible-table{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}.continuity-empty{display:grid;min-height:210px;place-items:center;text-align:center}.continuity-empty span{font-size:24px}.continuity-empty strong{display:block;margin-top:7px;color:#243550}.continuity-empty p{margin:5px 0 0;color:#65748a;font-size:12px}
@media(max-width:820px){body.authenticated .continuity-layout,body.authenticated .analytics-followup-card .continuity-layout{grid-template-columns:1fr}body.authenticated .continuity-insight{margin:0}body.authenticated .analytics-continuity-card .analytics-chart{height:230px}body.authenticated .analytics-followup-card .analytics-chart{height:205px}}
@media(max-width:1050px){.analytics-continuity-card .continuity-card-head{align-items:flex-start;flex-direction:column}.continuity-summary{width:100%;justify-content:space-between}.continuity-kpis{flex:1}.continuity-kpis>span:first-child{border-left:0;padding-left:0}}
@media(max-width:680px){body.authenticated .analytics-continuity-card{padding:16px}.continuity-summary{align-items:flex-start}.continuity-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.continuity-kpis>span{min-height:0;border-left:0;border-radius:9px;background:#f5f7fa;padding:10px}.continuity-kpis b{font-size:19px}.continuity-recovery{grid-template-columns:60px}.continuity-recovery>i{width:58px;height:58px}.continuity-recovery>i:before{width:43px;height:43px}.continuity-journeys{padding:14px}.continuity-journeys>header{align-items:flex-start;flex-direction:column}.continuity-journey-row{grid-template-columns:72px minmax(0,1fr);gap:9px}.journey-patient{padding:9px 5px;font-size:10px}}
@media(max-width:520px){.continuity-summary{display:grid;grid-template-columns:minmax(0,1fr) 64px;gap:10px}.continuity-journey-row{display:block;border-top:1px solid #e3e8ef;padding:12px 0}.continuity-journey-row:first-child{border-top:0}.journey-patient{display:inline-block;margin-bottom:8px}.journey-track{display:grid;grid-template-columns:1fr 1fr;gap:8px;height:auto}.journey-rail,.journey-connection{display:none}.journey-event{position:relative;inset:auto!important;min-width:0;transform:none}.journey-event:after{display:none}.journey-pending{position:static;display:grid;place-items:center;min-height:47px}.continuity-legend{width:100%;justify-content:space-between}.analytics-continuity-card .continuity-insight strong{font-size:16px}}

/* Continuidad: resultado primero; el detalle sólo se abre cuando hace falta. */
body.authenticated .analytics-continuity-card{padding:21px 22px}.analytics-continuity-card .continuity-card-head{margin-bottom:15px}.analytics-continuity-card .continuity-kpis{grid-template-columns:repeat(2,minmax(104px,1fr))}.analytics-continuity-card .continuity-layout{grid-template-columns:minmax(0,1fr) minmax(220px,265px);gap:14px}.analytics-continuity-card .continuity-insight{padding:18px}.analytics-continuity-card .continuity-insight strong{font-size:16px}.analytics-continuity-card .continuity-insight>small{margin-top:10px;padding-top:10px}
.continuity-outcomes{min-width:0;border:1px solid #dce3ed;border-radius:14px;background:#fbfcfe;padding:18px}.continuity-outcomes>header{display:flex;align-items:center;justify-content:space-between;gap:16px}.continuity-outcomes h4{margin:0;color:#17233a;font-size:16px}.continuity-outcomes>header small{display:block;margin-top:3px;color:#68768a;font-size:11px}.continuity-outcomes>header>strong{color:#31527f;font-size:13px;white-space:nowrap}.continuity-outcome-bar{display:flex;overflow:hidden;height:12px;margin-top:18px;border-radius:999px;background:#e8edf4}.continuity-outcome-bar>i{display:block;min-width:0;transition:width .25s ease}.continuity-outcome-bar .recovered{background:#405f8f}.continuity-outcome-bar .pending{background:#d6aa3c}.continuity-outcome-labels{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:10px;color:#536176;font-size:11px}.continuity-outcome-labels span{display:flex;align-items:center;gap:6px}.continuity-outcome-labels i{width:9px;height:9px;border-radius:50%}.continuity-outcome-labels i.recovered{background:#405f8f}.continuity-outcome-labels i.pending{background:#d6aa3c}.continuity-outcome-labels b{color:#20314c;font-size:13px}
.continuity-cases{margin-top:17px;border-top:1px solid #e1e6ed;padding-top:9px}.continuity-cases>summary{display:flex;min-height:44px;align-items:center;gap:9px;border-radius:10px;padding:0 10px;color:#405f8f;font-size:12px;font-weight:750;cursor:pointer;list-style:none}.continuity-cases>summary:hover{background:#eef2f8}.continuity-cases>summary:focus-visible{outline:3px solid rgba(64,95,143,.22);outline-offset:2px}.continuity-cases>summary::-webkit-details-marker{display:none}.continuity-cases>summary span{flex:1}.continuity-cases>summary b{display:grid;min-width:25px;height:25px;place-items:center;border-radius:99px;background:#eaf0f9;color:#31527f;font-size:11px}.continuity-cases>summary i{font-size:15px;font-style:normal;transition:transform .18s ease}.continuity-cases[open]>summary i{transform:rotate(180deg)}.continuity-cases>ol{display:grid;gap:6px;margin:7px 0 0;padding:0;list-style:none}.continuity-case-row{display:grid;grid-template-columns:64px minmax(90px,1fr) 24px minmax(115px,1fr);align-items:center;gap:8px;border-top:1px solid #e7ebf1;padding:10px 8px;color:#31445f;font-size:11px}.continuity-case-row>b{color:#536176}.continuity-case-row>span{font-weight:700}.continuity-case-row>span small{display:block;margin-bottom:2px;color:#758196;font-size:9px;font-weight:650}.continuity-case-row>i{color:#9aa8bb;font-style:normal;text-align:center}.continuity-case-row .recovered{color:#31527f}.continuity-case-row .pending{color:#80631d}.continuity-outcomes.continuity-empty{display:grid;min-height:180px;place-items:center;text-align:center}
@media(max-width:820px){body.authenticated .analytics-continuity-card .continuity-layout{grid-template-columns:1fr}.analytics-continuity-card .continuity-insight{order:-1}}
@media(max-width:560px){body.authenticated .analytics-continuity-card{padding:15px}.continuity-outcomes{padding:14px}.continuity-outcome-labels{align-items:flex-start;flex-direction:column;gap:7px}.continuity-case-row{grid-template-columns:55px 1fr 18px 1fr;padding-inline:2px}.analytics-continuity-card .continuity-kpis{grid-template-columns:1fr 1fr}.analytics-continuity-card .continuity-kpis>span{padding:9px}}

/* Mapa sereno: el territorio es contexto y las ubicaciones son el dato. */
body.authenticated .analytics-map-card{background:#fff}
body.authenticated .analytics-map-card .patient-location-map{border-color:#dce3ed;background:#f8fafc;box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)}
body.authenticated .patient-location-map .leaflet-container,body.authenticated .patient-location-map .leaflet-pane{background:#f8fafc}
body.authenticated .patient-location-map .leaflet-control-zoom{overflow:hidden;border:1px solid #d4dce8;border-radius:10px;box-shadow:0 5px 16px rgba(31,45,68,.08)}
body.authenticated .patient-location-map .leaflet-control-zoom a{border-color:#e1e6ee;background:#fff;color:#31445f}
body.authenticated .patient-location-map .leaflet-control-zoom a:hover{background:#eef2f8;color:#405f8f}
body.authenticated .patient-location-map .leaflet-control-attribution{border-radius:7px 0 0;background:rgba(255,255,255,.84);color:#758196}
body.authenticated .patient-location-map .map-origin-marker{filter:drop-shadow(0 3px 6px rgba(164,125,35,.28));animation:none}
body.authenticated .patient-map-layout{gap:20px}
body.authenticated .map-nav-head{padding-top:4px}.map-nav-head strong{color:#24324a;font-size:14px}.map-nav-head small{color:#6a778a;font-size:10px}
body.authenticated .map-level-row{min-height:58px;padding:12px 13px;border-color:#dce3ed;box-shadow:0 4px 14px rgba(31,45,68,.035)}
body.authenticated .map-level-row:hover{border-color:#aebcd1;background:#f7f9fc;transform:none;box-shadow:0 7px 18px rgba(31,45,68,.07)}
body.authenticated .map-level-row>i{background:#edf2fa;color:#405f8f}
body.authenticated .map-insights{border-color:#dce3ed;background:#f8fafc;box-shadow:none}
body.authenticated .map-insights-title>span{background:#edf2fa;color:#405f8f}.map-insight-kpis span{border-left-color:#b9c5d6}
body.authenticated .map-privacy-note{border-top-color:#e1e6ee}

/* Lectura mínima de analítica: títulos, métricas y leyendas no dependen del zoom del navegador. */
body.authenticated .analytics-card h3{color:#17233a;font-size:17px;font-weight:750;line-height:1.25}
body.authenticated .analytics-card header small{color:#59687d;font-size:11px;line-height:1.4}
body.authenticated .analytics-kpis{gap:22px!important}.analytics-kpis span{color:#59687d;font-size:10px;font-weight:600;line-height:1.35}.analytics-kpis b{margin-bottom:4px;color:#17233a;font-size:17px;font-weight:800}
body.authenticated .analytics-icon{width:35px;height:35px;font-size:14px}
@media(max-width:680px){body.authenticated .analytics-card h3{font-size:16px}body.authenticated .analytics-kpis{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:12px!important}body.authenticated .analytics-kpis span{white-space:normal}.analytics-kpis b{font-size:16px}}
.continuity-case-row{grid-template-columns:minmax(150px,1.2fr) minmax(90px,1fr) 24px minmax(115px,1fr);font-size:13px}
.continuity-patient{min-width:0}.continuity-patient strong{display:block;color:#22334d;overflow-wrap:anywhere;font-size:14px}.continuity-patient .row-action{min-height:44px;font-size:13px}.continuity-case-row>span small{font-size:12px}
@media(max-width:560px){.continuity-cases .continuity-case-row{grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr)}.continuity-patient{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:10px}.continuity-patient .row-action{flex-shrink:0}}
/* Cobertura de agenda ocupa el lugar del donut de obras sociales, sin duplicación. */
body.authenticated .analytics-followup-compact{min-width:0}
body.authenticated .analytics-followup-compact header{display:block}
body.authenticated .analytics-followup-compact header small{display:block;margin-top:4px;font-size:12px}
body.authenticated .analytics-followup-compact .analytics-chart{height:218px}
body.authenticated .followup-compact-link{display:flex;flex-direction:column;gap:6px;width:100%;min-height:44px;padding:12px 0 0;border:0;border-top:1px solid #dbe2ed;background:transparent;text-align:left;color:inherit;font:inherit;cursor:pointer}
body.authenticated .followup-compact-link strong{font-size:14px;line-height:1.45}
body.authenticated .followup-compact-link span{color:#405f8f;font-size:14px;font-weight:600}
body.authenticated .followup-compact-link:focus-visible{outline:3px solid #7892ba;outline-offset:3px}
body.authenticated .followup-compact-link:disabled{cursor:default}
