:root {
    --brand: #14735a;
    --brand-dark: #0c5844;
    --brand-soft: #e9f6f1;
    --blue: #2f80ed;
    --orange: #f2994a;
    --danger: #c23f3a;
    --danger-soft: #fff0ef;
    --warning: #b66516;
    --warning-soft: #fff6e8;
    --bg: #f3f7f5;
    --card: #fff;
    --line: #dce7e2;
    --text: #17372e;
    --muted: #698078;
    --shadow: 0 12px 35px rgba(24, 68, 54, .09);
}

* { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior-y: contain; }
body { margin: 0; background: linear-gradient(150deg, #edf8f4 0, #f6f8f7 340px); color: var(--text); font: 15px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
[hidden], .hidden { display: none !important; }
button, input, textarea { min-width: 0; max-width: 100%; font: inherit; }
button { min-height: 42px; border: 0; border-radius: 10px; padding: 9px 15px; background: var(--brand); color: #fff; font-weight: 750; cursor: pointer; transition: .15s ease; }
button:hover { background: var(--brand-dark); }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(20, 115, 90, .2); outline-offset: 2px; }
button:disabled { opacity: .48; cursor: not-allowed; }
button.secondary { background: #e9f0ed; color: #234b3f; }
button.secondary:hover { background: #dce9e4; }
button.danger { background: var(--danger); }
button.ghost { border: 1px solid #b9d8cd; background: #fff; color: var(--brand); }
button.ghost:hover { background: var(--brand-soft); }
input, textarea { display: block; width: 100%; min-height: 42px; border: 1px solid #b9ccc4; border-radius: 10px; background: #fff; color: var(--text); padding: 9px 11px; outline: none; }
input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 115, 90, .12); }
input[type="date"], input[type="time"] { width: 100% !important; min-width: 0 !important; max-width: 100% !important; inline-size: 100% !important; min-inline-size: 0 !important; }
input::-webkit-date-and-time-value { display: flex; align-items: center; min-width: 0; min-height: 100%; padding-inline: 7px; text-align: left; }

main { max-width: 1240px; margin: 32px auto; padding: 0 20px 40px; }
.card { border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 22px; box-shadow: var(--shadow); }
.auth-card { max-width: 460px; margin: clamp(36px, 12vh, 120px) auto; padding: 38px; text-align: center; }
.auth-mark { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px; background: linear-gradient(145deg, #1b8b6d, var(--brand-dark)); color: #fff; font-size: 27px; font-weight: 900; box-shadow: 0 10px 25px rgba(20, 115, 90, .22); }
.auth-card h1 { margin: 0 0 9px; font-size: 27px; }
.auth-card p { max-width: 350px; margin: 0 auto 23px; color: var(--muted); }
.auth-status { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.auth-status p { margin: 0; }
.spinner { width: 30px; height: 30px; border: 3px solid #d8e9e2; border-top-color: var(--brand); border-radius: 50%; animation: spin .75s linear infinite; }
.spinner.small { width: 18px; height: 18px; border-width: 2px; }
.login-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px; border-radius: 11px; background: var(--brand); color: #fff; font-weight: 800; text-decoration: none; }
.login-button:hover { background: var(--brand-dark); }
.auth-error { margin-top: 15px; color: var(--danger); font-size: 13px; }
.auth-error:empty { display: none; }
.auth-note { margin-top: 17px !important; font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.subtitle, .muted { color: var(--muted); }
.login-user { display: flex; align-items: center; gap: 9px; min-width: 0; overflow: hidden; padding: 7px 10px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbfa; }
.login-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; object-fit: cover; background: #dfece7; }
.login-avatar-fallback { display: flex; align-items: center; justify-content: center; color: var(--brand); font-weight: 900; }
.login-copy { min-width: 0; overflow: hidden; }
.login-copy strong, .login-copy span { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.login-copy strong { font-size: 13px; }
.login-copy span { color: var(--muted); font-size: 11px; }
.screen-actions { display: flex; justify-content: flex-end; margin: 2px 0 14px; }
.back-actions { justify-content: flex-start; margin-bottom: 16px; }

.timer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 15px 16px; margin: 0 0 18px; border: 1px solid #d5ebe3; border-radius: 13px; background: #f0f8f5; }
.timer-main { margin-right: auto; }
.timer-main span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.timer-main strong { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.message { position: sticky; top: 8px; z-index: 30; display: none; margin: 12px 0; padding: 11px 14px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 650; }
.message.show { display: block; }
.message.error { background: var(--danger-soft); color: #9c302d; }

.filters, .stats-filters { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr) auto; gap: 14px; align-items: start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #f8fbfa; }
.filters > *, .stats-filters > *, .date-range > *, .clock-row > * { min-width: 0; }
.field { position: relative; display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.field label { color: #526b63; font-size: 12px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.date-range { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; min-width: 0; }
.filter-actions, .stats-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 24px; }
.filter-actions button, .stats-actions button { white-space: nowrap; }
.employee-wrap { position: relative; }
.suggestions { position: absolute; z-index: 20; top: calc(100% + 5px); right: 0; left: 0; display: none; max-height: 270px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 5px; box-shadow: 0 16px 38px rgba(20, 57, 45, .18); }
.suggestions.open { display: block; }
.suggestion { display: block; width: 100%; height: auto; min-height: 48px; background: #fff; color: var(--text); padding: 8px 10px; text-align: left; }
.suggestion:hover { background: var(--brand-soft); }
.suggestion strong, .suggestion span { display: block; }
.suggestion span, .selected-user { color: var(--muted); font-size: 12px; font-weight: 500; }
.selected-user { margin-top: 5px; }
.mode-banner { display: flex; align-items: center; gap: 9px; margin: 15px 0; padding: 11px 13px; border-radius: 11px; background: var(--brand-soft); color: #285d4e; }
.mode-banner.readonly { background: #fff5dc; color: #775b15; }
.badge { display: inline-flex; align-items: center; flex: 0 0 auto; border-radius: 999px; background: #dff2eb; color: #17664f; padding: 4px 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge.neutral { background: #edf2f0; color: #50675f; }
.readonly .badge { background: #ffe8a9; color: #74570d; }

.section { margin-top: 20px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2, .section-head h3 { margin: 0; font-size: 19px; }
.summary, .hint { color: var(--muted); font-size: 13px; }
.chart-shell { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(#fff, #fbfdfc); padding: 16px 12px 10px; }
.chart-scroll { overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 4px; }
.day-chart { display: flex; align-items: flex-end; gap: 7px; height: 230px; min-width: 100%; }
.bar-item { display: flex; width: 46px; min-width: 46px; height: 100%; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; border-radius: 8px; background: transparent; color: var(--text); padding: 0; }
.bar-item:hover { background: #eff8f4; }
.bar-value { color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.bar-track { display: flex; width: 28px; height: 174px; align-items: flex-end; overflow: hidden; border-radius: 8px; background: #edf2f0; }
.bar-fill { display: block; width: 100%; min-height: 2px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #32aa82, var(--brand)); }
.bar-label { color: #60766f; font-size: 11px; }
.bar-item.selected .bar-track { outline: 3px solid rgba(20, 115, 90, .2); }
.bar-item.selected .bar-label { color: var(--brand); font-weight: 900; }
.chart-empty, .empty { display: flex; align-items: center; justify-content: center; min-height: 120px; color: var(--muted); padding: 26px 15px; text-align: center; }
.detail-date { display: flex; align-items: center; gap: 8px; }
.detail-date input { width: 155px; }
.sessions { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.session-head, .session-row { display: grid; grid-template-columns: 1fr 1fr 1fr .8fr minmax(170px, auto); gap: 12px; align-items: center; padding: 11px 14px; }
.session-head { background: #f5f9f7; color: #5f766e; font-size: 11px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.session-row { border-top: 1px solid var(--line); }
.session-row:first-child { border-top: 0; }
.session-time { font-weight: 650; font-variant-numeric: tabular-nums; }
.active-text { color: var(--brand); font-weight: 800; }
.row-actions { display: flex; justify-content: flex-end; gap: 7px; }
.row-actions button { min-height: 36px; padding: 7px 11px; }

.stats-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.stats-intro h2 { margin: 0; font-size: 24px; }
.stats-intro p { margin: 3px 0 0; color: var(--muted); }
.stats-filters { grid-template-columns: minmax(190px, 1fr) minmax(300px, 1fr) minmax(330px, auto); }
.loading-line { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 16px; color: var(--muted); font-weight: 700; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.metric { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 16px; }
.metric span { display: block; color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.metric strong { display: block; margin-top: 6px; color: var(--brand-dark); font-size: 28px; }
.danger-metric strong { color: var(--danger); }
.warning-metric strong { color: var(--warning); }
.sub-tabs { display: flex; gap: 4px; margin-top: 22px; border-bottom: 1px solid var(--line); }
.sub-tab { border-radius: 9px 9px 0 0; background: transparent; color: var(--muted); padding: 11px 16px; }
.sub-tab:hover { background: var(--brand-soft); color: var(--brand); }
.sub-tab.active { background: var(--brand); color: #fff; }
.stats-section { border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.legend { display: flex; gap: 16px; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; }
.legend i.onboard { background: var(--blue); }
.legend i.ot { background: var(--orange); }
.people-chart { display: flex; width: 100%; height: 458px; align-items: flex-end; gap: clamp(2px, .55vw, 10px); overflow: hidden; padding: 6px 2px 8px; }
.people-chart > .empty { width: 100%; }
.people-bar { display: flex; width: 0; min-width: 0; height: 100%; flex: 1 1 0; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.people-name { width: 18px; max-width: 100%; height: 140px; align-self: center; overflow: hidden; color: var(--text); font-size: clamp(8px, .72vw, 11px); font-weight: 700; line-height: 1; text-align: left; text-overflow: ellipsis; white-space: nowrap; writing-mode: vertical-rl; transform: rotate(180deg); }
.people-track { display: flex; width: clamp(8px, 58%, 46px); height: 250px; flex-direction: column-reverse; overflow: hidden; border-radius: 7px 7px 3px 3px; background: #edf2f0; }
.people-segment { display: block; width: 100%; min-height: 0; }
.people-segment.onboard { background: var(--blue); }
.people-segment.ot { background: var(--orange); }
.people-value { width: 18px; max-width: 100%; height: 44px; align-self: center; overflow: hidden; color: var(--muted); font-size: clamp(8px, .7vw, 11px); font-variant-numeric: tabular-nums; line-height: 1; text-align: left; text-overflow: ellipsis; white-space: nowrap; writing-mode: vertical-rl; transform: rotate(180deg); }
.late-chart .people-segment { border-radius: 7px 7px 3px 3px; background: var(--orange); }
.chart-tooltip { position: fixed; z-index: 100; width: max-content; max-width: min(280px, calc(100vw - 20px)); border: 1px solid rgba(255, 255, 255, .16); border-radius: 9px; background: rgba(16, 43, 35, .96); color: #fff; padding: 9px 11px; font-size: 12px; font-weight: 650; line-height: 1.55; white-space: pre-line; pointer-events: none; box-shadow: 0 9px 28px rgba(8, 34, 26, .24); }
.data-table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 850px; border-collapse: collapse; }
.data-table th, .data-table td { border-bottom: 1px solid var(--line); padding: 11px 10px; text-align: left; vertical-align: middle; }
.data-table th { background: #f5f9f7; color: #526b63; font-size: 11px; letter-spacing: .02em; text-transform: uppercase; }
.data-table tbody tr:hover { background: #f9fcfb; }
.data-table td:first-child { color: var(--muted); }
.sort-button { min-height: 0; border-radius: 5px; background: transparent; color: inherit; padding: 2px; font-size: inherit; text-transform: inherit; }
.sort-button:hover { background: #e7f2ed; color: var(--brand); }
.status-active { margin-left: 6px; border-radius: 999px; background: #def3e9; color: #17664f; padding: 3px 7px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.count-tag { display: inline-flex; min-width: 28px; justify-content: center; border-radius: 999px; background: var(--danger-soft); color: var(--danger); padding: 3px 8px; font-weight: 800; }
.count-tag.warning { background: var(--warning-soft); color: var(--warning); }
.detail-button { min-height: 34px; padding: 5px 10px; }

dialog { width: min(520px, calc(100% - 28px)); max-height: calc(100dvh - 30px); overflow: auto; border: 0; border-radius: 17px; color: var(--text); padding: 0; box-shadow: 0 30px 90px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(10, 31, 24, .65); backdrop-filter: blur(2px); }
dialog.wide-dialog { width: min(1040px, calc(100% - 28px)); }
dialog.order-dialog { width: min(680px, calc(100% - 28px)); }
.dialog-body, .dialog-grid { width: 100%; min-width: 0; }
.dialog-body { padding: 22px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialog-head h2 { margin: 0; font-size: 21px; }
.dialog-grid { display: grid; gap: 15px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 15px; }
.icon-close { width: 36px; min-height: 36px; flex: 0 0 36px; border-radius: 50%; padding: 0; }
.danger-note { border-radius: 10px; background: var(--danger-soft); color: #88302d; padding: 10px 12px; }
.clock-editor { min-width: 0; border: 1px solid var(--line); border-radius: 13px; background: #f8fbfa; padding: 14px; }
.clock-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end; }
.clock-row.active { grid-template-columns: minmax(0, 1fr); }
.clock-row.active .clock-arrow { display: none; }
.clock-arrow { padding-bottom: 11px; color: var(--muted); font-size: 18px; }
.duration-preview { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; border-top: 1px solid var(--line); color: var(--muted); padding-top: 11px; }
.duration-preview strong { color: var(--brand); font-size: 16px; }
.active-switch { display: flex; align-items: center; gap: 9px; margin-top: 12px; border-radius: 10px; background: var(--brand-soft); padding: 10px 11px; cursor: pointer; }
.active-switch input { width: 18px; height: 18px; min-height: 18px; margin: 0; }
.active-switch span { font-weight: 700; }
.optional-box { min-width: 0; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.optional-box summary { color: var(--brand); padding: 11px 13px; font-weight: 750; cursor: pointer; }
.optional-content { display: grid; gap: 13px; padding: 0 13px 13px; }
.detail-groups { display: grid; gap: 10px; }
.detail-day { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.detail-day summary { display: grid; grid-template-columns: 1.3fr repeat(5, 1fr); gap: 8px; align-items: center; background: #f7faf9; padding: 12px 14px; cursor: pointer; }
.detail-day summary::-webkit-details-marker { display: none; }
.detail-day summary strong { color: var(--brand-dark); }
.detail-day summary span { font-size: 12px; }
.detail-sessions { overflow-x: auto; padding: 8px 12px 12px; }
.detail-sessions table { min-width: 720px; }
.choice-list { display: grid; max-height: 430px; overflow: auto; gap: 5px; }
.choice-row { display: flex; align-items: center; gap: 10px; border-radius: 8px; padding: 8px 9px; }
.choice-row:hover { background: #f4f8f6; }
.choice-row input { width: 18px; height: 18px; min-height: 18px; }
.choice-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-head, .order-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 12px; align-items: center; }
.order-head { color: var(--muted); padding: 5px 10px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.order-list { max-height: 480px; overflow: auto; border: 1px solid var(--line); border-radius: 11px; }
.order-row { border-top: 1px solid var(--line); padding: 8px 10px; }
.order-row:first-child { border-top: 0; }
.order-person { min-width: 0; }
.order-person strong, .order-person span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-person span { color: var(--muted); font-size: 11px; }
.order-row input { text-align: center; }
.pull-refresh { display: none; }

@media (max-width: 1040px) {
    .filters, .stats-filters { grid-template-columns: minmax(0, 1fr) minmax(300px, 1fr); }
    .filter-actions, .stats-actions { grid-column: 1 / -1; padding-top: 0; }
    .session-head, .session-row { grid-template-columns: 1fr 1fr .9fr minmax(160px, auto); }
    .source-col { display: none; }
}

@media (max-width: 720px) {
    main { margin: 0; padding: 0; }
    .card { min-height: 100dvh; border-width: 0; border-radius: 0; padding: 16px; }
    .auth-card { display: flex; max-width: none; flex-direction: column; justify-content: center; margin: 0; padding: 32px 24px; }
    .app-shell { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
    .page-head { align-items: flex-start; flex-direction: column; }
    .page-head h1 { font-size: 23px; }
    .login-user { width: 100%; }
    .login-copy strong, .login-copy span { max-width: none; }
    .screen-actions button { width: 100%; }
    .timer { position: fixed; z-index: 40; right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(340px, calc(100vw - 24px)); align-items: center; flex-wrap: nowrap; margin: 0; background: rgba(240, 248, 245, .97); padding: 11px 12px; box-shadow: 0 14px 40px rgba(13, 63, 48, .24); backdrop-filter: blur(10px); }
    .timer-main { min-width: 0; flex: 1; margin: 0; }
    .timer-main strong { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
    .timer button { min-width: 106px; flex: 0 0 auto; }
    .pull-refresh { position: fixed; z-index: 60; top: calc(10px + env(safe-area-inset-top)); left: 50%; display: flex; align-items: center; gap: 8px; min-height: 38px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .96); color: var(--brand-dark); padding: 8px 13px; font-size: 12px; font-weight: 800; pointer-events: none; opacity: 0; transform: translate(-50%, -68px); transition: transform .2s ease, opacity .2s ease; box-shadow: 0 8px 24px rgba(13, 63, 48, .2); }
    .pull-refresh.visible { opacity: 1; }
    .pull-refresh.refreshing { opacity: 1; transform: translate(-50%, 0) !important; }
    .pull-refresh-spinner { width: 16px; height: 16px; border: 2px solid #cbe1d8; border-top-color: var(--brand); border-radius: 50%; }
    .pull-refresh.refreshing .pull-refresh-spinner { animation: spin .75s linear infinite; }
    .filters, .stats-filters { grid-template-columns: minmax(0, 1fr); padding: 13px; }
    .date-range, .clock-row { grid-template-columns: minmax(0, 1fr); }
    .clock-arrow { display: none; }
    .filter-actions, .stats-actions { grid-column: auto; }
    .filter-actions button { flex: 1; }
    .stats-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .stats-actions button { width: 100%; }
    .stats-actions button:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .section-head, .stats-intro { align-items: flex-start; flex-direction: column; }
    .detail-date { width: 100%; justify-content: space-between; }
    .detail-date input { width: 160px; }
    .chart-shell { margin-right: -4px; margin-left: -4px; padding-right: 8px; padding-left: 8px; }
    .day-chart { height: 215px; }
    .bar-track { height: 160px; }
    .sessions { overflow: visible; border: 0; background: transparent; }
    .session-head { display: none; }
    .session-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; border: 1px solid var(--line) !important; border-radius: 13px; background: #fff; padding: 13px; box-shadow: 0 5px 16px rgba(24, 68, 54, .055); }
    .session-cell::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; }
    .duration-col, .row-actions { grid-column: 1 / -1; }
    .row-actions { justify-content: stretch; }
    .row-actions button { flex: 1; }
    .mode-banner { align-items: flex-start; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .metric { padding: 13px; }
    .metric strong { font-size: 24px; }
    .sub-tabs { overflow-x: auto; }
    .sub-tab { min-width: max-content; flex: 1; }
    .stats-section { padding: 13px; }
    .people-chart { height: 398px; gap: 2px; }
    .people-track { width: clamp(5px, 62%, 24px); height: 198px; }
    .people-name { height: 140px; font-size: 8px; }
    .people-value { height: 42px; font-size: 8px; }
    .data-table { min-width: 760px; }
    dialog, dialog.wide-dialog, dialog.order-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
    .dialog-body { padding: 18px; }
    .dialog-actions button { flex: 1; }
    .clock-editor { padding: 12px; }
    .detail-day summary { grid-template-columns: 1fr 1fr; }
    input, textarea { font-size: 16px; }
}

@supports (-webkit-touch-callout: none) {
    input[type="date"], input[type="time"] { height: 42px; padding: 0; }
}

@media (max-width: 390px) {
    .filter-actions { flex-direction: column; }
    .dialog-actions { display: grid; grid-template-columns: 1fr; }
    .dialog-actions button { width: 100%; }
    .stats-actions { grid-template-columns: 1fr; }
}
