:root{color-scheme:light;--border: #d9d5e3;--ink: #211a33;--muted: #6b6478;--brand: #330072;--brand-dark: #22004f;--brand-tint: #f1ecf8;--accent: #e21c21;--accent-dark: #b91419;--secondary: #045184;--bg: #f6f4fa}*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:var(--bg)}h1,h2,h3{font-family:Cormorant Garamond,Georgia,serif;font-weight:600;color:var(--brand)}.app-shell header{display:flex;align-items:center;gap:1.5rem;padding:.75rem 1.5rem;background:var(--brand);color:#fff}.app-shell .brand{font-family:Cormorant Garamond,Georgia,serif;font-weight:700;font-size:1.3rem;color:#fff;letter-spacing:.02em}.brand-mimir{font-family:MedievalSharp,Cormorant Garamond,Georgia,serif;font-size:1.6em;letter-spacing:.03em}.brand-ehr{font-size:.65em;letter-spacing:.08em;opacity:.85;margin-left:.15em}.app-shell nav{display:flex;gap:1.25rem}.app-shell nav a{color:#ffffffd9;text-decoration:none;font-size:.95rem}.app-shell nav a:hover{color:#fff;text-decoration:underline}.app-shell .spacer{flex:1}.nav-badge{display:inline-block;background:var(--accent-dark, #e21c21);color:#fff;border-radius:999px;font-size:.7rem;font-weight:600;padding:.05rem .45rem;margin-left:.35rem}.app-shell header .muted{color:#ffffffbf}.app-shell header button.link{color:#fff}.profile-menu{position:relative}.profile-trigger{width:34px;height:34px;padding:0;border-radius:50%;border:1px solid rgba(255,255,255,.5);background:#ffffff26;color:#fff;font-size:.75rem;font-weight:600;letter-spacing:.02em;display:flex;align-items:center;justify-content:center}.profile-trigger:hover{background:#ffffff47}.profile-dropdown{position:absolute;top:calc(100% + .4rem);right:0;background:#fff;border:1px solid var(--border);border-radius:6px;box-shadow:0 4px 16px #00000026;display:flex;flex-direction:column;min-width:200px;z-index:10;padding:.75rem .9rem;gap:.3rem}.profile-email{font-size:.85rem;color:var(--ink);font-weight:600;word-break:break-all}.profile-meta{font-size:.78rem;color:var(--muted);text-transform:capitalize;margin-bottom:.3rem}.profile-admin-links{display:flex;flex-direction:column;border-top:1px solid var(--border);margin:.2rem 0 .4rem;padding-top:.4rem;gap:.3rem}.profile-admin-links a{color:var(--secondary);text-decoration:none;font-size:.85rem}.profile-admin-links a:hover{text-decoration:underline}.profile-section-label{font-size:.78rem;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.03em}.profile-sublink{padding-left:.6rem}.app-shell header .profile-dropdown button.link{color:var(--secondary);align-self:flex-start}.app-shell main{max-width:1080px;margin:0 auto;padding:1.5rem}.centered{min-height:100vh;display:flex;align-items:center;justify-content:center}.card{background:#fff;border:1px solid var(--border);border-radius:8px;padding:1.25rem;margin-bottom:1rem}.card label,.filter-sidebar label:not(.filter-option){display:flex;flex-direction:column;gap:.25rem;margin-bottom:.75rem;font-size:.85rem;color:var(--muted)}.tasks-heading{margin-top:2rem}.note-section:not(:first-child){margin-top:1.5rem;padding-top:1.5rem;border-top:3px solid var(--brand)}.note-section-title{font-family:Cormorant Garamond,Georgia,serif;font-size:1.3rem;font-weight:700;color:var(--brand)}input,select,textarea,button{font:inherit;padding:.5rem .6rem;border:1px solid var(--border);border-radius:6px}button{cursor:pointer;background:#fff;color:var(--ink)}button:hover{background:var(--brand-tint)}button.primary{background:var(--accent);color:#fff;border-color:var(--accent)}button.primary:hover{background:var(--accent-dark);border-color:var(--accent-dark)}button.link{background:none;border:none;padding:0;color:var(--secondary);text-decoration:underline}button.link:hover{background:none}.link-back{background:none;border:none;color:var(--secondary);cursor:pointer;padding:0;margin-bottom:.5rem}table{width:100%;border-collapse:collapse;background:#fff}th,td{text-align:left;padding:.6rem .75rem;border-bottom:1px solid var(--border);font-size:.9rem}th{color:var(--brand);font-weight:600}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable:hover{color:var(--secondary)}.row{display:flex;gap:.5rem;align-items:center;margin-bottom:.5rem}.row-between{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.muted{color:var(--muted);font-size:.85rem}.error{color:var(--accent-dark);font-size:.85rem}.badge{padding:.15rem .5rem;border-radius:999px;font-size:.75rem;background:#eeeaf5;color:var(--ink)}.status-note_signed{background:#fff3cd}.status-charge_flagged{background:bisque}.status-billed{background:#d4e8ff}.status-paid{background:#d3f2dd}.chips{display:flex;gap:.4rem;flex-wrap:wrap;margin:.4rem 0}.chip{background:#eeeaf5;border-radius:999px;padding:.15rem .6rem;font-size:.8rem}button.chip{border:none;cursor:pointer;font-family:inherit}button.chip:disabled{opacity:.5;cursor:default}.chip.success{background:#e3f3e6;color:#1e6b30}.chip.warning{background:#fdeceb;color:var(--accent-dark)}.charge-form{border-top:1px solid var(--border);padding-top:.75rem}.intake-page{max-width:640px;margin:2rem auto;padding:0 1rem}.intake-consent-body{white-space:pre-wrap;max-height:50vh;overflow-y:auto;border:1px solid var(--border);border-radius:6px;padding:1rem;background:var(--brand-tint);font-size:.9rem;line-height:1.5}.signature-pad{width:100%;height:160px;border:1px dashed var(--border);border-radius:6px;background:#fff;touch-action:none;cursor:crosshair}.message-thread{display:flex;flex-direction:column;gap:.5rem;margin:.75rem 0;max-height:420px;overflow-y:auto}.message-bubble{max-width:70%;padding:.5rem .75rem;border-radius:10px;font-size:.9rem}.message-bubble.inbound{align-self:flex-start;background:var(--brand-tint)}.message-bubble.outbound{align-self:flex-end;background:var(--brand);color:#fff}.message-bubble.outbound .muted{color:#ffffffbf}.addenda{border-top:1px solid var(--border);margin-top:1rem;padding-top:.75rem}.addendum{background:var(--brand-tint);padding:.5rem;border-radius:6px}.schedule-grid-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:8px;background:#fff;margin-bottom:1.5rem}.schedule-grid{display:grid;min-width:600px}.grid-corner{border-bottom:1px solid var(--border)}.grid-provider-header{padding:.5rem;font-weight:600;color:var(--brand);text-align:center;border-bottom:1px solid var(--border);border-left:1px solid var(--border);background:var(--brand-tint);font-size:.85rem}.grid-time-label{font-size:.7rem;color:var(--muted);text-align:right;padding-right:.4rem;transform:translateY(-.6em)}.grid-cell{border-left:1px solid var(--border);border-top:1px solid #f0eef5}.grid-cell-hour{border-top:1px solid var(--border)}.grid-cell-clickable{cursor:pointer}.grid-cell-clickable:hover{background:var(--brand-tint)}.grid-cell-available{background:#e3f3e6}.grid-cell-available.grid-cell-clickable:hover{background:#cdeed4}.grid-appt{margin:1px 2px;padding:2px 5px;border-radius:4px;border-left:3px solid var(--type-accent, var(--secondary));background:var(--type-tint, #eaf3fa);overflow:hidden;cursor:pointer;font-size:.72rem;line-height:1.15}.grid-appt:hover{filter:brightness(.97)}.grid-provider-header.today{background:var(--brand);color:#fff}.grid-week-date{font-weight:400;font-size:.72rem;opacity:.8}.grid-suggested{margin:1px 2px;border-radius:4px;border:2px dashed var(--brand);background:var(--brand-tint);color:var(--brand);display:flex;align-items:center;justify-content:center;font-size:.68rem;font-weight:700;cursor:pointer}.grid-suggested:hover{filter:brightness(.95)}.grid-suggested.soonest{border-color:var(--secondary);color:var(--secondary);background:#eaf3fa}.type-MEDICAL_EVAL{--type-accent: #2c6cad;--type-tint: #e2edf7}.type-MEDICAL_FU{--type-accent: #5b9bd5;--type-tint: #eaf3fb}.type-MEDICAL_EVAL_TPI{--type-accent: #1f7a8c;--type-tint: #e1f1f3}.type-MEDICAL_FU_TPI{--type-accent: #3aafa9;--type-tint: #e3f6f4}.type-CHIRO_EVAL{--type-accent: #330072;--type-tint: #ece4f7}.type-CHIRO_FU{--type-accent: #7c4dbb;--type-tint: #f1e9f9}.type-TRAUMA_COUNSELING_EVAL{--type-accent: #b8860b;--type-tint: #fbf1d9}.type-TRAUMA_COUNSELING_FU{--type-accent: #d4a017;--type-tint: #fdf6e0}.type-PAIN_MANAGEMENT_CONSULTATION{--type-accent: #c0392b;--type-tint: #fbe6e3}.type-QEEG{--type-accent: #b83280;--type-tint: #f9e4f0}.type-IMAGING_REVIEW{--type-accent: #546174;--type-tint: #e8eaed}.type-TELEHEALTH_EVAL{--type-accent: #2e7d4f;--type-tint: #e2f3e8}.type-TELEHEALTH_FU{--type-accent: #6aa84f;--type-tint: #eaf6e6}.grid-appt-patient{font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.grid-appt-time{color:var(--muted);white-space:nowrap}.grid-appt-type{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.66rem}.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:3px;vertical-align:middle}.status-dot.scheduled{background:#9a94a8}.status-dot.checked_in,.status-dot.note_signed{background:#b8860b}.status-dot.charge_flagged{background:var(--secondary)}.status-dot.billed{background:var(--brand)}.status-dot.paid{background:#2e7d32}.consent-badge{color:#2e7d32;margin-left:3px;font-weight:700}.billed-badge{color:var(--brand);margin-left:3px;font-weight:700}.type-legend{display:flex;flex-wrap:wrap;gap:.5rem 1rem;margin:.75rem 0;font-size:.78rem}.type-swatch{display:inline-flex;align-items:center;gap:.35rem}.type-swatch .dot{width:10px;height:10px;border-radius:3px;display:inline-block;background:var(--type-accent)}.dashboard-layout{display:flex;gap:1.5rem;align-items:flex-start}.filter-sidebar{width:300px;flex-shrink:0;background:#fff;border:1px solid var(--border);border-radius:8px;padding:1rem;display:flex;flex-direction:column;gap:1.5rem}.filter-sidebar h3{color:var(--brand);font-size:1.05rem}.dashboard-main{flex:1;min-width:0}.filter-group{display:flex;flex-direction:column;gap:.4rem}.filter-group-header{display:flex;align-items:baseline;justify-content:space-between;gap:.5rem}.filter-group-label{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:600}.filter-group-actions{font-size:.72rem;white-space:nowrap}.filter-group-actions button{background:none;border:none;padding:0;margin:0;color:var(--secondary);cursor:pointer;font-size:inherit}.filter-group-actions button:hover{background:none;text-decoration:underline}.filter-options{display:flex;flex-direction:column;gap:.4rem}.filter-option{display:flex;align-items:center;gap:.4rem;font-size:.8rem;cursor:pointer}.filter-option input{width:auto;padding:0;margin:0;flex-shrink:0}.filter-dropdown{position:relative}.filter-dropdown-panel{position:absolute;top:calc(100% + .4rem);left:0;background:#fff;border:1px solid var(--border);border-radius:6px;box-shadow:0 4px 16px #00000026;padding:.75rem .9rem;min-width:220px;max-height:320px;overflow-y:auto;z-index:10}.filter-dropdown-panel .filter-group-actions{display:block;margin-bottom:.5rem}.filter-dropdown-panel .filter-options{gap:.5rem}@media (max-width: 720px){.dashboard-layout{flex-direction:column}.filter-sidebar{width:100%}}.schedule-title-row{display:flex;align-items:baseline;gap:.9rem;margin-bottom:.75rem}.schedule-title-row h2{margin:0}.bill-summary{display:flex;gap:2rem;margin:.75rem 0 .5rem}.bill-figure{display:flex;flex-direction:column}.bill-label{font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}.bill-amount{font-family:Cormorant Garamond,Georgia,serif;font-size:1.8rem;font-weight:600;color:var(--brand);font-variant-numeric:tabular-nums}.bill-amount.near{color:#b8860b}.bill-amount.over{color:var(--accent-dark)}.bill-track{height:8px;border-radius:5px;background:var(--brand-tint);overflow:hidden;margin-bottom:.5rem}.bill-fill{height:100%;background:var(--brand);border-radius:5px}.bill-fill.near{background:#b8860b}.bill-fill.over{background:var(--accent)}.availability-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.availability-weekday{font-size:.72rem;color:var(--muted);text-align:center;padding-bottom:.3rem;font-weight:600}.availability-day{display:flex;flex-direction:column;align-items:flex-start;gap:.15rem;min-height:56px;padding:.35rem .4rem;border:1px solid var(--border);border-radius:6px;background:#fff;text-align:left}.availability-day:hover{background:var(--brand-tint)}.availability-day-num{font-size:.8rem;color:var(--ink)}.availability-day-summary{font-size:.68rem;color:var(--secondary)}.availability-day.today .availability-day-num{font-weight:700;color:var(--accent-dark)}.availability-day.has-hours{border-color:var(--secondary)}.availability-day.selected{background:var(--brand)}.availability-day.selected .availability-day-num,.availability-day.selected .availability-day-summary{color:#fff}.suggested-times-panel{border-top:1px solid var(--border);margin-top:.75rem;padding-top:.75rem}.suggested-slot-list{display:flex;flex-direction:column;gap:.4rem}.suggested-slot{display:flex;justify-content:space-between;align-items:center;padding:.5rem .6rem;border:1px solid var(--border);border-radius:6px;gap:.5rem;flex-wrap:wrap}.suggested-slot-info{font-size:.85rem}.suggested-slot-meta{font-size:.75rem;color:var(--muted)}
