:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --sidebar: #fafbfc;
  --text: #172b4d;
  --muted: #6b778c;
  --border: #dfe1e6;
  --accent: #0c66e4;
  --accent-soft: #e9f2ff;
  --danger: #c9372c;
  --new: #e2740b;
  --col: #ebecf0;
  --shadow: 0 1px 2px rgba(9, 30, 66, .18);
  --t-question: #6e5dc6; --t-bug: #c9372c; --t-task: #22a06b; --t-report: #0c66e4; --t-note: #8590a2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d2125; --surface: #282e33; --sidebar: #22272b; --text: #dee4ea; --muted: #9fadbc;
    --border: #38414a; --accent: #579dff; --accent-soft: #1c2b41; --col: #161a1d; --danger: #f87168;
    --new: #fea362; --shadow: 0 1px 2px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
.app { display: grid; grid-template-columns: 232px 1fr auto; grid-template-rows: minmax(0, 1fr); height: 100vh; overflow: hidden; }
/* Каждая область прокручивается сама: панель карточки не уезжает при прокрутке длинной колонки. */
.sidebar, .main, .panel { min-height: 0; }
.main { overflow: hidden; }

/* sidebar */
.sidebar { background: var(--sidebar); border-right: 1px solid var(--border); padding: 16px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.brand { font-weight: 700; font-size: 15px; padding: 2px 8px 12px; display: flex; align-items: center; gap: 8px; }
.brand-icon { width: 22px; height: 22px; flex: none; }
.search { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); margin-bottom: 8px; }
.side-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px 8px 4px; }
.nav-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: none; cursor: pointer; text-align: left; }
.nav-item:hover { background: var(--col); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item .count { margin-left: auto; color: var(--muted); font-size: 12px; }
.nav-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--new); }
.link-btn { border: 0; background: none; color: var(--muted); cursor: pointer; text-align: left; padding: 4px 8px; }
.link-btn:hover { color: var(--accent); }
.side-foot { margin-top: auto; color: var(--muted); font-size: 11px; padding: 12px 8px 0; overflow-wrap: anywhere; }

/* main */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 20px; }
.topbar h1 { font-size: 20px; margin: 0; }
.spacer { flex: 1; }
.pill { font-size: 12px; padding: 1px 8px; border-radius: 10px; }
.pill.new { background: var(--new); color: #fff; font-weight: 600; }
.toggle { color: var(--muted); display: flex; gap: 6px; align-items: center; cursor: pointer; }
.btn { border: 1px solid var(--border); background: var(--surface); padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.icon-btn { border: 0; background: none; cursor: pointer; padding: 5px; border-radius: 6px; color: var(--muted); display: inline-flex; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--col); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); }

.board { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); grid-template-rows: minmax(0, 1fr); gap: 12px; padding: 0 20px 20px; overflow-x: auto; overflow-y: hidden; min-height: 0; }
.column { background: var(--col); border-radius: 10px; display: flex; flex-direction: column; min-height: 0; }
.column.drop { outline: 2px dashed var(--accent); outline-offset: -2px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.col-body { padding: 4px 8px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.quick-add { border: 0; background: none; color: var(--muted); text-align: left; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.quick-add:hover { background: var(--surface); color: var(--text); }
.quick-input { width: 100%; border: 2px solid var(--accent); border-radius: 8px; padding: 8px 10px; background: var(--surface); resize: none; }

.card { background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); padding: 10px 12px; cursor: pointer; border-left: 3px solid transparent; position: relative; }
.card:hover { outline: 1px solid var(--border); }
.card.selected { outline: 2px solid var(--accent); }
.card.dragging { opacity: .4; }
.card.p-high { border-left-color: var(--danger); }
.card.p-low { opacity: .85; }
.card-title { font-weight: 500; margin-bottom: 8px; overflow-wrap: anywhere; padding-right: 12px; }
.card-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.card-id { font-size: 12px; color: var(--muted); font-weight: 600; }
.type { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; color: #fff; }
.type.question { background: var(--t-question); } .type.bug { background: var(--t-bug); } .type.task { background: var(--t-task); }
.type.report { background: var(--t-report); } .type.note { background: var(--t-note); }
.card .new-dot { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--new); }
.card .attach { margin-left: auto; }
.empty { color: var(--muted); font-size: 13px; padding: 8px; text-align: center; }

/* panel */
.panel { width: min(560px, 45vw); background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; padding: 12px 20px 16px; overflow-y: auto; }
/* Панель прокручивается целиком: блоки не сжимаем, иначе длинный текст вылезает на подпись снизу. */
.panel > * { flex-shrink: 0; }
.panel-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.saved { font-size: 12px; color: var(--muted); }
.p-title { width: 100%; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; margin-left: -6px; font-size: 20px; font-weight: 600; resize: none; background: none; overflow: hidden; }
.p-title:hover { border-color: var(--border); }
.p-title:focus { border-color: var(--accent); outline: none; }
.p-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.p-meta label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.p-meta select { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px; color: var(--text); padding: 5px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.p-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.p-links a { font-size: 12px; background: var(--accent-soft); color: var(--accent); padding: 3px 8px; border-radius: 12px; text-decoration: none; }
.tabs { display: flex; gap: 4px; align-items: center; border-bottom: 1px solid var(--border); margin: 6px 0 10px; }
.tab { border: 0; background: none; padding: 6px 10px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.hint { margin-left: auto; font-size: 11px; color: var(--muted); }
.p-body { width: 100%; flex: 1; min-height: 320px; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg); resize: vertical; }
.p-body:focus { outline: 2px solid var(--accent); border-color: transparent; }
.p-foot { margin-top: 12px; font-size: 12px; color: var(--muted); }
.conflict { background: #fff4e5; color: #7a4100; border: 1px solid #f5cd8f; border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; font-size: 13px; }
.hist { border: 1px solid var(--border); border-radius: 8px; padding: 8px; margin-top: 10px; font-size: 13px; }
.hist button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 4px 6px; border-radius: 4px; cursor: pointer; }
.hist button:hover { background: var(--col); }

/* markdown */
.md { min-height: 120px; overflow-wrap: anywhere; }
.md h1, .md h2, .md h3 { margin: 16px 0 6px; line-height: 1.25; }
.md h1 { font-size: 18px; } .md h2 { font-size: 16px; } .md h3 { font-size: 14px; }
.md p { margin: 6px 0; }
.md ul, .md ol { margin: 6px 0; padding-left: 22px; }
.md li.task { list-style: none; margin-left: -20px; }
.md li.task input { margin-right: 6px; cursor: pointer; }
.md li.task.checked > span { text-decoration: line-through; color: var(--muted); }
.md code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--col); padding: 1px 4px; border-radius: 4px; }
.md pre { background: var(--col); padding: 10px; border-radius: 8px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { border-left: 3px solid var(--border); margin: 6px 0; padding-left: 10px; color: var(--muted); }
.md a { color: var(--accent); }
.md table { border-collapse: collapse; margin: 8px 0; font-size: 13px; }
.md th, .md td { border: 1px solid var(--border); padding: 4px 8px; text-align: left; }
.md .placeholder { color: var(--muted); font-style: italic; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #172b4d; color: #fff; padding: 8px 16px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.25); display: flex; gap: 12px; align-items: center; }
.toast button { background: none; border: 0; color: #85b8ff; cursor: pointer; font-weight: 600; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .panel { position: fixed; inset: 0; width: auto; z-index: 10; }
  .p-meta { grid-template-columns: repeat(2, 1fr); }
}

/* синк */
.sync-badge { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #fff0b3; color: #7f5f01; }
@media (prefers-color-scheme: dark) { .sync-badge { background: #533f04; color: #f8e6a0; } }
.sync-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-weight: 500; width: fit-content; }
.sync-toggle:has(input:checked) { background: #fff7d6; border-color: #e2b203; }
@media (prefers-color-scheme: dark) { .sync-toggle:has(input:checked) { background: #3d2e00; border-color: #946f00; } }
.agenda { flex: 1; overflow-y: auto; padding: 0 20px 24px; }
.agenda-inner { max-width: 880px; }
.agenda-intro { color: var(--muted); margin: 0 0 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.agenda h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 20px 0 8px; }
.agenda-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 8px; cursor: pointer; border-left: 3px solid transparent; }
.agenda-item.p-high { border-left-color: var(--danger); }
.agenda-item:hover { outline: 1px solid var(--border); }
.agenda-num { font-weight: 700; color: var(--muted); padding-top: 1px; }
.agenda-title { font-weight: 600; margin-bottom: 4px; }
.agenda-q { color: var(--text); margin-bottom: 6px; }
.agenda-item .card-row { gap: 8px; }
.agenda-empty { color: var(--muted); padding: 24px 0; }

/* передача ИИ */
.p-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.ai-btn { border: 1px solid #8f7ee7; background: #f3f0ff; color: #5e4db2; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.ai-btn:hover { background: #e9e5ff; }
.ai-btn.active { background: #6e5dc6; color: #fff; border-color: #6e5dc6; }
.ai-state { font-size: 12px; color: var(--muted); }
.approve-btn { border: 1px solid #4bce97; background: #dcfff1; color: #216e4e; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.approve-btn:hover { background: #baf3db; }
.approve-btn.active { background: #1f845a; color: #fff; border-color: #1f845a; }
.approve-btn:disabled { cursor: default; opacity: .8; }
.approve-badge { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #dcfff1; color: #216e4e; }
.ai-badge { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #f3f0ff; color: #5e4db2; }
.ai-badge.working { background: #6e5dc6; color: #fff; animation: ai-pulse 1.6s ease-in-out infinite; }
.ai-badge.waiting { background: #fff0b3; color: #7f5f01; }
.ai-badge.done { background: #dcfff1; color: #216e4e; }
@keyframes ai-pulse { 50% { opacity: .55; } }
@media (prefers-color-scheme: dark) {
  .ai-btn { background: #2b273f; color: #b8acf6; border-color: #5e4db2; }
  .approve-btn { background: #164b35; color: #baf3db; border-color: #1f845a; }
  .approve-btn.active { background: #1f845a; color: #fff; }
  .approve-badge { background: #164b35; color: #baf3db; }
  .ai-badge { background: #2b273f; color: #b8acf6; }
  .ai-badge.waiting { background: #533f04; color: #f8e6a0; }
  .ai-badge.done { background: #164b35; color: #baf3db; }
}

/* Сейф «Доступы» */
.access { flex: 1; overflow: auto; padding: 0 24px 24px; }
.access-bar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; background: var(--bg); padding: 10px 0; z-index: 1; }
.access-lock { font-size: 12px; color: var(--muted); }
.access-search { width: 240px; margin: 0; }
.access-group h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; }
.access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; align-items: start; }
.access-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.access-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.access-head strong { flex: 1; font-size: 14px; }
.access-actions { display: flex; gap: 6px; }
.access-actions .btn { padding: 3px 9px; font-size: 12px; }
.access-card:not(:hover) .access-head .access-actions { opacity: .35; }
.access-row { display: grid; grid-template-columns: 100px 1fr auto; align-items: center; gap: 8px; min-height: 26px; }
.access-label { font-size: 11px; color: var(--muted); }
.access-value { overflow-wrap: anywhere; font-size: 13px; }
.access-value code { font-size: 12.5px; background: none; padding: 0; }
.access-tools { display: flex; gap: 2px; }
.access-tools .icon-btn { width: 26px; height: 26px; font-size: 13px; }
.access-notes { font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 6px; margin-top: 2px; }
.access-notes p { margin: 2px 0; }
.access-empty { font-size: 12px; color: var(--muted); font-style: italic; }
.access-card.editing label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }
.access-card.editing input, .access-card.editing textarea { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; font-size: 13px; }
.danger-btn { color: var(--danger, #c9372c); }
.access-value a { color: var(--accent); }
.access-card { align-self: start; }

/* Часы */
.hours-badge { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #e9f2ff; color: #0055cc; }
.p-hours { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin: 0 0 10px; }
.p-hours-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p-hours-head .muted, .muted { color: var(--muted); font-size: 12px; }
.hours-btn { border: 1px solid var(--border); background: var(--surface); color: var(--accent); padding: 3px 8px; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; margin-left: 4px; }
.hours-btn:hover { background: var(--accent-soft); }
.p-hours-form { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.p-hours-form input { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); }
.p-hours-form input[name=hours] { width: 70px; }
.p-hours-form input[name=note] { flex: 1; min-width: 140px; }
.p-hours-list { display: flex; flex-direction: column; margin-top: 6px; max-height: 180px; overflow-y: auto; }
#hours .p-hours-list { max-height: none; }
.hours-row { display: grid; grid-template-columns: 44px 58px 56px 1fr auto; gap: 8px; align-items: center; font-size: 12px; padding: 3px 0; border-top: 1px solid var(--border); }
.hours-row .icon-btn { width: 22px; height: 22px; font-size: 14px; }
.hours-date { color: var(--muted); }
.hours-who.claude { color: #5e4db2; font-weight: 600; }
.hours-h { font-weight: 600; }
.hours-note { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hours-bar { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; flex-wrap: wrap; }
.hours-bar select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.hours-kpi { display: flex; gap: 12px; margin-bottom: 8px; }
.hours-kpi div { background: var(--surface); box-shadow: var(--shadow); border-radius: 8px; padding: 10px 14px; min-width: 120px; display: flex; flex-direction: column; }
.hours-kpi span { color: var(--muted); font-size: 12px; }
.hours-kpi b { font-size: 20px; }
.hours-table { width: 100%; max-width: 880px; border-collapse: collapse; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.hours-table th, .hours-table td { text-align: left; padding: 6px 10px; border-top: 1px solid var(--border); font-size: 13px; }
.hours-table th { color: var(--muted); font-weight: 600; font-size: 12px; border-top: 0; }
.hours-table tr[data-card] { cursor: pointer; }
.hours-table tr[data-card]:hover td { background: var(--accent-soft); }
#hours { padding-top: 4px; }

/* Настройки проекта */
.settings { border: 1px solid var(--border); border-radius: 12px; padding: 0; background: var(--surface); color: var(--text); width: min(440px, calc(100vw - 32px)); box-shadow: 0 12px 32px rgba(0,0,0,.25); }
.settings::backdrop { background: rgba(9, 30, 66, .35); }
.settings form { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; }
.settings h2 { margin: 0; font-size: 16px; }
.settings label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.settings label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
.settings input:not([type=checkbox]) { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-size: 13px; }
.settings fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.settings legend { font-size: 12px; font-weight: 600; padding: 0 4px; }
.settings-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Z Code */
.zcode-btn { border: 1px solid #f5cd8f; background: #fff7e6; color: #7a4100; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.zcode-btn:hover { background: #ffe7c2; }
.zcode-btn:disabled { cursor: default; opacity: .75; }
.zcode-badge { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #fff7e6; color: #7a4100; }
.zcode-badge.running { background: #e2740b; color: #fff; animation: ai-pulse 1.6s ease-in-out infinite; }
.zcode-badge.failed { background: #ffeceb; color: #ae2e24; }
.settings textarea, .settings select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; font-size: 13px; }
.settings { max-height: calc(100vh - 32px); overflow-y: auto; }
.hours-who.zcode { color: #7a4100; font-weight: 600; }

/* Логи */
.p-logs { display: flex; flex-direction: column; gap: 14px; }
.p-logs h4 { margin: 0 0 6px; font-size: 13px; }
.log-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; background: var(--bg); font-size: 12px; }
.log-row { display: grid; grid-template-columns: 62px 1fr; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--border); }
.log-row:last-child { border-bottom: 0; }
.log-at { color: var(--muted); font-variant-numeric: tabular-nums; }
.log-text { word-break: break-word; }
.log-row.think .log-text { color: var(--muted); }
.log-row.err .log-text, .log-err { color: var(--danger); }
.log-status { font-size: 11px; color: var(--muted); }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e2740b; margin-left: 4px; vertical-align: middle; animation: ai-pulse 1.6s ease-in-out infinite; }

/* Пользователи, таймер, админка */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: var(--surface); box-shadow: var(--shadow); border-radius: 12px; padding: 24px 28px; width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 12px; }
.login-box h1 { font-size: 18px; margin: 4px 0 0; }
.login-box label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.login-box input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-size: 14px; }
.login-box .muted { margin: 0; font-size: 13px; }
.me-row { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }
.me-row .muted { margin-left: auto; }
.me-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.me-actions { display: flex; justify-content: space-between; margin-top: 4px; }
.me-actions .link-btn { padding: 2px 0; font-size: 12px; }
.timer-btn { border: 1px solid #4bce97; background: #dcfff1; color: #216e4e; padding: 3px 9px; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.timer-btn.running { background: #1f845a; color: #fff; border-color: #1f845a; }
.timer-pill { background: #1f845a; color: #fff; border: 0; cursor: pointer; font-weight: 600; font-variant-numeric: tabular-nums; }
.admin-inner { max-width: 1100px; }
.admin-inner h2 { display: flex; align-items: center; gap: 10px; }
.admin-inner h2 select { text-transform: none; letter-spacing: 0; font-weight: 400; padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.admin-table input:not([type=checkbox]), .admin-table select, .admin-form input, .admin-form select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-size: 13px; }
.admin-table tr.inactive td { opacity: .55; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.admin-actions .btn { padding: 4px 8px; font-size: 12px; }
.admin-form { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.check-inline { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; font-size: 13px; white-space: nowrap; }
.danger-btn { color: var(--danger); }

/* API-ключи */
.panel-like { background: var(--surface); box-shadow: var(--shadow); border-radius: 8px; padding: 12px 14px; margin: 12px 0; }
.fresh-key { border: 1px solid #4bce97; display: flex; flex-direction: column; gap: 8px; }
.key-row { display: flex; gap: 8px; }
.key-row input { flex: 1; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-family: monospace; font-size: 13px; }
.howto { line-height: 1.8; padding-left: 18px; }
.howto code, .admin-inner code { background: var(--col); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.admin-inner > p { max-width: 900px; line-height: 1.6; }
.guide { background: var(--surface); box-shadow: var(--shadow); border-radius: 8px; padding: 14px 16px; white-space: pre-wrap; font-size: 12.5px; line-height: 1.55; max-width: 900px; }
.claude-btn { border: 1px solid #b5a9f0; background: #f3f0ff; color: #5e4db2; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.claude-btn:hover { background: #e9e5ff; }
.claude-btn:disabled { cursor: default; opacity: .75; }
.zcode-badge.cc { background: #f3f0ff; color: #5e4db2; }
.zcode-badge.cc.running { background: #6e5dc6; color: #fff; }

/* Ноутбук после переезда доски: только «Доступы» */
body.vault-only #projects, body.vault-only #types, body.vault-only .side-title, body.vault-only #add-project,
body.vault-only #new-card, body.vault-only #show-done, body.vault-only label.toggle, body.vault-only #views .nav-item:not(.active) { display: none !important; }
