/* Тёмная тема — подключается ТОЛЬКО при тёмной теме (см. Base.astro head). */
/* ============================================================
html.theme-dark ТЕХНОГЕННАЯ ТЁМНАЯ ТЕМА (решение владельца 2026-10-04, html.theme-dark «делай так дизайн») {
html.theme-dark Палитра: графит #14171C / панели #1B1F26 / границы #2A2F38 {
html.theme-dark Текст: #E8EAED / вторичный #9AA0AA / акцент #F28C28 {
html.theme-dark ============================================================ */
html { background: #14171C; }
html.theme-dark body { background: #14171C; color: #E8EAED; }
html.theme-dark a { color: #F2A65A; }
html.theme-dark h1, html.theme-dark h2, html.theme-dark h3, html.theme-dark b { color: #F2F3F5; }
html.theme-dark h2.section { color: #F2F3F5; border-color: #2A2F38; }
html.theme-dark .wrap { color: #D6D9DE; }

/* шапка */
html.theme-dark .site-header { background: #101318; border-bottom: 1px solid #262B33; }
html.theme-dark .site-header .brand { color: #F2F3F5; }
html.theme-dark .site-header nav a { color: #B9BDC6; }
html.theme-dark .site-header nav a:hover, html.theme-dark .site-header nav a.active { color: #F28C28; }
html.theme-dark .nav-toggle span { background: #E8EAED; }

/* футер */
html.theme-dark .site-footer { background: #101318; border-top: 1px solid #262B33; color: #9AA0AA; }
html.theme-dark .site-footer a { color: #F2A65A; }
html.theme-dark .site-footer .last-updated { color: #6B7280; }

/* карточки и списки */
html.theme-dark .app-card { background: #1B1F26; border-color: #F28C28; color: #E8EAED; }
html.theme-dark .app-card .tag { color: #F2A65A; }
html.theme-dark .app-card p { color: #B9BDC6; }
html.theme-dark .news-item { background: #1B1F26; border-left-color: #F28C28; color: #D6D9DE; }
html.theme-dark .news-date { color: #F2A65A; }
html.theme-dark .features .feature { background: #1B1F26; color: #D6D9DE; }
html.theme-dark .features .feature b { color: #F2F3F5; }

/* формы и кнопки */
html.theme-dark .form-card { background: #1B1F26; color: #E8EAED; }
html.theme-dark .form-card label, html.theme-dark .task-dialog-inner label { color: #B9BDC6; }
html.theme-dark input, html.theme-dark textarea, html.theme-dark select {
  background: #14171C; color: #E8EAED;
  border: 1px solid #2A2F38;
}
html.theme-dark input:focus, html.theme-dark textarea:focus, html.theme-dark select:focus { outline: 2px solid #F28C28; }
html.theme-dark .btn { border-color: #F28C28; }
html.theme-dark .btn-primary { background: #F28C28; color: #14171C; }
html.theme-dark .btn-primary:hover { background: #FFA347; }
html.theme-dark .btn-ghost { color: #F2A65A; }
html.theme-dark .btn-small { background: transparent; color: #F2A65A; border-color: #F28C28; }
html.theme-dark .btn-disabled { color: #F2A65A; border-color: #F28C28; }
html.theme-dark .msg-ok { color: #7BC47F; }
html.theme-dark .msg-error { color: #FF8A70; }

/* политики и текстовые страницы */
html.theme-dark .policy h2, html.theme-dark .policy h3 { color: #F2F3F5; }
html.theme-dark .policy, html.theme-dark .policy p, html.theme-dark .policy li { color: #C9CDD4; }
html.theme-dark .policy a { color: #F2A65A; }

html.theme-dark .task-card { background: #1B1F26; border-color: #2A2F38; color: #E8EAED; }
html.theme-dark .task-info { background: #14171C; border-color: #2A2F38; }
html.theme-dark .task-info span, html.theme-dark .task-time, html.theme-dark .task-progress, html.theme-dark .group-title, html.theme-dark .fine-print { color: #9AA0AA; }
html.theme-dark .subtask-card { background: #161A20; border-color: #2A2F38; color: #E8EAED; }
html.theme-dark .subtask-card .task-time { color: #9AA0AA; }
html.theme-dark .sub-idx { box-shadow: 0 0 0 2px #14171C; }
html.theme-dark .sub-link { opacity: .6; }
html.theme-dark .child-tree { border-left-color: #2A2F38; }
html.theme-dark .day-progress, html.theme-dark .week-bar { background: #161A20; border-color: #2A2F38; }
html.theme-dark .week-row.today .week-dayname { color: #F2A65A; }
html.theme-dark .week-dayname, html.theme-dark .gantt-name, html.theme-dark .day-load, html.theme-dark .day-time { color: #9AA0AA; }
html.theme-dark .week-bar .week-fill { background: linear-gradient(90deg, html.theme-dark #F28C28, html.theme-dark #FFAE5C); }
html.theme-dark .week-bar.over .week-fill { background: linear-gradient(90deg, html.theme-dark #e0705a, html.theme-dark #c4432e); }
html.theme-dark .week-item { background: #1B1F26; border-left-color: #F28C28; }
html.theme-dark .week-item.sub { background: #161A20; }
html.theme-dark .week-col { background: #1B1F26; border-color: #2A2F38; }
html.theme-dark .week-col.today { border-color: #F28C28; background: #1d2129; }
html.theme-dark .gantt-hour { background: #161A20; border-left-color: #262B33; }
html.theme-dark .gantt-hour.sleep { background: #101318; }
html.theme-dark .gantt-hour span { color: #6B7280; }
html.theme-dark .gantt-name { color: #C9CDD4; border-bottom-color: #262B33; }
html.theme-dark .gantt-bar { background: #1B1F26; border-left-color: #F0B429; color: #E8EAED; }
html.theme-dark .gantt-bar.sub { background: #1d2129; }
html.theme-dark .gantt-bar.fact { background: #101318; }
html.theme-dark .gantt-bar.now { box-shadow: 0 0 0 2px #FF8A70 inset; }
html.theme-dark .task-card.open { border-color: var(--orange); }


#theme-switch button.active { background: var(--orange); color: #fff; border-color: var(--orange); }
/* Админ-метрика */
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .5rem; margin-bottom: .6rem; }
.mk-cell { background: #f7f3ea; border-radius: 8px; padding: .45rem .6rem; display: flex; flex-direction: column; }
.mk-cell span { font-size: .72rem; color: var(--graphite-soft); }
.mk-cell b { font-size: 1.05rem; }
.mk-pages { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .88rem; }
