:root {
  --sidebar-width: 220px;
  --bg: #f4f5f3;
  --surface: #ffffff;
  --surface-soft: #f8f9f7;
  --text: #17211d;
  --muted: #728079;
  --line: #dde3df;
  --sidebar: #1d2521;
  --sidebar-text: #dce5e0;
  --accent: #d66a16;
  --accent-strong: #ad4f0d;
  --accent-soft: #fff0e2;
  --accent-sidebar: #5b3821;
  --blue: #246b9f;
  --green: #198754;
  --green-soft: #e4f4eb;
  --amber: #9a6700;
  --amber-soft: #fff2c9;
  --red: #c0392b;
  --red-soft: #fde7e4;
  --shadow: 0 12px 36px rgba(20, 30, 25, .08);
}
.hidden { display: none !important; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth-card { width: min(420px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); }
.auth-brand { margin-bottom: 26px; }
.auth-card h1 { margin: 0 0 8px; font-size: 26px; }
.auth-card > p { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.auth-card input:not([type="checkbox"]) { min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); background: var(--surface); }
.auth-remember { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 7px !important; }
.auth-remember input { accent-color: var(--accent); }
.auth-submit { min-height: 42px; }
.auth-switch { width: 100%; margin-top: 15px; border: 0; background: transparent; color: var(--accent); cursor: pointer; }
.auth-error { margin: 14px 0 0 !important; color: var(--red) !important; }
.local-note { display: flex; align-items: center; gap: 7px; }
.current-user-info { min-width: 0; flex: 1; display: grid; gap: 2px; }
.current-user-info strong, .current-user-info span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.current-user-info strong { color: var(--sidebar-text); font-size: 11px; font-weight: 600; }
.current-user-info span { color: #8f9d96; font-size: 10px; }
.auth-logout { margin-left: auto; padding: 3px 6px; border: 0; color: var(--muted); background: transparent; font-size: 11px; cursor: pointer; }

body[data-theme="blue"] {
  --accent: #287bb5;
  --accent-strong: #185b8a;
  --accent-soft: #e8f3fb;
  --accent-sidebar: #24465f;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, .button-link {
  min-height: 34px;
  padding: 0 12px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
button:hover, .button-link:hover { border-color: var(--accent); background: var(--accent-soft); }
button.primary { color: #fff; border-color: var(--accent); background: var(--accent); font-weight: 700; }
button.primary:hover { background: var(--accent-strong); }
button.text-button { padding: 0; color: var(--accent-strong); border: 0; background: none; }
button.text-button:hover { color: var(--accent); background: none; }
.icon-button { width: 34px; padding: 0; font-size: 20px; }
.danger-text { color: var(--red); }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar-width);
  min-height: 100vh;
  padding: 24px 14px 18px;
  color: var(--sidebar-text);
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 7px;
  display: grid; place-items: center;
  color: #fff; background: var(--accent); font-size: 18px; font-weight: 900;
}
.brand strong { display: block; color: #fff; font-size: 18px; }
.brand span { display: block; margin-top: 3px; color: #9fb0a7; font-size: 12px; }
.brand .version-badge { margin-left: 5px; color: #ffd2ad; font-size: 10px; font-style: normal; font-weight: 700; letter-spacing: .02em; vertical-align: middle; }
.brand-copy > strong { line-height: 1.12; }
.brand-copy > span { max-width: 136px; line-height: 1.35; overflow-wrap: anywhere; }
.nav { display: grid; gap: 5px; }
.nav-item {
  width: 100%; min-height: 44px; padding: 0 13px; justify-content: flex-start;
  color: var(--sidebar-text); border: 0; background: transparent; font-size: 16px;
}
.nav-item span { width: 22px; color: #bcd5e2; font-size: 18px; text-align: center; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: var(--accent-sidebar); }
.nav-item.active span { color: #fff; }
.local-note { margin-top: auto; padding: 0 10px; color: #9fb0a7; font-size: 11px; }
.local-note i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--accent); }
.mobile-menu { display: none; position: fixed; left: 12px; top: 12px; z-index: 30; }

.main { min-height: 100vh; margin-left: var(--sidebar-width); padding: 34px 48px 52px; }
.view { display: none; max-width: 2400px; margin: 0 auto; }
.view.active { display: block; }
.page-head { min-height: 72px; margin-bottom: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.page-head h1 { margin: 0; font-size: 28px; line-height: 1.2; }
.page-head p { margin: 7px 0 0; color: var(--muted); }
.head-actions { display: flex; gap: 8px; }
.compact-page-head { min-height: auto; margin-bottom: 18px; }

.panel, .panel-flat { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; }
.panel-head { min-height: 70px; padding: 17px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.panel-head h2 { margin: 0; font-size: 18px; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { position: relative; min-height: 90px; padding: 18px; border-left: 3px solid var(--accent); background: var(--surface); text-align: left; cursor: pointer; }
.stat strong { display: block; margin-top: 4px; font-size: 25px; }
.stat span { color: var(--muted); font-size: 12px; }
.stat small { position: absolute; right: 16px; bottom: 14px; color: var(--accent-strong); font-size: 11px; opacity: 0; transition: opacity .15s ease; }
.stat:hover small, .stat:focus-visible small { opacity: 1; }
.stat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 18px; }
.dashboard-lower-grid { margin-top: 18px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 18px; }
.dashboard-projects, .dashboard-goals { min-width: 0; margin-top: 0; }
.empty-state { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.empty-state h2 { margin: 12px 0 4px; color: var(--text); font-size: 18px; }
.empty-state p { margin: 0; }
.empty-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 7px; color: var(--accent); background: var(--accent-soft); font-size: 26px; }
.empty-small { padding: 45px 20px; color: var(--muted); text-align: center; }

.today-list { padding: 6px 20px 15px; }
.task-check-list { width: 100%; }
.check-list { padding: 8px 20px 18px; }
.check-row { display: grid; grid-template-columns: 28px minmax(220px, 1fr) 92px minmax(180px, 280px) auto auto; align-items: center; gap: 10px; min-height: 62px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.check-row:last-child { border-bottom: 0; }
.check-row.is-complete .check-main strong { color: var(--muted); text-decoration: line-through; }
.check-toggle { display: grid; place-items: center; cursor: pointer; }
.check-toggle input { width: 19px; height: 19px; accent-color: var(--blue); }
.check-main { min-width: 0; }
.check-title { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 7px; }
.check-title strong { font-size: 13px; }
.check-title em { padding: 2px 6px; color: var(--accent-strong); background: var(--accent-soft); border-radius: 4px; font-size: 10px; font-style: normal; }
.check-title small { padding: 2px 5px; border-radius: 4px; background: var(--surface-soft); }
.check-title small, .check-main p { color: var(--muted); font-size: 11px; }
.check-main p { max-width: 100%; margin: 3px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-result { min-height: 31px; padding: 0 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.check-result.issue { color: var(--red); border-color: #efc4c0; background: var(--red-soft); }
.check-note { width: 100%; min-height: 31px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); font-size: 11px; }
.check-row:not(.has-note) .check-note { display: none; }
.check-save { min-height: 31px; padding: 0 9px; color: var(--blue); border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font-size: 11px; }
.check-actions { display: flex; gap: 4px; }
.check-actions button { min-height: 31px; padding: 0 7px; color: var(--muted); font-size: 11px; }
.check-list.compact { padding: 4px 16px 12px; }
.check-list.compact .check-row { grid-template-columns: 28px minmax(0, 1fr) 92px auto; padding: 10px 0; }
.check-list.compact .check-note { grid-column: 2 / 4; }
.check-list.compact .check-save { grid-column: 4; }
.check-list.compact .check-actions { display: none; }
.today-row { min-height: 66px; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; gap: 12px; align-items: center; border-bottom: 1px solid #eef1ef; }
.today-row:last-child { border-bottom: 0; }
.check-button { width: 25px; height: 25px; min-height: 25px; padding: 0; border-radius: 50%; color: transparent; }
.check-button:hover { color: #fff; background: var(--green); border-color: var(--green); }
.today-copy strong { display: block; }
.today-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.compact-list { padding: 8px 20px 16px; }
.compact-item { padding: 13px 0; border-bottom: 1px solid #edf0ee; }
.compact-item:last-child { border-bottom: 0; }
.compact-top, .compact-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.compact-top strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-foot { margin-top: 6px; color: var(--muted); font-size: 11px; }
.progress { height: 6px; margin-top: 10px; overflow: hidden; border-radius: 3px; background: #e7ebe8; }
.progress span { display: block; height: 100%; background: var(--accent); }
.confidence { padding: 3px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.confidence.green { color: #198754; background: #e4f4eb; }
.confidence.yellow { color: #9a6700; background: #fff2c9; }
.confidence.red { color: #c0392b; background: #fde7e4; }
.kr-card.confidence-green .progress span { background: var(--green); }
.kr-card.confidence-yellow .progress span { background: var(--amber); }
.kr-card.confidence-red .progress span { background: var(--red); }
.project-summary-grid { padding: 16px 20px 20px; display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 12px; }
.project-summary { padding: 14px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.project-summary strong { display: block; }
.project-summary span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }

.task-toolbar { margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 680px); padding: 3px; border-radius: 6px; background: #e7eae7; gap: 3px; }
.tabs button { min-height: 38px; min-width: 0; width: 100%; padding: 0 8px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); white-space: nowrap; }
.tabs button.active { color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.sort-tools { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.status-filter { display: inline-flex; align-items: center; gap: 6px; }
.status-filter select { min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); }
.sort-tools select, .modal-fields select, .modal-fields input, .modal-fields textarea, .doc-search input {
  min-height: 36px; padding: 7px 10px; color: var(--text); border: 1px solid var(--line); border-radius: 5px; background: var(--surface);
}
.sort-arrow { min-height: 36px; padding: 0 9px; color: var(--muted); font-size: 11px; }
.sort-arrow b { min-width: 10px; color: var(--accent); font-size: 15px; }
.menu-wrap { position: relative; display: inline-flex; }
.tool-menu-button { min-height: 34px; padding: 0 9px; color: var(--text); font-size: 12px; }
.tool-menu { position: absolute; top: calc(100% + 5px); right: 0; z-index: 40; min-width: 145px; padding: 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); box-shadow: var(--shadow); }
.tool-menu-up { top: auto; bottom: calc(100% + 5px); }
.tool-menu button { width: 100%; min-height: 32px; justify-content: flex-start; border: 0; border-radius: 4px; font-size: 12px; }
.tool-menu button:hover { background: var(--accent-soft); }
.table-wrap { overflow-x: auto; }
.task-table { width: 100%; min-width: 1300px; border-collapse: collapse; }
.task-table th { height: 46px; padding: 0 14px; color: var(--muted); background: var(--surface-soft); font-size: 11px; font-weight: 600; text-align: left; white-space: nowrap; }
.task-table td { height: 68px; padding: 8px 14px; border-top: 1px solid #e9edea; vertical-align: middle; }
.task-table .serial { width: 56px; color: var(--muted); text-align: center; }
.task-title-cell { min-width: 260px; }
.task-title-line { display: flex; align-items: center; gap: 11px; }
.task-title-line strong { display: block; }
.task-subline { margin: 4px 0 0 37px; color: var(--muted); font-size: 11px; }
.task-chain { max-width: 280px; color: var(--muted); font-size: 11px; }
.task-chain strong { display: block; overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.task-chain .progress { width: 170px; margin: 5px 0 3px; }
.priority-select { width: 58px; min-height: 29px; padding: 0 5px; border-radius: 5px; font-weight: 700; }
.priority-select.high { color: var(--red); border-color: #efc4c0; background: var(--red-soft); }
.priority-select.medium { color: var(--amber); border-color: #ebd59d; background: var(--amber-soft); }
.priority-select.low { color: var(--muted); border-color: var(--line); background: var(--surface-soft); }
.status-select { min-width: 90px; min-height: 34px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.intake-select, .intake-tag { display: inline-flex; min-height: 23px; margin-left: 5px; padding: 0 6px; align-items: center; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-soft); color: var(--muted); font-size: 11px; vertical-align: middle; }
.intake-select { cursor: pointer; }
.intake-select.external, .intake-tag.external { color: var(--blue); border-color: #c7ddec; background: #edf6fc; }
.intake-select.materials, .intake-tag.materials { color: var(--amber); border-color: #f0d79e; background: var(--amber-soft); }
.intake-select.confirm, .intake-tag.confirm { color: var(--accent-strong); border-color: var(--accent-soft); background: var(--accent-soft); }
.plan-control { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 124px; }
.plan-today { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; cursor: pointer; }
.plan-today input { margin: 0; accent-color: var(--blue); }
.plan-date-input { width: 124px; min-height: 28px; padding: 0 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); font-size: 11px; }
.task-actions { min-width: 190px; display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.task-actions button { min-height: 31px; padding: 0 7px; color: var(--muted); font-size: 11px; }
.task-action { font-weight: 700; white-space: nowrap; }
.progress-action { color: var(--accent-strong) !important; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)) !important; background: var(--accent-soft) !important; }
.progress-action.is-progressed { color: #126b42 !important; border-color: #94cfad !important; background: var(--green-soft) !important; }
.defer-action { color: var(--blue) !important; border-color: #b8d2e5 !important; background: #edf6fc !important; }
.defer-action.is-deferred { color: #fff !important; border-color: var(--blue) !important; background: var(--blue) !important; }
.task-actions .delete { width: 30px; padding: 0; color: var(--muted); }

.relation-hover { position: relative; display: inline-block; max-width: 100%; outline: 0; cursor: help; }
.project-relation > span { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relation-tooltip {
  position: absolute; z-index: 80; left: 0; top: calc(100% + 8px); width: min(360px, 72vw);
  padding: 13px 15px; color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); box-shadow: var(--shadow); visibility: hidden; opacity: 0;
  transform: translateY(-3px); transition: opacity .12s ease, transform .12s ease; pointer-events: none;
}
.relation-hover:hover > .relation-tooltip, .relation-hover:focus > .relation-tooltip, .relation-hover:focus-within > .relation-tooltip { visibility: visible; opacity: 1; transform: translateY(0); }
.relation-tooltip section + section { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.relation-tooltip h4 { margin: 0 0 7px; color: var(--text); font-size: 13px; }
.relation-tooltip section > div { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 8px; margin-top: 5px; line-height: 1.45; }
.relation-tooltip b { color: var(--muted); font-size: 10px; font-weight: 500; }
.relation-tooltip span { color: var(--text); white-space: normal; overflow-wrap: anywhere; }

.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(300px, 1fr)); gap: 16px; }
.project-card { min-height: 260px; padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.card-top { display: flex; justify-content: space-between; gap: 14px; }
.card-top h2 { margin: 0; font-size: 18px; }
.card-actions { display: flex; gap: 4px; }
.card-actions button { min-height: 29px; padding: 0 7px; color: var(--muted); font-size: 11px; }
.status-chip { display: inline-flex; margin-top: 9px; padding: 3px 7px; border-radius: 4px; color: var(--accent-strong); background: var(--accent-soft); font-size: 11px; }
.project-facts { margin-top: 18px; display: grid; gap: 11px; }
.project-facts div { padding-top: 10px; border-top: 1px solid #edf0ee; }
.project-facts label { display: block; color: var(--muted); font-size: 10px; }
.project-facts p { margin: 4px 0 0; line-height: 1.55; }
.card-progress { margin-top: 16px; }
.card-progress div { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }

.okr-list { display: grid; gap: 16px; }
.objective { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.objective-head { min-height: 90px; padding: 19px 22px; display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.objective-head h2 { margin: 0; font-size: 19px; }
.objective-context { max-width: 900px; margin-top: 7px; color: var(--muted); }
.objective-actions { display: flex; align-items: flex-start; gap: 6px; }
.objective-actions button { min-height: 30px; padding: 0 8px; color: var(--muted); font-size: 11px; }
.completion-chip { display: inline-flex; margin: 7px 0 0 8px; padding: 3px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.completion-chip.ready { color: #9a5a00; background: #fff1d6; }
.completion-chip.complete { color: #176b43; background: #e5f5eb; }
.cycle { padding: 5px 8px; border-radius: 4px; color: var(--accent-strong); background: var(--accent-soft); font-size: 11px; white-space: nowrap; }
.kr-grid { display: grid; grid-template-columns: repeat(2, minmax(320px, 1fr)); }
.kr-card { min-height: 130px; padding: 18px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kr-card:nth-child(2n) { border-right: 0; }
.kr-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kr-card-head strong { max-width: 75%; }
.kr-meta { margin-top: 8px; color: var(--muted); font-size: 11px; display: flex; justify-content: space-between; gap: 12px; }
.kr-actions { margin-top: 10px; }
.kr-actions button { min-height: 27px; padding: 0 7px; color: var(--muted); border: 0; font-size: 11px; }

.weekly-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; }
.archive-list-panel, .weekly-preview-panel { min-height: 620px; }
.archive-list { padding: 10px; }
.archive-list button { width: 100%; justify-content: flex-start; border: 0; }
.archive-list button.active { color: var(--accent-strong); background: var(--accent-soft); }
.markdown-preview { margin: 0; padding: 24px 28px; color: #25302b; font: 13px/1.75 Consolas, "Microsoft YaHei UI", monospace; white-space: pre-wrap; }

.knowledge-layout { height: calc(100vh - 150px); min-height: 650px; display: grid; grid-template-columns: 280px minmax(500px, 1fr) 240px; gap: 14px; }
.knowledge-tree, .document-editor, .outline { overflow: hidden; }
.knowledge-head { min-height: 58px; padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.knowledge-head h2 { margin: 0; font-size: 16px; }
.knowledge-head button { min-height: 30px; padding: 0 8px; font-size: 11px; }
.doc-search { margin: 12px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.doc-search span { padding-left: 10px; color: var(--muted); }
.doc-search input { width: 100%; border: 0; outline: none; }
.document-tree { height: calc(100% - 116px); padding: 2px 10px 20px; overflow-y: auto; }
.tree-root-drop { margin: 5px 4px 8px; padding: 7px 8px; border: 1px dashed var(--line); border-radius: 4px; color: var(--muted); font-size: 10px; text-align: center; }
.tree-root-drop.drag-over, .tree-row.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.tree-row.dragging { opacity: .5; }
.tree-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
.tree-copy small { padding-left: 8px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.tree-row { min-height: 36px; padding: 0 6px; display: flex; align-items: center; gap: 4px; border-radius: 4px; }
.tree-row.active { background: var(--accent-soft); }
.tree-row:hover { background: var(--surface-soft); }
.tree-row.active:hover { background: var(--accent-soft); }
.tree-row .toggle { width: 22px; min-height: 26px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.tree-row .tree-label { min-width: 0; flex: 1; min-height: 30px; padding: 0 4px; justify-content: flex-start; border: 0; background: transparent; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-row .tree-add { width: 26px; min-height: 26px; padding: 0; border: 0; background: transparent; opacity: 0; }
.tree-row:hover .tree-add { opacity: 1; }
.editor-shell { height: 100%; display: flex; flex-direction: column; }
.editor-meta { min-height: 65px; padding: 12px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.document-title { min-width: 200px; flex: 1; border: 0; outline: 0; color: var(--text); font-size: 20px; font-weight: 700; }
.editor-meta span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.editor-meta button { min-height: 29px; font-size: 11px; }
.editor-toolbar { min-height: 48px; padding: 7px 20px; display: flex; align-items: center; gap: 5px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.editor-toolbar select { min-height: 33px; padding: 0 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.editor-toolbar button { min-height: 33px; padding: 0 9px; }
.text-color-control { display: inline-flex; align-items: center; gap: 4px; min-height: 33px; padding: 0 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 11px; background: var(--surface); }
.text-color-control input { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.color-menu { display: flex; align-items: center; gap: 8px; }
.color-swatches { display: inline-flex; align-items: center; gap: 4px; }
.color-swatch { width: 19px; min-height: 19px; height: 19px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--swatch); }
.color-swatch:hover, .color-swatch:focus-visible { border-color: var(--text); transform: scale(1.08); }
.custom-color { display: inline-flex; align-items: center; gap: 4px; padding-left: 7px; border-left: 1px solid var(--line); color: var(--muted); font-size: 11px; white-space: nowrap; }
.custom-color input { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.document-content { flex: 1; padding: 34px max(40px, 8%); overflow-y: auto; outline: 0; font-size: 15px; line-height: 1.8; }
.document-content:empty::before { content: attr(data-placeholder); color: #a3ada7; }
.document-content h1 { margin: 26px 0 12px; font-size: 28px; }
.document-content h2 { margin: 23px 0 10px; font-size: 22px; }
.document-content h3 { margin: 20px 0 8px; font-size: 18px; }
.document-content img { display: block; max-width: 100%; height: auto; margin: 18px 0; border-radius: 4px; }
.document-footer { min-height: 46px; padding: 8px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; background: var(--surface-soft); }
.document-export-actions { display: flex; gap: 6px; }
.document-export-actions button { min-height: 29px; padding: 0 8px; font-size: 11px; }
.outline-list { height: calc(100% - 58px); padding: 14px; overflow-y: auto; }
.outline-list p { margin: 4px 0; color: var(--muted); font-size: 12px; }
.outline-list button { width: 100%; min-height: 30px; padding: 0 6px; justify-content: flex-start; border: 0; color: var(--muted); background: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outline-list button[data-level="2"] { padding-left: 16px; }
.outline-list button[data-level="3"] { padding-left: 27px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(320px, 1fr)); gap: 16px; }
.settings-section { min-height: 190px; padding: 22px; }
.settings-section h2 { margin: 0 0 10px; font-size: 18px; }
.settings-section p { color: var(--muted); line-height: 1.6; }
.theme-options, .settings-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.theme-options i { width: 15px; height: 15px; border-radius: 3px; }
.orange-swatch { background: linear-gradient(90deg, #F97316 0 50%, #23211F 50%); }
.blue-swatch { background: linear-gradient(90deg, #85B7EB 0 50%, #FFFFFF 50%); }
.green-yellow-swatch { background: linear-gradient(135deg, #62ae32 0 58%, #f2cc3e 58%); }
.theme-options button.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.path-list { display: grid; gap: 8px; }
.path-list div { padding: 9px 11px; border-radius: 4px; background: var(--surface-soft); }
.path-list label { display: block; color: var(--muted); font-size: 10px; }
.path-list code { word-break: break-all; font-size: 11px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; padding: 30px; display: grid; place-items: center; background: rgba(13,18,15,.55); }
.modal { width: min(660px, 100%); max-height: calc(100vh - 60px); overflow: hidden; border-radius: 7px; background: var(--surface); box-shadow: var(--shadow); }
.modal > header { min-height: 62px; padding: 12px 18px 12px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal h2 { margin: 0; font-size: 19px; }
.modal form { max-height: calc(100vh - 122px); overflow-y: auto; }
.modal-fields { padding: 20px 22px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.checkbox-field label { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text); font-size: 13px; }
.checkbox-field input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); }
.field label { color: var(--muted); font-size: 11px; }
.field input, .field select, .field textarea { width: 100%; }
.field textarea { min-height: 82px; resize: vertical; }
.modal footer { position: sticky; bottom: 0; padding: 13px 22px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: var(--surface); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 200; max-width: 380px; padding: 12px 16px; color: #fff; border-radius: 5px; background: #25302b; box-shadow: var(--shadow); }
.toast.error { background: var(--red); }

@media (min-width: 2100px) {
  :root { --sidebar-width: 250px; }
  .sidebar { padding-left: 20px; padding-right: 20px; }
  .main { padding-left: 64px; padding-right: 64px; }
  .cards-grid { grid-template-columns: repeat(4, minmax(300px, 1fr)); }
  .project-summary-grid { grid-template-columns: repeat(4, minmax(240px, 1fr)); }
  .knowledge-layout { grid-template-columns: 340px minmax(700px, 1fr) 300px; }
}

@media print {
  .sidebar, .page-head, .knowledge-tree, .outline, .editor-toolbar, .editor-meta, .document-footer { display: none !important; }
  .main { margin: 0; padding: 0; }
  .document-editor { border: 0; }
  .document-content { display: block !important; padding: 24px; overflow: visible; }
}

.brand-home { width: 42px; height: 42px; flex: 0 0 42px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 9px; border-radius: 6px; background: var(--accent); box-shadow: inset 0 -3px rgba(0,0,0,.16); }
.brand-home span { border-radius: 1px; background: #fff; }
.local-note { min-height: 58px; margin-top: auto; padding: 12px 7px 0; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 7px; border-top: 1px solid rgba(255,255,255,.12); }
.local-note > i { display: none; }
.user-avatar { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); font-size: 15px; }
.current-user-info { min-width: 0; display: grid; gap: 3px; }
.current-user-info strong { max-height: 34px; overflow: hidden; color: #f5f7f6; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.current-user-info span { overflow: hidden; color: #9fb0a7; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.auth-logout { min-height: 28px; padding: 0 6px; border: 0; color: #9fb0a7; background: transparent; font-size: 10px; }
.mobile-user { display: none; position: fixed; z-index: 30; top: 12px; right: 12px; max-width: 45vw; min-height: 34px; padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-grid { margin-bottom: 16px; }
.important-panel, .daily-checks-panel { min-width: 0; }
.project-summary { width: 100%; min-width: 0; color: var(--text); text-align: left; cursor: pointer; }
.project-summary:hover { border-color: var(--accent); }
.project-summary .progress { width: 100%; }
.project-overview { width: 100%; min-height: 205px; padding: 18px; display: grid; align-content: start; gap: 11px; color: var(--text); border: 1px solid var(--line); background: var(--surface); text-align: left; }
.project-overview-top, .project-progress-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.project-overview-top strong { font-size: 17px; overflow-wrap: anywhere; }
.project-overview-line { color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.project-progress-meta { color: var(--muted); font-size: 11px; }
.project-progress-meta b { color: var(--accent-strong); font-size: 14px; }
.project-overview .progress { width: 100%; margin: -4px 0 0; }
.project-detail-head { align-items: flex-end; }
.project-detail-head h1 { margin-top: 12px; }
.project-detail-summary { margin-bottom: 18px; padding: 18px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.project-detail-summary > div { min-width: 0; display: grid; gap: 7px; }
.project-detail-summary span { color: var(--muted); font-size: 11px; }
.project-detail-summary strong { overflow-wrap: anywhere; }
.project-stage-section { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.project-stage-section > .panel-head { border-bottom: 1px solid var(--line); }
.project-stage-list { padding: 14px 20px; display: grid; gap: 10px; }
.stage-okr-link { display: block; margin-top: 5px; color: var(--blue); }
.cycle-range-field { min-width: 0; }
.cycle-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.cycle-presets button { min-height: 32px; padding: 0 11px; color: var(--accent-strong); border-color: #f0c7a6; background: #fff8f1; }
.cycle-presets button:hover { background: var(--accent-soft); }
.cycle-date-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
.cycle-date-fields label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
.cycle-date-fields input { width: 100%; min-width: 0; }
.project-stage { display: grid; grid-template-columns: 30px minmax(0,1fr) auto auto; gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 6px; }
.project-stage.accepted { border-color: #b8d7c5; background: #f4faf6; }
.stage-number { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: var(--accent-strong); background: var(--accent-soft); font-weight: 700; }
.stage-content { min-width: 0; }
.stage-content p { margin: 6px 0 10px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.stage-content small { display: block; color: var(--green); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.project-detail-facts { margin-top: 18px; padding: 18px; }
.project-detail-facts .project-facts { margin-top: 0; }
.project-detail-facts p { white-space: pre-wrap; overflow-wrap: anywhere; }
.project-quick-field > div { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.project-quick-field .text-button { padding:2px 6px; font-size:12px; }
.task-table { min-width: 1140px; }
.task-table th[data-task-sort] { cursor: pointer; user-select: none; }
.task-table th[data-task-sort]:hover { color: var(--accent-strong); }
.task-table th[data-task-sort] b { color: var(--accent); }
.project-relation { min-width: 130px; display: grid; gap: 4px; white-space: normal; }
.project-relation > span:first-child { font-weight: 650; overflow-wrap: anywhere; }
.project-relation > small { color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.task-toolbar { flex-wrap: nowrap; }
.tabs { width: auto; display: flex; flex: 1 1 auto; }
.tabs button { width: auto; padding: 0 10px; }
.sort-tools { flex: 0 0 auto; }
.schedule-history-layout { display: grid; grid-template-columns: minmax(220px, .33fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.schedule-history-list { display: grid; align-content: start; max-height: 72vh; overflow: auto; }
.schedule-history-list button { min-height: 58px; padding: 9px 14px; justify-content: space-between; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; text-align: left; }
.schedule-history-list button.active { background: var(--accent-soft); color: var(--accent-strong); }
.schedule-history-list button span { display: grid; gap: 4px; }
.schedule-history-list small { color: var(--muted); }
.schedule-history-day { min-height: 300px; padding: 20px; }
.schedule-history-day h2 { margin-top: 0; }
.history-entry { padding: 12px 0; border-bottom: 1px solid var(--line); }
.history-entry strong { display: block; }
.history-entry small { display: block; margin-top: 4px; color: var(--muted); }
.history-review { width: 100%; min-height: 90px; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 5px; resize: vertical; }
.history-day-actions { margin-top: 10px; display: flex; justify-content: flex-end; }

@media (max-width: 1180px) {
  .task-toolbar { flex-wrap: wrap; align-items: stretch; }
  .tabs { flex-wrap: wrap; }
  .tabs button { flex: 1 0 auto; }
}
@media (max-width: 760px) {
  .mobile-user { display: inline-flex; }
  .main { padding-top: 60px; }
  .project-detail-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .project-detail-head { display: grid; }
  .project-detail-head .head-actions { flex-wrap: wrap; }
  .project-stage { grid-template-columns: 28px minmax(0,1fr); }
  .project-stage > button { grid-column: 2; justify-self: start; }
  .schedule-history-layout { grid-template-columns: 1fr; }
  .schedule-history-list { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 230px; }
  .task-toolbar { display: grid; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tabs button { flex: 0 0 auto; }
}

@media (max-width: 1180px) {
  .main { padding: 28px 24px 45px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-lower-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, minmax(280px, 1fr)); }
  .knowledge-layout { grid-template-columns: 250px minmax(470px,1fr); }
  .outline { display: none; }
  .task-toolbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 760px) {
  :root { --sidebar-width: 240px; }
  body { overflow-x: hidden; }
  .sidebar { transform: translateX(-100%); transition: transform .18s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: inline-flex; }
  .main { width: 100%; min-width: 0; margin-left: 0; padding: 68px 14px 35px; }
  .view { width: 100%; min-width: 0; }
  .page-head { width: 100%; max-width: calc(100vw - 28px); min-height: auto; margin-bottom: 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .page-head h1 { font-size: 24px; }
  .page-head p { font-size: 12px; }
  .page-head .primary { min-width: 40px; max-width: 108px; padding: 0 9px; white-space: nowrap; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { min-height: 80px; padding: 14px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .project-summary-grid { grid-template-columns: 1fr; }
  .today-row { grid-template-columns: auto minmax(0,1fr) auto; padding: 8px 0; }
  .today-row .row-actions { grid-column: 2 / -1; }
  .check-row, .check-list.compact .check-row { grid-template-columns: 28px minmax(0, 1fr) auto; align-items: start; }
  .check-result, .check-note, .check-save { grid-column: 2 / -1; }
  .check-list.compact .check-note { grid-column: 2; }
  .check-list.compact .check-save { grid-column: 3; }
  .check-actions { grid-column: 2 / -1; }
  .tabs { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 3px; overflow: visible; }
  .tabs button { padding: 0 3px; font-size: 12px; }
  .task-toolbar { width: 100%; min-width: 0; }
  .sort-tools { width: 100%; padding-bottom: 3px; flex-wrap: nowrap; overflow-x: auto; }
  .sort-tools > * { flex: 0 0 auto; }
  .sort-tools select { width: 200px; }
  .table-wrap { width: 100%; max-width: calc(100vw - 28px); }
  .cards-grid { grid-template-columns: 1fr; }
  .kr-grid { grid-template-columns: 1fr; }
  .kr-card { border-right: 0; }
  .objective-head { flex-direction: column; }
  .weekly-layout { grid-template-columns: 1fr; }
  .archive-list-panel { min-height: auto; }
  .weekly-preview-panel { min-height: 500px; }
  .knowledge-layout { height: auto; min-height: 0; grid-template-columns: 1fr; }
  .knowledge-tree { min-height: 240px; max-height: 330px; }
  .document-editor { min-height: 620px; }
  .editor-meta { flex-wrap: wrap; }
  .document-title { flex-basis: 100%; }
  .document-content { padding: 24px 20px; }
  .settings-grid { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 12px; }
  .modal-fields { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
}

/* Local visual refresh: lively orange and blue, with a narrower desktop sidebar. */
:root {
  --sidebar-width: clamp(158px, 11vw, 184px);
  --bg: #f3f7fa;
  --surface: #fff;
  --surface-soft: #f7fafc;
  --text: #263846;
  --muted: #71808b;
  --line: #dfe8ef;
  --sidebar: #eaf3fa;
  --sidebar-text: #3e5668;
  --accent: #f47a32;
  --accent-strong: #c95e20;
  --accent-soft: #fff0e4;
  --accent-sidebar: #f47a32;
  --blue: #398bd0;
  --shadow: 0 3px 0 rgba(42, 74, 96, .04), 0 9px 24px rgba(42, 74, 96, .06);
}
body[data-theme="blue"] {
  --accent: #398bd0;
  --accent-strong: #246da7;
  --accent-soft: #eaf4fb;
  --accent-sidebar: #398bd0;
}
body { background: var(--bg); }
button, .button-link { border-radius: 9px; }
button:hover, .button-link:hover { transform: translateY(-1px); }
button.primary {
  border-color: var(--accent-strong);
  border-radius: 10px;
  box-shadow: inset 0 -3px rgba(0, 0, 0, .12);
}
button.primary:active { transform: translateY(1px); box-shadow: none; }
button.text-button:hover { transform: none; }
.sidebar {
  padding: 20px 12px 14px;
  color: var(--sidebar-text);
  border-right: 1px solid #d9e7f0;
  background: var(--sidebar);
}
.brand { gap: 9px; padding: 0 5px 21px; }
.brand-home {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  gap: 2px;
  padding: 8px;
  border-radius: 11px;
  box-shadow: inset 0 -3px rgba(0, 0, 0, .12);
}
.brand-copy > strong { color: #263846; font-size: 16px; }
.brand-copy > span { max-width: 130px; color: #728899; font-size: 10px; }
.brand .version-badge { color: #fff; }
.nav { gap: 4px; }
.nav-item {
  min-height: 40px;
  padding: 0 10px;
  border-radius: 9px;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 650;
}
.nav-item span { width: 21px; color: var(--blue); }
.nav-item:hover { color: var(--text); background: #dcecf7; }
.nav-item.active {
  position: relative;
  color: #fff;
  background: var(--accent-sidebar);
  box-shadow: inset 0 -3px rgba(0, 0, 0, .13);
}
.nav-item.active::before {
  position: absolute;
  left: -12px;
  top: 9px;
  bottom: 9px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--blue);
  content: "";
}
.nav-item.active span { color: #fff; }
.local-note {
  min-height: 55px;
  padding: 10px 3px 0;
  border-top-color: #cbdde9;
  color: #637b8b;
}
.user-avatar { border-radius: 10px; color: #fff; }
.current-user-info strong { color: #2b4050; }
.current-user-info span { color: #728899; }
.auth-logout { color: #607a8d; }
.main { padding: 30px clamp(24px, 2.5vw, 42px) 48px; }
.view { max-width: 1560px; }
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 26px; }
.panel, .panel-flat { border-radius: 12px; box-shadow: var(--shadow); }
.panel-head { min-height: 62px; padding: 14px 18px; }
.stat { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 11px; box-shadow: var(--shadow); }
.dashboard-grid, .dashboard-lower-grid { gap: 14px; }
.today-row { border-bottom-color: #edf2f6; }
.project-summary { border-radius: 10px; background: var(--surface); box-shadow: 0 2px 0 rgba(42, 74, 96, .035); }
.dashboard-projects .project-summary-grid { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.tabs { border-radius: 10px; background: #e9f0f5; }
.tabs button { border-radius: 8px; }
.tabs button.active { color: var(--accent-strong); box-shadow: 0 2px 0 rgba(42, 74, 96, .08); }
.sort-tools select, .modal-fields select, .modal-fields input, .modal-fields textarea, .doc-search input,
.status-filter select, .history-review, .plan-date-input, .check-note { border-radius: 8px; }
.cards-grid { gap: 13px; }
.project-card, .project-overview { border-radius: 11px; box-shadow: var(--shadow); }
.project-stage-section, .project-detail-summary { border-radius: 11px; box-shadow: var(--shadow); }
.project-stage { border-radius: 9px; }
.schedule-period { border-radius: 10px; box-shadow: 0 2px 0 rgba(42, 74, 96, .035); }
.schedule-period:nth-child(2), .schedule-period:nth-child(3), .schedule-period:nth-child(4) { border-top-color: var(--line); }
.schedule-period:nth-child(2) { border-top: 3px solid var(--accent); }
.schedule-period:nth-child(3) { border-top: 3px solid var(--blue); }
.schedule-period:nth-child(4) { border-top: 3px solid #e8b84a; }
.schedule-period .schedule-quick { border-radius: 9px; background: var(--surface-soft); }
.schedule-quick input { border-radius: 8px; }
.schedule-period .schedule-card.task-complete { background: #edf6fc; box-shadow: inset 3px 0 var(--blue); }
.schedule-result.done { color: #2879b5; }
.schedule-ai-badge, .schedule-ai-badge.is-running { color: #286fa8; background: #e4f2fc; }
.schedule-ai-status.is-running { color: #286fa8; background: #e4f2fc; }
.schedule-ai-toggle.is-running { border-color: #c5e0f2; background: #eaf4fb; color: #398bd0; }
.schedule-list.drag-over { background: rgba(57, 139, 208, .08); }
.schedule-period .schedule-card[draggable="true"]:hover { background: #f6fafd; }
.schedule-period .schedule-card[draggable="true"]::before { color: #8196a6; }
.schedule-summary-cards button { border-radius: 11px; box-shadow: 0 2px 0 rgba(42, 74, 96, .045); }
.schedule-summary-cards button:hover { transform: translateY(-1px); }
.schedule-dialog, .modal { border-radius: 12px; }
.schedule-history-list button.active { border-left: 3px solid var(--accent); }
.history-entry { border-bottom-color: var(--line); }
.mobile-menu { border-radius: 9px; color: var(--text); box-shadow: 0 2px 8px rgba(42, 74, 96, .12); }
@media (min-width: 2100px) {
  :root { --sidebar-width: 184px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .main { padding-left: 42px; padding-right: 42px; }
}
@media (max-width: 1180px) {
  :root { --sidebar-width: 160px; }
  .sidebar { padding-left: 10px; padding-right: 10px; }
  .main { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 760px) {
  :root { --sidebar-width: 264px; }
  .sidebar { padding: 20px 14px 14px; }
  .main { padding: 68px 14px 35px; }
  .page-head { margin-bottom: 18px; }
  .panel-head { padding: 13px 14px; }
}
