.diet-history-center{color:var(--text,#f5f7fa);display:grid;gap:16px;min-width:0;letter-spacing:0}
.diet-history-center{background:transparent;border:0;box-shadow:none}
.diet-history-center [role=tabpanel]{display:grid;gap:14px}
.diet-history-center .dhc-two-column{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.diet-history-center .dhc-section{padding:16px;margin:0;border:1px solid var(--border-soft);border-radius:8px;background:var(--surface);box-shadow:none;font-size:13px;line-height:1.45}
.diet-history-center .dhc-section>h3{font-size:16px;font-weight:700;line-height:1.3;margin:0 0 16px;padding-bottom:12px;border-bottom:1px solid var(--border,#34383c);overflow-wrap:anywhere}
.diet-history-center .dhc-section :is(p,li,.dhc-rows li,.dhc-summary){font-size:13px;line-height:1.45}
.diet-history-center .dhc-section small,.diet-history-center .dhc-caption{font-size:12px;line-height:1.4}
.diet-history-center .dhc-weekdays{gap:4px;font-size:12px}
.diet-history-center .dhc-weekdays strong{font-size:12px}
.diet-history-center .dhc-bar-track{height:88px;width:60%;max-width:32px;background:var(--surface)}
.diet-history-center .dhc-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding-top:14px;border-top:1px solid var(--border,#34383c)}
.diet-history-center .dhc-summary dt{font-size:12px;color:var(--muted,#9ba3af);overflow-wrap:anywhere}
.diet-history-center .dhc-summary dd{font-size:16px;font-weight:700;margin:6px 0 0;overflow-wrap:anywhere}
.diet-history-center .dhc-meal-bars{gap:0}
.diet-history-center .dhc-meal-bars li{padding:12px 0;border-bottom:1px solid var(--border,#34383c)}
.diet-history-center .dhc-meal-bars header{font-size:13px;line-height:1.4;flex-wrap:wrap;gap:8px}
.diet-history-center .dhc-rows li{gap:12px;align-items:baseline}
.diet-history-center .dhc-rows li strong{white-space:normal;overflow-wrap:anywhere}
.diet-history-center .dhc-controls{padding-top:0;gap:12px}
.diet-history-center .dhc-controls label{flex:1 1 140px}
.diet-history-center .dhc-segments{flex-wrap:wrap}
.diet-history-center .history-stats-grid>div{background:var(--surface);border:1px solid var(--border-soft)}
.diet-history-center .history-stats-grid small{font-size:11px}
.diet-history-center .history-stats-grid strong{font-size:16px}
html[data-theme="light"] .diet-history-center .dhc-section,html[data-theme="light"] .diet-history-center .history-stats-grid>div{background:var(--app-bg);border-color:var(--border-soft)}
@media(min-width:600px){.diet-history-center .dhc-summary{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:900px){.diet-history-center .dhc-two-column{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}
.diet-history-center *{box-sizing:border-box;min-width:0}
.diet-history-center .training-history-toolbar{display:flex;flex-wrap:nowrap;gap:4px;padding:0;background:none;border:0;align-items:center}
.diet-history-center .workout-history-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:4px}
.diet-history-center .workout-history-tabs button{display:grid;justify-items:center;gap:5px;min-height:48px;padding:6px 0;font-size:9px;white-space:nowrap;border-radius:6px}
.diet-history-center button svg{width:20px;height:20px;flex:none}
.diet-history-center button,.diet-history-center select,.diet-history-center input{font:inherit;color:inherit;max-width:100%}
.diet-history-center button{cursor:pointer}
.diet-history-center button:disabled{cursor:default;opacity:.5}
.diet-history-center :focus-visible{outline:2px solid var(--cyan,#7ee8ff);outline-offset:3px}
.diet-history-center .history-toolbar-actions{display:flex;justify-content:flex-end;gap:8px;width:100%}
.diet-history-center .icon-btn{width:44px;height:44px;display:grid;place-items:center;padding:0;flex:none}
.diet-history-center select,.diet-history-center input{background:var(--panel,#101216);border:1px solid var(--border,rgba(126,232,255,.2));border-radius:6px;min-height:44px;padding:8px;width:100%}
.diet-history-center .dhc-report{max-width:130px}
.diet-history-center .dhc-period{margin:0;color:var(--muted,#9ba3af);font-size:13px}
.diet-history-center .history-stats-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.diet-history-center .history-stats-grid>div{border-radius:8px;padding:10px 3px}
.diet-history-center .history-stats-grid strong{font-size:15px;font-variant-numeric:tabular-nums}
.diet-history-center .history-stats-grid small{font-size:9px;color:var(--muted,#9ba3af);text-transform:none}
.dhc-section{padding:18px 0;border-bottom:1px solid var(--border,rgba(126,232,255,.14));min-width:0}
.dhc-section h3{font-size:16px;margin:0 0 16px;font-weight:650;letter-spacing:0}
.dhc-empty{font-size:14px;color:var(--muted,#9ba3af);margin:12px 0}
.dhc-weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;text-align:center;font-size:11px}
.dhc-weekdays strong{font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}
.dhc-bar-track{height:100px;background:var(--panel,#101216);display:flex;align-items:flex-end;margin:8px auto;width:70%;border-radius:4px;overflow:hidden}
.dhc-bar-track i{display:block;width:100%;background:var(--cyan,#7ee8ff);border-radius:3px 3px 0 0}
.dhc-rows,.dhc-history-list{list-style:none;padding:0;margin:0}
.dhc-rows li{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--border,rgba(126,232,255,.14));font-size:13px}
.dhc-rows li span{overflow-wrap:anywhere}
.dhc-rows li strong{text-align:right;font-weight:600;flex-shrink:0;font-variant-numeric:tabular-nums;max-width:60%}
.dhc-insights{padding-left:20px;font-size:14px;line-height:1.6}
.dhc-controls{display:flex;align-items:flex-end;flex-wrap:wrap;gap:16px;padding-top:20px}
.dhc-controls label{display:grid;gap:6px;flex:1}
.dhc-segments{display:flex;gap:4px}
.dhc-segments button{min-height:44px;padding:8px 12px;border:1px solid var(--border,rgba(126,232,255,.2));background:var(--panel,#101216);border-radius:6px}
.dhc-segments [aria-pressed=true]{border-color:var(--red,#f01f39);color:var(--red-strong,#ff4056)}
.dhc-comparison{display:grid;gap:8px;font-size:13px;color:var(--muted,#9ba3af)}
.dhc-comparison strong{font-size:22px;color:var(--text,#f5f7fa)}
.diet-history-center .dhc-positive{color:var(--success,#4cb59a)}
.diet-history-center .dhc-negative{color:var(--red-strong,#ff4056)}
.dhc-history-list li{display:flex;flex-wrap:wrap;align-items:center;border:1px solid var(--border,rgba(126,232,255,.14));gap:8px;padding:12px;border-radius:8px;margin-bottom:10px}
.dhc-history-list li>button:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:1;text-align:left;background:none;border:0;padding:14px 0;min-height:60px}
.dhc-history-list small{display:block;color:var(--muted,#9ba3af);font-size:12px;margin-top:4px;overflow-wrap:anywhere}
.dhc-calendar-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px;font-size:14px}
.dhc-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;text-align:center}
.dhc-calendar button{aspect-ratio:1;min-height:36px;padding:0;border:1px solid var(--border,rgba(126,232,255,.14));border-radius:6px;background:var(--panel,#101216);font-size:13px}
.dhc-calendar [data-level=high]{border-color:var(--success);color:var(--success)}
.dhc-calendar [data-level=medium]{border-color:var(--primary);color:var(--primary)}
.dhc-calendar [data-level=low]{border-color:var(--red-strong,#ff4056);color:var(--red-strong,#ff4056)}
.dhc-legend{font-size:11px;line-height:1.6;color:var(--muted,#9ba3af)}
.diet-history-center .dhc-goal-field{display:grid;grid-template-columns:minmax(0,1fr) 100px;gap:12px;align-items:center;margin:16px 0}
.dhc-goal-field small{display:block;color:var(--muted,#9ba3af);margin-top:6px;font-size:12px}
.diet-history-center fieldset{border:0;padding:0;margin:0}
.diet-history-center legend{font-size:18px;padding-top:20px}
.dhc-filter-dialog{color:var(--text,#f5f7fa);background:var(--panel,#101216);border:1px solid var(--border,rgba(126,232,255,.2));border-radius:8px;padding:20px;width:min(440px,calc(100% - 24px));max-height:85dvh;overflow-y:auto}
.dhc-filter-dialog::backdrop{background:var(--overlay)}
.dhc-filter-dialog form{display:grid;gap:16px}
.dhc-filter-dialog header,.dhc-filter-dialog footer{display:flex;justify-content:space-between;align-items:center;gap:12px}
.dhc-filter-dialog h2{font-size:18px;margin:0}
.dhc-filter-dialog label{display:grid;gap:6px;font-size:14px}
.dhc-date-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.dhc-filter-dialog .dhc-checkbox{display:flex;align-items:center;gap:10px}
.dhc-filter-dialog input[type=checkbox]{width:20px;min-height:20px;accent-color:var(--red,#f01f39)}
.dhc-filter-dialog footer button,.diet-history-center .primary,.diet-history-center .secondary{min-height:44px;padding:10px 16px;border-radius:6px}
.dhc-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.dhc-navigation{flex:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px}
.diet-history-center [data-dhc-action=back]{width:28px;min-width:28px;height:48px}
.diet-history-center .dhc-navigation .history-toolbar-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:4px}
.diet-history-center .history-goal-trigger{display:grid;justify-items:center;align-content:center;gap:5px;min-height:48px;padding:6px 0;font-size:9px;border:0;background:none}
.dhc-session-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:8px;margin:0;padding-top:8px;border-top:1px solid var(--border,rgba(126,232,255,.14))}
.dhc-session-metrics dt{font-size:11px;color:var(--muted,#9ba3af)}
.dhc-session-metrics dd{font-size:13px;margin:4px 0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.dhc-day-actions,.dhc-download{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.dhc-day-actions{width:100%}
.dhc-day-actions button,.dhc-download button{min-height:44px;display:flex;align-items:center;gap:6px;padding:8px 12px;border-radius:6px}
.diet-history-center .dhc-download{position:fixed;z-index:1200;display:grid;gap:4px;width:180px;max-width:calc(100vw - 16px);padding:6px;border:1px solid var(--border-default);border-radius:8px;background:var(--surface);box-shadow:var(--shadow-md);}
.diet-history-center .dhc-download button{width:100%;justify-content:flex-start;border:0;background:transparent;color:var(--text-primary);font-size:14px;text-align:left;}
.diet-history-center .dhc-download button:not(:disabled):is(:hover,:focus-visible){background:var(--primary-soft);color:var(--primary);}
.diet-history-center .dhc-download button svg{width:18px;height:18px;}
.diet-history-center .dhc-download p{margin:4px 8px 8px;color:var(--text-muted);font-size:12px;line-height:1.5;}
.diet-history-center [data-dhc-action=download][aria-expanded=true]{background:var(--primary-soft);color:var(--primary);border-radius:6px;}
.dhc-summary{display:flex;flex-wrap:wrap;gap:20px;margin:0;font-size:14px}
.dhc-summary dd{margin:6px 0 0;font-weight:600}
.dhc-record-count{font-size:13px;color:var(--muted,#9ba3af)}
.dhc-goal-progress{display:grid;gap:6px;margin:0 0 20px}
.dhc-goal-progress progress{width:100%;height:8px;accent-color:var(--cyan,#7ee8ff)}
.dhc-goal-progress small{font-size:12px;color:var(--muted,#9ba3af)}
.dhc-weekdays small{display:block;margin-top:6px;color:var(--muted,#9ba3af);font-size:10px}
.dhc-weekdays+.dhc-summary{margin-top:20px}
.dhc-caption{font-size:12px;line-height:1.5;color:var(--muted,#9ba3af)}
.dhc-meal-bars{padding:0;list-style:none;display:grid;gap:18px;margin:0}
.dhc-meal-bars li{display:grid;gap:7px}
.dhc-meal-bars header{display:flex;justify-content:space-between;gap:12px;font-size:13px}
.dhc-meal-bars header span{overflow-wrap:anywhere}
.dhc-meal-bars progress{width:100%;height:9px;accent-color:var(--cyan,#7ee8ff)}
.dhc-meal-bars small{font-size:11px;color:var(--muted,#9ba3af)}
.diet-history-center .history-goal-trigger[aria-pressed=true]{box-shadow:inset 0 -2px var(--red,#f01f39);color:var(--text,#f5f7fa)}
@media(min-width:720px){.diet-history-center .history-stats-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.dhc-two-column{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 28px}.diet-history-center .workout-history-tabs{width:auto;flex:1}.diet-history-center .history-toolbar-actions{width:auto}.dhc-calendar{max-width:430px}.dhc-calendar-heading{max-width:430px}}
@media(min-width:900px){.diet-history-center .dhc-two-column{display:block;column-count:2;column-gap:14px}.diet-history-center .dhc-two-column>.dhc-section{display:flow-root;break-inside:avoid;width:100%;margin:0 0 14px}}
