/* Independent columns keep clinical history next to the working notes. */
.endo-clinical-column{min-width:0;display:flex;flex-direction:column;gap:12px}
.endo-note-history{grid-column:auto}
.endo-note-body{padding:12px}
.et-tools-header{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:0 0 12px}
.et-tools-header h2{font-size:19px;font-weight:650;letter-spacing:-.3px}
.et-tools-header p{font-size:12px;color:var(--muted);margin-top:4px}
.et-picker{display:grid;grid-template-columns:1.3fr 1fr 1fr;padding:4px;gap:3px;background:var(--surface,#fff);border:1px solid var(--line);border-radius:12px;margin-bottom:12px}
.et-picker button{border:0;border-radius:8px;background:transparent;color:var(--muted);font:inherit;font-size:13px;font-weight:550;line-height:1.3;padding:11px 6px;cursor:pointer}
.et-picker button[aria-pressed=true]{background:var(--teal-soft,#e7f2f1);color:var(--teal);box-shadow:0 1px 3px #09214a08}
.et-picker button:focus-visible,.et-panel button:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
.et-panel{min-width:0}
.et-heading{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;margin-bottom:10px}
.et-heading h3{font-size:20px;letter-spacing:-.4px;font-weight:600}
.et-heading p,.et-hint{font-size:12px;color:var(--muted);line-height:1.6;margin:5px 0}
.et-heading .btn{flex-shrink:0}
.et-card{border:1px solid var(--line);border-radius:13px;background:var(--surface,#fff);padding:12px;margin-bottom:10px;min-width:0}
.et-card h4{font-size:14px;font-weight:600;margin:0 0 10px}
.et-panel input,.et-panel select{min-width:0;max-width:100%;font-size:15px;min-height:42px;padding:8px 10px;border:1px solid var(--line);background:var(--bg,#f6f8f9);color:var(--ink);border-radius:8px;width:100%}
.et-panel label{font-size:12px;line-height:1.5;color:var(--muted);display:block;min-width:0}
.et-panel label input,.et-panel label select{margin-top:4px}
.et-two{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
.et-form-head,.et-chart-controls,.et-actions,.eg-row-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.et-form-head{justify-content:space-between}
.et-actions{justify-content:flex-end;margin-top:12px}
.et-thyroid-field{border-top:1px solid var(--line);padding:7px 0}
.et-thyroid-main{display:grid;grid-template-columns:1fr 115px 90px;align-items:center;gap:8px}
.et-thyroid-main>label{color:var(--ink);font-size:14px;font-weight:550}
.et-thyroid-field details{margin-top:5px}
.et-thyroid-field summary{font-size:11px;color:var(--muted);cursor:pointer;list-style:none}
.et-thyroid-field summary::before{content:'＋ ';color:var(--teal)}
.et-thyroid-field details[open] summary::before{content:'− '}
.et-thyroid-field details input{margin-top:6px}
.et-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.et-metric{background:var(--surface,#fff);border:1px solid var(--line);border-radius:11px;padding:9px 11px}
.et-metric>span{font-size:12px;color:var(--muted)}
.et-metric strong{display:block;font-size:22px;letter-spacing:-.5px;line-height:1.35}
.et-metric strong small{font-size:11px;font-weight:400;letter-spacing:0}
.et-metric>small{font-size:11px;line-height:1.6;color:var(--muted);display:block}
.et-chart{min-width:0;margin:10px 0 0}
.et-chart svg{display:block;width:100%;height:auto}
.et-chart svg text{font-family:inherit;fill:var(--muted,#758297);font-size:13px}
.et-grid{stroke:var(--line,#e2e9ec);stroke-width:1}
.et-line{fill:none;stroke:var(--teal,#187781);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.et-measured{stroke-dasharray:5 5}
.et-dot{fill:var(--surface,#fff);stroke:var(--teal,#187781);stroke-width:2.5}
.et-insulin-dot{fill:#9b7693}
.et-chart-controls{justify-content:space-between}
.et-chart-controls label{flex:1;min-width:90px}
.et-chart-controls select{font-size:13px}
.et-empty{padding:25px 12px;text-align:center;color:var(--muted);font-size:13px;line-height:1.7}
.et-table-wrap{overflow:auto;max-width:100%;overscroll-behavior:contain}
.et-table{border-collapse:collapse;width:100%;font-size:12px;font-variant-numeric:tabular-nums}
.et-table caption{text-align:left;font-size:11px;color:var(--muted);padding:6px 0 10px}
.et-table th,.et-table td{padding:10px 9px;border-bottom:1px solid var(--line);text-align:right;white-space:nowrap}
.et-table th:first-child{text-align:left}
.et-table thead th{font-weight:550;color:var(--muted);font-size:11px}
.et-table small{display:block;font-size:10px;color:var(--muted);margin-top:3px}
.et-table tr.selected{background:var(--teal-soft,#e7f2f1)}
.et-table .btn{font-size:12px;padding:5px 0}
.et-day-picker{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:12px 0}
.et-day-picker input{width:auto;min-width:0;text-align:center;font-weight:550}
.et-day-picker .btn{flex-shrink:0}
.eg-row{padding:10px 0;border-bottom:1px solid var(--line)}
.eg-row:last-child{border-bottom:0}
.eg-row-heading{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:9px}
.eg-row-heading strong{font-size:14px;font-weight:600}
.eg-state{font-size:10px;color:var(--muted)}
.eg-state.pending{color:#9a691d}
.eg-readings{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.eg-readings label small,.eg-insulin label small{font-size:10px}
.eg-row-actions{margin-top:8px}
.eg-row-actions .btn{font-size:13px;padding:8px 10px;min-height:42px}
.eg-row-actions .icon{width:15px;height:15px}
.eg-spacer{flex:1}
.eg-insulin{display:grid;grid-template-columns:1fr 1fr;gap:9px;background:var(--bg,#f6f8f9);padding:10px;border-radius:9px;margin-top:10px;border:1px solid var(--line)}
.eg-insulin-kind,.eg-insulin-name{grid-column:1/-1}
.eg-insulin>.btn{justify-self:start;font-size:11px;padding:4px 0}
.eg-insulin-name[hidden]{display:none}
.eg-row-message{font-size:12px;line-height:1.6;margin-top:7px;color:#a04938}
.eg-row-message:empty{display:none}
.et-link-ready{margin-top:10px;padding:12px;background:var(--teal-soft,#e7f2f1);border-radius:10px}
.et-link-ready input{font-size:12px;margin:8px 0}
.et-link-list{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.et-detail>summary{cursor:pointer;color:var(--teal);font-size:13px;padding:8px 0}
.et-lab-details{font-size:12px;line-height:1.7}
.et-lab-details dt{color:var(--muted)}
.et-lab-details dd{margin:0 0 8px}
.et-panel input:focus,.et-panel select:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 3px #18778112;background:var(--surface,#fff)}
.et-panel [hidden]{display:none!important}
@media(max-width:1190px){.endo-clinical-column{display:contents}
.endo-note-entry{grid-row:1}
.endo-note-body{grid-row:2}
.endo-note-history{grid-row:3}
.et-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.et-picker{grid-template-columns:1.2fr 1fr 1fr}
.et-picker button{font-size:13px;min-height:44px}
.et-panel input,.et-panel select,.et-chart-controls select{font-size:16px}
.et-thyroid-main{grid-template-columns:minmax(80px,1fr) 90px 88px;gap:6px}
.et-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.et-card{padding:12px}
.et-two{grid-template-columns:1fr}
.et-chart svg text{font-size:15px}
.et-heading{flex-wrap:wrap}
.et-table .btn{min-height:40px}
.eg-row-actions .btn{min-height:40px}
.et-actions .btn{min-height:42px}
.et-thyroid-main>label{font-size:13px}}

.eg-conflict{background:var(--teal-soft,#e7f2f1);border-radius:9px;padding:10px;margin-bottom:10px;font-size:12px;line-height:1.6}
.eg-conflict .btn{font-size:11px;padding:7px 0;white-space:normal;text-align:left}
#et-thyroid-form{margin-top:14px}

.et-table .btn{white-space:nowrap;min-width:84px}

/* Compact day timeline. The consultation sidebar stays vertical at every width. */
.eg-timeline-heading{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-bottom:8px}
.eg-timeline-heading h4{margin:0;font-size:15px}
.eg-timeline-heading p{color:var(--muted);font-size:12px;margin-top:3px;line-height:1.5}
.eg-timeline-heading>span{font-size:11px;color:var(--muted);text-align:right;max-width:88px;line-height:1.5}
.eg-stages{list-style:none;padding:0;margin:0}
.eg-stage{position:relative;padding:0 0 4px;min-width:0}
.eg-stage:not(:last-child)::before{content:'';position:absolute;left:15px;top:28px;bottom:-15px;width:1px;background:var(--line)}
.eg-stage-head{width:100%;position:relative;display:flex;align-items:center;gap:10px;text-align:left;color:var(--ink);background:transparent;border:1px solid transparent;border-radius:10px;font:inherit;padding:9px 6px 9px 0;min-height:68px;cursor:pointer}
.eg-stage-head:hover .eg-stage-copy{color:var(--teal)}
.eg-stage-marker{width:30px;height:30px;flex-shrink:0;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;background:var(--surface,#fff);color:var(--muted);z-index:1}
.eg-stage-marker svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.eg-stage-copy{display:grid;grid-template-columns:1fr auto;gap:3px 8px;flex:1;min-width:0}
.eg-stage-label{font-size:13px;font-weight:600;line-height:1.4;grid-column:1/-1}
.eg-stage-value{grid-column:1;grid-row:2;font-size:12px;color:var(--muted);line-height:1.5;min-width:0}
.eg-stage-value strong{font-size:18px;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.eg-stage-value small{font-size:11px;font-weight:400;white-space:nowrap}
.eg-stage-state{grid-column:2;grid-row:2;font-size:10px;color:var(--muted);align-self:center}
.eg-stage-insulin{grid-column:1/-1;grid-row:3;display:flex;align-items:center;gap:4px;font-size:11px;line-height:1.5;color:var(--muted)}
.eg-stage-insulin .icon{width:13px;height:13px;flex-shrink:0}
.eg-stage-chevron{width:15px;height:15px;flex-shrink:0;fill:none;stroke:var(--muted);stroke-width:1.6;transition:transform .12s}
.eg-stage.is-active>.eg-stage-head .eg-stage-marker{color:var(--surface,#fff);background:var(--teal);border-color:var(--teal)}
.eg-stage.is-active>.eg-stage-head .eg-stage-label{color:var(--teal)}
.eg-stage.is-active>.eg-stage-head .eg-stage-chevron{transform:rotate(90deg);stroke:var(--teal)}
.eg-stage.is-saved .eg-stage-state{color:var(--teal)}
.eg-stage.is-saved:not(.is-active) .eg-stage-marker{background:var(--teal-soft);color:var(--teal);border-color:transparent}
.eg-stage.is-pending .eg-stage-state{color:#9a691d}
.eg-stage-panel{position:relative;padding:0 0 7px 40px;min-width:0}
.eg-stage-panel .eg-row{padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface,#fff)}
.eg-stage-panel .eg-row-heading{margin:0 0 7px;gap:5px}
.eg-stage-panel .eg-row-heading strong{display:none}
.eg-input-unit{position:relative;display:block;margin-top:4px}
.eg-input-unit>input{padding-right:57px!important;margin-top:0!important}
.eg-input-unit>span{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:11px;color:var(--muted);pointer-events:none}
.eg-input-unit.eg-dose>input{padding-right:30px!important}
.eg-insulin{margin-top:8px;gap:7px;padding:9px}
.eg-row-actions{gap:5px;margin-top:7px}
.eg-row-actions .btn:last-child{min-width:76px}
.eg-chart-card .et-chart{margin-top:0}
.eg-chart-card .et-chart svg{max-height:240px}
.eg-help{font-size:12px;line-height:1.6;color:var(--muted);margin:0 0 10px}
.eg-help summary{cursor:pointer;color:var(--teal);width:fit-content;min-height:32px;display:flex;align-items:center;gap:6px;list-style:none}
.eg-help summary::-webkit-details-marker{display:none}
.eg-help summary::before{content:'＋';font-size:16px}
.eg-help[open] summary::before{content:'−'}
.eg-help p{margin:3px 0 7px;max-width:750px}
.eg-page{max-width:1160px;margin:0 auto;padding:20px 26px;color:var(--ink)}
.eg-page>header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
.eg-page>header img{width:112px}
.eg-page>header .eg-doctor-logo{width:260px;max-width:calc(100% - 106px);height:auto}
.eg-powered-by{display:flex;flex-direction:column;align-items:flex-end;gap:7px;text-align:right}
.eg-page>header .eg-powered-by img{width:74px;height:auto}
.eg-powered-by .eg-private{font-size:10px}
.eg-private{font-size:12px;color:var(--muted)}
.eg-diary-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}
.eg-page h1{font-size:29px;line-height:1.2;font-weight:600;letter-spacing:-.8px;margin:5px 0 7px}
.eg-page .eg-patient-name{font-size:16px;font-weight:500;line-height:1.45}
.eg-page .eg-doctor{font-size:12px;line-height:1.6;color:var(--muted);margin-top:3px}
.eg-page .eg-intro{font-size:14px;line-height:1.6;color:var(--muted);margin:10px 0}
.eg-page .et-panel{margin-top:5px}
.eg-date-control{background:var(--surface,#fff);border:1px solid var(--line);border-radius:12px;padding:7px;gap:5px;flex-shrink:0}
.eg-date-control label{font-size:11px;color:var(--muted);text-align:center}
.eg-date-control input{display:block;font:inherit;font-size:15px;font-weight:550;min-height:30px;padding:3px 0;border:0;background:transparent;color:var(--ink);width:140px;text-align:center}
.eg-date-control .btn{width:38px;min-height:42px;font-size:23px;padding:0}
.eg-page .eg-day-timeline{padding:16px 18px}
.eg-page .eg-timeline-heading{margin-bottom:12px}
.eg-page .eg-timeline-heading>span{max-width:none}
.eg-page .eg-stage-panel .eg-row{background:var(--bg,#f6f8f9)}
.eg-page .et-panel input,.eg-page .et-panel select{background:var(--surface,#fff);font-size:16px;min-height:44px}
.eg-page .eg-row-actions .btn{min-height:44px;font-size:14px}
.eg-page .eg-row-actions .btn[type=submit]{background:var(--teal);color:white;padding:9px 21px}
.eg-page .et-detail>summary{font-size:14px;min-height:40px;padding:7px 0}
.eg-page footer{font-size:12px;color:var(--muted);line-height:1.65;margin:14px 0 8px;border-top:1px solid var(--line);padding-top:12px}
.eg-page footer p+p{margin-top:5px}
.endo-note-body .bp-card{padding:12px;margin-bottom:10px}
.endo-note-body .bp-metric{padding:10px 12px}
.endo-note-body .bp-panel-header{margin-bottom:12px}
@media(min-width:900px){
 .eg-page .eg-stages{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px 8px}
 .eg-page .eg-stage{display:contents}
 .eg-page .eg-stage::before{display:none}
 .eg-page .eg-stage-head{grid-column:var(--stage);grid-row:1;display:flex;flex-direction:column;align-items:start;justify-content:start;gap:8px;padding:9px 10px 11px;border-color:var(--line);border-radius:12px}
 .eg-page .eg-stage-head::after{content:'';height:1px;position:absolute;top:24px;left:39px;right:-10px;background:var(--line);z-index:0}
 .eg-page .eg-stage:last-child .eg-stage-head::after{right:10px}
 .eg-page .eg-stage-copy{display:flex;flex-direction:column;gap:3px;width:100%}
 .eg-page .eg-stage-label{font-size:13px;min-height:37px}
 .eg-page .eg-stage-value strong{font-size:22px}
 .eg-page .eg-stage-value small{font-size:11px}
 .eg-page .eg-stage-state{align-self:start;margin-top:auto;padding-top:3px}
 .eg-page .eg-stage-chevron{position:absolute;right:9px;top:16px;z-index:1;background:var(--surface,#fff)}
 .eg-page .eg-stage.is-active>.eg-stage-head{background:var(--teal-soft,#e7f2f1);border-color:var(--teal)}
 .eg-page .eg-stage.is-active .eg-stage-chevron{background:var(--teal-soft,#e7f2f1)}
 .eg-page .eg-stage-panel{grid-column:1/-1;grid-row:2;padding:0}
 .eg-page .eg-stage-panel .eg-row{padding:12px 15px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 20px}
 .eg-page .eg-stage-panel .eg-row-heading{grid-column:1/-1;margin:0}
 .eg-page .eg-stage-panel .eg-row-heading strong{display:block;font-size:14px}
 .eg-page .eg-readings{grid-column:1;max-width:500px}
 .eg-page .eg-row-actions{grid-column:2;grid-row:2;align-self:end;margin:0}
 .eg-page .eg-row-message,.eg-page .eg-conflict{grid-column:1/-1}
 .eg-page .eg-insulin{grid-column:1/-1;grid-template-columns:minmax(150px,1.4fr) minmax(100px,1fr) minmax(100px,1fr) auto;align-items:end;margin-top:0;background:var(--surface,#fff)}
 .eg-page .eg-insulin-kind{grid-column:auto}
 .eg-page .eg-insulin-name{grid-row:2;grid-column:1/-1}
 .eg-page .eg-insulin>.btn{min-height:44px;padding:8px;align-self:end}
 .eg-page .eg-day-review{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start}
 .eg-page .eg-chart-card,.eg-page .eg-history{padding:14px 16px}
 .eg-page .eg-history .et-table{font-size:11px}
}
@media(max-width:899px){
 .eg-page{max-width:660px;padding:18px 16px}
 .eg-page>header{margin-bottom:12px}
 .eg-page .eg-diary-heading{display:block}
 .eg-page h1{font-size:26px}
 .eg-page .eg-date-control{margin:13px 0 0;justify-content:space-between;padding:4px 7px}
 .eg-page .eg-date-control label{display:flex;align-items:center;gap:10px}
 .eg-page .eg-date-control input{font-size:16px}
 .eg-page .eg-day-timeline{padding:12px}
 .eg-page .eg-stage-panel{padding-left:38px}
 .eg-page .eg-timeline-heading{margin-bottom:3px}
 .eg-page .eg-timeline-heading>span{max-width:88px}
 .eg-page .eg-stage-head{min-height:64px}
 .eg-page .eg-stage-label{font-size:14px}
 .eg-page .eg-stage-value{grid-column:1;grid-row:2;font-size:13px}
 .eg-page .eg-stage-state{font-size:11px}
 .eg-page .eg-stage-panel .eg-row{padding:10px}
 .eg-page .eg-readings{gap:8px}
 .eg-page .eg-row-actions .btn{font-size:13px;padding:8px}
 .eg-page .eg-row-actions .btn[type=submit]{padding:8px 15px;min-width:70px}
 .eg-page .eg-stage-panel .eg-insulin{padding:8px}
 .eg-page .eg-help summary{min-height:40px}
}
@media(max-width:370px){
 .eg-page{padding:15px 10px}
 .eg-page .eg-stage-panel{padding-left:20px}
 .eg-stage-copy{gap:2px 5px}
 .eg-stage-state{grid-column:1/-1}
 .eg-page .eg-date-control label{gap:5px}
 .eg-page .eg-row-actions .btn{padding:7px;font-size:12px}
}

/* One save action for all of the patient's edited periods on the selected date. */
.eg-page{padding-bottom:112px}
.eg-savebar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);z-index:20;width:min(1108px,calc(100% - 32px));display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));border:1px solid var(--line);border-radius:14px 14px 0 0;background:var(--surface,#fff);box-shadow:0 -4px 22px #09214a09}
.eg-save-summary{min-width:0;font-size:13px;line-height:1.5}
.eg-save-summary strong{display:block;font-size:13px;font-weight:550;color:var(--ink)}
.eg-save-summary>span{display:block;font-size:11px;color:var(--muted)}
.eg-save-summary .btn{display:inline;padding:0;font-size:11px;color:var(--teal);min-height:0}
.eg-savebar>.btn{min-height:46px;flex-shrink:0;padding:10px 19px;font-size:14px}
.eg-savebar>.btn:disabled{opacity:.55;cursor:default}
.eg-page .eg-row-actions .btn:last-child{min-width:0}
@media(min-width:900px){.eg-page .eg-row:has(.eg-conflict) .eg-row-actions{grid-row:3}}
@media(max-width:600px){
 .eg-savebar{width:100%;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px));border-radius:12px 12px 0 0}
 .eg-savebar>.btn{font-size:13px;padding:10px 12px;max-width:172px;white-space:normal;line-height:1.4}
 .eg-save-summary strong{font-size:12px;line-height:1.45}
 .eg-save-summary>span,.eg-save-summary .btn{font-size:10px}
}

/* Keep the writing area and measurement cards close, without shrinking text. */
.endo-note-entry .note-heading{padding:15px 20px}
.endo-note-entry .note-editor{padding:16px 20px}
.endo-note-entry .note-context-fields{gap:12px;margin-bottom:13px}
.endo-note-entry .note-editor textarea{min-height:210px;line-height:1.7;padding:12px;border-radius:10px}
.endo-note-entry .editor-actions{padding:13px 20px}
.endo-note-body .bp-inline-form{padding:12px;margin-bottom:10px}
.endo-note-body .bp-inline-form .field{margin-bottom:8px}
.endo-note-body .bp-inline-form input,.endo-note-body .bp-inline-form select{min-height:42px;padding:8px 10px;border-radius:8px;background:var(--bg,#f6f8f9)}
@media(max-width:720px){.endo-note-entry .note-editor{padding:14px}.endo-note-entry .note-heading{padding:14px}.endo-note-entry .note-editor textarea{min-height:190px}.endo-note-body .bp-inline-form input,.endo-note-body .bp-inline-form select{min-height:44px}}

/* Date belongs to the day overview; the weekly table compares saved measurements. */
.eg-timeline-heading .eg-date-control{margin:0;padding:0;border:0;box-shadow:none;border-radius:0;background:transparent;justify-content:flex-start;gap:4px}
.eg-page .eg-timeline-heading .eg-date-control label{display:block;text-transform:capitalize;text-align:center;font-size:12px;line-height:1.4}
.eg-page .eg-timeline-heading .eg-date-control input{font-size:18px;font-weight:600;padding:0;background:transparent;border:0;min-height:30px;width:154px;line-height:1.4;color:var(--ink)}
.eg-page .eg-timeline-heading .eg-date-control .btn{width:30px;min-height:42px;font-size:22px}
.eg-page .eg-timeline-heading>span{padding-top:8px}
.eg-timeline-heading>div{min-width:0}
.eg-week-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
.eg-week-heading h4{margin:0 0 3px}
.eg-week-heading p{font-size:11px;color:var(--muted);line-height:1.5}
.eg-week-heading>div:last-child{display:flex;gap:4px}
.eg-week-heading .btn{font-size:22px;min-width:34px;min-height:40px;padding:4px 8px}
.eg-week-table{table-layout:fixed;width:100%}
.eg-week-table th:first-child{width:44%}
.eg-week-table caption{padding:2px 0 8px;font-size:11px}
.eg-week-table th,.eg-week-table td{padding:5px 8px;white-space:normal}
.eg-week-table strong{font-size:15px;font-weight:550;color:var(--ink)}
.eg-week-table .btn{display:flex;align-items:center;justify-content:start;gap:7px;font-size:12px;min-height:36px;min-width:0;width:100%;padding:2px 0;text-align:left}
.eg-week-table .btn small{display:inline;margin:0;font-weight:400}
.eg-week-table td small{margin:0;font-size:10px}
.eg-week-card>.et-hint{font-size:11px;margin-top:8px}
.eg-page .eg-week-card{padding:14px 16px}
.eg-page .eg-day-review{align-items:start}
@media(max-width:600px){
 .eg-page .eg-timeline-heading{gap:5px;align-items:center}
 .eg-page .eg-timeline-heading>span{max-width:75px;font-size:10px;padding:0}
 .eg-page .eg-timeline-heading .eg-date-control{margin:0;padding:0;gap:2px}
 .eg-page .eg-timeline-heading .eg-date-control input{width:141px;font-size:17px}
 .eg-page .eg-timeline-heading .eg-date-control .btn{width:27px;min-height:44px}
 .eg-page .eg-week-table .btn{min-height:40px;font-size:13px}
}

.et-diabetes-tabs{display:flex;gap:5px;padding:3px;border-bottom:1px solid var(--line);margin:0 0 13px}
.et-diabetes-tabs button{background:transparent;color:var(--muted);padding:9px 10px;border-radius:7px;font:inherit;font-size:13px;cursor:pointer;min-height:40px}
.et-diabetes-tabs button[aria-pressed=true]{color:var(--teal);background:var(--teal-soft);font-weight:600}
.et-diabetes-tabs button:focus-visible{outline:2px solid var(--teal);outline-offset:2px}
#et-diabetesLab-form{margin-top:12px}

.eg-access{max-width:420px;margin:34px auto;padding:26px;border:1px solid var(--line);border-radius:17px;background:var(--surface,#fff)}
.eg-page .eg-access h1{font-size:25px;margin:8px 0 12px}
.eg-access>p{font-size:14px;line-height:1.6;color:var(--muted)}
.eg-access form{margin-top:20px}
.eg-access form>label{margin:12px 0 0;font-size:13px}
.eg-access form>small{display:block;font-size:11px;color:var(--muted);margin-top:5px}
.eg-access form>.btn{width:100%;min-height:46px;margin-top:12px;font-size:14px}
.eg-access input{font-size:16px!important;min-height:46px}
.eg-access .eg-access-username{position:absolute;width:1px;height:1px;min-height:0;padding:0;clip-path:inset(50%);overflow:hidden}
.eg-auth-error{font-size:13px;color:#a04938;line-height:1.5;margin-top:12px}
.eg-auth-error:empty{display:none}
.eg-access .eg-access-help{font-size:12px;margin-top:20px}
.eg-access-actions{display:flex;gap:10px;justify-content:flex-end;margin-bottom:8px}
.eg-access-actions .btn{font-size:12px;min-height:40px;color:var(--teal)}
@media(max-width:600px){.eg-access{margin:22px auto;padding:20px}}
