:root {--navy:#142a53;--blue:#3159cb;--blue-dark:#2046b9;--blue-light:#edf2ff;--purple:#6d60db;--sky:#eaf7fa;--ink:#182643;--muted:#71809b;--line:#e5eaf3;--page:#f5f7fc;--good:#117657;--good-bg:#e7f8ef;--bad:#d75b34;--bad-bg:#fff1e8;--low:#b98922;--low-bg:#fff6e0;--shadow:0 9px 36px rgba(23,42,85,.045);--radius:18px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink);font-size:14px}button,input,textarea{font:inherit}button{cursor:pointer}a{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #8eacff;outline-offset:2px}.hidden{display:none!important}.loading{padding:26px;color:var(--muted);text-align:center}.hint{font-size:12px;line-height:1.65;color:var(--muted);margin:8px 0 0}.eyebrow{font-size:11px;letter-spacing:2.2px;font-weight:850;color:#6378c7}.eyebrow.light{color:#b7cffc}
.btn{border:0;display:inline-flex;align-items:center;justify-content:center;gap:10px;border-radius:12px;padding:12px 17px;font-size:13px;min-height:44px;font-weight:750;transition:.18s ease;background:#eef3ff;color:#3150a3;text-decoration:none;white-space:nowrap}.btn:hover{transform:translateY(-1px);filter:brightness(.985)}.btn.primary{background:linear-gradient(110deg,#3159cb,#5477e0);color:#fff;box-shadow:0 6px 13px #3561c729}.btn.outline{border:1px solid #cfd9eb;background:#fff;color:#3152ad}.btn.soft{background:#eff3ff;color:#2852b6}.btn.danger{background:#fff0ef;color:#c24843}.btn:disabled{opacity:.44;cursor:not-allowed;filter:none;transform:none}.btn.full{width:100%}.btn.small{padding:7px 11px;min-height:35px;font-size:12px;border-radius:9px}.notice{border-radius:12px;padding:13px 15px;font-size:13px;line-height:1.5;margin:14px 0}.notice.warn{background:#fff4ec;color:#99511e;border:1px solid #ffddc9}.notice.good{background:#e8f9f1;color:#146347;border:1px solid #b9ebd4}
input:not([type=checkbox]),textarea{border:1px solid #d8e0ed;border-radius:10px;background:#fff;color:#1e2e4c;padding:12px 13px;min-height:42px;width:100%;transition:border .15s,box-shadow .15s;outline:0}input:not([type=checkbox]):focus,textarea:focus{border-color:#7d9de5;box-shadow:0 0 0 3px #3f72d718}input:disabled,textarea:disabled{background:#f6f8fc;color:#38506f;opacity:1;-webkit-text-fill-color:#38506f;cursor:default}textarea{resize:vertical;min-height:65px}.stack{display:flex;flex-direction:column;gap:11px}.stack label,.form-label{font-size:12px;color:#425475;font-weight:800;display:block;margin-bottom:7px}.stack label{margin-bottom:-2px}.stack input{margin:0}.stack button{margin-top:9px}
.auth-page{min-height:100vh;background:#f4f7fd}.auth-layout{min-height:100vh;display:grid;grid-template-columns:minmax(350px,53%) minmax(330px,47%)}.auth-art{background:radial-gradient(ellipse at 18% 20%,#516ce4,transparent 54%),linear-gradient(135deg,#1c386d,#243e94 65%,#3f5ec0);color:white;padding:10%;display:flex;align-items:center;position:relative;overflow:hidden}.auth-art:before,.auth-art:after{content:"";position:absolute;border:1px solid #ffffff20;border-radius:50%;width:650px;height:650px;right:-300px;bottom:-280px}.auth-art:after{width:420px;height:420px;right:-200px;bottom:-165px}.auth-art-inner{max-width:570px;z-index:1}.hero-icon{width:92px;height:92px;display:grid;place-items:center;border:1px solid #ffffff55;border-radius:24px;background:#ffffff17;margin-bottom:44px}.auth-art h2{font-size:clamp(37px,4.3vw,63px);line-height:1.1;letter-spacing:-1.8px;margin:17px 0 23px;max-width:520px}.auth-art p{font-size:16px;color:#dce7ff;line-height:1.85;max-width:450px}.art-cards{display:flex;flex-wrap:wrap;gap:9px;margin-top:40px}.art-cards span{padding:12px 13px;border:1px solid #ffffff35;background:#ffffff12;border-radius:9px;font-size:12px;font-weight:650}.auth-card{max-width:530px;margin:auto;padding:55px;width:100%}.auth-card .small-brand{display:flex;align-items:center;gap:11px;margin-bottom:72px;font-weight:850;font-size:19px;letter-spacing:-.5px;color:#1b2f61}.brand-mark{width:39px;height:39px;display:grid;place-items:center;border-radius:12px;background:#3159cb;color:white;font-size:22px;flex-shrink:0;box-shadow:0 5px 14px #4368ce33}.auth-card h1{font-size:36px;letter-spacing:-1.2px;margin:0 0 7px}.auth-card>p{font-size:15px;color:var(--muted);margin:0 0 36px}.login-card .stack{gap:15px}.login-card .stack label{margin-bottom:-5px}.login-submit{margin-top:15px!important;font-size:14px}.login-submit span{font-size:20px;font-weight:400}.password-wrap{position:relative}.password-wrap input{padding-right:86px}.pw-toggle{position:absolute;right:7px;top:7px;border:none;background:#eef3ff;border-radius:8px;padding:6px 9px;color:#2853b8;font-weight:700;font-size:12px}.auth-foot{border-top:1px solid var(--line);margin-top:75px;padding-top:18px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:14px;font-size:11px;color:#8491a8}.install-card{background:#fff;border-radius:18px;box-shadow:0 15px 55px #24427018}.install-card .brand-mark{margin-bottom:20px}
.app-page{background:var(--page);min-height:100vh}.app-shell{display:flex;min-height:100vh}.sidebar{width:244px;flex:0 0 244px;background:linear-gradient(175deg,#14294f,#182b54 62%,#15264a);color:#e2eaff;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;padding:26px 16px 20px;z-index:30;box-shadow:8px 0 25px #2137590c}.sidebar-brand{display:flex;align-items:center;gap:10px;padding:0 6px 35px}.sidebar-brand .brand-mark{background:#7187f1}.sidebar-brand strong{display:block;font-size:16px;letter-spacing:-.5px}.sidebar-brand small{display:block;font-size:10px;color:#a8b8d9;margin-top:3px}.menu-label{font-size:10px;color:#859bc8;font-weight:800;letter-spacing:1.5px;padding:14px 13px}.menu-label.space{margin-top:22px}.nav-links{display:flex;flex-direction:column;gap:6px}.nav-btn{text-align:left;width:100%;border:0;background:transparent;color:#c0cbea;border-radius:11px;padding:13px 13px;min-height:48px;display:flex;align-items:center;gap:13px;font-size:13px;font-weight:640;transition:.17s}.nav-btn:hover{background:#ffffff0e;color:white}.nav-btn.active{background:#6882e9;color:white;box-shadow:0 6px 18px #060f2e2c}.nav-ico{font-size:19px;width:24px;text-align:center;line-height:1}.sidebar-bottom{margin-top:auto;border-top:1px solid #ffffff1c;padding:20px 11px 2px;font-size:11px;color:#bdcbe7}.privacy-dot{display:inline-block;width:7px;height:7px;background:#56d7ad;border-radius:50%;margin-right:6px}.sidebar-copy{margin-top:7px;color:#8299bc}.app-main{min-width:0;flex:1;display:flex;flex-direction:column}.topbar{height:77px;background:#fff;border-bottom:1px solid #e7ebf3;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,3.3vw,52px);position:sticky;top:0;z-index:20}.top-left,.top-right{display:flex;align-items:center;gap:19px}.top-eyebrow{font-size:11px;letter-spacing:1.4px;color:#8191ac;font-weight:850}.top-date{color:#7b89a2;font-size:12px}.profile-btn{display:flex;align-items:center;gap:10px;border:0;background:transparent;text-align:left;padding:2px 3px;border-radius:12px}.profile-btn:hover{background:#f4f6fc}.avatar{width:35px;height:35px;display:grid;place-items:center;background:#dce6ff;border-radius:12px;color:#2b51c4;font-size:16px;font-weight:850}.profile-info strong{font-size:12px;display:block}.profile-info small{display:block;color:#8a97ab;font-size:10px;margin-top:2px}.logout-btn{font-size:12px;font-weight:700;text-decoration:none;color:#aa5260;padding:10px 12px;border:1px solid #f1dce2;border-radius:10px}.icon-btn{border:0;background:#edf3fb;border-radius:10px;color:#26466d;min-width:37px;height:37px;font-size:19px;display:grid;place-items:center}.menu-btn{display:none}.workspace{padding:clamp(22px,3.2vw,43px) clamp(18px,3.3vw,52px) 50px;max-width:1700px;width:100%;margin:auto;flex:1}.page-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:27px;gap:18px}.page-heading h1{font-size:clamp(25px,2.6vw,37px);letter-spacing:-1px;margin:9px 0 8px;line-height:1.15}.page-heading p{font-size:13px;color:#7e8ba2;margin:0;line-height:1.6}.heading-decoration{width:67px;height:67px;border-radius:22px;display:grid;place-items:center;color:#6081d5;font-size:36px;background:linear-gradient(135deg,#dfe7ff,#edf9ff)}.panel-card{background:#fff;border:1px solid #e7ebf4;border-radius:var(--radius);padding:clamp(16px,2.4vw,28px);box-shadow:var(--shadow)}.date-card{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:23px}.date-card>div{width:min(100%,340px)}.date-field{max-width:320px;min-height:44px!important;cursor:pointer}.form-aside{color:#8b96aa;font-size:12px;padding-bottom:12px}.empty-state{margin:25px 0;background:#fff;border:1px dashed #c9d5eb;border-radius:19px;padding:68px 20px;text-align:center}.empty-icon{width:65px;height:65px;background:#eff3ff;border-radius:20px;display:grid;place-items:center;margin:0 auto 18px;font-size:32px;color:#4466bd}.empty-state h2{margin:10px 0;font-size:19px}.empty-state p{margin:0;color:#8490a5;line-height:1.6}.app-footer{border-top:1px solid var(--line);padding:18px 30px;text-align:center;color:#9ba7b9;font-size:11px;line-height:1.7}
.record-card{margin-bottom:23px;overflow:hidden}.record-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.record-head>div:first-child{min-width:0}.record-kicker{display:block;font-size:10px;color:#7b89a2;font-weight:850;letter-spacing:1.25px;margin-bottom:6px}.record-title{font-size:19px;letter-spacing:-.4px;margin:0}.record-subline{font-size:12px;color:#8a98ad;margin-top:4px}.record-pill{background:#edf7f4;color:#23775b;padding:8px 12px;border-radius:999px;font-size:11px;font-weight:750;white-space:nowrap}.record-pill.new{background:#eef2ff;color:#3656be}.record-pill.editing{background:#fff5df;color:#a57225}.data-table-wrap{width:100%;overflow-x:auto;border:1px solid #d9e0ec;border-radius:12px;scrollbar-color:#b7c5df #f7f9fc}.data-table{border-collapse:collapse;width:100%;table-layout:fixed;min-width:1000px;font-size:12px}.data-table th,.data-table td{border:1px solid #dee4ee;padding:7px;vertical-align:middle}.data-table thead th{background:#eff3fb;color:#26416d;text-align:center;font-size:10px;line-height:1.35;font-weight:800;height:58px;white-space:normal}.data-table thead th:first-child{background:#e7efff}.data-table tbody th{background:#f7f9fd;color:#243d66;font-weight:800;text-align:left;white-space:nowrap;padding:10px}.data-table tbody tr:hover td{background:#fafbff}.data-table input,.data-table textarea{width:100%;border:1px solid #e3e8f2!important;border-radius:7px!important;background:#fff!important;min-height:36px!important;padding:7px 8px!important;font-size:12px;line-height:1.4;box-shadow:none!important}.data-table textarea{height:47px;resize:vertical!important}.data-table input:disabled,.data-table textarea:disabled{background:#f5f7fb!important;color:#2a3c58!important;-webkit-text-fill-color:#2a3c58!important;border-color:transparent!important}.data-table .glucose-cell input{font-weight:750;text-align:center}.glucose-cell.low input{background:#fff9e5!important;color:#b9871f!important}.glucose-cell.normal input{background:#ebfaf1!important;color:#137553!important}.glucose-cell.high input{background:#fff0ea!important;color:#bc4f35!important}.data-table tr.glucose-row th{color:#294e9b}.record-foot{display:flex;justify-content:space-between;align-items:center;gap:15px;padding-top:17px;flex-wrap:wrap}.record-foot>.record-foot-note{font-size:12px;color:#8895ab;line-height:1.5}.button-pair{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.record-actions{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-top:10px}.small-stats{display:flex;align-items:center;gap:14px;flex-wrap:wrap;color:#60718c;font-size:12px}.small-stats strong{color:#2b4fba;font-size:14px}.mobile-periods{display:none}.mobile-period{border:1px solid #dce5f2;border-radius:13px;padding:14px;margin-bottom:12px;background:#fff}.mobile-period-title{font-size:12px;font-weight:850;color:#3756a0;padding:4px 0 11px;border-bottom:1px solid #e8eef8;margin-bottom:9px}.mobile-field{display:flex;gap:8px;align-items:flex-start;justify-content:space-between;padding:5px 0}.mobile-field label{font-weight:750;font-size:11px;color:#495f83;padding-top:11px;width:34%;flex-shrink:0;line-height:1.3}.mobile-field input,.mobile-field textarea{width:66%;min-width:0;min-height:41px!important;padding:9px 10px!important;font-size:13px!important}.mobile-field textarea{min-height:54px!important}.mobile-field.glucose-cell.low input{background:#fff9e5!important;color:#b9871f!important}.mobile-field.glucose-cell.normal input{background:#ebfaf1!important;color:#137553!important}.mobile-field.glucose-cell.high input{background:#fff0ea!important;color:#bc4f35!important}.capture-actions{justify-content:flex-start;gap:20px}.capture-actions .button-pair{gap:12px}.capture-status{font-size:12px;color:#7989a1}.record-card[data-editing=true]{border-color:#9cb5f3;box-shadow:0 8px 30px #305cc016}
.summary-line{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}.summary-mini{background:#fff;border:1px solid var(--line);border-radius:14px;padding:19px 20px}.summary-mini span{font-size:11px;font-weight:700;color:#8191ac;display:block}.summary-mini strong{display:block;font-size:27px;letter-spacing:-1px;margin:9px 0 2px;color:#223967}.summary-mini small{color:#8695ac;font-size:10px}.summary-mini .normaltext{color:var(--good)}.summary-mini .hightext{color:#c35e3d}.no-data-inline{background:#fff;padding:30px;border-radius:12px;color:#7a89a0;text-align:center}.more-btn{display:block;margin:24px auto}
.print-form-card{max-width:830px}.two-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin-bottom:18px}.two-fields .date-field{max-width:none}.tip-card{margin-top:20px;padding:22px 25px;background:#eef4ff;border:1px solid #dbe5ff;border-radius:15px;max-width:830px}.tip-card strong{color:#3854a2}.tip-card p{color:#647897;margin:8px 0 0;line-height:1.7;font-size:12px}
.stats-filter{display:flex;flex-wrap:wrap;align-items:end;gap:14px;margin-bottom:23px}.stats-filter>div{min-width:150px;flex:1;max-width:245px}.stats-filter .date-field{max-width:none}.stats-filter button{margin-bottom:0}.stat-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}.stat-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:19px;box-shadow:var(--shadow)}.stat-label{color:#7c8ba5;font-size:11px;font-weight:700;min-height:30px}.stat-value{font-size:29px;font-weight:850;color:#183766;letter-spacing:-1.4px;margin:4px 0 5px}.stat-unit{font-size:12px;font-weight:650;color:#7990ad;letter-spacing:0}.stat-sub{color:#8b99af;font-size:11px;line-height:1.5}.stat-card.good .stat-value{color:#17815e}.stat-card.coral .stat-value{color:#d86943}.stat-card.gold .stat-value{color:#b78621}.stats-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:19px}.chart-card{background:#fff;border:1px solid var(--line);border-radius:17px;padding:22px;box-shadow:var(--shadow);min-width:0}.chart-card h2{margin:0 0 5px;font-size:16px;letter-spacing:-.3px}.chart-caption{color:#91a0b4;font-size:11px;margin-bottom:23px;line-height:1.5}.chart-svg{width:100%;height:auto;display:block;overflow:visible}.chart-svg text{font-family:inherit;fill:#7b8ca4;font-size:11px}.chart-empty{padding:55px 10px;text-align:center;color:#8d9ab0;font-size:12px}.bar-line{display:grid;grid-template-columns:165px 1fr 58px;align-items:center;gap:12px;margin-bottom:16px;font-size:11px;color:#536681}.bar-line .bar-bg{height:10px;background:#eff3fa;border-radius:9px;overflow:hidden}.bar-line .bar-fill{height:100%;border-radius:9px;background:linear-gradient(90deg,#738ee8,#4168d0)}.bar-line strong{text-align:right;font-size:12px;color:#344d7d}.donut-section{display:flex;align-items:center;gap:24px;justify-content:center;margin:12px 0}.donut{width:150px;height:150px;border-radius:50%;position:relative;flex-shrink:0;display:grid;place-items:center;background:conic-gradient(#ecbd51 0deg 120deg,#4bc29b 120deg 240deg,#e78364 240deg 360deg)}.donut-inner{background:#fff;width:105px;height:105px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px}.donut-inner strong{font-size:23px;color:#243b66}.donut-inner span{font-size:10px;color:#8d9aaf}.legend{display:flex;flex-direction:column;gap:13px;font-size:11px;color:#657690}.legend-row{display:flex;align-items:center;justify-content:space-between;gap:20px}.legend-row span:before{content:"";display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:8px;background:var(--dot)}.legend-row strong{color:#263e6a}.stats-grid .wide{grid-column:1/-1}.monthly-bars{display:flex;align-items:end;justify-content:space-around;height:180px;gap:8px;border-bottom:1px solid #e4eaf4;padding:10px 6px 0}.month-column{display:flex;flex-direction:column;justify-content:end;align-items:center;gap:6px;min-width:0;flex:1;height:100%}.month-column .month-fill{width:min(34px,85%);background:linear-gradient(#6e88e5,#4161c7);border-radius:7px 7px 0 0;min-height:2px}.month-column span{color:#8291aa;font-size:10px;text-align:center;line-height:1.2}.month-column strong{color:#526fa9;font-size:11px}.note-box{border:1px solid #e6eaf5;background:#f9fbff;border-radius:14px;padding:16px 19px;font-size:12px;line-height:1.7;color:#63718b;margin-top:19px}.note-box strong{color:#31508f}.detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.detail-item{padding:14px 16px;border:1px solid #e6ebf4;border-radius:12px}.detail-item span{font-size:11px;color:#8796ad;display:block}.detail-item strong{font-size:18px;display:block;margin-top:7px;color:#254776}
.admin-layout{display:grid;grid-template-columns:minmax(250px,340px) minmax(0,1fr);gap:20px;align-items:start}.admin-layout .panel-card h2{font-size:16px;margin:0 0 19px}.user-line{display:flex;gap:10px;justify-content:space-between;align-items:center;padding:14px 0;border-bottom:1px solid #ebeff6;flex-wrap:wrap}.user-line:last-child{border:0}.user-head{display:flex;align-items:center;gap:10px;min-width:0}.user-circle{height:35px;width:35px;background:#eaf0fe;color:#3155bb;border-radius:10px;display:grid;place-items:center;font-weight:850}.user-head strong{display:block;font-size:13px}.user-head small{display:block;color:#8a98aa;font-size:11px;margin-top:3px}.user-tools{display:flex;gap:6px;flex-wrap:wrap}.status-chip{font-size:10px;font-weight:750;border-radius:7px;padding:4px 7px;background:#e9f7f0;color:#16805c}.status-chip.off{color:#a95b43;background:#fff0e6}
.modal-overlay{position:fixed;z-index:100;background:#13233d9e;inset:0;display:flex;align-items:center;justify-content:center;padding:18px;backdrop-filter:blur(4px)}.modal{background:#fff;border-radius:20px;max-width:440px;width:100%;padding:28px;box-shadow:0 22px 90px #020b2680}.modal-top{display:flex;justify-content:space-between;align-items:center;gap:12px}.modal-top h2{margin:0;font-size:21px}.modal>p{color:#7c89a1;font-size:12px;line-height:1.7;margin:10px 0 24px}.modal .stack{gap:12px}.toast{position:fixed;bottom:25px;right:25px;z-index:120;background:#163664;color:white;border-radius:13px;box-shadow:0 8px 36px #11294a40;padding:14px 21px;max-width:350px;font-weight:650;font-size:12px;line-height:1.5}.toast.error{background:#8c2d35}.mobile-backdrop{position:fixed;inset:0;background:#11244786;z-index:25}
@media (max-width:1150px){.sidebar{width:218px;flex-basis:218px}.workspace{padding-left:22px;padding-right:22px}.topbar{padding:0 22px}.stats-grid{grid-template-columns:1fr 1fr}.stat-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-line{grid-template-columns:repeat(2,minmax(0,1fr))}.bar-line{grid-template-columns:135px 1fr 50px}}
@media (max-width:900px){.sidebar{position:fixed;left:0;top:0;bottom:0;transform:translateX(-105%);transition:transform .22s;box-shadow:10px 0 30px #0d27522b;width:265px}.sidebar.open{transform:translateX(0)}.menu-btn{display:grid}.auth-art{padding:8%}.auth-layout{grid-template-columns:minmax(300px,45%) minmax(340px,55%)}.auth-card{padding:38px}.stats-grid{grid-template-columns:1fr}.chart-card.wide{grid-column:auto}.admin-layout{grid-template-columns:1fr}}
@media (max-width:760px){.auth-layout{display:block}.auth-art{display:none}.auth-card{max-width:510px;min-height:100vh;padding:35px 25px;display:flex;flex-direction:column;justify-content:center}.auth-card .small-brand{margin-bottom:60px}.auth-card h1{font-size:32px}.auth-foot{margin-top:65px}.topbar{height:67px;padding:0 14px}.top-date,.top-eyebrow{display:none}.top-left,.top-right{gap:9px}.logout-btn{padding:8px 10px}.workspace{padding:24px 13px 40px}.page-heading{margin-bottom:18px}.page-heading h1{font-size:28px}.page-heading .heading-decoration{display:none}.date-card{align-items:start;flex-direction:column}.date-card>div{width:100%}.form-aside{padding:0}.data-table-wrap{display:none}.mobile-periods{display:block}.record-card{padding:14px!important}.record-title{font-size:17px}.record-head{align-items:start;flex-wrap:wrap;gap:10px}.record-foot{align-items:stretch}.record-foot-note{width:100%}.capture-actions .button-pair{width:100%}.capture-actions .button-pair>.btn{flex:1}.summary-line{gap:9px}.summary-mini{padding:14px}.summary-mini strong{font-size:24px}.two-fields{grid-template-columns:1fr}.print-form-card .btn{width:100%}.stats-filter>div{max-width:none;width:100%;flex-basis:100%}.stats-filter .btn{width:100%}.chart-card{padding:17px}.bar-line{grid-template-columns:113px 1fr 44px;gap:8px;font-size:10px}.donut-section{flex-wrap:wrap}.donut{height:138px;width:138px}.donut-inner{height:96px;width:96px}.detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.app-footer{padding:17px 14px}.profile-info small{display:none}}
@media (max-width:450px){.record-pill{font-size:10px}.record-title{font-size:16px}.mobile-field label{width:40%;font-size:10px}.mobile-field input,.mobile-field textarea{width:60%}.stat-cards{gap:8px}.stat-card{padding:14px}.stat-value{font-size:24px}.stat-label{font-size:10px}.summary-mini strong{font-size:23px}.summary-mini span{font-size:10px}.detail-grid{grid-template-columns:1fr 1fr}.record-actions .button-pair{width:100%}.record-actions .button-pair .btn{flex:1}.user-line{align-items:flex-start}.modal{padding:21px}}

/* V2: comandos de guardado individuales por horario y campos de alimentación expansibles. */
.data-table {min-width:1100px}
.data-table thead th {height:auto;vertical-align:top;padding:12px 6px 9px}
.slot-heading {display:flex;align-items:center;justify-content:center;min-height:34px;margin-bottom:9px;line-height:1.28}
.slot-tools {display:flex;flex-direction:column;gap:6px;min-width:0}
.slot-button-row {display:flex;gap:5px;min-width:0}
.slot-btn {flex:1;min-width:0;padding:8px 4px;border-radius:7px;border:1px solid transparent;font-size:10px;font-weight:800;line-height:1.15;cursor:pointer;transition:background .15s ease,color .15s ease}
.slot-save {background:#305ccc;color:#fff}
.slot-edit {background:#fff;color:#2d4c9e;border-color:#bcc9e9}
.slot-btn:not(:disabled):hover {filter:brightness(.92)}
.slot-btn:disabled {opacity:.43;cursor:not-allowed}
.slot-state {display:block;font-size:10px;font-weight:650;color:#657697;text-align:center;min-height:12px}
.data-table textarea.auto-height,.mobile-field textarea.auto-height {height:auto;resize:none!important;overflow:hidden!important;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45!important;min-height:54px!important}
.data-table tr td {vertical-align:top}
.data-table input {min-width:0}
.mobile-period .slot-tools {margin:8px 0 13px;padding:0 0 11px;border-bottom:1px solid #e7edf8}
.mobile-period .slot-button-row {gap:9px}
.mobile-period .slot-btn {font-size:12px;min-height:38px;border-radius:10px}
.mobile-period .slot-state {font-size:11px}
.mobile-period .mobile-field {align-items:flex-start}
.mobile-period .mobile-field label {overflow-wrap:anywhere}
.delete-section {margin-top:19px;display:flex;align-items:center;justify-content:space-between;gap:17px;border-top:1px solid #e5ebf4;padding:18px 3px 2px}
.delete-info {min-width:0}
.delete-info strong {font-size:13px;color:#394963}
.delete-info p {color:#77869d;font-size:12px;margin:5px 0 12px;line-height:1.5}
.delete-confirm {display:flex;align-items:center;gap:9px;cursor:pointer;color:#53627e;font-size:12px;font-weight:700;line-height:1.4}
.delete-confirm input {width:18px;height:18px;flex-shrink:0;accent-color:#b44343;cursor:pointer}
.delete-confirm input:disabled {cursor:not-allowed}
.delete-table-btn {background:#bc343d!important;color:white!important;border:1px solid #bc343d;white-space:nowrap}
.delete-table-btn:disabled {background:#f4dfe2!important;color:#a6787e!important;border-color:#ead7da;opacity:.68}
@media (max-width:760px) {
  .delete-section {align-items:stretch;flex-direction:column;gap:13px}
  .delete-table-btn {width:100%}
  .mobile-field textarea.auto-height {min-width:0;max-width:66%}
}
@media (max-width:450px) {
  .mobile-field textarea.auto-height {max-width:60%}
  .mobile-period .slot-tools {margin-top:7px}
}

/* V3 — Alimentos habilitados exclusivamente en su horario y visor completo */
.data-table td.cell-not-applicable {background:#f7f9fd!important;text-align:center;vertical-align:middle;color:#b3bece;font-size:18px}
.data-table td.cell-not-applicable .legacy-value {display:block;text-align:left;color:#60738f;font-size:11px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.date-card > .date-card-controls {width:auto;flex:1;min-width:0;display:flex;align-items:end;gap:13px;flex-wrap:wrap}
.date-picker-group {flex:0 1 315px;min-width:180px}
.date-picker-group .date-field {width:100%;max-width:315px}
.view-table-btn {min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:9px;white-space:nowrap;flex-shrink:0}
.view-table-btn:disabled {opacity:.46;cursor:not-allowed}
.table-viewer-open {overflow:hidden}
.table-preview-overlay {position:fixed;inset:0;z-index:110;background:#0e1e38ba;display:flex;align-items:center;justify-content:center;padding:clamp(8px,2vw,24px)}
.table-preview-dialog {display:flex;flex-direction:column;max-width:1390px;width:100%;max-height:95dvh;min-height:280px;overflow:hidden;border-radius:19px;background:white;box-shadow:0 24px 70px #06163277}
.table-preview-top {display:flex;align-items:center;justify-content:space-between;gap:14px;padding:17px 22px;border-bottom:1px solid #e2e8f3}
.table-preview-heading h2 {font-size:20px;line-height:1.2;margin:0 0 5px}
.table-preview-date {color:#5a6e8c;font-size:13px;font-weight:650;text-transform:capitalize}
.table-preview-close {font-size:26px;flex-shrink:0;width:40px;height:40px;display:grid;place-items:center;border-radius:10px;background:#f0f4fb}
.table-preview-actions {display:flex;align-items:center;justify-content:space-between;padding:9px 22px;gap:10px;flex-wrap:wrap;border-bottom:1px solid #e3e9f4}
.table-preview-actions p {color:#73829d;font-size:12px;line-height:1.4;margin:0}
.preview-zoom-tools {display:flex;align-items:center;gap:6px}
.preview-zoom-tools button {min-width:34px;min-height:32px;border-radius:7px;border:1px solid #dae3f1;background:#f8faff;color:#254577;font-size:14px;font-weight:700;padding:5px 9px}
.preview-zoom-tools button:hover {background:#e9efff}
.preview-zoom-tools span {min-width:42px;text-align:center;font-variant-numeric:tabular-nums;font-size:12px;font-weight:750;color:#37578b}
.table-preview-draft {margin:10px 20px 0;border-radius:9px;padding:9px 12px;background:#fff3de;color:#865519;font-size:12px}
.table-preview-scroll {flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:20px 18px;background:#f5f7fc;scrollbar-color:#aebcd5 #f4f6fa}
.table-preview-frame {width:1100px;max-width:none;margin:auto;min-width:1100px}
.preview-table {width:1100px;border-collapse:collapse;table-layout:fixed;background:#fff;font-size:12px;color:#253953;box-shadow:0 2px 14px #1b35540d}
.preview-table th,.preview-table td {border:1px solid #c2ccdb;padding:10px 8px;white-space:pre-wrap;overflow-wrap:anywhere;vertical-align:top;line-height:1.45}
.preview-table thead th {background:#e9f0ff;font-size:11px;text-align:center;vertical-align:middle;color:#244377;font-weight:800}
.preview-table tbody th {background:#f1f5fd;font-size:11px;text-align:left;vertical-align:middle;font-weight:800}
.preview-table tbody td.preview-na {background:#f8fafc;color:#74869e}
.table-preview-footer {border-top:1px solid #e4eaf5;font-size:11px;color:#71819a;padding:11px 20px;line-height:1.5}
@media(max-width:760px){
 .date-card > .date-card-controls {width:100%;flex-direction:row;align-items:end;gap:10px;flex-wrap:nowrap}
 .date-picker-group {min-width:0;flex:1 1 0}
 .date-picker-group .date-field {max-width:none;min-width:0;font-size:13px;padding-left:8px;padding-right:3px}
 .view-table-btn {padding:10px 11px;font-size:12px}
 .table-preview-overlay {padding:0}
 .table-preview-dialog {width:100%;max-height:100dvh;height:100dvh;border-radius:0}
 .table-preview-top {padding:14px 13px}
 .table-preview-heading h2 {font-size:17px}
 .table-preview-date {font-size:11px}
 .table-preview-actions {padding:10px 13px}
 .table-preview-scroll {padding:12px 8px}
 .table-preview-footer {padding:10px 13px}
}
@media(max-width:375px){
 .date-card > .date-card-controls {flex-wrap:wrap}
 .date-picker-group {flex-basis:100%}
 .view-table-btn {width:100%}
}
