:root,html[data-theme="light"]{--primary:#51468e;--secondary:#41366f;--accent:#ffffff;--header-bg:#fff;--header-color:#343047;--header-link-color:#51468e;--body-bg:#f7f7fb;--body-fg:#343047;--body-quiet-color:#6d687e;--body-loud-color:#343047;--link-fg:#51468e;--link-selected-fg:#3e326e;--breadcrumbs-bg:#eeedf5;--breadcrumbs-fg:#6d687e;--breadcrumbs-link-fg:#51468e;--darkened-bg:#f0eff7;--hairline-color:#e7e4ef;--border-color:#dcd7e9;--selected-bg:#f3f1fa;--selected-row:#efebf8;--close-button-bg:#6d687e}
body{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px}#header{box-sizing:border-box;padding:22px 36px;border-bottom:1px solid #e5e1ef;gap:20px}#branding .restora-brand{display:flex;align-items:center;gap:13px;color:#51468e;font-size:25px;font-weight:650;letter-spacing:-.5px}.brand-logo{display:block;width:152px;height:auto;object-fit:contain;flex-shrink:0}.brand-subtitle{display:block;font-size:20px;letter-spacing:.2px;font-weight:550;color:#51468e;border-left:1px solid #e5e1ef;padding-left:18px}.brand-subtitle>span{display:block;font-size:17px;font-weight:400;color:#6d687e;margin-top:5px}#user-tools{font-size:12px;color:#6d687e}#user-tools a,#logout-form button{color:#51468e}.theme-toggle{display:none}#content{padding:28px 36px}#content>h1{font-size:23px;color:#51468e}.dashboard #content{width:auto}.portal-home{max-width:1450px}.welcome{position:relative;margin:0 0 27px}.welcome h1{font-size:32px;font-weight:650;letter-spacing:-.7px;margin:6px 0 9px}.welcome p{color:#6d687e;font-size:15px}.welcome .eyebrow{font-size:11px;font-weight:700;letter-spacing:2px;color:#51468e}.environment{display:inline-block;color:#775021;background:#fff2e4;border:1px solid #f5d6b0;padding:7px 10px;border-radius:6px;font-size:10px;letter-spacing:1px;margin-top:8px}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:26px}.metric{background:white;border:1px solid #e5e1ef;border-radius:12px;padding:21px 24px;box-shadow:0 3px 9px #51468e08}.metric>span{font-size:13px;color:#6d687e}.metric strong{display:block;font-size:38px;font-weight:550;color:#51468e;margin:8px 0}.metric small{color:#706980;font-size:12px}.home-grid{display:grid;grid-template-columns:minmax(280px, .85fr) minmax(380px,1.5fr);gap:24px}.home-panel{background:white;border:1px solid #e5e1ef;border-radius:12px;overflow:hidden}.panel-heading{padding:21px 23px;border-bottom:1px solid #eae7f1;display:flex;gap:12px;align-items:center;justify-content:space-between}.panel-heading h2{font-size:17px;color:#51468e;margin:0}.panel-heading>span{font-size:11px;color:#706980}.management-row{display:flex;align-items:center;justify-content:space-between;padding:19px 23px;border-bottom:1px solid #eeebf5;color:#51468e}.management-row:hover{background:#f4f1fa}.management-row strong{display:block;font-size:14px}.management-row small{display:block;margin-top:5px;font-size:12px;color:#706980}.management-row>span:last-child{font-size:22px;color:#51468e}.table-wrap{overflow:auto}.home-panel table{width:100%}.home-panel td,.home-panel th{padding:15px 17px;white-space:nowrap}.home-panel th{background:#f8f7fc;color:#6d687e;font-size:11px;font-weight:600}.home-panel td{font-size:12px}.record-status{background:#eeebfa;color:#51468e;border-radius:20px;padding:4px 8px;font-size:10px}.empty{padding:40px 30px;text-align:center;color:#6d687e}.empty-symbol{font-size:45px;color:#b8b0d4}.empty h3{color:#51468e;font-size:16px}.empty p{max-width:360px;margin:auto;line-height:1.65}.home-note{margin:24px 0;padding:18px 22px;border-radius:8px;background:#f0edf8;color:#63597d;font-size:13px;line-height:1.7}.restora-footer{padding:25px 36px;color:#706980;font-size:11px;border-top:1px solid #e5e1ef}.module{border-radius:8px;overflow:hidden}input[type=text],input[type=password],input[type=email],select,textarea{border-radius:6px;padding:9px 10px;font-size:14px}.button,input[type=submit],input[type=button],.submit-row input{border-radius:6px;padding:11px 17px}.login #container{width:min(480px,calc(100% - 32px));margin:8vh auto;border:1px solid #e5e1ef;border-radius:14px;box-shadow:0 18px 55px #51468e12;overflow:hidden}.login #header{padding:27px 30px}.login #content{padding:28px 30px}.login #content h1{font-size:23px}.login .login-intro{line-height:1.65;color:#6d687e}.login .login-notice{font-size:11px;padding:10px 12px;border-radius:5px;background:#fff2e4;color:#775021}.login .form-row label{font-size:13px}.login .form-row #id_username,.login .form-row #id_password{padding:12px;border-radius:6px}.login .submit-row{padding:15px 0 0}.login .submit-row input{width:100%;font-size:14px}.login .restora-footer{padding:18px 30px;font-size:10px}@media(max-width:1000px){.home-grid{grid-template-columns:1fr}.metrics{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){#header,#content{padding:20px 16px}.welcome h1{font-size:25px}.metrics{gap:10px}.metric{padding:16px}.metric strong{font-size:30px}.panel-heading{flex-wrap:wrap}}

/* Restora purple wordmark and orange wave; dark text maintains readable contrast. */
:root,html[data-theme="light"],html[data-theme="dark"],html[data-theme="auto"]{color-scheme:light;--primary:#51468e;--secondary:#41366f;--accent:#fff;--body-bg:#f7f7fb;--body-fg:#343047;--body-quiet-color:#6d687e;--body-loud-color:#343047;--header-bg:#fff;--header-color:#343047;--header-link-color:#51468e;--link-fg:#51468e;--link-selected-fg:#3e326e;--darkened-bg:#f0eff7;--breadcrumbs-bg:#eeedf5;--breadcrumbs-fg:#6d687e;--breadcrumbs-link-fg:#51468e;--border-color:#dcd7e9;--hairline-color:#e7e4ef;--selected-bg:#f3f1fa;--selected-row:#efebf8;--button-bg:#51468e;--button-hover-bg:#41366f;--default-button-bg:#51468e;--default-button-hover-bg:#41366f;--error-fg:#a6203b}
#header{border-top:4px solid #faaa55}.metric{border-top:3px solid #51468e}.metric:last-child{border-top-color:#faaa55}.home-note{border-left:3px solid #faaa55}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #a26825;outline-offset:3px}.login #header{justify-content:center}.login #branding .restora-brand{gap:18px}.login .brand-logo{width:160px}@media(max-width:600px){#branding .restora-brand{gap:12px}.brand-logo,.login .brand-logo{width:132px}.brand-subtitle{padding-left:12px;font-size:18px}.brand-subtitle>span{font-size:16px}}

@media(max-width:600px){.login #header{padding:22px 16px}.login #branding .restora-brand{gap:12px}}
@media(max-width:380px){.brand-logo,.login .brand-logo{width:104px}}
.activation-panel{max-width:820px;background:white;border:1px solid #e5e1ef;border-radius:12px;padding:28px;box-shadow:0 3px 9px #51468e08}.activation-panel p{line-height:1.7}.activation-handoff{background:#f4f1fa;border-left:4px solid #faaa55;padding:20px 24px;margin:24px 0;border-radius:6px}.activation-handoff code{display:block;color:#41366f;font-size:24px;letter-spacing:2px;font-weight:700;overflow-wrap:anywhere;user-select:all}.activation-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}.activation-actions button{border:0;border-radius:6px;background:#51468e;color:white;padding:12px 18px;cursor:pointer;font-size:14px}.activation-actions .secondary{background:#eeebf8;color:#51468e}@media(max-width:600px){.activation-panel{padding:18px}.activation-handoff{padding:16px}.activation-handoff code{font-size:19px;letter-spacing:1px}}

/* Patient details: roomy contact fields and one clear update action. */
.model-patient.change-form #id_name,.model-patient.change-form #id_email,.model-patient.change-form #id_phone{width:640px;max-width:100%;min-width:0;box-sizing:border-box;flex:1}
.model-patient.change-form .field-contact_version{display:none}
.patient-page-heading{display:flex;align-items:center;flex-wrap:wrap;gap:20px;margin:0 0 24px}.patient-page-heading h1{margin:0;color:#51468e;font-size:28px}.patient-secondary,a.patient-secondary:link,a.patient-secondary:visited{display:inline-block;background:#eeebf8;color:#51468e;text-decoration:none;border-radius:6px;padding:11px 17px}
.patient-inline-activation{box-sizing:border-box;max-width:900px;margin:24px 0}.patient-inline-activation h2{margin:0;color:#51468e;font-size:20px}.patient-inline-activation [hidden]{display:none!important}.patient-inline-activation button:disabled{opacity:.6;cursor:wait}
.patient-submit-row{display:flex;align-items:center;justify-content:flex-start;gap:12px}.patient-submit-row input{float:none;margin:0}
@media(max-width:767px){.model-patient.change-form #id_name,.model-patient.change-form #id_email,.model-patient.change-form #id_phone{width:100%;flex:auto}.patient-page-heading{align-items:flex-start;flex-direction:column;gap:14px}.patient-inline-activation{max-width:100%}}

/* Readable patient details, with profile actions directly below the fields. */
.model-patient.change-form #content{font-size:18px;line-height:1.5}
.model-patient.change-form #content p,.model-patient.change-form .form-row,.model-patient.change-form .form-row label,.model-patient.change-form .form-row .readonly,.model-patient.change-form .help{font-size:18px;line-height:1.5}
.model-patient.change-form #patient_form input:not([type=hidden]),.model-patient.change-form #patient_form button,.model-patient.change-form #content .button{font-size:18px;line-height:1.4}
.model-patient.change-form .patient-inline-activation h2{font-size:24px}
.model-patient.change-form .patient-submit-row{flex-wrap:wrap;margin:20px 0 24px}
.model-patient.change-form .activation-handoff code{font-size:28px}

/* One profile card encloses fields and actions; navigation aligns to its edge. */
.model-patient.change-form .patient-page-heading{width:100%;max-width:900px;box-sizing:border-box;justify-content:space-between}
.model-patient.change-form .patient-back{margin-left:auto;text-align:center}
.patient-profile-panel{box-sizing:border-box;width:100%;max-width:900px;background:#fff;border:1px solid #dcd7e9;border-radius:12px;padding:24px;box-shadow:0 3px 9px #51468e08}
.patient-profile-panel .module{background:transparent;border:0;margin-bottom:0;border-radius:0;overflow:visible}
.model-patient.change-form .patient-profile-panel .patient-submit-row{background:transparent;border:0;border-radius:0;padding:20px 0 0;margin:0;gap:16px}
.model-patient.change-form .patient-submit-row input[type=submit],.model-patient.change-form .patient-submit-row .patient-secondary{box-sizing:border-box;min-width:180px;min-height:52px;padding:12px 28px;text-align:center;font-weight:600;border:2px solid #51468e}
.model-patient.change-form .patient-submit-row .patient-secondary{background:#fff;color:#51468e}
.model-patient.change-form .patient-submit-row .patient-secondary:hover{background:#eeebf8}
@media(max-width:767px){.patient-profile-panel{padding:18px}.model-patient.change-form .patient-page-heading{align-items:stretch}.model-patient.change-form .patient-back{align-self:flex-end}.model-patient.change-form .patient-submit-row input[type=submit],.model-patient.change-form .patient-submit-row .patient-secondary{flex:1;min-width:0;padding:12px 16px}}

.patient-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-left:auto;flex-wrap:wrap}
.model-patient.change-form .patient-heading-actions .patient-back{margin-left:0}
.patient-inline-history{box-sizing:border-box;width:100%;max-width:900px;margin:24px 0;scroll-margin-top:24px}
.patient-inline-history h2{font-size:24px;color:#51468e;margin:0}.patient-inline-history table{width:100%}.patient-inline-history th,.patient-inline-history td{font-size:18px;line-height:1.5;padding:12px 14px;vertical-align:top;overflow-wrap:anywhere}.patient-inline-history th{background:#eeedf5;color:#51468e}.patient-inline-history td:first-child{min-width:150px}
.patient-history-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:20px}.patient-history-navigation button{padding:10px 18px;border:1px solid #51468e;border-radius:6px;background:#fff;color:#51468e;cursor:pointer}.patient-history-navigation button:disabled{opacity:.45;cursor:default}
@media(max-width:767px){.patient-heading-actions{align-self:flex-end;max-width:100%}.patient-inline-history{padding:18px}.patient-history-navigation{justify-content:center}}

.model-patient.change-form .field-activation_status .readonly{box-sizing:border-box;width:640px;max-width:100%;min-height:48px;padding:12px 14px;border:1px solid #c9c5d3;border-radius:6px;background:#f4f3f7;color:#333;line-height:1.4;cursor:default}

/* Identical field geometry for editable contact values and read-only status. */
.model-patient.change-form #id_name,.model-patient.change-form #id_email,.model-patient.change-form #id_phone,.model-patient.change-form .field-activation_status .readonly{box-sizing:border-box;flex:1;min-width:0;width:640px;max-width:100%;height:48px;min-height:48px;margin:0;padding:10px 12px;border:1px solid #c9c5d3;border-radius:6px;font-size:18px;line-height:26px}
.model-patient.change-form .field-activation_status .readonly{overflow:auto;white-space:nowrap}
@media(max-width:767px){.model-patient.change-form #id_name,.model-patient.change-form #id_email,.model-patient.change-form #id_phone,.model-patient.change-form .field-activation_status .readonly{width:100%;flex:auto}}
.sleep-calendar{box-sizing:border-box;max-width:900px;margin:24px 0}.calendar-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.calendar-heading h2{font-size:24px;color:#51468e;margin:0}.calendar-heading button{width:48px;height:48px;border:1px solid #c9c5d3;border-radius:8px;background:#fff;color:#51468e;font-size:30px;cursor:pointer}.calendar-weekdays,.calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.calendar-weekdays{text-align:center;margin-bottom:10px;font-size:16px;color:#6d687e}.calendar-days button{min-height:64px;border:3px solid transparent;border-radius:8px;background:#f0eff4;color:#343047;font-size:20px;cursor:pointer}.calendar-days button.has-recordings{background:#d5ecdc;color:#214e34;font-weight:650}.calendar-days button[aria-pressed=true]{border-color:#51468e}.calendar-days button[aria-current=date]{text-decoration:underline;text-underline-offset:5px}.calendar-legend{font-size:16px!important;display:flex;align-items:center;gap:8px}.calendar-legend span{display:inline-block;width:18px;height:18px;border-radius:4px;background:#d5ecdc;flex-shrink:0}#sleep-calendar[hidden],#selected-recordings[hidden],#recording-fallback[hidden]{display:none}@media(max-width:600px){.calendar-days,.calendar-weekdays{gap:4px}.calendar-days button{min-height:46px;padding:4px;font-size:18px}.calendar-weekdays{font-size:13px}.calendar-heading h2{font-size:21px}}

/* Three compact months share the same right edge as page navigation. */
.sleep-data-heading{width:100%;max-width:900px;box-sizing:border-box}
.sleep-calendar{padding:20px;width:100%}.calendar-months{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.calendar-mini-month{min-width:0}.calendar-mini-month h3{margin:0 0 14px;text-align:center;font-size:18px;color:#51468e}.calendar-mini-month .calendar-weekdays{font-size:12px;gap:3px}.calendar-mini-month .calendar-days{gap:3px}.calendar-mini-month .calendar-days button{min-height:34px;padding:2px;font-size:16px;border-width:2px;border-radius:5px}.sleep-calendar .calendar-heading{margin-bottom:18px}.sleep-calendar .calendar-heading h2{font-size:20px}.sleep-calendar .calendar-heading button{height:40px;width:40px;flex-shrink:0}.sleep-calendar .calendar-legend{font-size:14px!important;margin-bottom:0}
@media(max-width:760px){.calendar-months{grid-template-columns:1fr;gap:24px}.calendar-mini-month .calendar-days button{min-height:36px}.sleep-calendar .calendar-heading h2{font-size:17px}.calendar-mini-month .calendar-weekdays{font-size:14px}}

.calendar-view-toggle{display:flex;justify-content:flex-end;gap:0;margin-bottom:16px}.calendar-view-toggle button{padding:9px 16px;border:1px solid #51468e;background:#fff;color:#51468e;font-size:16px;cursor:pointer}.calendar-view-toggle button:first-child{border-radius:6px 0 0 6px}.calendar-view-toggle button:last-child{border-radius:0 6px 6px 0}.calendar-view-toggle button[aria-pressed=true]{background:#51468e;color:#fff}.calendar-months.single-month{grid-template-columns:minmax(0,1fr);max-width:400px;margin:0 auto}.calendar-months.single-month h3{display:none}.calendar-months.single-month .calendar-days button{min-height:38px}
.recording-cards{display:grid;gap:12px}.recording-card,.review-button,.review-toolbar button{border:1px solid #bcb4d0;background:#fff;color:#51468e;border-radius:8px;padding:12px 16px;font-size:17px;cursor:pointer}.recording-card{text-align:left;box-shadow:0 2px 6px #51468e12}.recording-card:hover{background:#f1eef8}.recording-review{max-width:1200px;box-sizing:border-box;margin:24px 0;padding:24px;border:1px solid #dcd7e9;border-radius:12px;background:#fff;box-shadow:0 3px 9px #51468e08;scroll-margin-top:16px}.recording-review[hidden],#review-loaded[hidden]{display:none}.review-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.review-title-row h2{color:#51468e;font-size:26px;margin:0}.recording-review p{font-size:17px;line-height:1.5}.review-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:14px 0}.review-toolbar label{display:flex;align-items:center;gap:8px;font-size:17px}.review-toolbar input{width:22px;height:22px;accent-color:#51468e}.review-toolbar button:disabled{opacity:.4;cursor:default}.zoom-toolbar{justify-content:flex-start}.zoom-toolbar button{font-size:16px;padding:9px 12px}.chart-cursor{white-space:pre-line;background:#f4f1fa;padding:10px 14px;border-radius:8px;min-height:50px}#recording-canvas{display:block;width:100%;height:628px;touch-action:pan-y}.recording-review .chart-help{font-size:14px;color:#6d687e}.review-summary{width:100%;margin-top:16px}.review-summary th,.review-summary td{font-size:17px;padding:12px}.review-summary th{background:#eeedf5;color:#51468e}@media(max-width:600px){.recording-review{padding:12px}.review-toolbar label{font-size:15px}.review-title-row h2{font-size:22px}.review-summary th,.review-summary td{font-size:15px;padding:8px}.review-summary{min-width:380px}}
.review-toolbar:not(.zoom-toolbar){display:grid;grid-template-columns:40px minmax(0,1fr) minmax(0,1fr) 40px;gap:10px}.review-toolbar:not(.zoom-toolbar)>button{padding:10px 0}.review-toolbar:not(.zoom-toolbar)>label{justify-content:center}.review-toolbar input{flex-shrink:0}@media(max-width:600px){.review-toolbar:not(.zoom-toolbar){gap:6px}.review-toolbar:not(.zoom-toolbar)>label{font-size:13px;gap:5px}}

.model-study.change-form .patient-page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.model-study.change-form .patient-page-heading h1{font-size:28px}
.model-study.change-form .patient-profile-panel input[type=text],.model-study.change-form .patient-profile-panel textarea{box-sizing:border-box;width:100%;max-width:600px;font-size:18px;padding:12px}
.model-study.change-form .patient-profile-panel .readonly{font-size:18px;padding:12px;background:#f3f1f7;border:1px solid #dcd7e9;border-radius:6px;max-width:574px}
.model-study.change-form .patient-submit-row{background:transparent;border:0;margin:20px 0 0;padding:0;flex-wrap:wrap}
.model-study.change-form .patient-submit-row input,.model-study.change-form .patient-submit-row a{box-sizing:border-box;min-width:180px;padding:12px 28px;min-height:52px;border:2px solid #51468e;text-align:center;font-size:18px}
.model-study.change-form .patient-submit-row a{background:#fff;color:#51468e}
.study-patients{margin:24px 0}.study-patients table{width:100%}.study-patients td,.study-patients th{font-size:18px;padding:14px}

.chart-timestamp-row{position:relative;height:38px;width:100%;margin:8px 0 0}#chart-timestamp{position:absolute;top:0;white-space:nowrap;background:#51468e;color:#fff;border-radius:6px;padding:6px 10px;font-size:16px;font-weight:600;line-height:22px}

.study-list-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}.study-list-heading h1{font-size:28px;margin:0}.study-list-heading .button{font-size:18px;padding:12px 22px}.study-dashboard table{width:100%}.study-dashboard th,.study-dashboard td{font-size:18px;padding:16px;vertical-align:top}.study-dashboard th{background:#eeedf5;color:#51468e}.study-dashboard td:nth-child(3){max-width:600px;overflow-wrap:anywhere}

.model-study.change-form .study-detail-heading{box-sizing:border-box;width:100%;max-width:900px}.study-detail-actions{display:flex;justify-content:flex-end;gap:12px;flex-wrap:wrap;margin-left:auto}.study-detail-actions .button{font-size:18px;padding:12px 18px;text-align:center}.model-study.change-form .study-patients{box-sizing:border-box;max-width:900px}

.study-definition{position:relative}.study-definition-values{margin:0;padding-right:52px}.study-definition-values dt{font-size:16px;font-weight:600;color:#6d687e;margin-top:18px}.study-definition-values dt:first-child{margin-top:0}.study-definition-values dd{margin:6px 0 0;font-size:18px;line-height:1.5;overflow-wrap:anywhere}.study-edit-icon{position:absolute;right:16px;top:16px;display:flex;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid #cec8e2;border-radius:8px;background:#eeedf5;color:#51468e;cursor:pointer}
#study-edit-dialog{box-sizing:border-box;width:720px;max-width:calc(100vw - 32px);max-height:calc(100vh - 40px);padding:0;border:1px solid #dcd7e9;border-radius:14px;box-shadow:0 12px 48px #24203444;background:#fff;color:#343047}
#study-edit-dialog::backdrop{background:#24203466}.study-dialog-title{background:#eeedf5;padding:20px 24px}.study-dialog-title h2{margin:0;font-size:24px;color:#51468e}.study-dialog-body{padding:24px}.study-dialog-body .module{background:transparent}.study-dialog-body input[type=text],.study-dialog-body textarea{box-sizing:border-box;width:100%;max-width:100%;font-size:18px}.study-dialog-body textarea{height:160px}.study-dialog-body .patient-submit-row button{box-sizing:border-box;min-width:180px;min-height:52px;border:2px solid #51468e;border-radius:6px;background:#fff;color:#51468e;font-size:18px;padding:12px 28px;cursor:pointer}

.model-study.change-form .study-definition,.model-study.change-form .study-patients{padding:0;overflow:hidden;border-radius:12px}
.model-study.change-form .study-card-title{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;box-sizing:border-box;padding:16px 24px;background:#eeedf5;border-bottom:1px solid #dcd7e9}
.model-study.change-form .study-card-title h2{margin:0;padding:0;background:transparent;color:#51468e;font-size:22px;font-weight:600}
.model-study.change-form .study-card-title .study-edit-icon{position:static;flex-shrink:0}
.model-study.change-form .study-card-title .button{margin-left:auto;padding:11px 18px;font-size:18px}
.model-study.change-form .study-definition-values{padding:24px}
.model-study.change-form .study-definition-values dd{box-sizing:border-box;min-height:48px;border:1px solid #cec8dc;border-radius:6px;background:#faf9fc;padding:12px 14px}
.model-study.change-form .study-patients-body{padding:8px 24px 24px}
@media(max-width:600px){.model-study.change-form .study-card-title{padding:14px 18px}.model-study.change-form .study-definition-values{padding:18px}.model-study.change-form .study-patients-body{padding:8px 18px 18px}}

.model-study.change-form .study-definition .study-card-title{background:#e5f0f8;border-bottom-color:#cedeea}
.model-study.change-form .study-patients .study-card-title{background:#f5eedf;border-bottom-color:#e6dcc8}

.patient-activation-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;font-size:18px;font-weight:700;margin-right:7px;vertical-align:middle;line-height:1}.patient-activation-icon.activated{color:#237248;background:#e2f3e9;border:1px solid #91c6a8}.patient-activation-icon.not-activated{color:#686b73;background:#f0f1f3;border:1px solid #bfc3cb}

.model-patient.change-list #content>h1{font-size:28px}
.model-patient.change-list #result_list th,.model-patient.change-list #result_list td{font-size:18px;line-height:1.5;padding:14px 16px}
.model-patient.change-list #result_list thead th .text a,.model-patient.change-list #result_list thead th .text span{font-size:18px}
.model-patient.change-list #changelist-search input,.model-patient.change-list #changelist-search label,.model-patient.change-list #changelist .paginator,.model-patient.change-list #changelist .small{font-size:17px}

#study-edit-dialog label,#study-edit-dialog .readonly,.profile-edit-dialog label{font-size:18px;line-height:1.5}
.patient-definition{position:relative}.patient-definition-values{margin:0;padding-right:46px}.patient-definition-values dt{font-size:18px;font-weight:600;margin-top:18px}.patient-definition-values dt:first-child{margin-top:0}.patient-definition-values dd{box-sizing:border-box;margin:6px 0 0;padding:12px 14px;min-height:48px;border:1px solid #cec8dc;border-radius:6px;background:#faf9fc;font-size:18px;overflow-wrap:anywhere}
.model-patient.change-form .patient-definition-values .field-activation_status .readonly{width:auto;min-height:0;padding:0;border:0;background:transparent}
.profile-edit-dialog{box-sizing:border-box;width:720px;max-width:calc(100vw - 32px);max-height:calc(100vh - 40px);padding:0;border:1px solid #dcd7e9;border-radius:14px;box-shadow:0 12px 48px #24203444;background:#fff;color:#343047}.profile-edit-dialog::backdrop{background:#24203466}.profile-dialog-field{margin-bottom:18px}.profile-dialog-field label{display:block;font-weight:600;margin-bottom:6px}
.model-patient.change-form .profile-edit-dialog input:not([type=hidden]):not([type=submit]){box-sizing:border-box;width:100%;max-width:100%;font-size:18px;padding:12px;border:1px solid #cec8dc;border-radius:6px}

.recording-distributions{margin-top:28px;border-top:1px solid #dcd7e9;padding-top:12px}.recording-distributions h3{font-size:22px;color:#51468e;margin:24px 0 12px}.distribution-chart{overflow-x:auto}.distribution-chart svg{display:block;width:100%;min-width:560px;height:auto;background:#fafbfd;border:1px solid #e2e4ec;border-radius:8px;box-sizing:border-box}.distribution-chart [role=button]{cursor:pointer}.distribution-chart [role=button]:focus{outline:2px solid #343047}.distribution-selection{font-size:16px!important;color:#506468;min-height:24px}.distribution-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:17px;margin:8px 0 14px}.time-legend{color:#007c78}.event-legend{color:#6862ac}.odi3-legend{color:#4674be}.odi4-legend{color:#b95c16}

#user-tools.portal-user-tools{margin-left:auto;overflow:visible}.account-menu{position:relative;text-align:left;text-transform:none;letter-spacing:normal;font-size:17px}.account-menu>summary{display:flex;align-items:center;justify-content:center;list-style:none;width:48px;height:48px;box-sizing:border-box;border:1px solid #cec8e2;border-radius:50%;background:#eeedf5;color:#51468e;cursor:pointer}.account-menu>summary::-webkit-details-marker{display:none}.account-menu>summary:focus-visible{outline:3px solid #a26825;outline-offset:3px}.account-menu-panel{position:absolute;right:0;top:calc(100% + 8px);z-index:1000;width:240px;max-width:calc(100vw - 32px);box-sizing:border-box;border:1px solid #dcd7e9;border-radius:12px;box-shadow:0 6px 24px #24203425;background:#fff;padding:8px;overflow:hidden}.account-menu-panel>strong{display:block;padding:12px;color:#343047;overflow-wrap:anywhere;border-bottom:1px solid #e7e4ef}#user-tools .account-menu-panel a,#user-tools .account-menu-panel button{display:block;box-sizing:border-box;width:100%;text-align:left;padding:12px;border:0;border-radius:6px;background:transparent;color:#51468e;font:inherit;text-decoration:none;cursor:pointer}#user-tools .account-menu-panel a:hover,#user-tools .account-menu-panel button:hover{background:#eeedf5}.account-menu-panel form{margin:0}.account-details .patient-definition-values{padding-right:0}.restora-footer time{white-space:nowrap}

#user-tools.portal-user-tools{display:flex;align-items:center;justify-content:flex-end;gap:12px;text-transform:none;letter-spacing:normal}.account-welcome{font-size:16px;line-height:1.4;color:#343047;text-align:right}.account-welcome strong{overflow-wrap:anywhere}.portal-user-tools .account-menu{flex-shrink:0}

.calendar-days button.duration-level-0,.calendar-legend .duration-level-0{background:#e4f3e9;color:#214e34}.calendar-days button.duration-level-1,.calendar-legend .duration-level-1{background:#bce0c8;color:#214e34}.calendar-days button.duration-level-2,.calendar-legend .duration-level-2{background:#8bc7a0;color:#163d26}.calendar-days button.duration-level-3,.calendar-legend .duration-level-3{background:#43875b;color:#fff}.calendar-days button.duration-level-4,.calendar-legend .duration-level-4{background:#24643c;color:#fff}.calendar-legend.duration-legend{flex-wrap:wrap;gap:6px}.calendar-legend .duration-key{display:inline-flex;align-items:center;justify-content:center;width:auto;height:auto;min-width:44px;padding:5px 8px;font-size:14px}.calendar-duration-note{font-size:14px!important;color:#6d687e;margin-bottom:0}.calendar-days button.has-recordings:not([class*="duration-level"]){background:#f0eff4;color:#343047}

.calendar-with-legend{display:flex;align-items:flex-start;gap:24px;max-width:1120px}.calendar-with-legend .sleep-calendar{flex:1;min-width:0}.calendar-side-legend{flex:0 0 150px;margin-top:24px;padding-top:12px}.calendar-side-legend h3{font-size:17px;color:#51468e;margin:12px 0}.calendar-side-legend .duration-legend{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.calendar-side-legend .duration-key{min-width:72px}.odi-key{display:flex;align-items:center;gap:8px;font-size:15px!important;margin:8px 0}.odi-key span{display:inline-block;width:32px;height:7px;border-radius:3px;border:1px solid #7b6d4744}.odi-low{background:#f7de83}.odi-medium{background:#ee942e}.odi-high{background:#d83d39}.calendar-days button{position:relative}.calendar-date-digit{display:block;line-height:1.2}.calendar-odi-bar{display:block;height:5px;width:70%;max-width:38px;margin:3px auto 0;border-radius:3px;box-shadow:0 0 0 1px #ffffff99}.calendar-with-legend .single-month{max-width:400px}@media(max-width:600px){.calendar-with-legend{gap:10px}.calendar-side-legend{flex-basis:92px}.calendar-side-legend h3{font-size:14px}.calendar-side-legend .duration-key{min-width:52px;font-size:12px}.odi-key{font-size:12px!important;gap:4px}.odi-key span{width:18px}.calendar-with-legend .sleep-calendar{padding:10px}.calendar-with-legend .calendar-view-toggle button{font-size:13px;padding:8px}.calendar-with-legend .calendar-heading{gap:4px}.calendar-with-legend .calendar-heading button{width:28px;height:34px}.calendar-with-legend .calendar-heading h2{font-size:14px}.calendar-odi-bar{width:75%;height:4px}}

.recording-timeline-scroll{overflow-x:auto;padding:6px 8px 10px}.recording-timeline{min-width:640px;padding:0 2px}.recording-time-axis{position:relative;height:30px;margin-bottom:4px;color:#6d687e;font-size:14px}.recording-time-axis span{position:absolute;transform:translateX(-50%);white-space:nowrap}.recording-time-axis .first-tick{transform:none}.recording-time-axis .last-tick{transform:translateX(-100%)}.recording-time-track{position:relative;height:48px;margin-bottom:8px;background:#f0eff7;border-radius:6px}.recording-time-grid{position:absolute;top:0;bottom:0;border-left:1px solid #d8d4e3;pointer-events:none}.recording-time-bar{position:absolute;top:5px;height:38px;min-width:3px;box-sizing:border-box;padding:0 4px;border:0;border-radius:5px;background:#43875b;color:#fff;font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.recording-time-bar:hover{background:#24643c}.recording-time-bar[aria-pressed=true]{background:#51468e;box-shadow:0 0 0 2px #faaa55}.recording-time-bar:focus-visible{outline:3px solid #a26825;outline-offset:2px}.recording-timeline-note{font-size:14px!important;color:#6d687e;margin:4px 0 0}

.recording-time-track{background:#faf9fc}.recording-time-grid{border-left-color:#e9e6ef}.recording-time-bar{height:44px;top:25px;padding:0;background:#e5f1e9;color:#214e34;box-shadow:inset 0 0 0 1px #a9cbb5}.recording-time-track{height:72px}.recording-time-bar:hover{background:#d5e9dd}.recording-time-bar[aria-pressed=true]{background:#ede8f6;color:#51468e;box-shadow:inset 0 0 0 2px #8674ad}.recording-bar-label{position:absolute;top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;line-height:19px;font-size:14px;color:#514b60;pointer-events:none}.recording-event-strip{position:absolute;inset:0;pointer-events:none;overflow:hidden}.recording-odi-event{position:absolute;top:0;bottom:0;width:2px;pointer-events:none}.event-odi3{background:rgba(149,86,187,.45)}.event-odi4{background:rgba(216,61,57,.45)}.recording-event-legend{display:flex;gap:20px;flex-wrap:wrap;margin:4px 0;font-size:15px!important;color:#514b60}.recording-event-legend>span{display:inline-flex;align-items:center;gap:7px}.recording-event-legend i{display:inline-block;width:18px;height:10px;border-radius:2px}
