:root{--font-sans:"Avenir Next", "Avenir", "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;--bg:#fff;--card:#fff;--line:#dee2e6;--text:#2c3e50;--muted:#7f8c8d;--brand:#3498db;--brand-strong:#2d84be;--glucose-good:#40a850;--glucose-high-fasting:#e64949;--glucose-high-pp:#a82020;--glucose-pp-normal:#44639f;--good:var(--glucose-good);--high:var(--glucose-high-fasting);--hover-soft:#a8f2c0;--shadow:#00000014;--radius:8px;--control-height:42px;--control-radius:6px}*{box-sizing:border-box;margin:0;padding:0}html,body{width:100%;min-height:100%}body{background:var(--bg);color:var(--text);font-family:var(--font-sans);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;font-size:15px;line-height:1.45}@supports (-webkit-touch-callout:none){input,select,textarea{font-size:16px!important}}a{color:inherit;text-decoration:none}.topbar{z-index:30;border-bottom:1px solid var(--line);background:#fff;position:sticky;top:0}.topbarInner{justify-content:space-between;align-items:center;gap:12px;max-width:1280px;height:60px;margin:0 auto;padding:0 16px;display:flex}.brand{color:var(--brand-strong);letter-spacing:1px;font-size:20px;font-weight:600}.topnav{white-space:nowrap;scrollbar-width:none;gap:8px;display:flex;overflow-x:auto}.topnav::-webkit-scrollbar{display:none}.topnavLink{border-radius:var(--radius);height:36px;color:var(--brand-strong);justify-content:center;align-items:center;padding:0 16px;font-size:1.02rem;font-weight:600;display:inline-flex}.topnavLink.active{background:var(--brand);color:#fff}.topnavIcon{color:var(--brand);border-radius:var(--radius);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;width:36px;height:36px;font-size:1.35rem;line-height:1;display:inline-flex}.topnavIcon:hover{background:#e8f2ff}.topnavIcon.spinning{animation:.8s linear infinite spin}.topnavIcon svg{width:16px;height:16px}.appMain{width:100%;padding:22px 14px 90px}.screen{gap:16px;max-width:1280px;margin:0 auto;display:grid}.sectionHead h1{letter-spacing:0;color:#868e96;font-size:22px;font-weight:600;line-height:1.25}.sectionHead p{color:#868e96;margin-top:6px;font-size:14px;font-weight:400}.statsGrid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;display:grid}.statCard{border:1px solid var(--line);background:var(--card);border-radius:var(--radius);box-shadow:none;padding:14px}.statCard p{color:#868e96;letter-spacing:0;font-size:14px;font-weight:500;line-height:1.1}.statCard strong{color:#495057;letter-spacing:0;margin-top:4px;font-size:16px;font-weight:600;line-height:1.2;display:block}.monthSplitStat{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.monthSplitStat .goodText,.monthSplitStat .highText{font-size:15px;font-weight:600}.averageStat{color:var(--good)!important}.monthSplitPlus,.monthSplitSlash{color:#868e96;font-size:14px;font-weight:500}.monthCards{gap:16px;display:grid}.monthCard{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:14px;box-shadow:0 1px 2px #0000000f}.monthCard h2{color:#343a40;letter-spacing:0;margin-bottom:12px;font-size:20px;font-weight:600}.monthChartContainer{height:300px}.chartTooltipCard{background:#fff;border:1px solid #dee2e6;border-radius:8px;width:min(380px,64vw);max-height:150px;padding:8px 10px;overflow:auto;box-shadow:0 4px 10px #0000001f}.chartTooltipDate{color:#343a40;font-size:14px;font-weight:400;line-height:1.3}.chartTooltipValue{margin-top:2px;font-size:13px;font-weight:500;line-height:1.35}.ppText{color:var(--glucose-pp-normal)}.ppMetaText{color:#38517f}.chartTooltipMetaRow{background:#f5f8ff;border:1px solid #d9e4f7;border-radius:10px;flex-wrap:wrap;align-items:center;gap:6px;margin-top:6px;margin-bottom:2px;padding:2px 8px;display:flex}.chartTooltipMetaLabel{color:#5c6f90;font-size:12px}.chartTooltipMetaValue{color:#334d7d;font-size:13px;line-height:1.35}.chartTooltipMetaTimes{color:#4d607d;width:100%;font-size:12px;line-height:1.35}.chartTooltipMetaTimeItem strong{color:#2e4672;font-weight:600}.ppCountLabel{fill:#274777;font-size:11px;font-weight:700}.chartTooltipNotes{color:#6c757d;max-height:66px;margin-top:2px;font-size:12px;line-height:1.35;overflow:auto}.chartWrap{border-top:1px dashed #cfd8e3;height:240px;padding-top:20px;position:relative;overflow:visible}.band{opacity:.16;position:absolute;left:0;right:0}.goodBand{top:calc((1 - (var(--fasting-max) / var(--chart-max))) * 190px + 20px);height:calc(((var(--fasting-max) - var(--fasting-min)) / var(--chart-max)) * 190px);background:#e8f5e9cc}.threshold{border-top:1px dashed;position:absolute;left:0;right:0}.fastingThreshold{top:calc((1 - (var(--fasting-max) / var(--chart-max))) * 190px + 20px);border-color:#d7dee9}.ppThreshold{top:calc((1 - (var(--pp-max) / var(--chart-max))) * 190px + 20px);border-color:#e81818}.bars{z-index:2;align-items:end;gap:6px;height:190px;display:flex;position:absolute;bottom:0;left:0;right:0}.bar{cursor:pointer;border-radius:4px 4px 0 0;width:12px;transition:opacity .14s}.bar:hover{opacity:.9}.bar.good{background:var(--good)}.bar.high{background:var(--high)}.calendarGrid{grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:24px;display:grid}.calendarCard{box-shadow:none;background:0 0;border:1px solid #dee2e6;border-radius:8px;padding:16px 8px}.calendarCard h2{color:#868e96;margin-bottom:12px;font-size:16px;font-weight:600;line-height:1.2}.weekdayRow{color:#868e96;grid-template-columns:repeat(7,minmax(0,1fr));margin-bottom:10px;font-size:14px;font-weight:400;display:grid}.weekdayRow span{text-align:center}.monthGrid{grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;display:grid}.dayCell{aspect-ratio:1;border-radius:var(--radius);text-align:center;background:0 0;border:0;flex-direction:column;justify-content:center;align-items:center;min-height:52px;padding:4px;display:flex;position:relative}.dayCell:hover{background:var(--hover-soft);border-radius:50%}.dayCell.today{background:#ececec;border-radius:10px}.dayCell.selected{background:#9be5b8;border-radius:50%}.dayCell.empty{pointer-events:none}.dayNum{font-size:15px;font-weight:500;line-height:1}.dots{gap:3px;min-height:6px;margin-top:6px;display:flex}.dot{border-radius:50%;width:6px;height:6px}.dot.green{background:var(--good)}.dot.red{background:var(--high)}.goodText{color:var(--good)}.highText{color:var(--high)}.calendarHoverCard{z-index:45;text-align:left;pointer-events:none;background:#fff;border:1px solid #dee2e6;border-radius:8px;width:min(360px,100vw - 24px);padding:14px 16px 12px;position:absolute;top:calc(100% + 12px);left:50%;transform:translate(-50%);box-shadow:0 8px 24px #1f293724}.calendarHoverCard.centerAlign{left:50%;transform:translate(-50%)}.calendarHoverCard.leftAlign{left:-8px;transform:none}.calendarHoverCard.rightAlign{left:auto;right:-8px;transform:none}.calendarHoverCard:before{content:"";background:#fff;border-top:1px solid #dee2e6;border-left:1px solid #dee2e6;width:12px;height:12px;position:absolute;top:-7px;left:50%;transform:translate(-50%)rotate(45deg)}.calendarHoverCard.leftAlign:before{left:20%}.calendarHoverCard.rightAlign:before{left:80%}.calendarHoverCard.fixedCard{z-index:80;position:fixed;transform:translate(-50%)}.calendarHoverCard.fixedCard.placeAbove{transform:translate(-50%,-100%)}.calendarHoverCard.fixedCard.placeAbove:before{top:auto;bottom:-7px;transform:translate(-50%)rotate(225deg)}.calendarHoverRow{justify-content:space-between;align-items:baseline;gap:12px;font-size:14px;display:flex}.calendarHoverRow strong{font-size:14px;font-weight:600}.calendarHoverRow span{color:#7f8894;font-size:14px}.calendarHoverNotes{color:#1f2430;margin-top:8px;font-size:14px;line-height:1.4}.chartHoverCard{z-index:7;pointer-events:none;background:#fff;border:1px solid #d7dce4;border-radius:14px;width:clamp(280px,46vw,560px);max-width:calc(100% - 24px);max-height:170px;padding:14px 16px 12px;position:absolute;bottom:12px;overflow:hidden;transform:translate(-50%);box-shadow:0 8px 24px #1f293724}.chartHoverDate{letter-spacing:-.02em;margin-bottom:6px;font-size:1.98rem;line-height:1.08}.chartHoverValue{margin-bottom:8px;font-size:1.58rem;font-weight:600;line-height:1.05}.chartHoverNotes{color:#7b8591;-webkit-line-clamp:2;line-clamp:2;text-overflow:ellipsis;-webkit-box-orient:vertical;font-size:1.06rem;line-height:1.35;display:-webkit-box;overflow:hidden}.logsHead{gap:12px;display:grid}.logsTitle{justify-self:start}.logsControlRow{flex-wrap:nowrap;justify-content:flex-start;justify-self:end;align-items:center;gap:8px;display:flex}.searchWrap{justify-self:center;width:min(540px,100%);position:relative}.input{border-radius:var(--control-radius);width:100%;color:var(--text);min-height:var(--control-height);font:inherit;background:#fff;border:1px solid #cfd8e3;padding:10px 12px}select.input{appearance:none}input[type=number]{appearance:textfield}input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.fxSelectTrigger{border-radius:var(--control-radius);width:100%;color:var(--text);min-height:var(--control-height);font:inherit;background:#fff;border:1px solid #cfd8e3;justify-content:space-between;align-items:center;gap:8px;padding:0 12px;display:inline-flex}.fxSelectTrigger:focus-visible{outline-offset:1px;outline:2px solid #228be6}.fxSelectIcon{color:#6c757d;justify-content:center;align-items:center;display:inline-flex}.fxSelectIcon svg{width:14px;height:14px}.fxSelectContent{z-index:120;min-width:var(--radix-select-trigger-width);border:1px solid var(--line);background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 8px 24px #1f293724}.fxSelectViewport{padding:4px}.fxSelectItem{color:#34495e;cursor:pointer;-webkit-user-select:none;user-select:none;border-radius:6px;align-items:center;min-height:34px;padding:0 30px 0 10px;font-size:14px;display:flex;position:relative}.fxSelectItem[data-highlighted]{background:#f1f7ff;outline:none}.fxSelectItemIndicator{color:#228be6;position:absolute;right:8px}.fxSelectItemIndicator svg{width:14px;height:14px}.searchInput{width:100%;padding-right:38px}.clearSearchButton{color:#6c757d;background:#e9ecef;border:0;border-radius:999px;justify-content:center;align-items:center;width:24px;height:24px;font-size:16px;line-height:1;display:inline-flex;position:absolute;top:50%;right:8px;transform:translateY(-50%)}.toggleAllButton{color:#5f6c7b;border-radius:var(--control-radius);width:var(--control-height);min-height:var(--control-height);font:inherit;white-space:nowrap;background:#fff;border:1px solid #c7d3e2;justify-content:center;align-items:center;padding:0;display:inline-flex}.toggleAllButton svg{width:14px;height:14px}.recordsActions{gap:8px;display:flex}.sortButton{background:#fff;border:1px solid #c7d3e2;border-radius:9px;height:36px;padding:0 12px}.sortButton.active{background:var(--brand);color:#fff;border-color:var(--brand)}.loadMoreButton{min-width:140px;margin:0 auto}.homeStats{grid-template-columns:1fr}.homeActions{flex-wrap:wrap;gap:8px;display:flex}.homeRecent{gap:10px;display:grid}.homeRecentHead h2{font-size:1.2rem}.homeRecentHead p{color:var(--muted);margin-top:4px}.mutedLine{color:var(--muted);text-align:left;padding:8px 0 2px}.recordsSummaryRow{justify-content:space-between;align-items:center;display:flex}.logsAccordion{gap:12px;display:grid}.monthAccordionCard{border:1px solid var(--line);border-radius:var(--radius);background:var(--card);overflow:hidden}.monthAccordionHeader{text-align:left;background:#fff;border:0;grid-template-columns:1fr auto auto;align-items:center;gap:12px;width:100%;padding:10px 12px;display:grid}.monthAccordionMeta h2{color:#343a40;font-size:20px;font-weight:600;line-height:1.1}.monthAccordionMeta p{color:#868e96;margin-top:2px;font-size:13px}.monthRatioWrap{align-items:center;gap:0;min-width:180px;display:flex}.monthRatioBar{background:#f8f9fa;border:1px solid #e9edf2;border-radius:999px;flex:1;min-width:140px;height:12px;display:flex;overflow:hidden}.monthRatioBar .goodSegment{background:var(--good)}.monthRatioBar .highSegment{background:var(--high)}.accordionChevron{color:#7b8794;font-size:14px;transition:transform .16s}.accordionChevron.open{transform:rotate(180deg)}.exportIconButton{width:var(--control-height);height:var(--control-height);border-radius:var(--control-radius);color:#228be6;cursor:pointer;background:#fff;border:1px solid #dee2e6;justify-content:center;align-items:center;display:inline-flex}.exportIconButton:hover{background:#f1f7ff}.exportIconButton svg{width:18px;height:18px}.tableWrap{border:1px solid var(--line);border-radius:0 0 var(--radius) var(--radius);background:var(--card);border-bottom:0;border-left:0;border-right:0;overflow:auto}.recordsTable{border-collapse:collapse;table-layout:fixed;width:100%;min-width:720px}.recordsTable th,.recordsTable td{text-align:left;vertical-align:top;border-bottom:1px solid #e9eef5;padding:12px 10px}.recordsTable th{color:#868e96;font-size:14px;font-weight:500}.recordsTable .colDate,.recordsTable th:first-child,.recordsTable td:first-child{white-space:nowrap;width:130px;min-width:128px}.recordsTable .colTime,.recordsTable th:nth-child(2),.recordsTable td:nth-child(2){white-space:nowrap;width:112px;min-width:92px}.recordsTable .colType{width:70px}.recordsTable .colValue{width:96px}.recordsTable .colNotes{width:auto}.recordsTable td.typeCode{width:60px;font-weight:400}.recordsTable td.valueCell{font-weight:600}.recordsRow{cursor:pointer}.recordsRow:hover{background:#f8f9fa}.notesClamp{-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;width:100%;max-width:none;display:-webkit-box;overflow:hidden}.recordsTable tbody tr:nth-child(2n){background:#fcfdff}.notesEditor{min-width:220px}.rowActions{gap:6px;display:flex}.rowActions>button{flex:1}.rowActions button,.primaryButton,.iconButton{border-radius:var(--radius);min-height:34px;font:inherit;background:#fff;border:1px solid #cad6e8;padding:0 10px}.rowActions .primaryButton{background:var(--brand);color:#fff;border-color:var(--brand)}.primaryButton{background:var(--brand);color:#fff;border-color:var(--brand);min-height:44px}.primaryButton:disabled{opacity:.5}.dangerButton{color:#d8070b;border-color:#f1b5b8}.rowPrimaryButton{width:100%;min-width:0;min-height:var(--control-height);padding:0 14px}.fab{background:var(--brand);color:#fff;border:0;border-radius:50%;width:56px;height:56px;font-size:2rem;line-height:1;position:fixed;bottom:18px;right:16px;box-shadow:0 10px 26px #2782e866}.sheetBackdrop{z-index:60;background:#0f172a73;align-items:end;padding:0;display:grid;position:fixed;inset:0}.quickSheet{background:#fff;border-radius:12px 12px 0 0;gap:12px;width:min(680px,100vw - 28px);max-height:88vh;margin:0 auto;padding:14px;display:grid;overflow:auto}.daySheet{border-radius:12px 12px 0 0;width:100%;max-width:680px;margin:0 auto}.sheetHeader{justify-content:space-between;align-items:center;display:flex}.sheetSubtleTitle{color:#868e96;font-size:16px;font-weight:500}.sheetForm{gap:10px;display:grid}.rowCompact{grid-template-columns:minmax(0,1fr) minmax(132px,38%);gap:10px;display:grid}.rowCompactTriple .valueInlineInput{grid-column:1/-1}.compactSelect{width:100%;min-width:0}.rowSplit{grid-template-columns:1fr;gap:10px;display:grid}.textarea{resize:vertical;min-height:96px}.errorText{color:#c02222}.dayEntries{gap:8px;display:grid}.dayEntryCard{border:1px solid var(--line);border-radius:var(--radius);gap:4px;padding:10px;display:grid}@media (min-width:760px){.appMain{padding:34px 20px 100px}.homeStats{grid-template-columns:repeat(3,minmax(0,1fr))}.logsHead{grid-template-columns:minmax(180px,1fr) minmax(280px,540px) auto;align-items:center}.dayCell{min-height:58px}.rowSplit{grid-template-columns:2fr 1fr}}@media (max-width:760px){body{font-size:14px}.brand{font-size:1.6rem}.sectionHead h1{font-size:22px}.sectionHead p,.statCard p{font-size:14px}.statCard strong{font-size:16px}.monthCard h2{font-size:20px}.calendarCard h2{font-size:16px}.weekdayRow{font-size:14px}.dayNum{font-size:15px}.calendarHoverCard{display:none}.chartHoverCard{width:calc(100% - 24px);max-width:calc(100% - 24px);max-height:160px;bottom:10px;transform:none;left:12px!important}.chartTooltipCard{width:min(88vw,340px);max-height:148px}.logsControlRow{justify-content:flex-start;width:100%}.toggleAllButton{width:var(--control-height)}.monthAccordionHeader{grid-template-columns:1fr auto;row-gap:8px}.monthRatioWrap{grid-column:1/span 2;width:100%}.rowCompact{grid-template-columns:minmax(0,1fr) minmax(124px,42%)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (min-width:1100px){.sheetBackdrop{align-items:center;padding:18px}.quickSheet{border-radius:14px;width:min(680px,100vw - 28px);margin:0 auto}.daySheet{border-radius:14px;max-width:680px}}@media (min-width:900px){.rowCompactTriple{grid-template-columns:repeat(3,minmax(0,1fr));align-items:center}.rowCompactTriple .valueInlineInput{grid-column:auto}}
