.ihs-dialog {
    --ihs-blue: var(--primary, #0798ed);
    --ihs-amber: #eaa322;
    --ihs-card: var(--bg-card, #fff);
    --ihs-bg: var(--bg-outer, #f4f6f9);
    --ihs-line: var(--border-color, #e2e8f0);
    --ihs-text: var(--text-main, #17243a);
    --ihs-muted: var(--text-muted, #64748b);
    width: min(960px, calc(100vw - 48px));
    max-width: none; max-height: calc(100dvh - 64px);
    margin: auto; padding: 0; border: 1px solid var(--ihs-line);
    border-radius: 26px; background: var(--ihs-card); color: var(--ihs-text);
    box-shadow: 0 32px 100px #0004;
    font-family: 'Inter', system-ui, sans-serif;
}
.ihs-dialog::backdrop { background: #0b1629a6; backdrop-filter: blur(5px); }
.ihs-dialog *, .ihs-dialog *::before, .ihs-dialog *::after { box-sizing: border-box; }
.ihs-dialog [hidden] { display: none !important; }
.ihs-dialog button, .ihs-dialog select { font: inherit; color: inherit; }
.ihs-dialog button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ihs-dialog button:focus-visible, .ihs-dialog select:focus-visible, .ihs-dialog summary:focus-visible,
.stat-card-hours:focus-visible { outline: 3px solid var(--primary, #0798ed); outline-offset: 3px; }
.ihs-dialog button:disabled { opacity: .32; cursor: default; }
.ihs-shell { display: flex; flex-direction: column; max-height: calc(100dvh - 66px); }
.ihs-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 30px; border-bottom: 1px solid var(--ihs-line); }
.ihs-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ihs-icon { width: 48px; height: 48px; padding: 11px; border-radius: 15px; color: var(--ihs-blue); background: color-mix(in srgb, var(--ihs-blue) 10%, var(--ihs-card)); flex-shrink: 0; }
.ihs-icon svg, .ihs-planned-icon svg { width: 100%; height: 100%; display: block; }
.ihs-eyebrow { margin: 0 0 6px; font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--ihs-muted); }
.ihs-dialog h2 { margin: 0; padding: 0; border: 0; font-size: 23px; font-weight: 750; letter-spacing: -.035em; line-height: 1.25; }
.ihs-close { width: 44px; height: 44px; display: grid; place-items: center; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--ihs-line); background: var(--ihs-card); font-size: 17px; }
.ihs-close:hover { background: var(--ihs-bg); }
.ihs-scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 26px 30px; }
.ihs-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 30px; }
.ihs-month { display: flex; flex-direction: column; align-items: stretch; text-align: left; min-width: 0; padding: 17px 18px 13px; border-radius: 17px; background: var(--ihs-card); border: 1px solid var(--ihs-line); position: relative; transition: border-color .15s, background .15s; }
.ihs-month:hover { border-color: var(--ihs-blue); }
.ihs-month[aria-pressed="true"] { background: color-mix(in srgb, var(--ihs-blue) 6%, var(--ihs-card)); border-color: var(--ihs-blue); box-shadow: inset 0 0 0 1px var(--ihs-blue); }
.ihs-month-top { display: flex; justify-content: space-between; gap: 6px; color: var(--ihs-muted); font-size: 10px; margin-bottom: 9px; }
.ihs-month-top > span:last-child { color: var(--ihs-blue); font-size: 16px; line-height: .8; }
.ihs-month > strong { display: block; text-transform: capitalize; font-size: 14px; font-weight: 650; }
.ihs-month-total { display: block; font-size: 29px; letter-spacing: -.035em; font-weight: 750; margin: 14px 0 12px; line-height: 1; }
.ihs-month-total small { font-size: 15px; font-weight: 500; color: var(--ihs-muted); }
.ihs-month-bar { display: flex; height: 5px; border-radius: 5px; background: var(--ihs-line); overflow: hidden; }
.ihs-month-bar i { background: var(--ihs-blue); } .ihs-month-bar b { background: var(--ihs-amber); }
.ihs-month-caption { display: block; color: var(--ihs-muted); font-size: 10px; margin-top: 7px; }
.ihs-period { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 18px; }
.ihs-period h3 { font-size: 24px; font-weight: 700; letter-spacing: -.03em; margin: 0; text-transform: capitalize; line-height: 1.3; }
.ihs-switch { display: flex; padding: 4px; border-radius: 12px; background: var(--ihs-bg); flex-shrink: 0; }
.ihs-switch button { border: 0; background: transparent; border-radius: 9px; padding: 10px 18px; font-size: 12px; color: var(--ihs-muted); min-height: 42px; font-weight: 600; }
.ihs-switch button[aria-pressed="true"] { background: color-mix(in srgb, var(--ihs-blue) 8%, var(--ihs-card)); color: var(--ihs-blue); box-shadow: 0 2px 5px #0001; }
.ihs-week-nav { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.ihs-week-nav button { width: 44px; height: 44px; border: 1px solid var(--ihs-line); border-radius: 11px; background: var(--ihs-card); font-size: 25px; }
.ihs-week-nav label { flex: 1; max-width: 270px; }
.ihs-week-nav select { width: 100%; border: 1px solid var(--ihs-line); background: var(--ihs-card); border-radius: 11px; padding: 11px 12px; height: 44px; font-size: 13px; }
.ihs-week-note { color: var(--ihs-muted); font-size: 11px; margin: 0 0 18px; }
.ihs-metrics { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 12px; }
.ihs-metric { padding: 22px 19px 18px; border: 1px solid var(--ihs-line); border-radius: 17px; min-width: 0; }
.ihs-metric > span { display: flex; align-items: center; gap: 7px; color: var(--ihs-muted); font-size: 11px; font-weight: 600; }
.ihs-metric > strong { display: block; font-size: 36px; line-height: 1.2; letter-spacing: -.04em; margin: 14px 0 8px; font-weight: 750; }
.ihs-metric small { font-size: 18px; font-weight: 450; letter-spacing: 0; }
.ihs-metric p { margin: 0; color: var(--ihs-muted); font-size: 10px; line-height: 1.5; }
.ihs-total { background: linear-gradient(125deg, color-mix(in srgb, var(--ihs-blue) 88%, #073b67), #117bc5); border-color: transparent; color: white; }
.ihs-total > span, .ihs-total p { color: #e3f4ff; }
.ihs-planned { display: flex; align-items: center; gap: 12px; padding: 17px 19px; margin: 12px 0 26px; border-radius: 13px; background: var(--ihs-bg); }
.ihs-planned-icon { color: var(--ihs-muted); width: 25px; height: 25px; flex-shrink: 0; }
.ihs-planned strong { font-size: 12px; font-weight: 550; }
.ihs-planned strong span { font-weight: 750; margin-left: 5px; }
.ihs-planned p { color: var(--ihs-muted); margin: 5px 0 0; font-size: 11px; line-height: 1.5; }
.ihs-planned p > span { padding: 0 7px; }
.ihs-chart-section { border: 1px solid var(--ihs-line); border-radius: 17px; padding: 20px; margin-bottom: 27px; }
.ihs-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ihs-section-title h4 { font-size: 13px; font-weight: 650; margin: 0; }
.ihs-section-title > span { color: var(--ihs-muted); font-size: 10px; }
.ihs-chart { display: flex; align-items: stretch; gap: 18px; padding: 2px 12px 0; }
.ihs-chart-column { flex: 1; min-width: 0; text-align: center; background: transparent; padding: 6px 5px; border: 0; border-radius: 10px; display: flex; flex-direction: column; align-items: center; }
button.ihs-chart-column:hover { background: var(--ihs-bg); }
.ihs-chart-value { font-size: 11px; font-weight: 650; margin-bottom: 10px; }
.ihs-bar-track { display: flex; flex-direction: column; justify-content: flex-end; height: 90px; width: min(100%, 54px); background: var(--ihs-bg); border-radius: 6px; overflow: hidden; }
.ihs-bar-stack { display: flex; flex-direction: column-reverse; width: 100%; min-height: 0; border-radius: 6px 6px 0 0; overflow: hidden; }
.ihs-bar-stack i { display: block; width: 100%; flex-shrink: 0; }
.ihs-basic { background: var(--ihs-blue); } .ihs-extra { background: var(--ihs-amber); }
.ihs-chart-label { font-size: 10px; margin-top: 9px; color: var(--ihs-muted); white-space: nowrap; }
.ihs-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 18px; font-size: 10px; color: var(--ihs-muted); }
.ihs-legend > span, .ihs-day-types > span { display: inline-flex; align-items: center; gap: 6px; }
.ihs-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ihs-days-section .ihs-section-title { margin-bottom: 7px; }
.ihs-day { display: grid; grid-template-columns: 1fr 1.2fr .9fr; gap: 15px; align-items: center; padding: 15px 2px; border-bottom: 1px solid var(--ihs-line); }
.ihs-day-date strong, .ihs-day-total strong { display: block; font-size: 12px; font-weight: 650; }
.ihs-day-date > span, .ihs-day-total > span { display: block; color: var(--ihs-muted); font-size: 10px; margin-top: 4px; }
.ihs-day-types { display: flex; gap: 18px; font-size: 11px; justify-content: flex-start; }
.ihs-day-total { text-align: right; }
.ihs-empty { display: flex; align-items: center; flex-direction: column; text-align: center; padding: 30px 16px; background: var(--ihs-bg); border-radius: 14px; }
.ihs-empty svg { width: 32px; height: 32px; color: var(--ihs-muted); margin-bottom: 12px; }
.ihs-empty strong { font-size: 13px; } .ihs-empty p { font-size: 11px; color: var(--ihs-muted); line-height: 1.5; margin: 7px 0 0; }
.ihs-footer { margin-top: 25px; }
.ihs-quarter { padding: 18px; background: var(--ihs-bg); border-radius: 14px; }
.ihs-quarter > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ihs-quarter > div > span { color: var(--ihs-muted); font-size: 11px; }
.ihs-quarter strong { font-size: 21px; white-space: nowrap; letter-spacing: -.03em; }
.ihs-quarter p { font-size: 10px; color: var(--ihs-muted); line-height: 1.8; margin: 9px 0 0; }
.ihs-quarter p > span { padding: 0 9px; } .ihs-quarter b { font-weight: 600; color: var(--ihs-text); }
.ihs-method { margin: 17px 2px 0; color: var(--ihs-muted); font-size: 11px; line-height: 1.7; }
.ihs-method summary { cursor: pointer; padding: 7px 0; width: fit-content; font-weight: 550; }
.ihs-method p { margin: 8px 0; }
.ihs-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 650px) {
    .ihs-dialog { width: calc(100vw - 24px); border-radius: 22px; max-height: calc(100dvh - 24px); }
    .ihs-shell { max-height: calc(100dvh - 26px); }
    .ihs-header { padding: 19px 18px; }
    .ihs-brand { gap: 10px; } .ihs-icon { width: 40px; height: 40px; padding: 9px; border-radius: 12px; }
    .ihs-dialog h2 { font-size: 18px; } .ihs-eyebrow { font-size: 8px; }
    .ihs-scroll { padding: 20px 18px; scrollbar-gutter: auto; }
    .ihs-months { gap: 7px; margin-bottom: 24px; }
    .ihs-month { padding: 13px 10px 10px; border-radius: 13px; }
    .ihs-month-top { font-size: 9px; min-height: 25px; margin-bottom: 5px; }
    .ihs-month > strong { font-size: 12px; line-height: 1.5; min-height: 36px; }
    .ihs-month-total { font-size: 23px; margin-top: 12px; } .ihs-month-total small { font-size: 11px; }
    .ihs-month-caption { font-size: 9px; }
    .ihs-period { gap: 10px; align-items: flex-start; }
    .ihs-period h3 { font-size: 20px; }
    .ihs-switch { padding: 3px; } .ihs-switch button { padding: 8px 10px; font-size: 11px; min-height: 38px; }
    .ihs-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .ihs-metric { padding: 17px 14px; border-radius: 14px; }
    .ihs-total { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; }
    .ihs-total > strong { grid-row: 1 / 3; grid-column: 2; margin: 0; font-size: 37px; }
    .ihs-total p { margin-top: 7px; }
    .ihs-metric > span { font-size: 11px; gap: 5px; line-height: 1.4; }
    .ihs-metric > strong { font-size: 30px; margin: 10px 0 6px; }
    .ihs-metric p { font-size: 10px; }
    .ihs-planned { padding: 14px; margin-bottom: 22px; gap: 10px; }
    .ihs-planned p { font-size: 10px; } .ihs-planned p > span { padding: 0 3px; }
    .ihs-chart-section { padding: 16px 12px; }
    .ihs-section-title { gap: 6px; flex-wrap: wrap; }
    .ihs-section-title h4 { font-size: 12px; } .ihs-section-title > span { font-size: 9px; }
    .ihs-chart { gap: 7px; padding: 0; } .ihs-chart-column { padding: 5px 2px; }
    .ihs-chart-value, .ihs-chart-label { font-size: 10px; }
    .ihs-bar-track { max-width: 36px; }
    .ihs-day { grid-template-columns: .9fr 1.2fr 1fr; gap: 8px; }
    .ihs-day-types { gap: 9px; font-size: 10px; }
    .ihs-day-date > span, .ihs-day-total > span { font-size: 9px; }
    .ihs-quarter { padding: 14px; }
}
@media (max-width: 370px) {
    .ihs-dialog { width: 100vw; max-height: 100dvh; border: 0; border-radius: 0; }
    .ihs-shell { max-height: 100dvh; }
    .ihs-header { padding: max(14px, env(safe-area-inset-top)) 14px 14px; }
    .ihs-scroll { padding: 18px 14px max(20px, env(safe-area-inset-bottom)); }
    .ihs-dialog h2 { font-size: 17px; } .ihs-icon { display: none; }
    .ihs-period { flex-wrap: wrap; } .ihs-switch { width: 100%; } .ihs-switch button { flex: 1; }
    .ihs-month-top > span:last-child { display: none; }
    .ihs-day-types { flex-direction: column; gap: 4px; align-items: center; }
    .ihs-quarter > div > span { max-width: 140px; }
}
@media (prefers-reduced-motion: reduce) { .ihs-dialog * { transition: none !important; scroll-behavior: auto !important; } }
