:root {
  --ink: #173936;
  --ink-soft: #5d7370;
  --ink-faint: #8ca19e;
  --paper: #f6faf8;
  --surface: #ffffff;
  --line: #e2eeea;
  --line-strong: #cfe2dc;
  --mint: #d8f3e9;
  --mint-strong: #0f766e;
  --mint-deep: #075e5a;
  --blue: #e1effb;
  --peach: #fff0e5;
  --lavender: #efe9fb;
  --shadow: 0 12px 32px rgba(33, 77, 68, 0.07);
  --shadow-soft: 0 4px 16px rgba(33, 77, 68, 0.05);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Noto Sans JP", sans-serif; font-size: 14px; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(15, 118, 110, 0.28); outline-offset: 2px; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 246px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 30px 18px 22px; background: #fbfdfc; border-right: 1px solid var(--line); z-index: 10; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 13px; color: var(--mint-deep); }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; color: white; background: var(--mint-strong); border-radius: 12px; box-shadow: 0 6px 12px rgba(15, 118, 110, .18); }
.brand-mark svg { width: 23px; height: 23px; }
.brand strong, .brand span { display: block; line-height: 1.2; }
.brand strong { font: 700 18px "DM Sans", sans-serif; letter-spacing: -.03em; }
.brand span { margin-top: 3px; color: var(--ink-faint); font-size: 10px; letter-spacing: .08em; }
.nav-links { display: grid; gap: 6px; margin-top: 51px; }
.nav-link { display: flex; align-items: center; gap: 13px; height: 46px; padding: 0 15px; color: var(--ink-soft); text-decoration: none; border-radius: 12px; transition: .2s ease; }
.nav-link:hover { color: var(--mint-deep); background: #f0f8f5; }
.nav-link.active { color: var(--mint-deep); font-weight: 700; background: var(--mint); }
.nav-icon { display: inline-grid; place-items: center; width: 20px; color: currentColor; font: 21px/1 "DM Sans", sans-serif; }
.sidebar-bottom { margin-top: auto; }
.sync-mini { margin: 0 3px 17px; padding: 16px 14px; background: #f1f8f5; border: 1px solid #dfefe8; border-radius: 14px; }
.sync-mini-top { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 12px; font-weight: 700; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #a6b8b3; flex: 0 0 auto; }
.status-dot.connected { background: #17a673; box-shadow: 0 0 0 3px rgba(23, 166, 115, .12); }
.status-dot.syncing { background: #e5a334; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.sync-mini p { margin: 7px 0 10px; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.text-button, .link-button { padding: 0; color: var(--mint-strong); background: transparent; border: 0; font-weight: 700; }
.text-button { font-size: 11px; }
.text-button span, .link-button span { margin-left: 5px; }
.sidebar-footer { color: #a7b9b5; font: 10px "DM Sans", sans-serif; text-align: center; }

.main-content { min-width: 0; width: calc(100% - 246px); margin-left: 246px; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 48px; background: rgba(251,253,252,.78); border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; align-items: center; gap: 9px; color: var(--ink-faint); font-size: 12px; }
.breadcrumbs strong { color: var(--ink-soft); font-weight: 600; }
.breadcrumb-separator { color: #c2d1cd; }
.topbar-actions { display: flex; align-items: center; gap: 17px; }
.sync-status { display: flex; align-items: center; gap: 8px; color: var(--ink-faint); font-size: 11px; }
.admin-button { min-height: 30px; padding: 0 11px; color: var(--mint-deep); background: var(--mint); border: 1px solid #c7e9dd; border-radius: 8px; font-size: 10px; font-weight: 700; }
.admin-button:hover { background: #c4eade; }
.icon-button, .close-button { display: grid; place-items: center; width: 34px; height: 34px; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; transition: .2s; }
.icon-button:hover { color: var(--mint-strong); border-color: var(--line-strong); }
.account-switcher { display: flex; align-items: center; gap: 8px; padding: 3px 5px 3px 3px; color: var(--ink-soft); background: transparent; border: 1px solid transparent; border-radius: 22px; }
.account-switcher:hover { background: #f0f8f5; border-color: var(--line); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; color: var(--mint-deep); background: var(--mint); border-radius: 50%; font: 600 12px "DM Sans", sans-serif; }
.account-name { max-width: 110px; overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.account-chevron { margin-top: -4px; color: var(--ink-faint); font-size: 16px; line-height: 1; }
.content-wrap { max-width: 1320px; margin: 0 auto; padding: 47px 48px 28px; }
.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 5px; color: var(--mint-strong); font: 700 10px "DM Sans", "Noto Sans JP", sans-serif; letter-spacing: .16em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; color: var(--ink); font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -.06em; line-height: 1.3; }
h1 em { color: var(--mint-strong); font-style: normal; }
h2 { margin: 0; font-size: 20px; letter-spacing: -.04em; line-height: 1.3; }
h3 { margin: 0; font-size: 16px; letter-spacing: -.035em; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 17px; border-radius: 10px; font-weight: 700; transition: .2s ease; }
.primary-button { color: white; background: var(--mint-strong); border: 1px solid var(--mint-strong); box-shadow: 0 6px 12px rgba(15, 118, 110, .14); }
.primary-button:hover { background: var(--mint-deep); border-color: var(--mint-deep); transform: translateY(-1px); }
.secondary-button { color: var(--ink-soft); background: white; border: 1px solid var(--line-strong); }
.secondary-button:hover { color: var(--mint-deep); border-color: var(--mint-strong); background: #f5fbf8; }
.button-plus { font-size: 20px; font-weight: 400; line-height: 0; }
.button-arrow { margin-left: 5px; font-size: 17px; font-weight: 400; }
.kpi-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 14px; margin-bottom: 28px; }
.kpi-card { min-height: 152px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-soft); }
.kpi-featured { background: linear-gradient(135deg, #e4f8f0 0%, #f8fdfb 72%); border-color: #ccebe0; }
.kpi-label { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.kpi-icon { display: inline-grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; font: 15px/1 "DM Sans", sans-serif; }
.kpi-icon.mint { color: var(--mint-deep); background: #c7eddf; }
.kpi-icon.blue { color: #38799a; background: var(--blue); }
.kpi-icon.peach { color: #a66335; background: var(--peach); }
.kpi-icon.lavender { color: #7155a5; background: var(--lavender); }
.kpi-month { margin-left: auto; color: var(--ink-faint); font-size: 10px; font-weight: 400; }
.kpi-value { display: flex; align-items: baseline; gap: 5px; margin-top: 16px; color: var(--ink); font: 700 34px/1 "DM Sans", "Noto Sans JP", sans-serif; letter-spacing: -.06em; }
.kpi-value.compact { margin-top: 20px; }
.kpi-value .unit { margin-left: 2px; color: var(--ink-soft); font: 500 12px "Noto Sans JP", sans-serif; letter-spacing: 0; }
.kpi-value small { color: var(--ink-soft); font: 500 15px "DM Sans", sans-serif; letter-spacing: -.03em; }
.category-value { display: block; overflow: hidden; color: var(--mint-deep); font: 700 21px "Noto Sans JP", sans-serif; letter-spacing: -.05em; text-overflow: ellipsis; white-space: nowrap; }
.kpi-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--mint-strong); font-size: 10px; }
.kpi-foot.muted { color: var(--ink-faint); margin-top: 16px; }
.accent-line { width: 17px; height: 3px; background: var(--mint-strong); border-radius: 9px; }

.workspace-grid { display: grid; grid-template-columns: minmax(360px, .93fr) minmax(440px, 1.3fr); align-items: start; gap: 18px; margin-bottom: 28px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-soft); }
.log-panel { padding: 24px 25px 18px; }
.recent-panel { min-width: 0; padding: 24px 25px 18px; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.panel-heading-row { align-items: center; }
.field-group { min-width: 0; margin-bottom: 17px; }
.field-group label { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; color: var(--ink); font-size: 11px; font-weight: 700; }
.required { color: #ca6e58; font-size: 9px; font-weight: 500; }
.optional { color: var(--ink-faint); font-size: 9px; font-weight: 400; }
.time-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
input, select, textarea { width: 100%; color: var(--ink); background: #fbfdfc; border: 1px solid var(--line-strong); border-radius: 9px; transition: .2s; }
input, select { height: 42px; padding: 0 12px; }
textarea { padding: 10px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #acbdb9; }
input:hover, select:hover, textarea:hover { border-color: #a9cdc1; }
input:focus, select:focus, textarea:focus { border-color: var(--mint-strong); box-shadow: 0 0 0 3px rgba(15,118,110,.08); outline: none; }
.input-with-button { position: relative; display: flex; min-width: 0; }
.input-with-button input { min-width: 0; padding-right: 52px; }
.now-button { position: absolute; top: 5px; right: 5px; height: 30px; padding: 0 8px; color: var(--mint-strong); background: var(--mint); border: 0; border-radius: 6px; font-size: 10px; font-weight: 700; }
.now-button:hover { background: #c1eade; }
.form-message { min-height: 20px; color: #c35e49; font-size: 11px; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 3px; }
.link-button { font-size: 11px; }
.recent-list { display: grid; gap: 2px; }
.recent-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 72px; padding: 9px 4px; border-bottom: 1px solid #edf3f1; }
.recent-item:last-child { border-bottom: 0; }
.date-chip { display: grid; place-items: center; width: 43px; height: 44px; color: var(--mint-deep); background: #eff9f5; border-radius: 10px; }
.date-chip strong { font: 700 17px/1 "DM Sans", sans-serif; letter-spacing: -.06em; }
.date-chip span { margin-top: 2px; font-size: 9px; }
.recent-main { min-width: 0; }
.recent-title { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.recent-meta { display: flex; align-items: center; gap: 7px; margin-top: 3px; color: var(--ink-faint); font-size: 10px; }
.category-pill { display: inline-block; padding: 2px 7px; color: var(--mint-strong); background: #eaf7f2; border-radius: 20px; font-size: 9px; }
.recent-duration { color: var(--ink); font: 600 12px "DM Sans", sans-serif; white-space: nowrap; }
.recent-duration.open { color: #ca6e58; }
.empty-small { padding: 45px 15px; color: var(--ink-faint); text-align: center; font-size: 12px; }
.empty-small .empty-icon { margin-bottom: 8px; color: #c5d8d2; font-size: 31px; }
.hidden { display: none !important; }

.records-panel { margin-bottom: 33px; padding: 24px 25px 20px; }
.records-tools { display: flex; align-items: center; gap: 8px; }
.small-select { width: auto; height: 34px; padding: 0 26px 0 10px; font-size: 11px; }
.compact-button { min-height: 34px; padding: 0 11px; font-size: 10px; }
.table-scroll { overflow-x: auto; }
.records-table { width: 100%; min-width: 650px; border-collapse: collapse; }
.records-table th { padding: 0 10px 10px; color: var(--ink-faint); border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 600; text-align: left; white-space: nowrap; }
.records-table td { padding: 13px 10px; border-bottom: 1px solid #edf3f1; color: var(--ink-soft); font-size: 11px; vertical-align: middle; }
.records-table tbody tr:last-child td { border-bottom: 0; }
.records-table .record-date { color: var(--ink); font-weight: 600; white-space: nowrap; }
.records-table .record-description { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-state { display: inline-flex; align-items: center; gap: 5px; color: #c36c4e; font-size: 10px; white-space: nowrap; }
.record-state .status-dot { width: 5px; height: 5px; background: #da7e5b; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.row-button { padding: 4px 7px; color: var(--ink-faint); background: transparent; border: 1px solid transparent; border-radius: 6px; font-size: 10px; }
.row-button:hover { color: var(--mint-strong); background: #f1f9f6; border-color: var(--line); }
.row-button.finish { color: var(--mint-strong); }
.empty-state { padding: 37px 15px 24px; color: var(--ink-faint); text-align: center; }
.empty-state .empty-icon { color: #c5d8d2; font-size: 38px; }
.empty-state h3 { margin: 8px 0 3px; color: var(--ink-soft); font-size: 14px; }
.empty-state p { margin: 0; font-size: 11px; }

.analysis-section { margin-top: 8px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.section-heading h2 { font-size: 22px; }
.section-period { color: var(--ink-faint); font: 500 11px "DM Sans", sans-serif; }
.analysis-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.category-panel, .insight-panel, .trend-panel { padding: 24px 25px; }
.panel-description { margin: 5px 0 0; color: var(--ink-faint); font-size: 10px; }
.chart-badge { padding: 4px 8px; color: var(--mint-strong); background: var(--mint); border-radius: 5px; font-size: 9px; }
.category-bars { display: grid; gap: 15px; min-height: 146px; }
.bar-row { display: grid; grid-template-columns: 88px minmax(90px, 1fr) 56px; align-items: center; gap: 11px; }
.bar-label { overflow: hidden; color: var(--ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; overflow: hidden; background: #eef5f2; border-radius: 20px; }
.bar-fill { height: 100%; min-width: 3px; background: linear-gradient(90deg, #79cbb1, #0f766e); border-radius: 20px; }
.bar-time { color: var(--ink); font: 600 10px "DM Sans", sans-serif; text-align: right; }
.insight-panel { background: linear-gradient(135deg, #fffdf9, #fffaf2); border-color: #f2eadc; }
.insight-content { min-height: 145px; display: flex; flex-direction: column; justify-content: center; }
.insight-mark { color: #d59659; font-size: 24px; line-height: 1; }
.insight-text { margin: 11px 0 0; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.8; }
.insight-text strong { color: #a86e38; }
.insight-detail { margin: 9px 0 0; color: var(--ink-faint); font-size: 10px; }
.trend-panel { margin-top: 18px; }
.trend-legend { display: flex; align-items: center; gap: 6px; color: var(--ink-faint); font-size: 10px; }
.legend-dot { width: 7px; height: 7px; background: var(--mint-strong); border-radius: 50%; }
.daily-chart { min-height: 198px; padding-top: 4px; }
.daily-chart svg { display: block; width: 100%; height: 194px; overflow: visible; }
.chart-grid-line { stroke: #e8f0ed; stroke-width: 1; }
.chart-axis-label, .chart-x-label { fill: #9aaba7; font-family: "DM Sans", "Noto Sans JP", sans-serif; font-size: 10px; }
.chart-bar { fill: #9ad9c4; }
.chart-bar.today { fill: var(--mint-strong); }
.chart-bar:hover { fill: #f0a56e; }
.chart-total-label { fill: var(--ink); font-family: "DM Sans", sans-serif; font-size: 10px; font-weight: 600; }
.chart-empty { min-height: 180px; display: grid; place-items: center; color: var(--ink-faint); font-size: 11px; }
.main-footer { display: flex; align-items: center; gap: 18px; margin-top: 35px; padding: 18px 2px 3px; color: #9aaba7; border-top: 1px solid var(--line); font-size: 10px; }
.main-footer > span:first-child { color: var(--mint-strong); font: 700 12px "DM Sans", sans-serif; }
.main-footer .text-button { margin-left: auto; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(23, 57, 54, .28); backdrop-filter: blur(5px); }
.modal-card { width: min(100%, 580px); padding: 28px; background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 24px 65px rgba(15, 70, 59, .2); }
.account-modal-card { width: min(100%, 440px); }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.modal-header h2 { font-size: 19px; }
.close-button { width: 29px; height: 29px; border: 0; font-size: 24px; font-weight: 300; line-height: 1; }
.close-button:hover { color: var(--mint-strong); background: #eef8f4; }
.modal-lead { margin: 0 0 22px; color: var(--ink-soft); font-size: 12px; line-height: 1.75; }
.modal-note { display: flex; gap: 9px; margin: 4px 0 22px; padding: 12px 13px; color: var(--ink-faint); background: #f7fbf9; border-radius: 9px; font-size: 10px; line-height: 1.6; }
.modal-note > span:first-child { color: var(--mint-strong); font-size: 14px; }
.account-current { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; padding: 13px 14px; background: #f3faf7; border: 1px solid var(--line); border-radius: 11px; }
.account-avatar-large { width: 38px; height: 38px; font-size: 14px; }
.account-current-label, .account-current strong { display: block; }
.account-current-label { color: var(--ink-faint); font-size: 9px; }
.account-current strong { margin-top: 1px; color: var(--ink); font-size: 13px; }
.role-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 43px; padding: 4px 7px; border-radius: 5px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.role-badge.admin { color: #8a5b19; background: #fff0d3; }
.role-badge.user { color: var(--ink-soft); background: #eef4f2; }
.account-current .role-badge { margin-left: auto; }
.full-button { width: 100%; }
.account-divider { display: flex; align-items: center; gap: 10px; margin: 24px 0 16px; color: var(--ink-faint); font-size: 10px; }
.account-divider::before, .account-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.account-divider span { white-space: nowrap; }
.admin-modal-card { width: min(100%, 560px); }
.admin-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 18px; }
.admin-summary > div { padding: 13px 14px; background: #f6faf8; border: 1px solid var(--line); border-radius: 10px; }
.admin-summary span, .admin-summary strong { display: block; }
.admin-summary span { color: var(--ink-faint); font-size: 10px; }
.admin-summary strong { margin-top: 2px; color: var(--ink); font: 700 23px/1.2 "DM Sans", "Noto Sans JP", sans-serif; }
.admin-list { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.admin-account-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; }
.admin-account-main, .admin-account-actions { display: flex; align-items: center; gap: 9px; }
.admin-account-main { min-width: 0; }
.admin-account-main strong, .admin-account-main span:not(.avatar) { display: block; }
.admin-account-main strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-account-main div > span:not(.avatar) { color: var(--ink-faint); font-size: 9px; }
.admin-avatar { width: 29px; height: 29px; font-size: 11px; }
.admin-account-actions { flex: 0 0 auto; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.sync-feedback { min-height: 18px; margin-top: 12px; color: var(--mint-strong); font-size: 11px; text-align: right; }
.sync-feedback.error { color: #c35e49; }
.toast { position: fixed; right: 25px; bottom: 25px; z-index: 30; max-width: min(340px, calc(100vw - 50px)); padding: 12px 16px; color: white; background: #234d47; border-radius: 9px; box-shadow: 0 10px 25px rgba(21, 61, 54, .18); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .sidebar { width: 212px; }
  .main-content { width: calc(100% - 212px); margin-left: 212px; }
  .topbar, .content-wrap { padding-left: 30px; padding-right: 30px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 790px) {
  .sidebar { position: static; width: 100%; height: auto; padding: 16px 18px 11px; border-right: 0; border-bottom: 1px solid var(--line); }
  .app-shell { display: block; }
  .brand { padding: 0 2px; }
  .nav-links { display: flex; gap: 2px; margin-top: 16px; overflow-x: auto; }
  .nav-link { flex: 0 0 auto; height: 38px; padding: 0 11px; font-size: 11px; }
  .nav-icon { width: 16px; font-size: 17px; }
  .sidebar-bottom { display: none; }
  .main-content { width: 100%; margin-left: 0; }
  .topbar { height: 57px; padding: 0 18px; }
  .breadcrumbs { font-size: 11px; }
  .sync-status { display: none; }
  .content-wrap { padding: 31px 18px 22px; }
  .page-intro { align-items: stretch; flex-direction: column; margin-bottom: 25px; }
  .page-intro .primary-button { width: 100%; }
  h1 { font-size: 29px; }
  .kpi-grid { gap: 9px; margin-bottom: 20px; }
  .kpi-card { min-height: 130px; padding: 15px; }
  .kpi-label { gap: 5px; font-size: 10px; }
  .kpi-icon { width: 20px; height: 20px; font-size: 13px; }
  .kpi-month { display: none; }
  .kpi-value { margin-top: 15px; font-size: 26px; }
  .kpi-value.compact { margin-top: 19px; }
  .kpi-value small { font-size: 12px; }
  .category-value { font-size: 16px; margin-top: 22px; }
  .kpi-foot { margin-top: 11px; font-size: 9px; }
  .workspace-grid, .analysis-grid { grid-template-columns: 1fr; gap: 13px; }
  .log-panel, .recent-panel, .category-panel, .insight-panel, .trend-panel, .records-panel { padding: 20px 17px 16px; }
  .records-tools { flex-wrap: wrap; }
  .records-tools .compact-button { margin-left: auto; }
  .section-heading { margin-top: 8px; }
  .main-footer { flex-wrap: wrap; gap: 8px 14px; }
  .main-footer .text-button { width: 100%; margin-left: 0; text-align: left; }
  .modal-card { padding: 22px 18px; }
  .modal-actions > button { flex: 1 1 auto; }
}
@media (max-width: 420px) {
  .time-grid { grid-template-columns: 1fr; gap: 0; }
  .category-grid { grid-template-columns: 1fr; gap: 0; }
  .records-tools .compact-button { width: 100%; margin-left: 0; }
  .bar-row { grid-template-columns: 74px minmax(70px, 1fr) 50px; gap: 7px; }
}
