:root { --ink:#293536; --muted:#5d6e68; --soft:#647570; --line:#e1e8e3; --page:#f7f7f2; --surface:#fff; --accent:#5b8f83; --accent-dark:#3d7167; --accent-soft:#eaf4ef; --warm:#d7a45b; --danger:#b66f64; --radius:18px; font-family:Roboto,Arial,sans-serif; color:var(--ink); background:var(--page); font-synthesis:none; }
.auth-page { width:100%; min-height:100vh; display:grid; place-items:center; padding:24px 16px; overflow-x:hidden; }
.auth-shell { width:min(100%,430px); max-width:100%; }
.auth-header { margin:0 4px 24px; }
.auth-brand-title { margin:0; color:var(--accent-dark); font-size:clamp(24px,7vw,34px); font-weight:600; letter-spacing:-.04em; line-height:1.1; text-align:center; }
.auth-page .auth-header { text-align:center; }
.clinic-logo { display:block; width:min(100%,260px); height:auto; margin:0 auto 24px; }
.young-bonica-logo { width:min(100%,290px); margin-bottom:10px; }
.airecovery-logo { width:min(100%,310px); max-height:78px; margin-bottom:6px; }
.auth-header h1 { margin:0; font-size:clamp(30px,8vw,42px); letter-spacing:-.04em; }
.auth-card { width:100%; padding:24px 20px; }
.auth-card h2 { margin:0 0 8px; }
.auth-actions { display:grid; gap:10px; margin-top:20px; }
.google-signin { min-height:44px; display:flex; justify-content:center; }
.apple-button { min-height:50px; border:0; border-radius:13px; background:#171a19; color:#fff; font:inherit; font-weight:600; cursor:pointer; }
.apple-button span { margin-right:8px; font-size:11px; }
.auth-divider { display:flex; align-items:center; gap:10px; margin:20px 0; color:var(--soft); font-size:12px; }
.auth-divider::before,.auth-divider::after { height:1px; flex:1; background:var(--line); content:""; }
.email-form { display:grid; gap:8px; }
.email-form label { color:var(--muted); font-size:12px; font-weight:500; }
.email-form select { width:100%; min-height:46px; margin-top:7px; padding:0 38px 0 12px; border:1px solid var(--line); border-radius:12px; background:#fcfdfb; color:var(--ink); font:inherit; font-size:14px; }
.email-form .quiet-button { min-height:48px; margin-top:4px; }
.auth-status { min-height:18px; margin:14px 0 0; color:var(--accent-dark); font-size:12px; line-height:1.4; }
.auth-status.error { color:var(--danger); }
.auth-note { margin:16px 4px 0; color:var(--soft); font-size:11px; line-height:1.45; text-align:center; }
.role-choice-modal { width:min(92vw,390px); border:0; border-radius:24px; padding:0; color:var(--ink); background:transparent; box-shadow:0 20px 60px rgba(40,60,50,.25); }
.role-choice-modal::backdrop { background:rgba(27,40,34,.38); }
.role-choice-card { position:relative; padding:28px 22px 22px; border:1px solid var(--line); border-radius:24px; background:var(--surface); }
.role-choice-card h2 { margin:0 0 10px; }
.modal-close-button { position:absolute; top:12px; right:14px; display:grid; place-items:center; width:44px; height:44px; border:0; border-radius:10px; background:var(--accent-soft); color:var(--accent-dark); line-height:1; cursor:pointer; }
.modal-close-button:hover,.modal-close-button:focus-visible { background:var(--accent); color:#fff; outline:none; }
.role-choice-actions { display:grid; gap:9px; margin-top:16px; }
.journal-link { display:block; margin:18px 0 0; color:var(--accent-dark); font-size:12px; text-align:center; text-decoration:none; }
* { box-sizing:border-box; } html,body { min-height:100%; overflow-x:hidden; } body { margin:0; min-width:320px; min-height:100vh; background:var(--page); } button,input,textarea { font:inherit; } button { cursor:pointer; } button:focus-visible,input:focus-visible,textarea:focus-visible { outline:3px solid rgba(91,143,131,.28); outline-offset:2px; }
.app-shell { width:min(calc(100% - 30px),720px); min-height:100vh; margin:0 auto; padding:28px 0 42px; } .app-header { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; } .eyebrow,.section-kicker { margin:0 0 7px; color:var(--accent); font-size:10px; font-weight:700; letter-spacing:.15em; text-transform:uppercase; } h1,h2,p { margin-top:0; } h1 { margin:0; font-size:clamp(31px,9vw,43px); font-weight:600; letter-spacing:-.05em; line-height:1.05; } h2 { margin:0; font-size:22px; font-weight:600; letter-spacing:-.03em; line-height:1.18; } .header-subtitle,.section-intro { margin:10px 0 0; color:var(--muted); font-size:13px; line-height:1.45; } .header-mark { display:grid; width:46px; height:46px; place-items:center; border-radius:16px; background:var(--accent-soft); color:var(--accent); font-size:22px; }
.sos-button { display:inline-flex; min-height:44px; align-items:center; justify-content:center; gap:6px; padding:0 12px; border:1px solid #a94f45; border-radius:13px; background:#b95f54; color:#fff; font-size:12px; font-weight:700; box-shadow:0 2px 5px rgba(169,79,69,.12); }
.sos-button:hover,.sos-button:focus-visible { background:#99443b; }
.home-view { display:grid; gap:18px; padding-top:4px; }
.home-current-plan { padding:17px 18px; border:1px solid #cfe0d8; border-radius:18px; background:linear-gradient(135deg,#f8fcf9 0%,#edf6f2 100%); box-shadow:0 8px 22px rgba(42,65,54,.05); }
.home-current-plan-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.home-current-plan-header h2 { font-size:18px; }
.home-current-plan-header .quiet-button { min-height:40px; flex:0 0 auto; padding:0 13px; background:rgba(255,255,255,.78); }
.home-current-goal-label { margin:14px 0 4px; color:var(--accent-dark); font-size:10px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.home-current-goal { margin:0 0 13px; color:var(--ink); font-size:15px; font-weight:600; line-height:1.42; }
.home-current-goal-preview { display:-webkit-box; margin:0; overflow:hidden; color:var(--ink); font-size:14px; font-weight:600; line-height:1.42; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.home-current-plan-status { margin:11px 0 0; padding-top:10px; border-top:1px solid rgba(91,143,131,.18); color:var(--muted); font-size:11px; line-height:1.4; }
.home-current-plan-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px 18px; margin:0; }
.home-current-plan-grid div { min-width:0; padding-top:9px; border-top:1px solid rgba(91,143,131,.18); }
.home-current-plan-grid dt { margin:0 0 4px; color:var(--accent-dark); font-size:10px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.home-current-plan-grid dd { margin:0; color:#53645f; font-size:12px; line-height:1.42; overflow-wrap:anywhere; }
.home-treatment-medications { display:grid; grid-template-columns:30px minmax(0,1fr) auto; align-items:center; gap:9px; width:100%; margin-top:13px; padding:10px 11px; border:1px solid rgba(91,143,131,.20); border-radius:12px; background:rgba(255,255,255,.76); color:var(--ink); text-align:left; }
.home-treatment-medications:hover,.home-treatment-medications:focus-visible { border-color:var(--accent); background:#fff; }
.home-treatment-medications-icon { display:grid; width:30px; height:30px; place-items:center; border-radius:9px; background:#eef4f8; color:#5d7898; }
.home-treatment-medications-icon svg { width:18px; height:18px; }
.home-treatment-medications strong,.home-treatment-medications small { display:block; }
.home-treatment-medications strong { font-size:12px; }
.home-treatment-medications small { margin-top:2px; color:var(--muted); font-size:11px; line-height:1.35; overflow-wrap:anywhere; }
.home-treatment-medications > span:last-child { color:var(--accent-dark); font-size:20px; }
.current-plan-dialog { width:min(92vw,680px); }
.current-plan-dialog h2 { padding-right:34px; }
.current-plan-dialog .home-current-goal-label { margin-top:18px; }
.weekly-plan { margin-top:14px; padding-top:13px; border-top:1px solid rgba(91,143,131,.22); }
.weekly-plan-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:9px; }
.weekly-plan-heading h3 { margin:0; font-size:14px; }
.weekly-plan-heading small,.weekly-plan-note { color:var(--muted); font-size:11px; }
.weekly-plan-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.weekly-plan-item { display:grid; grid-template-columns:26px minmax(0,1fr); gap:8px; min-width:0; min-height:68px; padding:10px; border:1px solid rgba(91,143,131,.20); border-radius:12px; background:rgba(255,255,255,.72); color:var(--ink); text-align:left; cursor:pointer; }
.weekly-plan-item:hover,.weekly-plan-item:focus-visible { border-color:var(--accent); background:#fff; }
.weekly-plan-item>.control-svg,.weekly-plan-item>span:first-child svg { width:20px; height:20px; color:var(--accent-dark); }
.weekly-plan-item strong,.weekly-plan-item small { display:block; }
.weekly-plan-item strong { font-size:11px; }
.weekly-plan-item small { margin-top:4px; color:var(--muted); font-size:10px; line-height:1.35; overflow-wrap:anywhere; }
.weekly-plan-note { margin:9px 0 0; line-height:1.4; }
.home-card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.home-priority-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:10px; }
.home-priority-card { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:11px; min-height:102px; padding:15px; border:1px solid var(--line); border-radius:18px; background:var(--surface); color:var(--ink); text-align:left; box-shadow:0 8px 22px rgba(42,65,54,.05); transition:border-color .15s,box-shadow .15s,transform .15s; }
.home-priority-card:hover,.home-priority-card:focus-visible { border-color:var(--accent); background:var(--surface); box-shadow:0 11px 28px rgba(42,65,54,.09); transform:translateY(-1px); }
.home-priority-card .home-module-icon { width:44px; height:44px; border-radius:14px; }
.home-priority-card .home-module-copy strong { font-size:15px; }
.home-priority-card .home-module-copy small { margin-top:6px; font-size:11px; line-height:1.35; }
.home-module-icon.is-medication { background:#edf3f8; color:#5d7898; }
.home-plan-link { display:flex; align-items:center; justify-content:center; gap:6px; width:100%; min-height:38px; margin:0 0 17px; border:0; color:var(--accent-dark); background:transparent; font-size:12px; font-weight:600; }
.home-plan-link:hover,.home-plan-link:focus-visible { color:var(--ink); text-decoration:underline; }
.home-plan-link span { font-size:18px; line-height:1; }
.home-module-card { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:11px; min-height:102px; padding:15px; border:1px solid var(--line); border-radius:18px; background:var(--surface); color:var(--ink); text-align:left; box-shadow:0 8px 22px rgba(42,65,54,.05); transition:border-color .15s,box-shadow .15s,transform .15s; }
.home-module-card:hover,.home-module-card:focus-visible { border-color:var(--accent); box-shadow:0 11px 28px rgba(42,65,54,.09); transform:translateY(-1px); }
.home-module-card.is-crisis { border-color:#ecd8d4; }
.home-module-icon { display:grid; width:44px; height:44px; place-items:center; border-radius:14px; background:var(--accent-soft); color:var(--accent-dark); }
.home-module-icon.is-progress { background:#e9f5f2; color:#4f8c80; }
.home-module-icon.is-exercise { background:#edf5ee; color:#5d9270; }
.home-module-icon.is-mindfulness { background:#f1edf8; color:#816aa5; }
.home-module-icon.is-sleep { background:#edf5fb; color:#5b86a5; }
.home-module-icon.is-crisis { background:#fff0ed; color:#a95a50; }
.home-module-icon.is-education { background:#fff5e7; color:#a97638; }
.home-module-icon.is-team { background:#e9eff7; color:#5d7898; }
.home-module-copy,.home-module-copy strong,.home-module-copy small { display:block; min-width:0; }
.home-module-copy strong { font-size:15px; }
.home-module-copy small { margin-top:6px; color:#657371; font-size:11px; line-height:1.35; }
.home-module-arrow { color:var(--accent); font-size:24px; }
.home-ui-svg { width:22px; height:22px; }
.menu-home-item { gap:9px; }
@media (max-width:560px) {
  .home-current-plan { padding:15px; }
  .home-priority-grid { gap:8px; }
  .home-priority-card { grid-template-columns:40px minmax(0,1fr); align-content:start; min-height:142px; padding:13px; }
  .home-priority-card .home-module-icon { width:40px; height:40px; }
  .home-priority-card .home-module-arrow { display:none; }
  .home-current-plan-header { align-items:center; }
  .home-current-plan-header h2 { font-size:17px; }
  .home-current-goal { font-size:14px; }
  .home-current-plan-grid { grid-template-columns:1fr; gap:8px; }
  .weekly-plan-heading { align-items:flex-start; flex-direction:column; gap:3px; }
  .weekly-plan-grid { grid-template-columns:1fr; }
  .weekly-plan-item { min-height:58px; }
  .home-card-grid { gap:9px; }
  .home-module-card { grid-template-columns:40px minmax(0,1fr); align-content:start; min-height:142px; padding:13px; }
  .home-module-icon { width:40px; height:40px; }
  .home-module-copy { grid-column:1 / -1; }
  .home-module-copy strong { font-size:14px; }
  .home-module-arrow { position:absolute; opacity:0; pointer-events:none; }
}
.connection-card,.card { border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); box-shadow:0 9px 25px rgba(42,65,54,.045); } .connection-card { display:flex; justify-content:space-between; align-items:center; gap:18px; margin:27px 0 18px; padding:17px; } .connection-copy h2 { font-size:17px; } .connection-copy p:last-child { max-width:420px; margin:7px 0 0; color:var(--muted); font-size:12px; line-height:1.4; } .connection-card.connected { border-color:#b9d8c8; background:#fbfffc; } .connection-card.connected .connection-copy h2 { color:var(--accent-dark); }
.connection-actions { display:flex; flex-direction:column; align-items:stretch; gap:8px; flex:0 0 auto; } .primary-button,.quiet-button { min-height:46px; border-radius:13px; padding:0 15px; border:1px solid transparent; font-size:13px; font-weight:600; white-space:nowrap; } .primary-button { background:var(--accent); color:#fff; box-shadow:0 7px 16px rgba(91,143,131,.19); } .primary-button:hover { background:var(--accent-dark); } .google-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; } .google-mark { display:inline-grid; width:22px; height:22px; place-items:center; border-radius:50%; background:#fff; color:#4285f4; font-family:Arial,sans-serif; font-size:15px; font-weight:700; } .quiet-button { border-color:var(--line); background:var(--surface); color:var(--muted); } .quiet-button:hover { border-color:var(--accent); color:var(--accent-dark); }
.main-nav { display:flex; gap:4px; margin:0 0 22px; padding:4px; border:1px solid var(--line); border-radius:14px; background:#f0f3ef; } .nav-tab { min-height:38px; flex:1; border:0; border-radius:10px; background:transparent; color:var(--muted); font-size:12px; font-weight:600; } .nav-tab.active { background:var(--surface); color:var(--accent-dark); box-shadow:0 2px 7px rgba(42,65,54,.08); }
.date-navigation { display:flex; align-items:center; justify-content:space-between; margin:4px 0 12px; } .date-heading { text-align:center; } .date-heading p { margin:0 0 5px; color:var(--muted); font-size:12px; text-transform:capitalize; } .date-heading h2 { font-size:20px; text-transform:capitalize; } .round-button { display:grid; width:42px; height:42px; place-items:center; border:1px solid var(--line); border-radius:50%; background:var(--surface); color:var(--muted); font-size:27px; line-height:1; } .round-button:hover { border-color:var(--accent); color:var(--accent); } .date-list { display:flex; gap:7px; overflow-x:auto; padding:2px 0 8px; scrollbar-width:none; } .date-list::-webkit-scrollbar { display:none; } .date-pill { flex:0 0 auto; min-height:32px; padding:0 12px; border:1px solid var(--line); border-radius:99px; background:var(--surface); color:var(--muted); font-size:11px; } .date-pill.selected { border-color:var(--accent); background:var(--accent); color:#fff; }
.card-heading,.section-title-row { display:flex; justify-content:space-between; align-items:flex-end; gap:12px; } .card-heading { margin-bottom:1px; } .day-state { display:inline-flex; align-items:center; min-height:25px; padding:0 9px; border-radius:99px; background:var(--accent-soft); color:var(--accent-dark); font-size:10px; font-weight:600; white-space:nowrap; } .journal-card { margin-top:12px; padding:18px 19px 8px; } .question-block { margin:0; padding:20px 0; border:0; border-bottom:1px solid #edf1ed; } .question-block legend,.text-question>span { display:block; padding:0; color:var(--ink); font-size:15px; font-weight:500; line-height:1.35; } .last-question { border-bottom:0; } .star-row,.choice-row { display:flex; align-items:center; gap:8px; margin-top:12px; } .star-button { width:38px; height:38px; padding:0; border:0; border-radius:10px; background:transparent; color:#d6e0db; font-size:28px; line-height:1; transition:transform .15s,color .15s,background .15s; } .star-button:hover,.star-button:focus-visible { transform:scale(1.08); background:var(--accent-soft); } .star-button.selected { color:var(--warm); } .score-label { margin-left:5px; color:var(--muted); font-size:11px; } .choice-row { gap:10px; } .choice-button { min-height:46px; flex:1; border:1px solid var(--line); border-radius:12px; background:#fbfcfa; color:var(--muted); font-size:13px; } .choice-button:hover,.choice-button:focus-visible,.choice-button.selected { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-dark); } .choice-button.selected { font-weight:600; }
.open-answer { display:block; margin-top:14px; color:var(--muted); font-size:11px; font-weight:500; } textarea,input { width:100%; border:1px solid var(--line); border-radius:12px; background:#fcfdfb; color:var(--ink); } textarea { display:block; min-height:67px; margin-top:7px; padding:11px 12px; resize:vertical; font-size:13px; line-height:1.45; } input { min-height:46px; margin-top:7px; padding:0 12px; font-size:14px; } textarea::placeholder,input::placeholder { color:#adb8b3; } .text-question { display:block; }
.save-row { display:flex; align-items:center; gap:12px; margin:14px 2px 0; } .save-status { min-height:18px; margin:9px 0 0; color:var(--muted); font-size:11px; line-height:1.35; } .save-status.unsaved { color:var(--danger); } .save-button { flex:0 0 auto; }
.section-title-row { align-items:center; margin:3px 1px 10px; } .section-intro { margin:0 1px 15px; } .metric-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } .metric-card { display:flex; align-items:flex-start; gap:10px; min-height:105px; padding:14px; border:1px solid var(--line); border-radius:16px; background:var(--surface); box-shadow:0 7px 19px rgba(42,65,54,.04); } .metric-icon { display:grid; width:31px; height:31px; flex:0 0 auto; place-items:center; border-radius:10px; font-size:18px; background:var(--indicator-soft,var(--accent-soft)); color:var(--indicator-color,var(--accent-dark)); } .metric-card p { margin:2px 0 8px; color:var(--muted); font-size:11px; } .metric-card strong { display:block; font-size:21px; font-weight:600; line-height:1; } .metric-card small { display:block; margin-top:6px; color:var(--soft); font-size:10px; line-height:1.2; } .dashboard-collapsed .metric-grid,.dashboard-collapsed .trend-section { display:none; }
.history-card { margin-top:15px; padding:17px; } .history-list { display:grid; gap:7px; margin-top:12px; } .history-row { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-height:54px; padding:9px 11px; border:1px solid var(--line); border-radius:12px; background:#fcfdfb; color:var(--muted); text-align:left; font-size:11px; } .history-row:hover { border-color:var(--accent); } .history-row strong,.history-row small { display:block; } .history-row strong { color:var(--ink); font-size:12px; font-weight:600; } .history-row small { margin-top:4px; color:var(--soft); } .empty-state { margin:12px 0 2px; color:var(--soft); font-size:12px; }
.trend-section { margin-top:24px; }
.trend-disclosure > summary { display:flex; min-height:64px; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px; border:1px solid var(--line); border-radius:16px; background:var(--surface); box-shadow:0 7px 19px rgba(42,65,54,.04); cursor:pointer; list-style:none; }
.trend-disclosure > summary::-webkit-details-marker { display:none; }
.trend-disclosure > summary .section-kicker { display:block; margin:0 0 4px; }
.trend-disclosure > summary strong { display:block; color:var(--ink); font-size:16px; line-height:1.25; }
.trend-disclosure-count { display:grid; width:34px; height:34px; flex:0 0 auto; place-items:center; border-radius:50%; background:var(--accent-soft); color:var(--accent-dark); font-size:12px; font-weight:700; }
.trend-disclosure[open] > summary { border-color:#c8ddd4; }
.trend-disclosure-body { padding-top:16px; }
.trend-grid { display:grid; gap:12px; }
.trend-mode-control { min-width:0; margin:0; padding:0; border:0; }
.trend-mode-control legend { margin-bottom:10px; padding:0; color:var(--ink); font-size:14px; font-weight:600; }
.trend-mode-options { display:flex; padding:4px; gap:4px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.trend-mode-options label { position:relative; display:flex; flex:1; min-width:0; cursor:pointer; }
.trend-mode-options input { position:absolute; width:1px; height:1px; opacity:0; }
.trend-mode-options span { display:flex; width:100%; min-height:44px; align-items:center; justify-content:center; padding:8px 6px; border:1px solid transparent; border-radius:10px; text-align:center; color:var(--muted); font-size:13px; line-height:1.3; }
.trend-mode-options input:checked + span { background:var(--accent-soft); color:var(--accent-dark); border-color:#c8ddd4; font-weight:600; }
.trend-mode-options input:focus-visible + span { outline:3px solid var(--accent); outline-offset:2px; }
.trend-mode-description,.trend-gap-note { margin:12px 0; color:#51655e; font-size:13px; line-height:1.5; }
.trend-gap-note { margin-top:8px; }
.trend-legend { display:flex; flex-wrap:wrap; gap:10px 18px; color:#51655e; font-size:12px; }
.trend-legend > span { display:inline-flex; align-items:center; gap:7px; }
.trend-legend > span[hidden] { display:none; }
.trend-legend i { display:block; width:24px; height:0; border-top:3px solid currentColor; }
.trend-legend .trend-key-daily { border-top:2px dashed currentColor; }
.trend-line.trend-line-daily { stroke-dasharray:5 5; stroke-width:1.8; }
.trend-point.trend-point-average { fill:var(--indicator-color,var(--accent)); }
.trend-latest { color:var(--muted); font-size:12px; }
.trend-card .trend-average { color:var(--indicator-color,var(--accent-dark)); }
.trend-card { overflow:hidden; padding:14px 13px 10px; border:1px solid var(--line); border-radius:16px; background:var(--surface); box-shadow:0 7px 19px rgba(42,65,54,.04); }
.trend-card-heading { display:flex; align-items:center; gap:8px; min-height:27px; }
.trend-card-heading h3 { min-width:0; flex:1; margin:0; color:var(--ink); font-size:13px; font-weight:600; line-height:1.3; }
.trend-average { flex:0 0 auto; color:var(--accent-dark); font-size:10px; font-weight:600; }
.trend-icon { display:grid; width:27px; height:27px; flex:0 0 auto; place-items:center; border-radius:9px; background:var(--indicator-soft,var(--accent-soft)); color:var(--indicator-color,var(--accent-dark)); font-size:16px; }
.trend-card > svg { display:block; width:100%; height:auto; margin-top:8px; }
.trend-grid-line { stroke:#e9efeb; stroke-width:1; }
.trend-axis-label { fill:var(--soft); font-family:Roboto,Arial,sans-serif; font-size:9px; }
.trend-line { fill:none; stroke:var(--indicator-color,var(--accent)); stroke-linecap:round; stroke-linejoin:round; stroke-width:2.5; }
.trend-point { fill:#fff; stroke:var(--indicator-color,var(--accent-dark)); stroke-width:2; }
.trend-empty { margin:14px 0 4px; color:var(--soft); font-size:11px; line-height:1.4; }
.settings-card { display:grid; gap:15px; padding:18px; } .settings-card label { color:var(--muted); font-size:12px; font-weight:500; } .switch-label { display:flex; align-items:center; gap:9px; } .switch-label input { position:absolute; opacity:0; width:1px; height:1px; } .switch { width:40px; height:23px; flex:0 0 auto; border-radius:99px; background:#d5dfda; transition:background .15s; } .switch::after { display:block; width:17px; height:17px; margin:3px; border-radius:50%; background:#fff; content:""; transition:transform .15s; } .switch-label input:checked + .switch { background:var(--accent); } .switch-label input:checked + .switch::after { transform:translateX(17px); } .privacy-note { margin:-2px 0 0; color:var(--soft); font-size:10px; line-height:1.4; } .professional-list-card { margin-top:15px; padding:17px; } .professional-list { display:grid; gap:8px; margin-top:11px; } .professional-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:11px 12px; border:1px solid var(--line); border-radius:12px; background:#fcfdfb; } .professional-row strong,.professional-row small { display:block; } .professional-row strong { font-size:13px; } .professional-row small { margin-top:4px; color:var(--muted); font-size:11px; } .row-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:7px; } .row-actions .quiet-button { min-height:34px; white-space:nowrap; } .revoke-button { min-height:34px; padding:0 10px; color:var(--danger); }
.companion-permission-fieldset { display:grid; gap:12px; margin:0; padding:14px; border:1px solid var(--line); border-radius:14px; }
.companion-permission-fieldset legend { padding:0 6px; color:var(--ink); font-size:13px; font-weight:650; }
.companion-access-card { margin-top:15px; padding:18px; }
.companion-access-heading,.companion-access-item header,.companion-identity { display:flex; align-items:center; }
.companion-access-heading,.companion-access-item header { justify-content:space-between; gap:12px; }
.companion-access-heading h3 { margin:3px 0 0; font-size:18px; }
.companion-access-list { display:grid; gap:12px; margin-top:14px; }
.companion-access-item { padding:15px; border:1px solid var(--line); border-radius:14px; background:#fcfdfb; }
.companion-identity { gap:10px; min-width:0; }
.companion-avatar { display:grid; width:36px; height:36px; flex:0 0 auto; place-items:center; border-radius:12px; background:var(--accent-soft); color:var(--accent-dark); }
.companion-avatar .control-svg { width:20px; height:20px; }
.companion-identity strong,.companion-identity small { display:block; }
.companion-identity small,.companion-contact,.companion-fixed-limit { color:var(--muted); font-size:12px; line-height:1.45; }
.companion-identity small { margin-top:3px; }
.companion-contact { margin:11px 0 13px; overflow-wrap:anywhere; }
.companion-permission-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.companion-permission-columns section { padding:11px; border-radius:12px; background:#f4f7f5; }
.companion-permission-columns h4 { margin:0 0 8px; font-size:12px; }
.companion-permission-columns ul { display:grid; gap:7px; margin:0; padding:0; list-style:none; }
.companion-permission { display:grid; grid-template-columns:18px 1fr auto; align-items:center; gap:7px; color:var(--muted); font-size:11px; }
.companion-permission .control-svg { width:16px; height:16px; }
.companion-permission strong { font-size:10px; }
.companion-permission.is-allowed { color:var(--accent-dark); }
.companion-permission.is-blocked { color:var(--soft); }
.companion-permission.is-blocked .control-svg,.companion-permission.is-blocked span:nth-child(2) { opacity:.62; }
.companion-fixed-limit { margin:12px 0 0; padding-top:11px; border-top:1px solid var(--line); }
.companion-empty { display:flex; align-items:flex-start; gap:12px; padding:15px; border-radius:14px; background:#f4f7f5; }
.companion-empty>.control-svg { width:24px; height:24px; flex:0 0 auto; color:var(--accent-dark); }
.companion-empty strong { font-size:13px; }
.companion-empty p { margin:4px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
.revoke-companion { min-height:36px; padding:0 11px; color:var(--danger); white-space:nowrap; }
@media (max-width:560px) { .companion-access-item header { align-items:flex-start; flex-direction:column; } .companion-access-item header .revoke-companion { width:100%; } .companion-permission-columns { grid-template-columns:1fr; } }
.toast { position:fixed; right:15px; bottom:15px; left:15px; z-index:5; max-width:520px; margin:auto; padding:12px 14px; border-radius:12px; background:#29423d; color:#fff; font-size:12px; text-align:center; opacity:0; transform:translateY(10px); pointer-events:none; transition:opacity .18s,transform .18s; } .toast.visible { opacity:1; transform:translateY(0); } .toast.error { background:#8c514a; } [hidden] { display:none !important; }
@media (max-width:560px) { .connection-card { align-items:stretch; flex-direction:column; } .connection-actions { flex-direction:row; } .connection-actions>* { flex:1; } .save-row { align-items:stretch; flex-direction:column; } .save-button { width:100%; } }
@media (max-width:560px) { .auth-page { display:block; padding:18px 10px 24px; } .auth-shell { width:100%; } .auth-card { padding:22px 16px; } .clinic-logo { width:min(100%,210px); } }
@media (max-width:560px) { .auth-header .airecovery-logo { width:min(100%,260px); max-height:66px; } }
@media (min-width:600px) { .app-shell { padding-top:45px; } .journal-card { padding-inline:27px; } }

/* Ajuste final para pantallas estrechas: evita que el logo o la tarjeta corten el borde. */
.auth-page { width:100%; max-width:100vw; padding-inline:12px; }
.auth-shell { width:100%; max-width:400px; min-width:0; }
.auth-header { min-width:0; }
.auth-header .clinic-logo { width:auto; max-width:100%; height:auto; max-height:none; object-fit:contain; object-position:center; }
.auth-card { min-width:0; overflow:hidden; }
.card-heading .open-answer-toggle { min-height:34px; padding:0 10px; font-size:10px; }
.journal-card.open-answers-hidden .open-answer { display:none; }
@media (max-width:560px) {
  .auth-page { padding-inline:8px; }
  .auth-shell { max-width:100%; }
  .auth-header .clinic-logo { width:min(100%, 205px); }
  .auth-card { padding-inline:16px; }
  .card-heading { align-items:center; }
  .card-heading .open-answer-toggle { font-size:9px; }
}
.video-grid { display:grid; gap:14px; }
.video-card { overflow:hidden; border:1px solid var(--line); border-radius:16px; background:var(--surface); box-shadow:0 7px 19px rgba(42,65,54,.04); }
.video-preview-button { position:relative; display:block; width:100%; aspect-ratio:16/9; overflow:hidden; padding:0; border:0; border-bottom:1px solid var(--line); background:#dcebe5; cursor:pointer; }
.video-preview-button:focus-visible { outline-offset:-4px; }
.video-preview-button::after { position:absolute; inset:0; background:linear-gradient(180deg,transparent 48%,rgba(24,39,35,.42)); content:""; transition:background .18s; }
.video-preview-button:hover::after,.video-preview-button:focus-visible::after { background:linear-gradient(180deg,rgba(30,54,47,.05),rgba(24,39,35,.5)); }
.video-placeholder { display:block; width:100%; height:100%; min-height:0; background:linear-gradient(135deg,var(--accent-soft),#dcece8); }
.video-preview { display:block; width:100%; height:100%; margin:0; border-radius:0; object-fit:contain; background:#fff; transition:transform .25s ease; }
.video-preview-button:hover .video-preview,.video-preview-button:focus-visible .video-preview { transform:scale(1.025); }
.video-play-button { position:absolute; top:50%; left:50%; z-index:2; display:grid; width:52px; height:52px; place-items:center; padding:0; border:2px solid rgba(255,255,255,.92); border-radius:50%; background:rgba(42,80,70,.82); color:#fff; transform:translate(-50%,-50%); box-shadow:0 8px 22px rgba(20,36,31,.24); }
.video-preview-label { position:absolute; right:13px; bottom:11px; z-index:2; color:#fff; font-size:11px; font-weight:700; }
.video-card-body { padding:16px; }
.video-card-body h3 { margin:0; font-size:17px; font-weight:600; }
.video-card-body p:not(.section-kicker) { color:var(--muted); font-size:1rem; line-height:1.45; }
.video-card-body .quiet-button { margin-top:4px; }
.exercise-video-dialog { width:min(92vw,620px); max-height:min(88vh,760px); overflow:auto; padding:0; border:1px solid var(--line); border-radius:22px; background:var(--surface); color:var(--ink); box-shadow:0 24px 70px rgba(28,45,39,.28); }
.exercise-video-dialog::backdrop { background:rgba(21,34,30,.58); backdrop-filter:blur(3px); }
.exercise-video-stage { position:relative; aspect-ratio:16/9; overflow:hidden; background:#dcebe5; }
.exercise-video-stage img { display:block; width:100%; height:100%; object-fit:contain; }
.exercise-video-playing { position:absolute; top:50%; left:50%; display:flex; align-items:center; gap:9px; padding:10px 14px; border-radius:99px; background:rgba(31,55,48,.78); color:#fff; font-size:12px; font-weight:700; transform:translate(-50%,-50%); }
.exercise-video-playing span { font-size:15px; }
.exercise-video-prototype { position:absolute; top:14px; left:14px; padding:6px 9px; border-radius:99px; background:rgba(255,255,255,.9); color:var(--accent-dark); font-size:10px; font-weight:700; }
.exercise-video-content { padding:20px; }
.exercise-video-content h2 { margin-bottom:8px; }
.exercise-video-content > p:not(.section-kicker) { color:var(--muted); font-size:13px; line-height:1.5; }
.exercise-video-content .exercise-dose { color:var(--accent-dark); }
.exercise-video-note { padding:10px 12px; border-radius:11px; background:#f3f7f4; }
.exercise-video-content .primary-button { width:100%; margin-top:3px; }
.video-empty { display:none; }
#patient-videos > .video-empty { display:block; }
.user-group { display:grid; gap:6px; padding:11px 12px; border:1px solid var(--line); border-radius:12px; background:#fcfdfb; }
.user-group strong { color:var(--accent-dark); font-size:12px; }
.user-group small { color:var(--muted); font-size:11px; line-height:1.55; }
.admin-shell { max-width:720px; }
.admin-notice { display:flex; flex-direction:column; gap:4px; margin:18px 0; padding:14px 16px; border:1px solid #d9e9e2; border-radius:14px; background:var(--accent-soft); color:var(--accent-dark); font-size:12px; }
.admin-notice strong { font-size:13px; }
.admin-form { display:grid; gap:15px; margin-top:15px; }
.admin-form select,.file-field input { width:100%; min-height:44px; margin-top:7px; padding:0 12px; border:1px solid var(--line); border-radius:12px; background:#fbfcfa; color:var(--ink); font:inherit; }
.file-field input { padding:10px 12px; }
.admin-list-card { margin-top:15px; padding:18px; }

/* Ajustes de acabado visual y accesibilidad */
:focus-visible { outline:3px solid rgba(91,143,131,.45); outline-offset:3px; }
body { -webkit-font-smoothing:antialiased; }
.app-shell { width:min(calc(100% - 24px),720px); }
.app-header { gap:14px; }
.header-subtitle,.section-intro { max-width:52ch; }
.main-nav { position:sticky; top:0; z-index:3; padding:5px; border:1px solid rgba(225,232,227,.9); border-radius:15px; background:rgba(247,247,242,.94); backdrop-filter:blur(12px); }
.app-header:has(.patient-greeting) ~ .main-nav { overflow-x:auto; scrollbar-width:none; }
.app-header:has(.patient-greeting) ~ .main-nav::-webkit-scrollbar { display:none; }
.app-header:has(.patient-greeting) ~ .main-nav .nav-tab { flex:0 0 auto; }
.nav-tab { min-height:42px; border-radius:11px; color:var(--muted); font-size:12px; font-weight:600; transition:background .15s,color .15s,transform .15s; }
.nav-tab:hover,.nav-tab:focus-visible { color:var(--accent-dark); background:var(--accent-soft); }
.nav-tab.active { background:var(--accent); color:#fff; box-shadow:0 4px 10px rgba(91,143,131,.2); }
.card { box-shadow:0 9px 24px rgba(42,65,54,.055); }
.question-block { margin:10px 0; padding:18px; border:1px solid #e4ece7; border-radius:16px; background:#fbfdfb; transition:border-color .15s,box-shadow .15s,background .15s; }
.question-block:focus-within { border-color:#bad3c7; background:#fff; box-shadow:0 6px 18px rgba(42,65,54,.07); }
.question-block legend,.text-question>span { font-size:16px; font-weight:600; }
.question-block legend { display:flex; width:100%; align-items:flex-start; gap:8px; }
.question-block legend,.text-question { position:relative; }
.question-title { display:block; flex:1; letter-spacing:-.01em; }
.journal-question-count { color:var(--muted); font-size:11px; font-weight:600; }
.scale-hint { display:flex; max-width:270px; justify-content:space-between; margin-top:4px; color:var(--muted); font-size:10px; }
.assigned-activity-hint { display:block; margin:8px 0 11px; padding:8px 10px; border-radius:10px; background:#f3f7f4; color:var(--accent-dark); font-size:10px; line-height:1.45; }
.open-question-note { display:block; margin:8px 0 10px; color:var(--muted); font-size:10px; font-weight:500; }
.question-info { position:relative; display:inline-grid; width:18px; height:18px; margin-left:7px; padding:0; place-items:center; vertical-align:middle; border:1px solid #b8c9c2; border-radius:50%; background:#f5faf7; color:var(--accent-dark); font-family:Georgia,serif; font-size:12px; font-weight:700; line-height:1; cursor:help; }
.question-info:hover,.question-info:focus-visible,.question-info.is-open { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-dark); }
.question-info-popover { position:absolute; top:calc(100% + 9px); right:0; z-index:4; display:block; width:min(245px, calc(100vw - 48px)); padding:10px 11px; border:1px solid #d6e5de; border-radius:11px; background:#fff; box-shadow:0 8px 20px rgba(42,65,54,.14); color:var(--muted); font-family:Roboto,Arial,sans-serif; font-size:11px; font-weight:400; line-height:1.4; text-align:left; opacity:0; pointer-events:none; transform:translateY(-3px); transition:opacity .15s,transform .15s; }
.question-info-popover::before { position:absolute; top:-5px; right:8px; width:9px; height:9px; border-top:1px solid #d6e5de; border-left:1px solid #d6e5de; background:#fff; content:""; transform:rotate(45deg); }
.question-info:hover .question-info-popover,.question-info:focus-visible .question-info-popover,.question-info.is-open .question-info-popover { opacity:1; pointer-events:auto; transform:translateY(0); }
.text-question .question-info { margin-top:-2px; }
.open-answer { margin-top:16px; color:var(--muted); font-size:11px; font-weight:600; }
.open-answer textarea { margin-top:7px; }
textarea,input,select { transition:border-color .15s,box-shadow .15s,background .15s; }
textarea:focus,input:focus,select:focus { border-color:var(--accent); background:#fff; box-shadow:0 0 0 3px rgba(91,143,131,.12); outline:0; }
.star-row { gap:5px; }
.star-button { width:42px; height:42px; color:#cbd8d3; font-size:30px; }
.star-button.selected { color:var(--accent); text-shadow:0 2px 5px rgba(91,143,131,.18); }
.star-button:hover,.star-button:focus-visible { color:var(--accent-dark); }
.score-label { min-width:58px; font-weight:600; }
.choice-button { min-height:50px; font-size:14px; font-weight:500; }
.choice-button.selected { box-shadow:0 0 0 2px rgba(91,143,131,.14); }
.choice-button { display:flex; align-items:center; justify-content:center; gap:8px; }
.choice-icon { display:grid; width:23px; height:23px; place-items:center; border-radius:50%; background:#e6eeea; color:#55766e; font-size:14px; font-weight:700; line-height:1; }
.choice-button.selected .choice-icon { background:var(--accent); color:#fff; }
.choice-button:nth-child(2).selected { border-color:#d8b86a; background:#fff8e5; color:#745b21; box-shadow:0 0 0 2px rgba(216,184,106,.15); }
.choice-button:nth-child(2).selected .choice-icon { background:#d3a93f; color:#fff; }
.choice-button:nth-child(3).selected { border-color:#b9c3bf; background:#f2f5f3; color:#53615c; box-shadow:0 0 0 2px rgba(125,141,134,.12); }
.choice-button:nth-child(3).selected .choice-icon { background:#7d8d86; color:#fff; }
.save-row { margin-top:16px; padding:12px 2px 0; border-top:1px solid var(--line); }
.save-status { min-height:18px; font-weight:500; }
.save-status.unsaved { color:var(--warm); }
.primary-button,.quiet-button,.round-button { min-height:44px; }
.primary-button { box-shadow:0 5px 12px rgba(91,143,131,.16); }
.history-row { min-height:58px; }
.clinic-logo { width:min(100%,220px); max-height:54px; object-fit:contain; object-position:left center; }
.auth-header .airecovery-logo { width:min(100%,310px); max-height:78px; object-position:center; }
.auth-header { margin-bottom:20px; }
@media (max-width:560px) { .auth-header .airecovery-logo { width:min(100%,260px); max-height:66px; } }
.auth-card { border-color:#dce8e3; }
.admin-entry-link { display:flex; align-items:center; gap:11px; min-height:56px; margin-top:16px; padding:10px 13px; border:1px solid #d7e5df; border-radius:15px; background:#fff; color:var(--ink); box-shadow:0 6px 15px rgba(42,65,54,.04); text-align:left; text-decoration:none; transition:border-color .15s,box-shadow .15s,transform .15s; }
.professional-entry-link { display:flex; align-items:center; gap:11px; min-height:56px; margin-top:16px; padding:10px 13px; border:1px solid #d8e9e6; border-radius:15px; background:#eff8f6; color:var(--ink); box-shadow:0 6px 15px rgba(42,65,54,.04); text-align:left; text-decoration:none; transition:border-color .15s,box-shadow .15s,transform .15s; }
.professional-entry-link:hover,.professional-entry-link:focus-visible { border-color:#4c9990; box-shadow:0 8px 18px rgba(42,65,54,.09); transform:translateY(-1px); }
.professional-entry-icon { display:grid; width:36px; height:36px; flex:0 0 auto; place-items:center; border-radius:11px; background:#e8f3f0; color:#397d74; font-size:20px; line-height:1; }
.professional-entry-link strong,.professional-entry-link small { display:block; }
.professional-entry-link strong { font-size:12px; font-weight:700; }
.professional-entry-link small { margin-top:3px; color:var(--muted); font-size:10px; line-height:1.25; }
.admin-entry-link:hover,.admin-entry-link:focus-visible { border-color:var(--accent); box-shadow:0 8px 18px rgba(42,65,54,.09); transform:translateY(-1px); }
.admin-entry-icon { display:grid; width:33px; height:33px; flex:0 0 auto; place-items:center; border-radius:10px; background:var(--accent-soft); color:var(--accent-dark); font-weight:700; }
.admin-entry-link strong,.admin-entry-link small { display:block; }
.admin-entry-link strong { font-size:12px; font-weight:700; }
.admin-entry-link small { margin-top:3px; color:var(--muted); font-size:10px; line-height:1.25; }
.admin-entry-arrow { margin-left:auto; color:var(--accent-dark); font-size:23px; line-height:1; }
.completion-notice { display:flex; align-items:center; gap:11px; margin:14px 0 2px; padding:12px; border:1px solid #ecdcb9; border-radius:15px; background:#fffaf0; color:#6b5632; }
.completion-notice-icon { color:var(--warm); font-size:18px; }
.completion-notice strong { display:block; font-size:12px; }
.completion-notice p { margin:3px 0 0; color:#8a7552; font-size:10px; line-height:1.35; }
.completion-notice .quiet-button { min-height:34px; margin-left:auto; padding:0 9px; font-size:10px; white-space:nowrap; }
.patient-greeting { font-size:clamp(19px,5vw,25px); letter-spacing:-.04em; }
.header-actions { display:flex; align-items:center; gap:7px; flex:0 0 auto; }
.header-menu { position:relative; z-index:30; }
.header-menu > summary { display:grid; width:42px; height:42px; place-items:center; border:1px solid var(--line); border-radius:13px; background:var(--surface); color:var(--accent-dark); box-shadow:0 3px 10px rgba(42,65,54,.08); cursor:pointer; list-style:none; }
.header-menu > summary::-webkit-details-marker { display:none; }
.header-menu > summary svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.app-icon { display:block; flex-shrink:0; vertical-align:middle; }
[data-ui-icon] { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
.control-svg { width:20px; height:20px; }
.rating-star { width:27px; height:27px; margin:auto; fill:currentColor; stroke-width:1.2; }
.video-play-button .control-svg { width:24px; height:24px; fill:currentColor; stroke-width:1.5; }
.mindfulness-placeholder .app-icon { width:36px; height:36px; }
.dialog-close { display:grid; place-items:center; }
.header-menu[open] > summary,.header-menu > summary:hover,.header-menu > summary:focus-visible { border-color:var(--accent); background:var(--accent-soft); outline:none; }
.header-menu-popover { position:absolute; top:calc(100% + 8px); right:0; z-index:1000; display:grid; width:max-content; min-width:210px; max-height:calc(100vh - 88px); max-height:calc(100dvh - 88px); overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; padding:7px; border:1px solid var(--line); border-radius:15px; background:var(--surface); box-shadow:0 18px 45px rgba(38,48,45,.18); }
.header-menu-popover::-webkit-scrollbar { width:7px; }
.header-menu-popover::-webkit-scrollbar-thumb { border:2px solid var(--surface); border-radius:99px; background:#c8d7d0; }
.app-menu-item { display:flex; width:100%; min-height:40px; align-items:center; gap:10px; padding:0 11px; border:0; border-radius:10px; background:transparent; color:var(--ink); font:600 12px Roboto,Arial,sans-serif; text-align:left; text-decoration:none; cursor:pointer; }
.menu-item-icon { display:grid; flex:0 0 22px; width:22px; height:22px; place-items:center; color:var(--accent-dark); }
.menu-item-svg { display:block; width:20px; height:20px; }
.app-menu-item:hover,.app-menu-item:focus-visible { background:var(--accent-soft); color:var(--accent-dark); outline:none; }
.app-menu-item.is-current { background:var(--accent-soft); color:var(--accent-dark); }
.app-menu-divider { height:1px; margin:5px 7px; background:var(--line); }
.header-profile-button { display:inline-flex; min-height:40px; align-items:center; justify-content:center; padding:0 12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--muted); font-size:11px; font-weight:700; box-shadow:0 2px 7px rgba(42,65,54,.06); }
.header-profile-button:hover,.header-profile-button:focus-visible { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-dark); }
.header-icon-button { display:inline-flex; width:42px; height:42px; min-height:42px; align-items:center; justify-content:center; padding:0; border:1px solid var(--line); border-radius:13px; background:var(--surface); color:var(--accent-dark); cursor:pointer; box-shadow:0 2px 7px rgba(42,65,54,.06); transition:border-color .15s,background .15s,transform .15s; }
.header-icon-button svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.header-icon-button:hover,.header-icon-button:focus-visible { border-color:var(--accent); background:var(--accent-soft); outline:none; }
.header-icon-button:active { transform:translateY(1px); }
.topbar-home-button.is-active { border-color:#c9dfd5; background:var(--accent-soft); color:var(--accent-dark); }
.topbar-profile-button.is-active { border-color:#c9dfd5; background:var(--accent-soft); color:var(--accent-dark); }
.topbar-home-icon { display:grid; width:22px; height:22px; place-items:center; }
.topbar-home-icon .home-ui-svg { width:22px; height:22px; }
.logout-button { display:inline-flex; min-height:40px; align-items:center; justify-content:center; padding:0 15px; border:1px solid var(--accent); border-radius:12px; background:var(--surface); color:var(--accent-dark); font-size:12px; font-weight:700; text-decoration:none; box-shadow:0 2px 7px rgba(42,65,54,.08); transition:border-color .15s,color .15s,background .15s,transform .15s; }
.logout-button:active { transform:translateY(1px); }
.logout-button:hover,.logout-button:focus-visible { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-dark); }
.logout-button.header-icon-button { padding:0; border-color:var(--accent); font-size:inherit; }
.patient-greeting { margin-bottom:14px; font-size:clamp(17px,4.5vw,21px); letter-spacing:-.015em; }
.patient-greeting + * { margin-top:0; }
.app-header:has(.patient-greeting) { margin-bottom:12px; }
.app-header:has(.patient-greeting) + .main-nav { margin-top:0; }
.app-header:has(.patient-greeting) ~ .main-nav .nav-tab { min-height:38px; padding-inline:10px; font-size:11px; }
.settings-card input[readonly],.settings-card textarea[readonly] { cursor:default; background:#f5f8f6; color:#5e6d69; }
.settings-card input[disabled] + .switch { opacity:.65; }
.empty-state { padding:18px 4px; line-height:1.5; }
.professional-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.send-summary-button { min-height:34px; padding:0 10px; font-size:11px; }
.revoke-button { min-height:34px; }
@media (max-width:560px) { .app-shell { width:min(calc(100% - 20px),720px); padding-top:20px; } .app-header h1 { font-size:32px; } .main-nav { overflow-x:auto; display:flex; scrollbar-width:none; } .main-nav::-webkit-scrollbar { display:none; } .nav-tab { flex:0 0 auto; padding:0 13px; } .professional-row { align-items:flex-start; flex-direction:column; } .professional-actions,.row-actions { width:100%; justify-content:stretch; } .professional-actions>*,.row-actions>* { flex:1; } .auth-shell { width:100%; } .clinic-logo { width:min(100%,230px); } }

.patient-card { align-items: stretch; cursor:pointer; transition:border-color .15s,box-shadow .15s,transform .15s; }
.patient-card:hover,.patient-card:focus-visible { border-color:var(--accent); box-shadow:0 5px 16px rgba(61,113,103,.10); transform:translateY(-1px); outline:none; }
.patient-card-heading { display:grid; grid-template-columns:1fr auto; align-items:center; gap:2px 8px; }
.patient-card-heading small { grid-column:1 / -1; }
.info-button { width:30px; height:30px; border:1px solid var(--line); border-radius:10px; background:var(--accent-soft); color:var(--accent-dark); font:500 17px/1 Roboto,Arial,sans-serif; cursor:pointer; }
.metric-icon { font-family:Roboto,Arial,sans-serif; font-weight:400; }
.metric-icon .indicator-svg,.trend-icon .indicator-svg { width:19px; height:19px; }
/* Each indicator and its chart share the same palette. */
.metric-sleep,[data-chart-indicator="sleep"] { --indicator-color:#5b99bd; --indicator-soft:#edf5fb; }
.metric-feeling,[data-chart-indicator="wellbeing"] { --indicator-color:#b47594; --indicator-soft:#f9edf4; }
.metric-pain,[data-chart-indicator="pain"] { --indicator-color:#c7884d; --indicator-soft:#fff1e5; }
.metric-pain-interference,[data-chart-indicator="interference"] { --indicator-color:#b86b62; --indicator-soft:#fff0ef; }
.metric-mobility,[data-chart-indicator="mobility"] { --indicator-color:#68a17c; --indicator-soft:#eaf5ee; }
.metric-physical,[data-chart-indicator="physical"] { --indicator-color:#cb9855; --indicator-soft:#fff4e6; }
.metric-self-efficacy,[data-chart-indicator="confidence"] { --indicator-color:#816aa5; --indicator-soft:#f1edf8; }
.metric-recovery,[data-chart-indicator="recovery"] { --indicator-color:#4f8c80; --indicator-soft:#e9f5f2; }

/* El saludo acompaña la navegación sin dominar la pantalla del paciente. */
.app-header .patient-greeting {
  margin-bottom:14px;
  font-size:clamp(18px,4vw,22px) !important;
  line-height:1.15;
  letter-spacing:-.02em;
}
@media (max-width:560px) {
  .app-header .patient-greeting { font-size:18px !important; }
}
.patient-actions { justify-content:flex-start; }
.patient-info-dialog { width:min(92vw,430px); border:1px solid var(--line); border-radius:var(--radius); padding:26px 22px 22px; color:var(--ink); background:var(--surface); box-shadow:0 20px 60px rgba(40,60,50,.25); font-family:inherit; }
.patient-info-dialog::backdrop { background:rgba(27,40,34,.35); }
.dialog-close { position:absolute; top:12px; right:14px; border:0; background:transparent; color:var(--muted); font-size:25px; cursor:pointer; }
.patient-info-dialog h2 { margin:0 0 14px; color:var(--ink); font-size:26px; letter-spacing:-.03em; }
.patient-info-dialog p { margin:7px 0; color:var(--muted); }
.patient-info-dialog,.patient-workspace-dialog { font-family:Roboto,Arial,sans-serif; font-size:14px; line-height:1.45; }
.patient-info-dialog .section-kicker,.patient-workspace-dialog .section-kicker { margin:0 0 8px; color:var(--accent); font-size:11px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; }
.patient-workspace-dialog h2 { margin:0; color:var(--ink); font-size:30px; font-weight:700; letter-spacing:-.04em; line-height:1.1; }
.patient-info-dialog strong,.patient-workspace-dialog strong { font-weight:700; }
.patient-info-dialog button,.patient-workspace-dialog button,.patient-info-dialog input,.patient-workspace-dialog input,.patient-info-dialog select,.patient-workspace-dialog select,.patient-info-dialog textarea,.patient-workspace-dialog textarea { font-family:Roboto,Arial,sans-serif; }
.professional-secondary:not(.workspace-care-editor):not(#sos-alert-section):not(#clinical-alert-section) { display:none; }
.workspace-care-editor { margin-top:16px; }
.workspace-care-editor > summary { cursor:pointer; padding:8px 0; }
.workspace-care-editor form { margin-top:16px; }
.profile-record,.record-more { padding:20px; margin-bottom:16px; }
.profile-main-card{display:grid;gap:0;}
.profile-subheading{margin:22px 0 12px;padding-top:16px;border-top:1px solid #edf1ed;font-size:15px;}
.profile-medication-link { display:inline-flex; align-items:center; gap:8px; margin-bottom:16px; }
.profile-record h3,.record-more h3 { margin:0 0 16px; font-size:18px; }
.profile-list { display:grid; gap:0; margin:0 0 3px; padding:0; list-style:none; }
.profile-list li { display:flex; align-items:flex-start; gap:10px; padding:11px 0; border-bottom:1px solid #edf1ed; }
.profile-list li:last-child { border-bottom:0; }
.profile-list-bullet { width:7px; height:7px; flex:0 0 7px; margin:7px 2px 0 1px; border-radius:50%; background:var(--accent); }
.profile-list strong,.profile-list small { display:block; }
.profile-list strong { color:var(--ink); font-size:14px; line-height:1.35; }
.profile-list small { margin-top:3px; color:var(--muted); font-size:13px; line-height:1.4; }
.profile-list-empty { color:var(--soft); font-size:13px; }
.profile-list-empty::before { display:none; }
.progress-highlights-card { padding:20px; }
.progress-highlights-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:22px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.progress-highlights-overview div { min-width:0; }
.progress-highlights-overview small { display:block; color:var(--muted); font-size:10px; line-height:1.35; }
.progress-highlights-overview strong { display:block; margin-top:5px; color:var(--accent-dark); font-size:25px; font-weight:600; }
.progress-highlights-card h3 { margin:0 0 7px; font-size:18px; }
.progress-highlights-list { display:grid; gap:0; }
.progress-highlight { display:flex; align-items:flex-start; gap:12px; padding:14px 0; border-bottom:1px solid #edf1ed; }
.progress-highlight:last-child { border-bottom:0; }
.progress-highlight-icon { display:grid; width:34px; height:34px; flex:0 0 34px; place-items:center; border-radius:11px; background:var(--accent-soft); color:var(--accent-dark); }
.progress-highlight-icon svg { width:20px; height:20px; }
.progress-highlight strong { display:block; color:var(--ink); font-size:14px; line-height:1.3; }
.progress-highlight p { margin:4px 0 5px; color:var(--muted); font-size:13px; line-height:1.45; }
.progress-highlight small { color:var(--soft); font-size:11px; }
@media (max-width:560px) { .progress-highlights-overview { gap:7px; } .progress-highlights-overview small { font-size:9px; } .progress-highlights-overview strong { font-size:22px; } }
.record-details { margin:16px 0 0; display:grid; gap:18px; }
.record-details dt { font-size:14px; color:var(--muted); margin-bottom:5px; }
.record-details dd { margin:0; font-size:16px; line-height:1.55; white-space:pre-line; overflow-wrap:anywhere; }
.record-more > summary,.admin-editor > summary { cursor:pointer; font-size:16px; font-weight:600; padding:8px 0; }
.record-more .settings-card { padding:20px 0 0; }
.admin-editor > summary h2 { display:inline; font-size:18px; }
.admin-editor[open] > summary { margin-bottom:20px; }
.share-progress,.crisis-contact-button { margin-bottom:20px; }
.metric-card[role="button"],.network-professional-node { cursor:pointer; }
.metric-card:focus-visible,.network-professional-node:focus-visible,.treating-card:focus,.trend-card:focus { outline:3px solid var(--accent); outline-offset:4px; }
.trend-card,.treating-card { scroll-margin-top:24px; }
.treating-role { margin:12px 0; font-size:14px; }
.treating-role summary { cursor:pointer; }
.treating-role p { line-height:1.5; }
.metric-grid-custom { display:contents; }
.metric-grid-custom .metric-icon { background:#f1edf8; color:#8b73ae; }
.metric-grid-custom .metric-card:nth-child(2n) .metric-icon { background:#fff1e5; color:#c7884d; }
.metric-grid-custom .metric-card:nth-child(3n) .metric-icon { background:#eaf5ee; color:#68a17c; }
.metric-grid > .metric-card { min-width:0; }
@media (min-width:700px) { .metric-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; } .metric-card { min-height:118px; } }
.header-actions { display:flex; align-items:center; gap:8px; }
.add-patient-button { min-height:40px; padding:0 14px; border:1px solid var(--accent); border-radius:12px; background:var(--accent); color:#fff; font-weight:700; cursor:pointer; }
.workspace-tabs { display:block; margin:16px 0 20px; }
.workspace-tab { flex:0 0 auto; min-height:38px; padding:0 12px; border:1px solid var(--line); border-radius:11px; background:var(--surface); color:var(--muted); cursor:pointer; font-weight:600; }
.workspace-tab.active { background:var(--accent); border-color:var(--accent); color:#fff; }
.patient-workspace-dialog { width:100vw; max-width:none; height:100vh; max-height:none; margin:0; overflow:auto; border:0; border-radius:0; padding:clamp(24px,5vw,56px) clamp(18px,6vw,80px) 40px; color:var(--ink); background:var(--page); box-shadow:none; font-family:inherit; }
.patient-workspace-dialog::backdrop { background:rgba(27,40,34,.38); }
.workspace-menu-label { display:grid; gap:7px; max-width:430px; color:var(--muted); font-size:12px; font-weight:600; }
.workspace-menu { width:100%; min-height:50px; padding:0 14px; border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--ink); font:600 15px Roboto,Arial,sans-serif; }
.workspace-evolution-button { min-height:42px; margin-top:10px; padding:0 16px; border:1px solid var(--accent); border-radius:12px; background:var(--accent); color:#fff; font:700 13px Roboto,Arial,sans-serif; cursor:pointer; }
.workspace-evolution-button:hover,.workspace-evolution-button:focus-visible { background:var(--accent-dark); border-color:var(--accent-dark); }
.workspace-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.workspace-metric-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.workspace-metric-grid .metric-card { min-width:0; }
.workspace-metric-grid .metric-pain .metric-icon { background:#fff1e5; color:#c7884d; }
.workspace-metric-grid .metric-fatigue .metric-icon { background:#eaf5ee; color:#68a17c; }
.workspace-metric-grid .metric-food .metric-icon { background:#f1edf8; color:#8b73ae; }
.workspace-stat { padding:14px; border:1px solid var(--line); border-radius:14px; background:#fbfdfb; }
.workspace-stat strong,.workspace-stat small { display:block; }
.workspace-stat strong { margin-top:5px; font-size:22px; }
.workspace-stat small { color:var(--muted); }
.workspace-list { display:grid; gap:8px; }
.workspace-list-item { padding:12px; border:1px solid var(--line); border-radius:12px; background:#fbfdfb; }
.exercise-assigned-section,.exercise-assign-panel { margin-top:14px; padding:18px; border:1px solid var(--line); border-radius:18px; background:var(--surface); box-shadow:0 7px 19px rgba(42,65,54,.04); }
.workspace-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.workspace-section-heading h3 { margin:0; color:var(--ink); font-size:20px; letter-spacing:-.03em; }
.exercise-count { display:grid; min-width:30px; height:30px; place-items:center; border-radius:10px; background:var(--accent-soft); color:var(--accent-dark); font-size:12px; font-weight:700; }
.exercise-plan-grid { display:grid; gap:10px; }
.activity-catalog-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin:14px 0; }
.activity-option { display:flex !important; min-height:58px; grid-template-columns:none !important; flex-direction:row; align-items:center; gap:10px !important; padding:10px 12px; border:1px solid var(--line); border-radius:13px; background:#fbfdfb; cursor:pointer; }
.activity-option:has(input:checked) { border-color:var(--accent); background:var(--accent-soft); }
.activity-option input { width:18px !important; min-height:18px !important; height:18px; margin:0; accent-color:var(--accent); }
.activity-option strong,.activity-option small { display:block; }
.activity-option strong { color:var(--ink); font-size:12px; }
.activity-option small { margin-top:3px; color:var(--muted); font-size:10px; }
@media (max-width:560px) { .activity-catalog-grid { grid-template-columns:1fr; } }
.exercise-assigned-card { padding:14px; border:1px solid var(--line); border-radius:16px; background:#fbfdfb; }
.exercise-card-heading { display:grid; grid-template-columns:auto 1fr auto; align-items:start; gap:10px; }
.exercise-card-heading strong,.exercise-card-heading small { display:block; }
.exercise-card-heading strong { color:var(--ink); font-size:15px; font-weight:700; }
.exercise-card-heading small { margin-top:4px; color:var(--muted); font-size:11px; line-height:1.4; }
.exercise-assigned-card > p { margin:12px 0 0 41px; color:var(--accent-dark); font-size:12px; font-weight:600; }
.exercise-thumbnail { width:42px; height:42px; flex:0 0 42px; object-fit:cover; border-radius:12px; background:#eaf5ee; }
.exercise-thumbnail-placeholder { display:grid; place-items:center; color:var(--accent-dark); font-size:20px; }
.exercise-new-button { width:100%; margin:0 0 12px; }
.exercise-remove-button { display:grid; width:30px; height:30px; place-items:center; border:1px solid #edc9c4; border-radius:10px; background:#fff1ef; color:#a75a50; font-size:20px; line-height:1; cursor:pointer; }
.exercise-remove-button:hover,.exercise-remove-button:focus-visible { border-color:#c8796d; background:#fbe0dc; }
.exercise-assign-panel .admin-form { margin-top:0; }
.mindfulness-grid { display:grid; gap:12px; }
.care-module-grid { display:grid; gap:10px; margin-top:16px; }
.care-module-card { display:flex; align-items:flex-start; gap:13px; padding:16px; }
.care-module-card h3 { margin:1px 0 5px; color:var(--ink); font-size:15px; }
.care-module-card p { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.care-step,.care-symbol { display:grid; flex:0 0 34px; width:34px; height:34px; place-items:center; border-radius:11px; background:var(--accent-soft); color:var(--accent-dark); font-size:15px; font-weight:700; }
.crisis-warning { margin-top:14px; padding:15px 16px; border:1px solid #edc9c4; border-radius:14px; background:#fff1ef; color:#7c3f38; }
.crisis-warning strong { font-size:1rem; }
.crisis-warning p { margin:5px 0 0; font-size:1rem; line-height:1.5; }
.crisis-step-title { display:flex; align-items:center; gap:10px; margin:22px 0 4px; font-size:18px; }
.crisis-step-title span { display:grid; width:30px; height:30px; place-items:center; border-radius:10px; background:var(--accent-soft); color:var(--accent-dark); font-size:14px; }
.crisis-contact-panel { display:flex; align-items:flex-start; gap:14px; margin-top:18px; padding:17px; border:1px solid #d8e2ee; border-radius:16px; background:#f5f8fc; }
.crisis-contact-panel h3 { margin:0 0 6px; font-size:17px; }
.crisis-contact-panel p { margin:0 0 12px; color:var(--muted); line-height:1.5; }
.crisis-contact-panel small { display:block; margin-top:10px; color:var(--muted); line-height:1.45; }
.crisis-contact-icon { display:grid; flex:0 0 40px; width:40px; height:40px; place-items:center; border-radius:12px; background:#fff0ed; color:#a94f45; }
.crisis-contact-icon svg,.crisis-contact-button svg { width:22px; height:22px; }
.crisis-contact-button { margin:0; }
.care-owner { margin:14px 0 0; padding:12px 14px; border-radius:12px; background:#edf5f0; color:var(--muted); font-size:12px; }
.journal-cadence { display:inline-block; margin-top:5px; color:var(--accent-dark); font-size:10px; font-weight:600; }
.form-label { display:block; margin-bottom:7px; color:var(--muted); font-size:12px; font-weight:500; }
.compact-list { display:grid; gap:7px; }
.compact-item { padding:11px 12px; border:1px solid var(--line); border-radius:12px; background:#fcfdfb; }
.medication-item summary{cursor:pointer;list-style:none;}
.medication-item summary::-webkit-details-marker{display:none;}
.medication-item summary::after{float:right;margin-left:10px;color:var(--accent-dark);content:'+';font-size:18px;line-height:1;}
.medication-item[open] summary::after{content:'−';}
.medication-sheet{margin-top:13px;padding-top:12px;border-top:1px solid #edf1ed;}
.medication-sheet dl{display:grid;gap:10px;margin:10px 0 0;}
.medication-sheet dt{color:var(--muted);font-size:11px;font-weight:600;}
.medication-sheet dd{margin:3px 0 0;color:var(--ink);font-size:12px;line-height:1.45;}
.medication-source{display:inline-block;margin-top:12px;color:var(--accent-dark);font-size:11px;font-weight:600;text-decoration:underline;}
.compact-item strong,.compact-item small { display:block; }
.compact-item strong { color:var(--ink); font-size:13px; }
.compact-item small { margin-top:4px; color:var(--muted); font-size:11px; line-height:1.4; }
.sos-dialog { width:min(92vw,460px); max-height:90vh; overflow:auto; padding:24px; border:0; border-radius:22px; color:var(--ink); background:var(--surface); box-shadow:0 24px 70px rgba(38,48,45,.28); }
.sos-dialog::backdrop { background:rgba(39,49,46,.52); }
.sos-dialog h2 { padding-right:32px; }
.sos-dialog .dialog-close { top:13px; right:14px; }
.sos-confirm-button { min-height:48px; border:0; border-radius:13px; background:#b95f54; color:#fff; font-weight:700; }
.sos-confirm-button:hover,.sos-confirm-button:focus-visible { background:#99443b; }
.care-module-card.is-alert { border-color:#edc9c4; background:#fff8f7; }
.care-module-card.is-success { border-color:#c8dfd4; background:#f7fcf9; }
.care-editor { margin-top:15px; padding:0 18px 18px; }
.care-editor > summary { display:flex; min-height:64px; align-items:center; justify-content:space-between; cursor:pointer; list-style:none; }
.care-editor > summary::-webkit-details-marker { display:none; }
.care-editor > summary::after { color:var(--accent-dark); content:'＋'; font-size:20px; }
.care-editor[open] > summary::after { content:'−'; }
.care-editor > summary .section-kicker { display:block; margin-bottom:4px; }
.care-editor > summary strong { color:var(--ink); font-size:15px; }
.mindfulness-card { overflow:hidden; border:1px solid var(--line); border-radius:16px; background:var(--surface); box-shadow:0 7px 19px rgba(42,65,54,.04); }
.mindfulness-card > .mindfulness-preview { display:block; width:72px; height:72px; aspect-ratio:1; margin:12px 12px 0; border-radius:12px; object-fit:cover; background:#edf5f0; }
.mindfulness-preview { width:96px; height:96px; border-radius:16px; object-fit:cover; background:#edf5f0; }
.mindfulness-placeholder { display:grid; place-items:center; color:var(--accent-dark); font-size:28px; }
.mindfulness-card > .mindfulness-placeholder { display:grid; place-items:center; }
.mindfulness-card-body { min-width:0; padding:16px; }
.mindfulness-card-body h3 { margin:2px 0 6px; color:var(--ink); font-size:17px; letter-spacing:-.02em; }
.mindfulness-card-body > p:not(.section-kicker) { margin:5px 0; color:var(--muted); font-size:1rem; line-height:1.45; }
.mindfulness-card-body .section-kicker { margin:0; font-size:10px; }
.mindfulness-purpose strong,.mindfulness-time strong { color:var(--accent-dark); }
.mindfulness-card .quiet-button { margin-top:12px; min-height:44px; padding:8px 12px; font-size:.875rem; }
.mindfulness-listen-button { display:inline-flex; align-items:center; gap:7px; }
.mindfulness-listen-button[aria-pressed="true"] { border-color:var(--accent); background:var(--accent-soft); color:var(--accent-dark); }
.mindfulness-assigned-section,.mindfulness-assign-panel { margin-top:14px; padding:18px; border:1px solid var(--line); border-radius:18px; background:var(--surface); box-shadow:0 7px 19px rgba(42,65,54,.04); }
.mindfulness-plan-grid { display:grid; gap:10px; }
.mindfulness-assigned-card { display:grid; grid-template-columns:62px 1fr auto; gap:12px; align-items:start; padding:12px; border:1px solid var(--line); border-radius:16px; background:#fbfdfb; }
.mindfulness-assigned-card .mindfulness-preview { width:62px; height:62px; border-radius:13px; }
.mindfulness-assigned-card strong,.mindfulness-assigned-card small { display:block; }
.mindfulness-assigned-card strong { color:var(--ink); font-size:14px; }
.mindfulness-assigned-card small { margin-top:4px; color:var(--muted); font-size:11px; line-height:1.4; }
.mindfulness-assigned-card > p { grid-column:2 / -1; margin:0; color:var(--accent-dark); font-size:12px; line-height:1.45; }
.mindfulness-remove-button { display:grid; width:30px; height:30px; place-items:center; border:1px solid #edc9c4; border-radius:10px; background:#fff1ef; color:#a75a50; font-size:20px; line-height:1; cursor:pointer; }
.mindfulness-remove-button:hover,.mindfulness-remove-button:focus-visible { border-color:#c8796d; background:#fbe0dc; }
.mindfulness-limit-note { margin:0 0 12px; color:var(--muted); font-size:12px; }
.professional-evolution { margin-top:14px; }
.professional-insights { margin-top:14px; padding:18px; border:1px solid var(--line); border-radius:18px; background:var(--surface); box-shadow:0 7px 19px rgba(42,65,54,.04); }
.insights-list { display:grid; gap:10px; margin:14px 0 0; padding:0; list-style:none; }
.insights-list li { position:relative; padding:12px 13px 12px 35px; border:1px solid var(--line); border-radius:14px; background:#fbfdfb; color:var(--muted); font-size:12px; line-height:1.5; }
.insights-list li::before { position:absolute; top:12px; left:13px; display:grid; width:16px; height:16px; place-items:center; border-radius:50%; background:var(--accent-soft); color:var(--accent-dark); content:'✓'; font-size:10px; font-weight:700; }
.professional-trend-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.professional-trend-card { min-width:0; }
.professional-trend-card .trend-card-heading { align-items:flex-start; }
.professional-trend-card .trend-icon { display:grid; width:30px; height:30px; flex:0 0 auto; place-items:center; border-radius:10px; background:var(--accent-soft); color:var(--accent-dark); font-size:18px; }
.professional-trend-card .trend-average { margin-left:auto; color:var(--accent-dark); font-size:10px; font-weight:700; white-space:nowrap; }
.professional-trend-card .trend-value { fill:var(--accent-dark); font:600 10px Roboto,Arial,sans-serif; }
.professional-trend-card .trend-grid-line { stroke:#dce8e2; stroke-width:1; opacity:.32; }
.professional-trend-card .trend-grid-line-major { opacity:.68; }
.professional-trend-card .trend-axis-label { fill:var(--soft); font:10px Roboto,Arial,sans-serif; }
.patient-selection-heading { color:var(--muted); font-size:16px; font-weight:500; letter-spacing:-.02em; line-height:1.3; }
@media (max-width:560px) { .professional-trend-grid { grid-template-columns:1fr; } }
@media (max-width:560px) { .mindfulness-card > .mindfulness-preview { width:72px; height:72px; border-radius:12px; } .mindfulness-card-body h3 { font-size:15px; } }
.patient-workspace-dialog .admin-form { padding:16px; margin-top:14px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }
.patient-workspace-dialog input,.patient-workspace-dialog select,.patient-workspace-dialog textarea,.patient-info-dialog input,.patient-info-dialog select,.patient-info-dialog textarea { width:100%; min-height:46px; border:1px solid var(--line); border-radius:13px; background:#fcfdfb; color:var(--ink); padding:0 13px; font:inherit; }
.patient-workspace-dialog label,.patient-info-dialog label { display:grid; gap:7px; color:var(--muted); font-size:12px; font-weight:600; }
.patient-workspace-dialog .primary-button,.patient-info-dialog .primary-button { width:100%; margin-top:4px; }
@media (max-width:560px) { .header-actions { gap:5px; } .add-patient-button { padding:0 9px; font-size:12px; } .workspace-grid,.workspace-metric-grid { grid-template-columns:1fr; } .patient-workspace-dialog { padding:22px 14px 32px; } }
@media (max-width:420px) {
  .app-header { align-items:center; gap:8px; }
  .app-header > div:first-child { min-width:0; }
  .app-header .patient-greeting { max-width:calc(100vw - 205px); overflow:hidden; font-size:16px !important; white-space:nowrap; text-overflow:ellipsis; }
  .header-actions { gap:4px; }
  .header-icon-button,.header-menu > summary { width:40px; height:40px; min-height:40px; }
  .sos-button { width:44px; min-height:40px; justify-content:center; padding:0; }
}
.date-heading h2 { text-transform:none; }
.exercise-dose { color: var(--accent); font-size: 14px; margin: 10px 0; }
.disabled-button { opacity: .65; cursor: default; display: inline-flex; align-items: center; }
.plan-complete-button { margin-left:8px; }
.plan-complete-button:disabled { border-color:#bfd7cb; background:#edf7f1; color:#39745a; opacity:1; cursor:default; }
.education-check { margin:12px 0 4px; }
.education-check textarea { width:100%; min-height:64px; margin-top:6px; padding:10px 12px; resize:vertical; border:1px solid var(--line); border-radius:12px; background:#fcfdfb; color:var(--ink); font:inherit; }
.education-chapter { display:block; overflow:hidden; padding:0; }
.education-image-frame { display:grid; place-items:center; width:100%; aspect-ratio:3/2; max-height:300px; overflow:hidden; background:#f7f5ed; border-bottom:1px solid var(--line); }
.education-chapter-image { display:block; width:100%; height:100%; min-height:0; max-height:300px; object-fit:contain; object-position:center; }
.education-chapter-body { padding:17px; }
.education-chapter-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.education-chapter-heading .section-kicker { margin-bottom:7px; }
.education-read-state { color:var(--accent-dark); font-size:11px; font-weight:700; white-space:nowrap; }
.education-chapter h3 { margin:0 0 7px; font-size:18px; }
.education-chapter .education-summary { color:var(--ink); font-size:1rem; line-height:1.5; }
.education-deeper,.education-reflection { margin-top:14px; border-top:1px solid var(--line); }
.education-deeper > summary,.education-reflection > summary { display:flex; align-items:center; gap:12px; min-height:48px; padding:12px 0; color:var(--accent-dark); font-size:1rem; font-weight:600; cursor:pointer; list-style:none; }
.education-deeper > summary::-webkit-details-marker,.education-reflection > summary::-webkit-details-marker { display:none; }
.education-deeper > summary::after,.education-reflection > summary::after { content:'+'; flex:0 0 auto; margin-left:auto; font-size:1.25rem; }
.education-deeper[open] > summary::after,.education-reflection[open] > summary::after { content:'−'; }
.education-reflection > summary { font-size:.875rem; font-weight:400; }
.education-details-content.education-core { padding-top:0; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.education-details-content { padding-top:13px; }
.education-details-content > p { color:var(--muted); font-size:1rem; line-height:1.6; }
.education-action { display:grid; gap:4px; margin:13px 0; padding:12px 13px; border-radius:13px; background:var(--accent-soft); color:var(--accent-dark); }
.education-action strong { font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
.education-action span { font-size:12px; line-height:1.45; }
.education-check { display:grid; gap:4px; color:var(--ink); font-size:12px; font-weight:700; }
.education-check small { color:var(--muted); font-size:12px; font-weight:400; line-height:1.45; }
.education-chapter .plan-complete-button { margin:10px 0 0; }
.history-row > span:last-child { max-width: 62%; text-align: right; line-height: 1.45; }
.history-row-duplicate { border-color:#efc5c2; background:#fff0ef; }
.history-row-duplicate small { color:#a8645d; }
.history-row-incomplete:not(.history-row-duplicate) { border-style:dashed; background:#fcfdfb; }
.history-row-missing { border-style:dashed; }
@media (max-width:560px) { .history-row { align-items: flex-start; flex-direction: column; } .history-row > span:last-child { max-width:100%; text-align:left; } }
.profile-pathology-row { display:flex; min-width:0; align-items:center; gap:13px; margin:16px 0 20px; padding:15px 0 17px; border-bottom:1px solid var(--line); }
.profile-pathology-icon { display:grid; width:42px; height:42px; flex:0 0 42px; place-items:center; border-radius:13px; background:var(--accent-soft); color:var(--accent-dark); }
.profile-pathology-icon svg { width:24px; height:24px; }
.profile-pathology-row small,.profile-pathology-row strong { display:block; }
.profile-pathology-row small { margin:0 0 5px; color:var(--muted); font-size:13px; }
.profile-pathology-row strong { overflow-wrap:anywhere; color:var(--ink); font-size:20px; line-height:1.25; }
.profile-section-title { margin:4px 0 -1px; padding-bottom:9px; border-bottom:1px solid var(--line); color:var(--ink); font-size:14px; font-weight:700; }
.team-area-legend { display:flex; flex-wrap:wrap; gap:7px; margin:2px 0 15px; }
.care-network { position:relative; min-height:410px; margin:18px 0 14px; overflow:hidden; border:1px solid #dce7e1; border-radius:22px; background:radial-gradient(circle at center,#edf5fc 0 18%,transparent 18.5%),linear-gradient(145deg,#fff,#f7faf8); box-shadow:0 9px 25px rgba(42,65,54,.045); }
.care-network-lines { position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
.network-line { vector-effect:non-scaling-stroke; stroke:#83aa9d; stroke-width:1.2; stroke-dasharray:3 3; }
.network-line.area-fisica { stroke:#d3a052; }
.network-line.area-mental { stroke:#b67596; }
.network-line.is-manager { stroke:#2f75b5; stroke-width:1.6; }
.network-line.is-companion { stroke:#7f9a91; stroke-width:1.4; stroke-dasharray:none; }
.network-patient-node,.network-professional-node { position:absolute; z-index:2; display:flex; align-items:center; justify-content:center; flex-direction:column; text-align:center; }
.network-patient-node { top:50%; left:50%; width:116px; min-height:96px; padding:10px; border:2px solid #2f75b5; border-radius:50%; background:#f8fcff; color:var(--ink); transform:translate(-50%,-50%); box-shadow:0 10px 24px rgba(47,117,181,.2); }
.network-patient-node > span { display:grid; width:29px; height:29px; place-items:center; margin-bottom:3px; border-radius:10px; background:#e5f2fd; color:#245f95; }
.network-patient-node small,.network-patient-node strong,.network-professional-node small,.network-professional-node strong { display:block; }
.network-patient-node small { color:#245f95; font-size:9px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.network-patient-node strong { max-width:96px; margin-top:3px; overflow:hidden; font-size:12px; line-height:1.2; text-overflow:ellipsis; }
.network-professional-node { top:var(--network-y); left:var(--network-x); width:124px; min-height:76px; padding:8px 7px; border:1px solid #cee0d7; border-radius:15px; background:#fff; transform:translate(-50%,-50%); box-shadow:0 7px 18px rgba(42,65,54,.08); }
.network-professional-node.area-fisica { border-color:#ead7b8; }
.network-professional-node.area-mental { border-color:#ead4df; }
.network-professional-node.is-manager { border-width:2px; border-color:#2f75b5; background:#f8fcff; box-shadow:0 8px 20px rgba(47,117,181,.2); }
.network-professional-node.is-manager .network-node-icon { background:#e5f2fd; color:#245f95; }
.network-professional-node.is-manager:focus-visible { outline-color:#245f95; }
.network-node-icon { display:grid; width:25px; height:25px; place-items:center; margin-bottom:4px; border-radius:8px; background:var(--accent-soft); color:var(--accent-dark); }
.network-professional-node.area-fisica .network-node-icon { background:#fff5e5; color:#a97736; }
.network-professional-node.area-mental .network-node-icon { background:#f8edf3; color:#a46687; }
.network-professional-node strong { width:100%; overflow:hidden; font-size:10px; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.network-professional-node small { width:100%; margin-top:2px; overflow:hidden; color:#687674; font-size:9px; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.network-companion-node { position:absolute; z-index:2; top:84%; left:83%; display:flex; width:150px; min-height:0; align-items:center; justify-content:center; flex-direction:column; padding:4px 8px; border:0; border-radius:0; background:transparent; color:var(--ink); transform:translate(-50%,-50%); box-shadow:none; cursor:pointer; font:inherit; text-align:center; }
.network-companion-node .network-node-icon { width:23px; height:23px; margin-bottom:3px; background:#e5f3ed; color:#3d7167; }
.network-companion-node strong { max-width:100%; overflow:hidden; font-size:11px; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.network-companion-node small { max-width:100%; margin-top:1px; overflow:hidden; color:#687674; font-size:10px; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.network-companion-node:focus-visible { outline:3px solid #3d7167; outline-offset:3px; }
.network-node-svg { width:16px; height:16px; }
.network-patient-svg { width:18px; height:18px; }
.team-area-chip,.alert-contact-chip { display:inline-flex; min-height:25px; align-items:center; padding:0 9px; border-radius:99px; font-size:10px; font-weight:700; }
.team-area-chip.area-gestion { background:#e7f2ed; color:#3d7167; }
.team-area-chip.area-fisica { background:#fff3e2; color:#a16f2f; }
.team-area-chip.area-mental { background:#f5eaf1; color:#9b6180; }
.alert-contact-chip { background:#fff0ee; color:#a45249; }
.treating-team-grid { display:grid; gap:12px; }
.treating-card { display:grid; grid-template-columns:48px minmax(0,1fr); gap:13px; padding:16px; border:1px solid var(--line); border-left:4px solid var(--accent); border-radius:18px; background:var(--surface); box-shadow:0 8px 22px rgba(42,65,54,.045); }
.treating-card.area-fisica { border-left-color:#d3a052; }
.treating-card.area-mental { border-left-color:#b67596; }
.treating-card.is-alert-contact { box-shadow:0 8px 22px rgba(91,143,131,.1); }
.team-area-mark { display:grid; width:48px; height:48px; place-items:center; border-radius:15px; background:var(--accent-soft); color:var(--accent-dark); }
.area-fisica .team-area-mark { background:#fff3e2; color:#a16f2f; }
.area-mental .team-area-mark { background:#f5eaf1; color:#9b6180; }
.team-area-svg { width:27px; height:27px; }
.treating-card-body { min-width:0; }
.treating-card-heading { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:9px; }
.treating-card h3 { margin:0; color:var(--ink); font-size:17px; letter-spacing:-.02em; }
.treating-specialty { margin:4px 0 0; color:var(--accent-dark); font-size:12px; font-weight:700; }
.treating-function { margin:10px 0; color:var(--muted); font-size:12px; line-height:1.5; }
.treating-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; }
.treating-meta div { min-width:0; padding:9px 10px; border-radius:11px; background:#f7faf7; }
.treating-meta dt { color:var(--soft); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; }
.treating-meta dd { margin:4px 0 0; color:var(--ink); font-size:11px; line-height:1.35; overflow-wrap:anywhere; }
.treating-contact { display:flex; flex-wrap:wrap; gap:8px; margin-top:11px; }
.treating-contact a,.treating-contact-disabled { display:inline-flex; min-height:32px; align-items:center; padding:7px 10px; border:1px solid var(--line); border-radius:10px; color:var(--accent-dark); font-size:11px; font-weight:700; text-decoration:none; }
.treating-contact a:hover,.treating-contact a:focus-visible { border-color:var(--accent); background:var(--accent-soft); }
.treating-contact .whatsapp-contact { border-color:#b9deca; background:#f1faf5; color:#287449; }
.treating-contact .whatsapp-contact:hover,.treating-contact .whatsapp-contact:focus-visible { border-color:#4e9b6c; background:#e5f5eb; color:#1f613c; }
.treating-contact-disabled { border-style:dashed; color:#98a29f; text-decoration:line-through; cursor:not-allowed; }
.team-manager-note { margin-top:14px; padding:15px 16px; border:1px solid #c8dfd4; border-radius:15px; background:#f5faf7; }
.team-manager-note strong { color:var(--accent-dark); font-size:13px; }
.team-manager-note p { margin:5px 0 0; color:var(--muted); font-size:11px; line-height:1.5; }
@media (max-width:560px) { .care-network { min-height:440px; } .network-patient-node { width:104px; min-height:90px; } .network-professional-node { width:104px; min-height:72px; padding-inline:5px; } .network-companion-node { top:86%; left:82%; width:138px; } .treating-card { grid-template-columns:42px minmax(0,1fr); padding:14px; } .team-area-mark { width:42px; height:42px; } .treating-meta { grid-template-columns:1fr; } }

/* Controles sencillos, texto legible y ayuda fuera del flujo principal. */
.star-row { flex-wrap:wrap; gap:4px; }
.star-button { width:44px; height:44px; flex:0 0 44px; }
.question-block legend { position:relative; width:100%; font-size:1rem; }
.question-info { position:static; width:44px; height:44px; flex:0 0 44px; margin-left:2px; border:0; border-radius:12px; background:transparent; cursor:pointer; }
.question-info > span:first-child { display:grid; place-items:center; width:22px; height:22px; border:0; color:var(--accent-dark); }
.question-info-popover { top:100%; width:min(340px,100%); font-size:.875rem; line-height:1.5; }
.question-info-popover::before { display:none; }
.score-label,.scale-hint,.assigned-activity-hint,.choice-button,.day-state,.save-status,
.app-menu-item,.care-editor > summary strong,.settings-card label,.admin-form label { font-size:.875rem; }
.journal-question-count,.journal-cadence,.section-kicker,.trend-axis-label,.trend-average,
.treating-meta dt,.team-area-chip,.alert-contact-chip { font-size:.75rem; }
.section-intro,.care-module-card p,.video-card-body p,.mindfulness-card p,
.record-details dd,.education-summary,.education-details-content p { font-size:1rem; line-height:1.55; }
.treating-specialty,.treating-function,.treating-meta dd,.treating-contact a,
.treating-contact-disabled,.team-manager-note p { font-size:.875rem; line-height:1.5; }
.network-professional-node strong,.network-professional-node small,.network-patient-node small { font-size:.75rem; }
.header-icon-button,.header-menu > summary,.sos-button,.round-button,.dialog-close,
.quiet-button,.primary-button,.app-menu-item,.date-pill,.treating-contact a { min-width:44px; min-height:44px; }

/* Encabezado del paciente: identidad arriba, navegación agrupada y SOS separado. */
.patient-app-header { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; column-gap:12px; row-gap:10px; padding-bottom:22px; border-bottom:1px solid rgba(214,226,221,.85); }
.patient-app-header .patient-greeting { grid-column:1 / -1; margin:0; min-width:0; }
.patient-primary-actions { grid-column:1; display:flex; align-items:center; gap:3px; padding:3px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.72); }
.patient-primary-actions .header-icon-button { border-color:transparent; border-radius:11px; background:transparent; box-shadow:none; }
.patient-primary-actions .header-icon-button:hover,.patient-primary-actions .header-icon-button:focus-visible,.patient-primary-actions .header-icon-button.is-active { border-color:transparent; background:var(--accent-soft); }
.patient-updates-button { position:relative; color:var(--accent-dark); }
.patient-updates-button:hover,.patient-updates-button:focus-visible,.patient-updates-button.is-active { background:var(--accent-soft) !important; color:var(--accent-dark); }
.patient-queries-button { position:relative; color:#456e9b; }
.patient-queries-button:hover,.patient-queries-button:focus-visible,.patient-queries-button.is-active { background:#edf3f9 !important; color:#456e9b; }
.patient-update-badge { position:absolute; top:-4px; right:-4px; display:grid; min-width:19px; height:19px; place-items:center; padding:0 4px; border:2px solid var(--surface); border-radius:10px; background:#456e9b; color:#fff; font-size:10px; font-weight:700; line-height:1; }
.patient-update-badge[hidden] { display:none; }
.patient-updates-dialog,.patient-queries-dialog { width:min(92vw,580px); }
.patient-updates-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:10px 0 16px; }
.patient-updates-toolbar p { margin:0; color:var(--muted); font-size:.875rem; }
.patient-updates-toolbar > div { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.patient-update-list { display:grid; gap:12px; max-height:min(52vh,520px); overflow:auto; padding:2px; }
.patient-update-card { padding:16px; border:1px solid var(--line); border-radius:16px; background:#fff; }
.patient-update-card.is-unread { border-color:#b9ccdf; background:#f5f8fc; box-shadow:inset 3px 0 #456e9b; }
.patient-update-card header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.patient-update-card header div { display:grid; gap:3px; }
.patient-update-card header strong { font-size:.9375rem; }
.patient-update-card header small,.patient-update-card time { color:var(--muted); font-size:.75rem; }
.patient-update-card header > span { padding:4px 8px; border-radius:999px; background:#e6eef7; color:#456e9b; font-size:.6875rem; font-weight:700; }
.patient-update-card time { display:block; margin-top:8px; }
.patient-update-card p { margin:10px 0 0; font-size:.9375rem; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
.patient-query-section { margin-top:24px; padding-top:22px; border-top:1px solid var(--line); }
.patient-query-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.patient-query-heading h3 { margin:3px 0 0; }
.patient-query-heading > span { display:grid; width:42px; height:42px; place-items:center; border-radius:13px; background:#eaf1f8; color:#456e9b; }
.patient-query-heading svg { width:21px; height:21px; }
.patient-query-composer { margin:14px 0 18px; padding:0 14px; border:1px solid #cddceb; border-radius:14px; background:#f7f9fc; }
.patient-query-composer > summary { display:flex; min-height:48px; align-items:center; color:#456e9b; font-weight:700; cursor:pointer; }
.patient-query-composer > p { margin:0 0 14px; color:var(--muted); font-size:.8125rem; line-height:1.5; }
.patient-query-composer form { display:grid; gap:12px; padding-bottom:14px; }
.patient-query-composer label { display:grid; gap:6px; font-size:.875rem; font-weight:600; }
.patient-query-composer select,.patient-query-composer textarea { width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:11px; background:#fff; color:var(--ink); font:inherit; }
.patient-query-composer textarea { min-height:90px; resize:vertical; }
.patient-query-composer button { justify-self:start; }
.patient-query-list { display:grid; gap:12px; }
.patient-query-card { padding:16px; border:1px solid var(--line); border-radius:16px; background:#fff; }
.patient-query-card header { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.patient-query-card header div { display:grid; gap:3px; }
.patient-query-card header small,.query-recipient,.query-awaiting { color:var(--muted); font-size:.75rem; }
.patient-query-card > p { margin:12px 0 8px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
.query-status { flex:0 0 auto; padding:5px 8px; border-radius:999px; background:#f2f4f3; color:#65736f; font-size:.6875rem; font-weight:700; }
.query-status.is-respondida { background:#e7f3ed; color:#34685c; }
.query-status.is-revisada { background:#fff6df; color:#7c631e; }
.patient-query-response { margin-top:13px; padding:13px; border-left:3px solid #456e9b; border-radius:0 10px 10px 0; background:#f4f7fb; }
.patient-query-response strong { font-size:.8125rem; }
.patient-query-response p { margin:6px 0 0; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
.query-awaiting { margin-bottom:0 !important; }
.patient-sos-action { position:relative; grid-column:2; justify-self:end; width:44px; min-width:44px; height:44px; padding:10px; gap:0; border:1px solid #e2cbc6; border-radius:14px; background:var(--surface); color:#99443b; box-shadow:none; line-height:1; text-align:center; }
.patient-sos-action > [data-ui-icon] { display:grid; place-items:center; }
.patient-sos-action svg { display:block; width:22px; height:22px; }
.patient-sos-action .sos-action-label { position:absolute; top:calc(100% + 4px); left:50%; transform:translateX(-50%); font-size:10px; font-weight:600; line-height:1.2; white-space:nowrap; }
.patient-sos-action:hover,.patient-sos-action:focus-visible { background:#fff0ed; border-color:#b66f64; }
.patient-menu-action { grid-column:3; justify-self:end; }
.patient-menu-action .header-menu > summary { box-shadow:none; }
@media (max-width:560px) {
  .patient-app-header { column-gap:10px; }
  .patient-updates-toolbar { align-items:stretch; flex-direction:column; }
  .patient-updates-toolbar > div { justify-content:stretch; }
  .patient-updates-toolbar > div > button { flex:1 1 auto; }
}
.record-more > summary,.education-details > summary,.clinical-sources > summary { min-height:44px; padding-block:12px; cursor:pointer; }
button:focus-visible,a:focus-visible,summary:focus-visible,select:focus-visible,
textarea:focus-visible,input:focus-visible { outline:3px solid #34685c; outline-offset:3px; }
.journal-reference-period,.clinical-note { margin:12px 0 18px; color:#51655e; font-size:.875rem; line-height:1.55; overflow-wrap:anywhere; }
.journal-reference-period { padding:12px 14px; border-left:3px solid var(--accent); background:#edf5f0; border-radius:0 10px 10px 0; }
.clinical-sources { margin:12px 0 20px; color:#51655e; font-size:.875rem; line-height:1.55; }
.clinical-sources summary { color:var(--accent-dark); font-weight:600; }
.clinical-sources ul { padding-left:22px; }
.clinical-sources li { margin-bottom:12px; }
.clinical-reference { padding-top:10px; border-top:1px solid var(--line); font-size:.875rem !important; }
.clinical-reference a,.clinical-sources a { color:#34685c; text-decoration:underline; text-underline-offset:3px; }
.trend-reading { color:#51655e; font-size:.875rem; line-height:1.5; }
.trend-card-heading { flex-wrap:wrap; }
.card-heading { flex-wrap:wrap; }
.clinical-sources,.clinical-note,.trend-reading { max-width:100%; }
.journal-help { margin:0 0 16px; color:#51655e; font-size:.875rem; line-height:1.5; }
.journal-help summary { cursor:pointer; padding:10px 0; min-height:44px; }
.draft-recovery { margin:16px 0; padding:14px; border:1px solid #d3b369; border-radius:12px; background:#fff9e9; font-size:.875rem; }
.draft-recovery p { margin:0 0 10px; }
.choice-row { flex-wrap:wrap; }
.not-applicable-button { flex-basis:100%; min-height:44px; font-size:.875rem; }
.save-row { flex-wrap:wrap; gap:12px; }
.sos-deliveries { border-top:1px solid var(--line); margin-top:16px; padding-top:12px; }
.sos-delivery-row { padding:12px 0; border-bottom:1px solid var(--line); }
.sos-delivery-row strong,.sos-delivery-row small { display:block; overflow-wrap:anywhere; font-size:.875rem; }
.sos-delivery-row small { margin-top:4px; color:#51655e; }
#crisis-urgent-content .care-module-card { margin-bottom:16px; }
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { transition:none !important; animation:none !important; }
}

/* Quinta revisión: información operativa legible y administración menos densa. */
.eyebrow { font-size:.75rem; }
.home-module-copy small,.metric-card p,.metric-card small,.professional-row small,
.user-group small,.privacy-note,.open-question-note,.video-preview-label,
.education-read-state,.education-action strong,.mindfulness-card-body .section-kicker { font-size:.8125rem; line-height:1.45; }
.date-pill { font-size:.75rem; }
.education-action span { font-size:.875rem; line-height:1.5; }
.user-group { padding:0; }
.user-group > summary { display:flex; min-height:48px; align-items:center; justify-content:space-between; gap:12px; padding:11px 12px; color:var(--accent-dark); cursor:pointer; list-style:none; }
.user-group > summary::-webkit-details-marker { display:none; }
.user-group > summary span { font-size:1.1rem; transition:transform .15s ease; }
.user-group[open] > summary span { transform:rotate(45deg); }
.user-group > small { padding:0 12px 13px; overflow-wrap:anywhere; }

/* Resumen primero; detalle disponible al abrirlo. */
.plan-pending { padding:14px 16px; border:1px solid #d3b369; border-radius:12px; background:#fff9e9; color:#65501f; }
.companion-group + .companion-group { margin-top:28px; padding-top:20px; border-top:1px solid var(--line); }
.education-details-content h4 { margin:22px 0 8px; font-size:1rem; color:var(--ink); }
.education-details-content ol { padding-left:24px; color:var(--muted); font-size:1rem; line-height:1.6; }
.education-details-content li { margin:10px 0; }
.habit-plan { margin:20px 0; padding:16px; background:#f3f8f5; border:1px solid var(--line); border-radius:14px; }
.habit-plan p { font-size:1rem; line-height:1.5; }
.habit-plan h4 { margin-top:0; }
.companion-group .compact-item small { font-size:1rem; line-height:1.5; }
.activity-detail[hidden] { display:none; }
.video-card-body .section-kicker,.education-chapter-body .section-kicker { font-size:.875rem; color:var(--accent-dark); }
.video-card-body .exercise-dose { color:var(--ink); }
.network-size-probe { position:absolute; width:1rem; height:1rem; visibility:hidden; pointer-events:none; }
.network-manager-label { color:#245f95; font-size:.75rem; font-weight:600; margin-top:3px; }
.care-network.is-list { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; padding:16px; min-height:0; background:var(--surface); }
.care-network.is-list .care-network-lines { display:none; }
.care-network.is-list .network-patient-node,.care-network.is-list .network-professional-node { position:static; transform:none; width:100%; min-height:0; padding:14px; border-radius:14px; }
.care-network.is-list .network-companion-node { position:static; transform:none; width:100%; min-height:0; padding:14px; border-radius:14px; }
.care-network.is-list strong,.care-network.is-list small { width:auto; max-width:100%; white-space:normal; overflow:visible; overflow-wrap:anywhere; font-size:.875rem; }
.care-network.is-list .network-manager-label { font-size:.875rem; }
.home-module-card.is-due { background:#fff8df; border-color:#e7d18d; box-shadow:0 5px 16px rgba(157,122,44,.10); }
.home-module-card.is-due .home-module-icon { background:#fff0bd; color:#9b7a2c; }
.home-module-card.is-due .home-module-copy small { color:#876a25; font-weight:600; }
.compact-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
.compact-metrics .metric-card { display:grid; grid-template-columns:26px minmax(0,1fr); gap:8px; min-height:132px; padding:12px; text-align:left; color:var(--ink); }
.compact-metrics .metric-icon { width:26px; height:26px; }
.compact-metrics .metric-icon svg { width:18px; height:18px; }
.compact-metrics .metric-card p,.compact-metrics .metric-label { display:block; min-height:36px; margin:0 0 6px; color:#536661; font-size:.875rem; line-height:1.3; }
.compact-metrics .metric-card strong { font-size:1.375rem; line-height:1.2; }
.compact-metrics .metric-card .metric-change { display:flex; align-items:center; gap:3px; color:#51655e; font-size:.8125rem; line-height:1.35; }
.metric-change svg { width:15px; height:15px; flex:0 0 15px; }
.compact-metrics .metric-card .metric-date { color:#647570; font-size:.75rem; line-height:1.35; }
.compact-metrics .metric-card:hover { border-color:#9dbfb2; }
.compact-disclosure { margin:16px 0; }
.compact-disclosure > summary { min-height:44px; display:flex; align-items:center; gap:8px; cursor:pointer; color:var(--accent-dark); font-size:1rem; font-weight:600; list-style:none; }
.compact-disclosure > summary::-webkit-details-marker { display:none; }
.compact-disclosure > summary::after { content:''; width:7px; height:7px; margin-left:auto; margin-right:6px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); }
.compact-disclosure[open] > summary::after { transform:rotate(225deg); }
.compact-disclosure[open] > summary { margin-bottom:12px; }
.education-library { gap:24px; padding:0; }
.network-professional-node.is-selected { outline:3px solid currentColor; outline-offset:3px; }
.network-professional-node { color:var(--ink); }
.network-professional-node.is-manager.is-selected { outline-color:#245f95; }
.patient-search-label { display:grid; gap:8px; }
#patient-search { width:100%; min-height:46px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--ink); font:inherit; font-size:1rem; }
.patient-search-count { margin:0; color:#647570; font-size:.875rem; }
#professional-patient-list { margin-top:0; }
#professional-patient-list .patient-card { width:100%; flex-direction:row; align-items:center; text-align:left; font:inherit; color:var(--ink); }
.patient-card-heading { flex:1; min-width:0; }
.patient-row-arrow { flex:0 0 20px; color:var(--accent-dark); }
.patient-row-arrow svg { width:20px; height:20px; }
.workspace-patient-overview { padding:16px; margin-bottom:20px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.workspace-patient-overview h3 { margin:0 0 8px; font-size:1.125rem; }
.workspace-patient-overview p { margin:0 0 12px; font-size:1rem; line-height:1.5; }
.record-snapshot { display:grid; gap:16px; margin:16px 0; }
.record-snapshot dt { color:#51655e; font-size:.875rem; font-weight:600; margin-bottom:4px; }
.record-snapshot dd { margin:0; font-size:1rem; line-height:1.5; white-space:pre-line; overflow-wrap:anywhere; }
.workspace-record-summary { padding-bottom:12px; }
.workspace-record-summary h3 { margin:0; }
.workspace-record-summary .compact-disclosure { border-top:1px solid var(--line); padding-top:8px; }
.goal-editor.compact-disclosure { padding:16px; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
@media (min-width:700px) { .compact-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:360px) {
  .compact-metrics .metric-card { gap:6px; padding:10px; grid-template-columns:1fr; }
  .compact-metrics .metric-icon { margin-bottom:2px; }
}
