/* ==== shared.css ==== */
/* ─── АРТЕЛЬТЕХ · SHARED DESIGN SYSTEM ─── */
/* Mobile-first · Tile-based · Light/Dark */
/* Шрифт Geologica подключается через <link rel="preconnect"> + <link rel="stylesheet">
   в header.php — параллельно с этим CSS, без блокирующего @import. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ══════════════════════════════════════════
   THEME TOKENS
   ══════════════════════════════════════════ */

/* ── LIGHT (default) ── */
:root {
  color-scheme: light;
  --bg:       #ffffff;
  --bg2:      #f6f8fa;
  --bg3:      #eef1f6;
  --bg4:      #dfe3ea;
  --accent:   #9a6700;
  --accent-hover: #7d5200;
  --accent-surface: #f0a500;
  --accent-surface-hover: #e09600;
  --accent-dim: rgba(245,166,35,0.08);
  --accent-border: rgba(154,103,0,0.22);
  --text:     #1f2328;
  --text2:    #596168;   /* AA ≥ 7:1 on white */
  --text3:    #6f7680;   /* AA ≥ 4.8:1 — now passes */
  --border:   rgba(0,0,0,0.12);
  --border2:  rgba(0,0,0,0.2);
  --danger:   #d1242f;
  --success:  #1a7f37;
  --info:     #0969da;
  --radius:   14px;
  --radius-sm: 8px;
  --radius-xs: 4px;
  --transition: 0.18s ease;
  --topbar-bg: rgba(255,255,255,0.92);
  --topbar-border: rgba(0,0,0,0.08);
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
}

/* ── DARK ── GitHub-inspired layered surfaces, avoid pure #000 for OLED smear */
[data-theme="dark"] {
  color-scheme: dark;
  --bg:       #0d1117;
  --bg2:      #161b22;
  --bg3:      #1e242d;
  --bg4:      #2a313c;
  --accent:   #f0a500;
  --accent-hover: #ffbc2e;
  --accent-surface: #f0a500;
  --accent-surface-hover: #ffbc2e;
  --accent-dim: rgba(240,165,0,0.14);
  --accent-border: rgba(240,165,0,0.32);
  --text:     #e6edf3;
  --text2:    #9ea7b3;   /* WCAG AA ≥ 5.5:1 on --bg */
  --text3:    #8b949e;   /* WCAG AA ≥ 4.7:1 — now passes for small text */
  --border:   rgba(255,255,255,0.09);
  --border2:  rgba(255,255,255,0.16);
  --danger:   #ff6b63;
  --success:  #56d364;
  --info:     #79b8ff;
  --topbar-bg: rgba(13,17,23,0.9);
  --topbar-border: rgba(255,255,255,0.09);
  --card-shadow: 0 1px 3px rgba(0,0,0,0.35);
  --card-shadow-hover: 0 6px 18px rgba(0,0,0,0.45);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
}

/* ══════════════════════════════════════════
   GLOBAL RESETS
   ══════════════════════════════════════════ */
html { scroll-behavior: smooth; }

body {
  font-family: 'Geologica', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;          /* mobile-first 16px → no iOS auto-zoom */
  line-height: 1.55;
  min-height: 100dvh;
  touch-action: manipulation;
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: 72px;
}

@media (min-width: 769px) {
  body { padding-bottom: 0; font-size: 14px; line-height: 1.6; }
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

/* ── Базовая типографика (замена main.css) ── */
html {
  background: var(--bg);
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
}

/* ── Legacy утилиты, ранее в main.css ── */
._hide, ._hidden, [hidden] { display: none !important; }
.cross::before, .cross::after { content: ''; }

/* ── Глобальный поиск (dropdown) ── */
.global_search_wrapper { position: relative; }
.searchbar-wrap {
  position: relative;
  transition: max-height .25s ease, opacity .2s ease, padding .2s ease;
  max-height: 80px; opacity: 1;
}
.searchbar-wrap.is-collapsed {
  max-height: 0; opacity: 0;
  padding-top: 0 !important; padding-bottom: 0 !important;
  border: 0 !important; pointer-events: none;
  overflow: hidden;
}
.searchbar { position: relative; }
.searchbar-close {
  background: transparent !important; border: 0 !important;
  padding: 0 14px !important;
  cursor: pointer; color: var(--text3);
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
}
.searchbar-close:hover { color: var(--danger); }
.global_search_dropdown {
  display: none;
  position: absolute;
  left: 50%; transform: translateX(-50%);
  top: calc(100% + 6px);
  width: calc(100% - 2rem); max-width: 600px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
  max-height: 420px;
  overflow-y: auto;
  z-index: 1000;
}
.global_search_dropdown.show { display: block; }
.global_search_dropdown_section { padding: 6px 0; }
.global_search_dropdown_section:not(:first-child) { border-top: 1px solid var(--border); }
.global_search_dropdown_title {
  padding: 6px 14px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text3);
}
.global_search_dropdown_item {
  display: block; padding: 10px 14px;
  text-decoration: none; color: var(--text);
  transition: background 0.15s;
  cursor: pointer; text-align: left;
  border: 0; background: transparent;
  width: 100%; font-family: inherit; font-size: 14px;
}
.global_search_dropdown_item:hover,
.global_search_dropdown_item:focus-visible {
  background: var(--bg3); color: var(--text); outline: none;
}
.global_search_dropdown_item_title { font-weight: 600; margin-bottom: 2px; }
.global_search_dropdown_item_meta { font-size: 12px; color: var(--text3); }
.global_search_dropdown_empty {
  padding: 20px 14px; text-align: center;
  color: var(--text3); font-size: 13px;
}
h1, h2, h3, h4, h5, h6 { color: var(--text); font-weight: 600; line-height: 1.25; margin: 0 0 0.75em; letter-spacing: -0.3px; }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.5px; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
h4 { font-size: 14px; font-weight: 500; }
p  { margin: 0 0 0.75em; color: var(--text); font-weight: 400; }
b, strong { font-weight: 600; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 0.75em 1.25em; color: var(--text); }
ul:last-child, ol:last-child { margin-bottom: 0; }
nav ul { list-style: none; margin: 0; padding: 0; }
img, svg, video { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
button { font-family: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ── Структурные классы из старой темы ── */
.wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1rem; position: relative;
}
@media (min-width: 769px) { .wrap { padding: 0 1.25rem; } }

section.page, section.single, section.add_new, section.home_about, section.services,
section.services_archive, section.projects_archive {
  padding: 1.25rem 0 2rem;
}
@media (min-width: 769px) {
  section.page, section.single, section.add_new { padding: 1.5rem 0 3rem; }
}

/* ══════════════════════════════════════════
   ACCESSIBILITY
   ══════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--accent-surface);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: fixed; top: -100%;
  left: 50%; transform: translateX(-50%);
  background: var(--accent-surface); color: #000;
  padding: 10px 24px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 14px; font-weight: 600;
  z-index: 9999; transition: top 0.2s;
}
.skip-link:focus { top: 0; color: #000; }

/* Универсальный press-feedback: scale(0.97) на кнопках/ссылках/карточках */
button:not(:disabled):active,
.btn:not(:disabled):active,
a.btn:active,
a.btn-cta:active,
.bottom-nav-item:active,
.card:active,
.tile:active,
.project-card:active,
.conversation-item:active {
  transform: scale(0.97);
  transition-duration: 80ms;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* Отключаем transform-press, чтобы не было микро-скачков */
  button:active, .btn:active, a.btn:active, a.btn-cta:active,
  .icon-btn:active, .bottom-nav-item:active, .bottom-nav-cta:active .nav-cta-circle,
  .card:active, .tile:active, .project-card:active, .conversation-item:active {
    transform: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ══════════════════════════════════════════
   TOPBAR
   ══════════════════════════════════════════ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  /* Резервируем место под system status bar в PWA/WebView edge-to-edge.
     В обычном браузере env() = 0 → высота 56px как раньше. */
  height: calc(56px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--topbar-border);
  display: flex; align-items: center;
  padding-left: 1rem;
  padding-right: 1rem;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 769px) {
  .topbar { padding-left: 1.25rem; padding-right: 1.25rem; gap: 1rem; }
}

.topbar-logo {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; flex-shrink: 0;
}
.topbar-logo-icon {
  width: 30px; height: 30px;
  background: var(--accent-surface);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
}
.topbar-logo-icon svg { width: 16px; height: 16px; }
.topbar-logo-text { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }

.topbar-nav {
  display: none; gap: 1.25rem; align-items: center;
  margin-left: 0.5rem;
}
@media (min-width: 769px) {
  .topbar-nav { display: flex; }
}
.topbar-nav a {
  color: var(--text2); font-size: 13px; font-weight: 500;
  transition: color var(--transition);
}
.topbar-nav a:hover { color: var(--text); }
.topbar-nav a.active {
  color: var(--accent);
  position: relative;
}
.topbar-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -18px; left: 0; right: 0;
  height: 2px;
  background: var(--accent-surface);
  border-radius: 2px;
}

.topbar-spacer { flex: 1; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.btn-cta {
  background: var(--accent-surface); color: #000;
  font-weight: 600; font-size: 12px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  text-decoration: none; white-space: nowrap;
  transition: background var(--transition), transform 0.12s ease;
  border: none; cursor: pointer;
  min-height: 36px;
}
.btn-cta:hover { background: var(--accent-surface-hover); color: #000; }
.btn-cta:active { transform: scale(0.97); }

/* Hide CTA on mobile — bottom nav has it */
@media (max-width: 768px) {
  .topbar-actions .btn-cta { display: none; }
}

.icon-btn {
  width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); cursor: pointer; transition: all var(--transition);
  text-decoration: none; position: relative;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--bg3); color: var(--text); border-color: var(--border2); }
.icon-btn:active { transform: scale(0.94); transition-duration: 80ms; }
.icon-btn .badge-dot {
  position: absolute; top: -2px; right: -2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--bg);
}
/* Numeric variant: native pushes unread count → бейдж с числом */
.icon-btn .badge-dot.badge-dot--count {
  width: auto; height: 16px; min-width: 16px;
  padding: 0 5px; border-radius: 10px;
  color: #fff; font-size: 11px; line-height: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  top: -4px; right: -4px;
}

/* ── THEME TOGGLE ── показывает ТЕКУЩУЮ тему */
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.topbar-user {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); cursor: pointer;
  transition: background var(--transition); text-decoration: none; color: var(--text);
}
.topbar-user:hover { background: var(--bg3); color: var(--text); }
.topbar-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-surface); color: #000;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.topbar-username { font-size: 12px; font-weight: 600; }
@media (max-width: 768px) {
  .topbar-username { display: none; }
  .topbar-user { padding: 4px; border: none; }
}

/* ══════════════════════════════════════════
   BOTTOM NAVIGATION (Mobile)
   ══════════════════════════════════════════ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
  height: 64px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -1px 8px rgba(0,0,0,0.06);
}
[data-theme="dark"] .bottom-nav {
  box-shadow: 0 -1px 8px rgba(0,0,0,0.3);
}

@media (min-width: 769px) {
  .bottom-nav { display: none; }
}

.bottom-nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  color: var(--text3);
  text-decoration: none;
  font-size: 10px; font-weight: 600;
  transition: color var(--transition);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item svg { width: 22px; height: 22px; flex-shrink: 0; }
.bottom-nav-item:active { opacity: 0.7; }
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item.active::before {
  content: '';
  position: absolute; top: 0; left: 25%; right: 25%;
  height: 2px;
  background: var(--accent-surface);
  border-radius: 0 0 2px 2px;
}

.bottom-nav-cta {
  position: relative;
}
.bottom-nav-cta .nav-cta-circle {
  width: 44px; height: 44px;
  background: var(--accent-surface);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-top: -14px;
  box-shadow: 0 2px 8px rgba(240,165,0,0.3);
  transition: transform 0.15s ease;
}
.bottom-nav-cta .nav-cta-circle svg { color: #000; width: 20px; height: 20px; }
.bottom-nav-cta:active .nav-cta-circle { transform: scale(0.93); }

/* ══════════════════════════════════════════
   SEARCH BAR
   ══════════════════════════════════════════ */
.searchbar-wrap {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 10px 1rem;
}
@media (min-width: 769px) {
  .searchbar-wrap { padding: 10px 1.25rem; }
}
.searchbar {
  max-width: 600px; margin: 0 auto;
  display: flex; align-items: center;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); overflow: hidden;
}
.searchbar input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 15px;
  padding: 10px 14px;
  min-height: 44px;
}
@media (min-width: 769px) {
  .searchbar input { font-size: 13px; padding: 8px 12px; min-height: 0; }
}
.searchbar input::placeholder { color: var(--text3); }
.searchbar button {
  background: transparent; border: none;
  padding: 0 14px; cursor: pointer; color: var(--text2);
  display: flex; align-items: center;
  min-height: 44px;
}

/* ══════════════════════════════════════════
   BREADCRUMB
   ══════════════════════════════════════════ */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text3); margin-bottom: 8px;
  overflow-x: auto; white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.breadcrumb a { color: var(--text3); }
.breadcrumb a:hover { color: var(--text2); }
.breadcrumb span { color: var(--text3); }

/* ══════════════════════════════════════════
   PAGE LAYOUT
   ══════════════════════════════════════════ */
.page-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}
@media (min-width: 769px) {
  .page-wrap { padding: 1.5rem 1.25rem 3rem; }
}

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 1.25rem;
}
.page-title { font-size: 20px; font-weight: 700; letter-spacing: -0.4px; }

/* ══════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border2);
  background: var(--bg3); color: var(--text);
  transition: all var(--transition); text-decoration: none; white-space: nowrap;
  min-height: 44px;
}
@media (min-width: 769px) {
  .btn { padding: 8px 14px; font-size: 12px; min-height: 34px; }
}
.btn:hover { background: var(--bg4); border-color: var(--border2); color: var(--text); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-primary { background: var(--accent-surface); color: #000; border-color: transparent; }
.btn-primary:hover { background: var(--accent-surface-hover); color: #000; }
.btn-danger { background: rgba(248,81,73,0.12); color: var(--danger); border-color: rgba(248,81,73,0.25); }
.btn-danger:hover { background: rgba(248,81,73,0.2); }
.btn-success { background: rgba(63,185,80,0.1); color: var(--success); border-color: rgba(63,185,80,0.25); }

/* ══════════════════════════════════════════
   CARDS (base tile/card component)
   ══════════════════════════════════════════ */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  box-shadow: var(--card-shadow-hover);
}

/* ══════════════════════════════════════════
   STAT TILES (mobile-first grid)
   ══════════════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px; margin-bottom: 1.5rem;
}
@media (min-width: 600px) {
  .stats-row { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--card-shadow-hover); }
.stat-card .num {
  font-size: 26px; font-weight: 700;
  color: var(--accent); letter-spacing: -1px;
}
.stat-card .lbl { font-size: 12px; color: var(--text3); margin-top: 2px; }

/* ══════════════════════════════════════════
   TABLE (desktop) + CARD LIST (mobile)
   ══════════════════════════════════════════ */
.table-wrap {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
}

/* Mobile: convert table rows to stacked cards */
@media (max-width: 768px) {
  .table-wrap { background: transparent; border: none; box-shadow: none; overflow: visible; }
  .table-wrap .overflow-x { overflow: visible; }
  .table-wrap table { display: block; }
  .table-wrap thead { display: none; }
  .table-wrap tbody { display: flex; flex-direction: column; gap: 10px; }
  .table-wrap tbody tr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 4px 12px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--card-shadow);
  }
  .table-wrap tbody tr:hover { background: var(--bg3); }
  .table-wrap tbody td {
    padding: 2px 0; font-size: 13px;
  }
  /* Title spans full width */
  .table-wrap tbody td:nth-child(3) {
    grid-column: 1 / -1;
    order: -2;
    font-size: 14px; font-weight: 600;
    padding-bottom: 6px;
  }
  /* ID + Date on same row */
  .table-wrap tbody td.td-id {
    order: -1;
    font-size: 11px;
  }
  .table-wrap tbody td.td-date {
    order: -1;
    text-align: right;
    grid-column: 2 / -1;
  }
  /* Hide less important cols on small screens */
  .table-wrap tbody td:nth-child(4) { display: none; } /* Author */
  .table-wrap tbody td:nth-child(5) { grid-column: 1 / 2; } /* Status */
  .table-wrap tbody td:nth-child(6) { grid-column: 2 / 3; text-align: right; } /* Executor */
  .table-wrap tbody td:nth-child(7) { grid-column: 3; } /* Actions */
}

/* Desktop table */
@media (min-width: 769px) {
  table { width: 100%; border-collapse: collapse; }
  thead tr { border-bottom: 1px solid var(--border); }
  thead th {
    text-align: left; padding: 10px 14px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.8px;
    text-transform: uppercase; color: var(--text3);
  }
  tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
  }
  tbody tr:last-child { border-bottom: none; }
  tbody tr:hover { background: var(--bg3); }
  tbody td { padding: 10px 14px; font-size: 13px; }
}

/* Always visible */
.td-id { color: var(--text2); font-size: 12px; font-weight: 600; }
.td-date { color: var(--text3); font-size: 12px; }
.td-link { color: var(--accent); font-weight: 600; }
.td-link:hover { color: var(--accent-hover); }
.td-muted { color: var(--text2); }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600;
}
.badge-publish { background: rgba(63,185,80,0.12); color: var(--success); }
.badge-draft   { background: var(--bg4); color: var(--text3); }
.badge-admin   { background: rgba(88,166,255,0.12); color: var(--info); }
.badge-exec    { background: var(--accent-dim); color: var(--accent); }

.action-btns { display: flex; gap: 6px; align-items: center; }
.action-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text2);
  transition: all var(--transition); text-decoration: none;
}
.action-icon svg { width: 15px; height: 15px; }
.action-icon:hover { background: var(--bg4); color: var(--text); border-color: var(--border2); }
.action-icon.del:hover { background: rgba(248,81,73,0.1); color: var(--danger); border-color: rgba(248,81,73,0.25); }

/* ══════════════════════════════════════════
   SECTION DIVIDER
   ══════════════════════════════════════════ */
.section-label {
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.3px; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 8px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}

/* ══════════════════════════════════════════
   MAP BUTTON (panel)
   ══════════════════════════════════════════ */
.map-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: var(--radius-sm);
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 13px;
  font-weight: 600; cursor: pointer; transition: all var(--transition);
  text-decoration: none; margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
  width: 100%;
  justify-content: center;
}
@media (min-width: 769px) {
  .map-btn { width: auto; justify-content: flex-start; }
}
.map-btn:hover { background: var(--bg3); color: var(--text); box-shadow: var(--card-shadow-hover); }
.map-btn svg { color: var(--accent); }

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1rem;
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap;
  gap: 1rem; justify-content: space-between; align-items: center;
}
@media (max-width: 768px) {
  .site-footer { padding-bottom: 80px; } /* above bottom nav */
}
.site-footer p { font-size: 12px; color: var(--text3); }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { font-size: 12px; color: var(--text3); }
.footer-links a:hover { color: var(--text2); }

/* ══════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════ */
.overflow-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Hidden heading for accessibility */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ==== 01-core.css ==== */
/* artelteh — часть legacy-overrides.css. Загружается под body.newui.
 * Не редактировать вручную в продакшене без согласования.
 */
/* ─── ARTELTEH LEGACY OVERRIDES ───
   Scope: body.newui — восстанавливает новые токены на старых классах.
   Specificity body.X .Y > .Y побеждает инлайновые <style> такой же специфичности. */

/* ── HTML/BODY: перебиваем main.css hardcoded light bg + Arial ── */
html:has(body.newui),
body.newui {
  background-color: var(--bg) !important;
  background: var(--bg) !important;
  font-family: 'Geologica', system-ui, -apple-system, sans-serif !important;
  color: var(--text);
}
body.newui * { font-family: inherit; }
body.newui h1, body.newui h2, body.newui h3, body.newui h4,
body.newui p, body.newui ul, body.newui li {
  font-family: inherit;
}

/* ── Меню topbar — убрать буллиты и markers ── */
body.newui .topbar-menu-ul,
body.newui .topbar-nav ul {
  list-style: none !important;
  display: flex !important;
  gap: 1.25rem !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.newui .topbar-menu-ul li,
body.newui .topbar-nav li {
  list-style: none !important;
  display: inline-flex;
  margin: 0 !important;
  line-height: 1.3 !important;
  float: none !important;
}
body.newui .topbar-menu-ul li::marker,
body.newui .topbar-nav li::marker { content: ''; }
body.newui .topbar-nav a {
  color: var(--text2); font-size: 13px; font-weight: 500;
  text-decoration: none;
}
body.newui .topbar-nav a:hover { color: var(--text); }

/* Убираем старый header { background: #ffc527 } */
body.newui > header:not(.topbar),
body.newui header:not(.topbar):not(.newui-exempt) {
  background: transparent !important;
  box-shadow: none !important;
  height: auto !important;
  line-height: normal !important;
  margin-bottom: 0 !important;
  border: 0 !important;
}

/* Mobile panel button — только на узких экранах */
body.newui .topbar .topbar-panel-mobile { display: none !important; }
@media (max-width: 768px) {
  body.newui .topbar .topbar-panel-mobile {
    display: inline-flex !important;
  }
}

/* ── Header icon-кнопки одинаковой ширины (перекрыть legacy 20px) ── */
body.newui .topbar .icon-btn,
body.newui .topbar .messages-link,
body.newui .topbar .notifications-toggle {
  width: 40px !important; height: 40px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-sm) !important;
  display: inline-flex !important;
  align-items: center !important; justify-content: center !important;
  color: var(--text2) !important;
  margin: 0 !important;
  position: relative;
  flex-shrink: 0;
}
body.newui .topbar .icon-btn:hover,
body.newui .topbar .messages-link:hover,
body.newui .topbar .notifications-toggle:hover {
  background: var(--bg3) !important;
  border-color: var(--accent) !important;
  color: var(--text) !important;
}
body.newui .topbar .notifications-icon { font-size: 14px; }
body.newui .topbar .notifications-badge {
  top: -3px !important; right: -3px !important;
  background: var(--danger) !important; color: #fff !important;
  border: 2px solid var(--bg) !important;
  font-size: 9px !important; font-weight: 600 !important;
  min-width: 16px; height: 16px; line-height: 12px !important;
  padding: 0 4px !important; border-radius: 100px !important;
}

/* ══════════════════════════════════════════
   NOTIFICATIONS — выезжающая правая панель
   ══════════════════════════════════════════ */

/* Backdrop scrim — начинается ПОД topbar (56px desktop / 64px mobile) */
body.newui .notifications-menu-item:has(.notifications-dropdown.show)::before {
  content: '';
  position: fixed;
  top: 56px; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  animation: at-fade-in .2s ease;
}
@media (max-width: 768px) {
  body.newui .notifications-menu-item:has(.notifications-dropdown.show)::before {
    top: calc(56px + env(safe-area-inset-top, 0));
  }
  body.newui .notifications-dropdown {
    top: calc(56px + env(safe-area-inset-top, 0)) !important;
    height: calc(100dvh - 56px - env(safe-area-inset-top, 0)) !important;
    max-height: calc(100dvh - 56px - env(safe-area-inset-top, 0)) !important;
  }
}
@keyframes at-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes at-slide-right { from { transform: translateX(100%); } to { transform: translateX(0); } }

body.newui .notifications-dropdown {
  position: fixed !important;
  top: 56px !important; right: 0 !important; left: auto !important; bottom: 0 !important;
  width: 400px !important; max-width: 100vw;
  height: calc(100dvh - 56px) !important; max-height: calc(100dvh - 56px) !important;
  margin: 0 !important;
  background: var(--bg2) !important;
  border: 0 !important;
  border-left: 1px solid var(--border2) !important;
  border-radius: 0 !important;
  box-shadow: -10px 0 30px rgba(0,0,0,0.35) !important;
  overflow: hidden !important;
  z-index: 100;
  flex-direction: column;
  display: none;
  transform: translateX(100%);
}
body.newui .notifications-dropdown.show {
  display: flex !important;
  animation: at-slide-right .25s ease forwards;
}

body.newui .notifications-dropdown-header {
  background: var(--bg2) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 16px 18px !important; line-height: 1.3 !important;
  flex-shrink: 0;
}
body.newui .notifications-dropdown-header h3 {
  color: var(--text) !important;
  font-size: 14px !important; font-weight: 600 !important;
  margin: 0 !important;
}
body.newui .notifications-reset-btn {
  background: var(--bg2) !important;
  color: var(--text2) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-sm) !important;
  padding: 4px 10px !important;
  font-size: 11px !important; font-weight: 600 !important;
  line-height: 1.4 !important;
  cursor: pointer;
  transition: all var(--transition);
}
body.newui .notifications-reset-btn:hover:not(:disabled) {
  background: var(--bg4) !important;
  color: var(--text) !important;
  border-color: var(--accent) !important;
}
body.newui .notifications-reset-btn:disabled {
  opacity: 0.4 !important;
  background: transparent !important;
  cursor: not-allowed;
}
body.newui .view-all-link {
  color: var(--accent) !important;
  text-decoration: none !important;
  font-size: 12px !important; font-weight: 600 !important;
}
body.newui .view-all-link:hover {
  text-decoration: underline !important;
  color: var(--accent-hover) !important;
}
body.newui .notifications-dropdown-content {
  background: var(--bg2) !important;
  max-height: none !important;
  padding: 0 !important;
  flex: 1 1 auto;
  overflow-y: auto;
}
body.newui .notification-dropdown-item {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 12px 16px !important;
  cursor: pointer;
  transition: background var(--transition);
}
body.newui .notification-dropdown-item:hover {
  background: var(--bg3) !important;
}
body.newui .notification-dropdown-item.unread {
  background: var(--accent-dim) !important;
  border-left: 3px solid var(--accent) !important;
  padding-left: 13px !important;
}
body.newui .notification-dropdown-item:last-child {
  border-bottom: 0 !important;
}
body.newui .notification-dropdown-title {
  color: var(--text) !important;
  font-size: 13px !important; font-weight: 600 !important;
  margin: 0 0 4px !important;
}
body.newui .notification-dropdown-message {
  color: var(--text2) !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  margin: 0 0 4px !important;
}
body.newui .notification-dropdown-date {
  color: var(--text3) !important;
  font-size: 11px !important;
  font-variant-numeric: tabular-nums;
}
body.newui .notifications-loading,
body.newui .notifications-empty {
  color: var(--text3) !important;
  padding: 32px 20px !important;
  text-align: center;
  font-size: 13px;
}


/* ── Каркас страниц ── */
body.newui .page,
body.newui section.page {
  background: transparent;
  padding: 0;
}
body.newui .page > .wrap,
body.newui section.page > .wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}
@media (min-width: 769px) {
  body.newui .page > .wrap { padding: 1.5rem 1.25rem 3rem; }
}

/* Общий сброс фона */
body.newui { background: var(--bg); }

/* ── Кнопки темы ── */
body.newui .adm_btn,
body.newui .btn,
body.newui button.adm_btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  line-height: 1.2; padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg3); color: var(--text) !important;
  border: 1px solid var(--border2);
  text-decoration: none; cursor: pointer;
  transition: all var(--transition);
  min-height: 40px;
}
body.newui .adm_btn:hover,
body.newui .btn:hover { background: var(--bg4); border-color: var(--border2); color: var(--text) !important; }

body.newui .btn.newproject,
body.newui a.newproject {
  background: var(--accent-surface); color: #000 !important;
  border-color: transparent;
}
body.newui .btn.newproject:hover,
body.newui a.newproject:hover { background: var(--accent-surface-hover); color: #000 !important; }

body.newui .logout-btn {
  background: rgba(248,81,73,0.12) !important; color: var(--danger) !important;
  border-color: rgba(248,81,73,0.25) !important;
}
body.newui .logout-btn:hover { background: rgba(248,81,73,0.22) !important; }

/* ── Уведомления / алерты ── */
body.newui .adm_front_noti {
  padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); margin-bottom: 1rem !important;
  font-size: 14px; background: var(--bg2) !important; color: var(--text) !important;
}

/* ── Карточка профиля (account-header) ── */
body.newui .account-header {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem !important;
}
body.newui .account-header h1,
body.newui #user-greeting {
  font-size: 20px; font-weight: 700; letter-spacing: -0.4px;
  color: var(--text); margin: 0;
}
body.newui .user-avatar,
body.newui .user-avatar-placeholder {
  border: 2px solid var(--accent-surface) !important;
  width: 64px !important; height: 64px !important;
  font-size: 24px !important;
}
body.newui .user-avatar-placeholder {
  background: var(--accent-surface) !important;
  color: #000 !important;
}

/* ── Блоки user_data / user_projects / user_notes / user_map / tg_connect ── */
body.newui .user_data,
body.newui .user_projects,
body.newui .user_notes,
body.newui .user_map,
body.newui .tg_connect,
body.newui .avatar-upload-section {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 1.25rem !important;
  box-shadow: var(--card-shadow);
  margin: 0 0 1.25rem !important;
}

body.newui .user_data h4,
body.newui .tg_connect h4,
body.newui .user_projects h2,
body.newui .user_notes h2,
body.newui .user_map h2,
body.newui .avatar-upload-section h3 {
  color: var(--text) !important;
  font-weight: 600;
  margin-top: 0;
}
body.newui .user_data .row {
  display: grid; grid-template-columns: max-content 1fr;
  gap: 6px 12px; padding: 6px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
body.newui .user_data .row:last-child { border-bottom: 0; }
body.newui .user_data .row h4 {
  font-size: 12px; font-weight: 600;
  color: var(--text3); margin: 0;
  text-transform: uppercase; letter-spacing: 0.5px;
}
body.newui .user_data .row span,
body.newui .tg_connect .row span { color: var(--text); font-size: 14px; }

/* ── Поля ввода ── */
body.newui input[type="text"],
body.newui input[type="email"],
body.newui input[type="tel"],
body.newui input[type="number"],
body.newui input[type="password"],
body.newui input[type="url"],
body.newui input[type="date"],
body.newui input[type="search"],
body.newui textarea,
body.newui select {
  background: var(--bg) !important;
  color: var(--text) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px 12px !important;
  font-family: inherit; font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: none !important;
}
body.newui input:focus,
body.newui textarea:focus,
body.newui select:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-dim) !important;
}
body.newui input[type="text"]:disabled,
body.newui input[disabled] {
  background: transparent !important;
  border: 0 !important; padding: 0 !important;
  color: var(--text) !important;
}
body.newui textarea { min-height: 100px; resize: vertical; }

/* ── Заметки ── */
body.newui .note_item {
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 14px !important;
  margin-bottom: 10px !important;
}
body.newui .note_content { color: var(--text) !important; }
body.newui .note_date { color: var(--text3) !important; }
body.newui .note_footer { border-top-color: var(--border) !important; }
body.newui .note_delete {
  background: rgba(248,81,73,0.12) !important;
  color: var(--danger) !important;
  border: 1px solid rgba(248,81,73,0.25) !important;
  border-radius: var(--radius-xs) !important;
}
body.newui .note_delete:hover { background: rgba(248,81,73,0.22) !important; }
body.newui .notes_empty,
body.newui .notes_loading { color: var(--text3) !important; }

/* ── Таблицы в кабинете / проектах ── */
body.newui .user_projects table,
body.newui .admin_projects table {
  width: 100%; border-collapse: collapse;
}
body.newui .user_projects thead th,
body.newui .admin_projects thead th {
  text-align: left; padding: 10px 12px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--text3); border-bottom: 1px solid var(--border);
}
body.newui .user_projects tbody td,
body.newui .admin_projects tbody td {
  padding: 10px 12px; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
body.newui .user_projects tbody tr:hover,
body.newui .admin_projects tbody tr:hover { background: var(--bg3); }

/* ── Единые сообщения ── */
body.newui .no-projects,
body.newui .empty-state {
  padding: 2rem; text-align: center;
  color: var(--text3); font-size: 14px;
}

/* ── Breadcrumb legacy ── */
body.newui .breadcrumbs,
body.newui .bread {
  font-size: 12px; color: var(--text3);
  margin-bottom: 0.75rem;
}
body.newui .breadcrumbs a,
body.newui .bread a { color: var(--text3); }
body.newui .breadcrumbs a:hover,
body.newui .bread a:hover { color: var(--text2); }

/* ── Заголовки h1/h2 страниц ── */
body.newui section.page h1:first-of-type,
body.newui section.page > .wrap > h1:first-of-type {
  font-size: 22px; font-weight: 700; letter-spacing: -0.4px;
  margin: 0 0 1rem; color: var(--text);
}
body.newui section.page h2 {
  font-size: 17px; font-weight: 600;
  color: var(--text); margin: 0 0 1rem;
}

/* ── Карта ── */
body.newui .single_map_wrapper,
body.newui #map,
body.newui .leaflet-container {
  border-radius: var(--radius) !important;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ── Загрузчик файлов ── */
body.newui input[type="file"] {
  padding: 8px !important;
  background: var(--bg2) !important;
  border: 1px dashed var(--border2) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
}

/* ── Формы логина/регистрации (если используют _show_login контейнер) ── */
body.newui .login-form,
body.newui .register-form,
body.newui .auth-form,
body.newui form.login,
body.newui form.register {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  max-width: 420px; margin: 2rem auto;
}

/* ── Общий сброс устаревшего белого фона ── */
body.newui section,
body.newui .wrap { background: transparent; }

/* ── Старый footer ── */
body.newui > footer,
body.newui footer:not(.site-footer):not(.newui-exempt) {
  background: var(--bg) !important;
  color: var(--text2);
  border-top: 1px solid var(--border);
  padding: 1.5rem 1rem;
  margin-top: 2rem;
}
body.newui footer .wrap {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap;
  gap: 1rem; justify-content: space-between; align-items: center;
}
body.newui footer .copyright {
  font-size: 12px; color: var(--text3);
}
body.newui footer nav ul,
body.newui footer .menu {
  list-style: none; display: flex; gap: 1rem;
  flex-wrap: wrap; padding: 0; margin: 0;
}
body.newui footer nav a,
body.newui footer .menu a {
  font-size: 12px; color: var(--text3);
  text-decoration: none;
}
body.newui footer nav a:hover,
body.newui footer .menu a:hover { color: var(--text2); }

@media (max-width: 768px) {
  body.newui > footer,
  body.newui footer:not(.site-footer):not(.newui-exempt) {
    padding-bottom: 80px;  /* выше bottom-nav */
  }
}

/* ── Убираем 404-стили в пользу токенов ── */
body.newui .error-404 {
  text-align: center; padding: 4rem 1rem; color: var(--text2);
}

/* ── Видимость скрипт-переключённых блоков ── */
body.newui [hidden] { display: none !important; }


/* ==== 02-single-projects.css ==== */
/* artelteh — часть legacy-overrides.css. Загружается под body.newui.
 * Не редактировать вручную в продакшене без согласования.
 */
/* ══════════════════════════════════════════
   SINGLE PROJECT — single-projects.php
   Data-Dense Dashboard стиль: status-цвета, timeline, две колонки
   ══════════════════════════════════════════ */

body.newui section.single,
body.newui .single { padding: 0 !important; background: transparent; }

body.newui section.single > .wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
  padding-top: 1rem !important;
}
@media (min-width: 1024px) {
  body.newui section.single > .wrap {
    grid-template-columns: 70fr 30fr;
  }
}

/* Заголовок проекта — span обе колонки */
body.newui .single .post_class h1,
body.newui section.single h1 {
  font-size: clamp(20px, 2.2vw, 26px) !important;
  font-weight: 700 !important; letter-spacing: -0.5px !important;
  line-height: 1.2 !important; color: var(--text) !important;
  margin: 0 !important;
  grid-column: 1 / -1;
}

/* statuses → column 2 (правая узкая, 30%); остальной контент → full width */
body.newui .single .post_class > .statuses,
body.newui .single > .wrap > .statuses {
  grid-column: 2;
  align-self: start;
}

body.newui .single > .wrap > .project_events,
body.newui .single > .wrap > .worker_actions,
body.newui .single > .wrap > .worker_stage_actions,
body.newui .single > .wrap > .admin_stage_request,
body.newui .single > .wrap > .single_map_nav_btn_wrapper,
body.newui .single > .wrap > .single_map_wrapper,
body.newui .single > .wrap > .comments-section,
body.newui .single > .wrap > .project-comments,
body.newui .single .post_class > .project_events,
body.newui .single .post_class > .worker_actions,
body.newui .single .post_class > .worker_stage_actions,
body.newui .single .post_class > .admin_stage_request,
body.newui .single .post_class > .single_map_nav_btn_wrapper,
body.newui .single .post_class > .single_map_wrapper,
body.newui .single .post_class > .comments-section,
body.newui .single .post_class > .project-comments,
body.newui .single .post_class > .project_comments,
body.newui .single > .wrap > .project_comments,
body.newui .single .post_class > .adm_front_noti,
body.newui .single .post_class > p {
  grid-column: 1 / -1;
}
/* Хлебные крошки сверху на всю ширину */
body.newui .single > .wrap > .bread,
body.newui .single > .wrap > .breadcrumbs {
  grid-column: 1 / -1;
}

/* Главные кнопки действий — sticky сверху */
body.newui .adm_btns {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 14px !important;
  margin: 0 0 1rem !important;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  grid-column: 1 / -1;
}
body.newui .adm_btns input[type="submit"],
body.newui .adm_btns .adm_btn {
  min-height: 38px !important;
  font-size: 12px !important;
  padding: 8px 14px !important;
  font-weight: 600;
}
/* Удаление — справа, отделено */
body.newui .adm_btn_delete,
body.newui .adm_btn[style*="#dc3545"] {
  background: transparent !important;
  color: var(--danger) !important;
  border: 1px solid rgba(248,81,73,0.35) !important;
  margin-left: auto;
}
body.newui .adm_btn_delete:hover,
body.newui .adm_btn[style*="#dc3545"]:hover {
  background: rgba(248,81,73,0.1) !important;
}
/* Зелёные / accept */
body.newui .adm_btn[style*="#28a745"],
body.newui .adm_btn[style*="#4caf50"] {
  background: var(--success) !important;
  color: #000 !important;
  border: 0 !important;
  font-weight: 600 !important;
}
/* Жёлтые / accent */
body.newui .adm_btn[style*="#bf9523"],
body.newui .adm_btn[style*="#ffc527"],
body.newui .adm_btn[style*="#ffc107"] {
  background: var(--accent-surface) !important;
  color: #000 !important;
  border: 0 !important;
  font-weight: 600 !important;
}

/* post_class — растворяем через display:contents (его дети стали прямыми элементами grid в .wrap) */
body.newui .single .post_class,
body.newui .single .type-projects,
body.newui .single article.post {
  display: contents;
}
body.newui .single .post_class > p,
body.newui .single .type-projects > p {
  grid-column: 1 / 2;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 14px; line-height: 1.65;
  color: var(--text); margin: 0;
}

/* Боковая колонка контейнер */
body.newui .adm_meta {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 1rem 1.25rem !important;
  margin: 0 !important;
  align-self: start;
}
@media (min-width: 1024px) {
  body.newui .adm_meta {
    grid-column: 1;
  }
}
body.newui .adm_meta::before {
  content: 'Информация о проекте';
  display: block;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text3);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
body.newui .adm_meta .row {
  display: grid; grid-template-columns: minmax(110px, 36%) 1fr;
  gap: 4px 10px;
  padding: 8px 0 !important;
  border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text);
  align-items: baseline;
  line-height: 1.4;
  word-break: break-word;
}
body.newui .adm_meta .row:last-child { border-bottom: 0; }
body.newui .adm_meta .row b {
  font-weight: 600; color: var(--text3); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.4px;
}
body.newui .adm_meta .row .title b {
  font-size: 12px; color: var(--text);
}
/* Файлы заказчика — grid внутри строки */
body.newui .adm_meta .row .title + br + a,
body.newui .adm_meta .row a[href*="upload"],
body.newui .adm_meta .row a[href$=".pdf"],
body.newui .adm_meta .row a[href$=".jpg"],
body.newui .adm_meta .row a[href$=".png"],
body.newui .adm_meta .row a[href$=".doc"],
body.newui .adm_meta .row a[href$=".docx"],
body.newui .adm_meta .row a[href$=".zip"] {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; margin: 4px 4px 0 0;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 100px; font-size: 12px;
  color: var(--accent); text-decoration: none;
}
body.newui .adm_meta .row .title + br + a:hover,
body.newui .adm_meta .row a[href*="upload"]:hover {
  background: var(--accent-dim); border-color: var(--accent-border);
}

/* Статусы / стадии / события — карточки */
body.newui .statuses,
body.newui .worker_actions,
body.newui .worker_stage_actions,
body.newui .admin_stage_request {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 1.25rem !important;
  margin: 1rem 0 0 !important;
  box-shadow: none !important;
  border-left: 0 !important;
}
/* Семантика по цвету inline-стиля */
body.newui .worker_stage_actions[style*="e8f5e9"] {
  border-left: 3px solid var(--success) !important;
  background: linear-gradient(90deg, rgba(86,211,100,0.06) 0%, var(--bg2) 30%) !important;
}
body.newui .worker_stage_actions[style*="fff3cd"],
body.newui .admin_stage_request {
  border-left: 3px solid var(--accent) !important;
  background: linear-gradient(90deg, var(--accent-dim) 0%, var(--bg2) 30%) !important;
}
/* Inline h3 цвета — переопределяем */
body.newui .worker_stage_actions h3,
body.newui .admin_stage_request h3,
body.newui .project_events h3 {
  color: var(--text) !important;
  font-size: 14px !important; font-weight: 600 !important;
  margin: 0 0 0.75rem !important;
}
body.newui .worker_stage_actions h3[style*="2e7d32"] { color: var(--success) !important; }
body.newui .worker_stage_actions h3[style*="856404"],
body.newui .admin_stage_request h3[style*="856404"] { color: var(--accent) !important; }

/* Statuses wrapper (правая колонка) */
body.newui .statuses {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* События проекта — timeline */
body.newui .project_events,
body.newui .project_events[style] {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 1.25rem !important;
  margin: 0 !important;
}
body.newui .project_events h3 {
  font-size: 12px !important; font-weight: 600 !important;
  text-transform: uppercase !important; letter-spacing: 0.5px !important;
  color: var(--text3) !important;
  margin: 0 0 1rem !important;
  border: 0 !important; padding: 0 !important;
}
body.newui .project_events ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
}

/* Items с inline color-styles — переопределяем по [style*=""] */
body.newui .project_events li[style] {
  position: relative;
  padding: 10px 12px 10px 14px !important;
  margin: 0 !important;
  background: var(--bg3) !important;
  border-left: 3px solid var(--text3) !important;
  border-radius: var(--radius-sm) !important;
  font-size: 13px;
  color: var(--text);
}
/* Зелёные (accepted / stage_approved) */
body.newui .project_events li[style*="d4edda"] {
  background: rgba(86,211,100,0.10) !important;
  border-left-color: var(--success) !important;
}
[data-theme="dark"] body.newui .project_events li[style*="d4edda"] {
  background: rgba(86,211,100,0.08) !important;
}
/* Красные (rejected / stage_rejected) */
body.newui .project_events li[style*="f8d7da"] {
  background: rgba(255,107,99,0.10) !important;
  border-left-color: var(--danger) !important;
}
[data-theme="dark"] body.newui .project_events li[style*="f8d7da"] {
  background: rgba(255,107,99,0.08) !important;
}
/* Жёлтые (pending stage_request) */
body.newui .project_events li[style*="fff3cd"] {
  background: var(--accent-dim) !important;
  border-left-color: var(--accent) !important;
}

/* Заголовок строки события (strong с inline color) */
body.newui .project_events li strong[style] {
  color: inherit !important;
  font-size: 13px !important; font-weight: 600 !important;
  display: block; margin-bottom: 4px;
}
body.newui .project_events li[style*="d4edda"] strong { color: var(--success) !important; }
body.newui .project_events li[style*="f8d7da"] strong { color: var(--danger) !important; }
body.newui .project_events li[style*="fff3cd"] strong { color: var(--accent) !important; }

/* Подробности события (.div style="color:#666") */
body.newui .project_events li > div[style*="#666"],
body.newui .project_events li > div {
  color: var(--text2) !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  margin-top: 4px !important;
}
body.newui .project_events li a {
  color: var(--accent) !important;
  text-decoration: underline; text-underline-offset: 2px;
}
body.newui .project_events li a:hover { color: var(--accent-hover) !important; }

/* Карта */
body.newui .single_map_nav_btn_wrapper {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 0 0.75rem;
}
body.newui .single_map_nav_btn {
  background: var(--bg3) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 8px 12px !important;
  font-size: 12px !important; font-weight: 600 !important;
  text-decoration: none !important;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 36px;
}
body.newui .single_map_nav_btn:hover {
  background: var(--bg4) !important;
  color: var(--text) !important;
  border-color: var(--accent) !important;
}
body.newui .single_map_wrapper {
  border-radius: var(--radius) !important;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 1rem;
  height: 360px;
}

/* ══════════════════════════════════════════
   PROJECT COMMENTS — project-comments.php (Telegram-style)
   ══════════════════════════════════════════ */
body.newui .project_comments {
  margin: 1rem 0 0 !important;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
body.newui .project_comments h3 {
  font-size: 14px !important; font-weight: 600 !important;
  color: var(--text) !important;
  margin: 0 0 1rem !important;
  padding: 0 0 0.75rem !important;
  border-bottom: 1px solid var(--border) !important;
  display: flex; align-items: center; gap: 8px;
}
body.newui .project_comments_list {
  list-style: none; padding: 0; margin: 0 0 1rem;
  display: flex; flex-direction: column; gap: 12px;
}

/* Каждый комментарий — карточка */
body.newui .comment_item {
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 12px 16px !important;
  margin: 0 !important;
  transition: border-color var(--transition);
}
body.newui .comment_item:hover {
  border-color: var(--border2) !important;
}

/* Шапка комментария */
body.newui .comment_header {
  display: flex !important; align-items: flex-start; gap: 10px;
  margin-bottom: 8px !important;
}
body.newui .comment_avatar {
  width: 32px; height: 32px;
  border-radius: 50% !important;
  background: var(--accent-surface) !important;
  color: #000 !important;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
body.newui .comment_author_info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
body.newui .comment_author_name {
  color: var(--text) !important;
  font-size: 13px !important; font-weight: 600 !important;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
body.newui .comment_author_type {
  display: inline-block;
  padding: 1px 8px !important;
  border-radius: 100px !important;
  font-size: 10px !important; font-weight: 600 !important;
  text-transform: uppercase; letter-spacing: 0.4px;
  background: var(--bg3) !important;
  color: var(--text3) !important;
}
body.newui .comment_author_type.type-admin {
  background: rgba(121,184,255,0.15) !important;
  color: var(--info) !important;
}
body.newui .comment_author_type.type-worker {
  background: rgba(86,211,100,0.15) !important;
  color: var(--success) !important;
}
body.newui .comment_date {
  color: var(--text3) !important;
  font-size: 11px !important;
  font-variant-numeric: tabular-nums;
}

/* Действия (delete) */
body.newui .comment_actions {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
}
body.newui .comment_delete_btn {
  background: transparent !important;
  border: 0 !important;
  color: var(--text3) !important;
  font-size: 14px !important;
  padding: 4px 8px !important;
  border-radius: var(--radius-xs) !important;
  cursor: pointer;
  transition: all var(--transition);
  opacity: 0;
}
body.newui .comment_item:hover .comment_delete_btn { opacity: 1; }
body.newui .comment_delete_btn:hover {
  background: rgba(255,107,99,0.12) !important;
  color: var(--danger) !important;
}

/* Тело */
body.newui .comment_content {
  color: var(--text) !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  margin: 0 !important;
  white-space: pre-wrap;
  word-wrap: break-word; overflow-wrap: anywhere;
}

/* Файлы вложений */
body.newui .comment_files {
  margin-top: 10px !important;
  padding-top: 10px !important;
  border-top: 1px solid var(--border) !important;
}
body.newui .comment_files_title {
  font-size: 11px !important;
  text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text3) !important;
  font-weight: 600 !important;
  margin: 0 0 6px !important;
}
body.newui .comment_file_item {
  display: inline-flex !important; align-items: center; gap: 6px;
  padding: 5px 10px !important;
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 100px !important;
  margin: 0 4px 4px 0 !important;
  text-decoration: none !important;
  color: var(--accent) !important;
  font-size: 12px !important;
  transition: background var(--transition);
}
body.newui .comment_file_item:hover {
  background: var(--bg3) !important;
  color: var(--accent-hover) !important;
  border-color: var(--accent-border) !important;
}

/* Пустое состояние */
body.newui .comments_empty {
  padding: 2rem 1rem !important;
  text-align: center;
  color: var(--text3) !important;
  background: transparent !important;
  border: 1px dashed var(--border2) !important;
  border-radius: var(--radius) !important;
  font-size: 13px;
  font-style: normal !important;
}

/* Форма добавления комментария */
body.newui .add_comment_form {
  margin-top: 1rem !important;
  padding: 1rem 1.25rem !important;
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}
body.newui .add_comment_form h4 {
  font-size: 12px !important; font-weight: 600 !important;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text3) !important;
  margin: 0 0 0.75rem !important;
}
body.newui .add_comment_form textarea {
  width: 100% !important;
  min-height: 80px !important;
  background: var(--bg2) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px 12px !important;
  font-size: 14px !important; font-family: inherit;
  color: var(--text) !important;
  resize: vertical;
}
body.newui .add_comment_form textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-dim) !important;
  outline: none;
}
body.newui .add_comment_form button[type="submit"],
body.newui .add_comment_form input[type="submit"] {
  background: var(--accent-surface) !important;
  color: #000 !important;
  border: 0 !important;
  padding: 10px 18px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important; font-size: 13px !important;
  cursor: pointer;
  margin-top: 0.5rem;
}
body.newui .add_comment_form button[type="submit"]:hover {
  background: var(--accent-surface-hover) !important;
}


/* ==== 03-messages-old.css ==== */
/* artelteh — часть legacy-overrides.css. Загружается под body.newui.
 * Не редактировать вручную в продакшене без согласования.
 */
/* ══════════════════════════════════════════
   MESSAGES — page-messages.php (new chat UI)
   ══════════════════════════════════════════ */
body.newui .messages_page { margin-top: 1rem; }
body.newui .messages_page_header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; flex-wrap: wrap; gap: 8px;
}
body.newui .messages_page_header h2 {
  font-size: 22px; font-weight: 700; letter-spacing: -0.4px;
  color: var(--text); margin: 0;
}
body.newui .messages_refresh_btn {
  background: var(--bg2) !important; border: 1px solid var(--border2) !important;
  color: var(--text) !important; padding: 8px 14px !important;
  border-radius: var(--radius-sm) !important; font-size: 12px !important;
  font-weight: 600 !important; cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  min-height: 36px;
}
body.newui .messages_refresh_btn:hover { background: var(--bg3) !important; border-color: var(--accent) !important; }

/* Shell: грид sidebar + main (адаптивный) */
body.newui .messages_shell {
  display: grid; grid-template-columns: 1fr;
  gap: 1rem; align-items: start;
  min-height: 560px;
}
/* 768–1023: узкий планшет — двухколонная верстка с компактным сайдбаром */
@media(min-width: 768px) and (max-width: 1023px) {
  body.newui .messages_shell { grid-template-columns: 260px 1fr; gap: 0.75rem; }
  body.newui .messages_conversations_list { display: block !important; }
}
/* ≥1024: полноразмерный сайдбар */
@media(min-width: 1024px) {
  body.newui .messages_shell { grid-template-columns: 320px 1fr; gap: 1.25rem; }
  body.newui .messages_conversations_list { display: block !important; }
}
/* Когда .messages_main показан JS (style="display:block"), делаем его flex-колонкой */
body.newui .messages_main[style*="display: block"],
body.newui .messages_main[style*="display:block"] {
  display: flex !important;
  flex-direction: column;
}
/* На мобиле сохраняем old one-at-a-time флоу */
@media(max-width: 767px) {
  body.newui .messages_shell > .messages_sidebar,
  body.newui .messages_shell > .messages_main { min-width: 0; }
}

body.newui .messages_sidebar {
  display: flex; flex-direction: column; gap: 12px;
  min-width: 0;
}

/* Скрываем «Новый диалог» при открытом чате */
body.newui .messages_shell:has(.messages_main[style*="display: block"]) .new-dialog-card,
body.newui .messages_shell:has(.messages_main[style*="display:block"]) .new-dialog-card {
  display: none !important;
}

/* Новый диалог (админ) */
body.newui .new-dialog-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; gap: 8px;
}
body.newui .new-dialog-label {
  font-size: 11px; font-weight: 600;
  color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px;
}
body.newui .new-dialog-select {
  width: 100% !important;
}
body.newui .new-dialog-btn {
  width: 100%; justify-content: center;
}

/* Список диалогов */
body.newui .messages_conversations_list {
  list-style: none; padding: 0; margin: 0;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--card-shadow);
  max-height: 560px; overflow-y: auto;
}
body.newui .messages_conversations_list > li,
body.newui .messages_conversations_list > li.conversation_item,
body.newui .messages_conversations_list > li.unread {
  padding: 12px 14px;
  background: transparent !important;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background var(--transition);
  position: relative;
}
body.newui .messages_conversations_list > li:last-child { border-bottom: 0; }
body.newui .messages_conversations_list > li:hover { background: var(--bg3) !important; }
body.newui .messages_conversations_list > li.unread {
  box-shadow: inset 3px 0 0 0 var(--accent);
  padding-left: 14px !important;
}
body.newui .messages_conversations_list > li.unread .conversation_user_name {
  color: var(--text) !important;
}
/* Затухание непрочитанных меньше — название ярче */
body.newui .conversation_user_name { color: var(--text); font-weight: 600; }
body.newui .conversation_preview { color: var(--text2); }
body.newui .conversation_last_date { color: var(--text3); }
body.newui .conversations_empty {
  padding: 1.5rem 1rem !important; text-align: center;
  color: var(--text3) !important; font-size: 13px;
  cursor: default !important;
  border-bottom: 0 !important;
}

/* Main area (chat window) */
body.newui .messages_main {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  display: flex; flex-direction: column;
  min-height: 560px; overflow: hidden;
  min-width: 0;
}




/* ==== 04-misc-forms.css ==== */
/* artelteh — часть legacy-overrides.css. Загружается под body.newui.
 * Не редактировать вручную в продакшене без согласования.
 */
/* ══════════════════════════════════════════
   ARCHIVES — archive-projects.php / services
   ══════════════════════════════════════════ */
body.newui .archive-list,
body.newui .projects-grid,
body.newui .services-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 12px; margin-top: 1rem;
}
@media(min-width: 640px) {
  body.newui .archive-list,
  body.newui .projects-grid,
  body.newui .services-grid { grid-template-columns: repeat(2,1fr); }
}
@media(min-width: 960px) {
  body.newui .projects-grid,
  body.newui .services-grid { grid-template-columns: repeat(3,1fr); }
}

/* ══════════════════════════════════════════
   BREAD (bread.php)
   ══════════════════════════════════════════ */
body.newui .bread,
body.newui .breadcrumbs {
  font-size: 12px; color: var(--text3);
  margin-bottom: 0.75rem;
  display: flex; flex-wrap: wrap; gap: 6px;
}

/* ══════════════════════════════════════════
   POPS (pops.php) — модальные окна
   ══════════════════════════════════════════ */
body.newui .pop,
body.newui .popup,
body.newui .modal {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 1.5rem !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.18);
  color: var(--text);
}

/* ══════════════════════════════════════════
   USERNOTY (page-usernoty.php) — уведомления
   ══════════════════════════════════════════ */
body.newui .noty-item,
body.newui .notification-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  margin-bottom: 10px;
}
body.newui .noty-item.unread { border-left: 3px solid var(--accent); }

/* ══════════════════════════════════════════
   ADD NEW PROJECT — page-addnew.php
   ══════════════════════════════════════════ */
body.newui section.add_new { background: transparent; }
body.newui .add_new h1 {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.4px; margin: 0 0 1.25rem;
}
body.newui .add_new_project {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--card-shadow);
  max-width: 680px;
}
body.newui .add_new_project .row {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 1rem;
}
body.newui .add_new_project .row._hidden { display: none; }
body.newui .add_new_project .row .title {
  font-size: 12px; font-weight: 600;
  color: var(--text3); text-transform: uppercase;
  letter-spacing: 0.5px;
}
body.newui form.add_new_project,
body.newui .add_new_project { display: block !important; padding: 1.5rem !important; max-width: 680px; }
body.newui form.add_new_project .row {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 6px !important;
  margin: 0 0 1rem !important;
  width: 100% !important;
}
body.newui form.add_new_project .row .title {
  width: auto !important;
  font-size: 12px !important; font-weight: 600 !important;
  color: var(--text3) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}
body.newui form.add_new_project .row input,
body.newui form.add_new_project .row select,
body.newui form.add_new_project .row textarea {
  width: 100% !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 40px !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  padding: 10px 12px !important;
}
body.newui form.add_new_project .row textarea { min-height: 120px !important; padding-top: 10px !important; }
body.newui .add_new_project .add_files {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--bg3); color: var(--text);
  border: 1px dashed var(--border2);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all var(--transition); margin-top: 4px;
}
body.newui .add_new_project .add_files:hover {
  background: var(--bg4); border-color: var(--accent);
}
body.newui .add_new_project #fileCount {
  font-size: 13px; color: var(--text2);
  margin: 8px 0 0 0;
}
body.newui .submit_btn_wrapper {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
body.newui #submit_post,
body.newui input[type="submit"]#submit_post {
  background: var(--accent-surface) !important;
  color: #000 !important;
  border: none !important;
  padding: 12px 22px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important; font-size: 14px !important;
  min-height: 44px; cursor: pointer;
  transition: background var(--transition);
}
body.newui #submit_post:hover { background: var(--accent-surface-hover) !important; }
body.newui #submit_post:disabled { opacity: 0.6; cursor: not-allowed; }

body.newui .project_loading_status,
body.newui .project_success_status {
  align-items: center; gap: 8px;
  font-size: 13px; color: var(--text2);
}
body.newui .project_loading_status[style*="display: none"],
body.newui .project_success_status[style*="display: none"] { display: none !important; }
body.newui .project_success_status { color: var(--success); }
body.newui .loading_spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  animation: at-spin 0.7s linear infinite;
}
@keyframes at-spin { to { transform: rotate(360deg); } }

body.newui #projectdatefiles,
body.newui #uploadForm { display: none !important; }

/* select2 — поверх нашей темы */
body.newui .select2-container--default .select2-selection--single,
body.newui .select2-container--default .select2-selection--multiple {
  background: var(--bg) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-sm) !important;
  min-height: 40px !important;
  color: var(--text) !important;
}
body.newui .select2-container--default .select2-selection__rendered {
  color: var(--text) !important; line-height: 38px !important;
  padding: 0 12px !important;
}
body.newui .select2-dropdown {
  background: var(--bg2) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
}
body.newui .select2-results__option--highlighted[aria-selected] {
  background: var(--accent-dim) !important;
  color: var(--accent) !important;
}

/* ───────── Server info block (только kouz, page-account.php) ───────── */
body.newui .user_server_info {
  margin-top: 24px;
}
body.newui .user_server_info h2 {
  margin-bottom: 14px;
}
body.newui .srv-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
body.newui .srv-card--accent {
  border-color: var(--accent, #bf9523);
  box-shadow: 0 0 0 3px rgba(191, 149, 35, 0.08);
}
body.newui .srv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
body.newui .srv-row--sub {
  font-size: 12.5px;
  color: var(--text2);
  margin-top: 6px;
  margin-bottom: 0;
}
body.newui .srv-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
body.newui .srv-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
body.newui .srv-value--big {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent, #bf9523);
}
body.newui .srv-bar {
  width: 100%;
  height: 8px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
  margin: 6px 0 0;
}
body.newui .srv-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 200ms;
}
body.newui .srv-bar-fill--ok   { background: #1f9d55; }
body.newui .srv-bar-fill--warn { background: #d97706; }
body.newui .srv-bar-fill--crit { background: #dc2626; }

body.newui .srv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
body.newui .srv-stat {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
body.newui .srv-stat-label {
  font-size: 11.5px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
body.newui .srv-stat-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

@media (max-width: 600px) {
  body.newui .srv-value--big { font-size: 18px; }
  body.newui .srv-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  body.newui .srv-stat { padding: 8px 10px; }
  body.newui .srv-stat-val { font-size: 13px; }
}

/* ───────── Projects table (page-account.php) ───────── */
body.newui .user_projects { margin-top: 24px; }
body.newui .projects-empty {
  color: var(--text2);
  padding: 12px 0;
}
body.newui .projects-table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg2);
}
body.newui .projects-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
body.newui .projects-table thead th {
  background: var(--bg3);
  color: var(--text2);
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.4px;
  font-weight: 700;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
body.newui .projects-table tbody td {
  padding: 9px 10px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
body.newui .projects-table tbody tr:first-child td { border-top: 0; }
body.newui .projects-table .col-id {
  width: 60px;
  font-variant-numeric: tabular-nums;
  color: var(--text2);
  font-size: 11.5px;
}
body.newui .projects-table .col-date {
  width: 100px;
  font-variant-numeric: tabular-nums;
  color: var(--text2);
  white-space: nowrap;
}
body.newui .projects-table .col-title a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
body.newui .projects-table .col-title a:hover {
  color: var(--accent);
  text-decoration: underline;
}
body.newui .projects-table .col-role { width: 100px; }
body.newui .projects-table .col-status { width: 240px; }

body.newui .role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg3);
  color: var(--text2);
}
body.newui .role-badge.role-author { background: rgba(99,102,241,0.18); color: #6366f1; }
body.newui .role-badge.role-worker { background: rgba(34,197,94,0.18); color: #22c55e; }
[data-theme="dark"] body.newui .role-badge.role-author { color: #a5b4fc; }
[data-theme="dark"] body.newui .role-badge.role-worker { color: #86efac; }

body.newui .status-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  white-space: normal;
  line-height: 1.3;
}

/* Выполненные строки — полупрозрачные и внизу (порядок задан PHP) */
body.newui .projects-table tr.is-done {
  opacity: 0.45;
}
body.newui .projects-table tr.is-done:hover { opacity: 0.85; }
body.newui .projects-table tr.is-done .col-title a { font-weight: 400; }

/* ───────── Cache-reset кнопка (внизу личного кабинета) ───────── */
body.newui .user_cache_reset,
body.newui .user_app_update {
  margin: 16px 0;
  display: flex;
  justify-content: center;
}
body.newui .user_cache_reset { margin-top: 32px; }
body.newui .cache-reset-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 28px;
  background: var(--bg2);
  color: var(--text);
  border: 2px dashed var(--accent, #bf9523);
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  min-width: 280px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  transition: background 150ms, transform 80ms, border-color 150ms;
  -webkit-tap-highlight-color: transparent;
}
body.newui .cache-reset-btn:hover,
body.newui .cache-reset-btn:focus-visible {
  background: var(--bg3);
  border-style: solid;
  outline: none;
}
body.newui .cache-reset-btn:active { transform: scale(0.98); }
body.newui .cache-reset-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}
body.newui .cache-reset-icon {
  color: var(--accent, #bf9523);
  flex-shrink: 0;
  margin-bottom: 2px;
}
body.newui .cache-reset-label {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
body.newui .cache-reset-hint {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text2);
  line-height: 1.3;
}
@media (max-width: 600px) {
  body.newui .cache-reset-btn { padding: 16px 18px; min-width: 0; }
  body.newui .cache-reset-label { font-size: 15px; }
  body.newui .cache-reset-hint { font-size: 11px; }
}

/* Mobile: схлопываем в карточки */
@media (max-width: 640px) {
  body.newui .projects-table thead { display: none; }
  body.newui .projects-table,
  body.newui .projects-table tbody,
  body.newui .projects-table tr,
  body.newui .projects-table td { display: block; width: 100%; }
  body.newui .projects-table tbody tr {
    border-top: 1px solid var(--border);
    padding: 8px 12px;
  }
  body.newui .projects-table tbody tr:first-child { border-top: 0; }
  body.newui .projects-table td {
    padding: 3px 0;
    border: 0;
  }
  body.newui .projects-table .col-id {
    display: inline-block;
    width: auto;
    margin-right: 8px;
  }
  body.newui .projects-table .col-date {
    display: inline-block;
    width: auto;
  }
  body.newui .projects-table .col-title { padding-top: 2px; }
  body.newui .projects-table .col-role,
  body.newui .projects-table .col-status {
    width: auto;
    display: inline-block;
    margin-right: 6px;
    padding-top: 4px;
  }
}


/* ==== 05-admin-auth.css ==== */
/* artelteh — часть legacy-overrides.css. Загружается под body.newui.
 * Не редактировать вручную в продакшене без согласования.
 */
/* ══════════════════════════════════════════
   ADMIN PANEL / MAP — page-adminpanel, page-adminmap
   ══════════════════════════════════════════ */
body.newui .admin-panel,
body.newui .adm_panel,
body.newui .admin-tables {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.25rem;
}

/* Wrapper — без рамки, только отступ */
body.newui .admin-table-wrapper {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 0 2rem !important;
}
body.newui .admin-table-wrapper > h2,
body.newui .admin-table-wrapper > h2 a {
  color: var(--text) !important;
  font-size: 18px !important; font-weight: 700 !important;
  letter-spacing: -0.3px !important;
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 0 0.75rem !important;
  text-decoration: none !important;
}
body.newui .admin-table-wrapper > h2 a:hover {
  color: var(--accent) !important;
}

/* Карточка таблицы — единственная рамка */
body.newui .admin-table-card {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  overflow: hidden !important;
  box-shadow: var(--card-shadow) !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.newui .admin-table-card table {
  width: 100%; border-collapse: collapse; margin: 0;
  background: transparent !important;
}
body.newui .admin-table-card thead {
  background: var(--bg3) !important;
  border-bottom: 1px solid var(--border) !important;
}
body.newui .admin-table-card thead tr td,
body.newui .admin-table-card thead tr th {
  padding: 10px 14px !important;
  font-size: 11px !important; font-weight: 600 !important;
  letter-spacing: 0.5px !important; text-transform: uppercase !important;
  color: var(--text3) !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  text-align: left !important;
  background: transparent !important;
}
body.newui .admin-table-card tbody tr {
  border-bottom: 1px solid var(--border) !important;
}
body.newui .admin-table-card tbody tr:last-child { border-bottom: 0 !important; }
body.newui .admin-table-card tbody tr:hover {
  background: var(--bg3) !important;
}
body.newui .admin-table-card tbody td {
  padding: 10px 14px !important; font-size: 13px !important;
  color: var(--text) !important;
  background: transparent !important;
  border: 0 !important;
}
body.newui .admin-table-card a {
  color: var(--accent) !important;
}

/* Map height */
body.newui .single_map_wrapper {
  min-height: 460px;
  margin-top: 1rem;
}

/* ══════════════════════════════════════════
   ADMIN TABLES — mobile card view
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  body.newui .admin-table-card {
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  body.newui .admin-table-card table {
    display: block !important;
    min-width: 0 !important;
    background: transparent !important;
  }
  body.newui .admin-table-card thead { display: none !important; }
  body.newui .admin-table-card tbody {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    background: transparent !important;
  }
  body.newui .admin-table-card tbody tr {
    display: block !important;
    padding: 12px 14px !important;
    background: var(--bg2) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
  }
  body.newui .admin-table-card tbody tr:hover { background: var(--bg2) !important; }
  body.newui .admin-table-card tbody td {
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text2);
  }

  /* ── Projects table: ID,Создание,Название,Автор,Статус,Исполнитель,Действия ── */
  /* ID — мелкий бейдж сверху-слева */
  body.newui .projects_table tbody td:nth-child(1) {
    display: inline-block !important;
    font-size: 10px !important; font-weight: 600;
    padding: 2px 8px !important;
    background: var(--bg3); border-radius: 100px;
    color: var(--text3) !important;
    margin-bottom: 6px;
  }
  body.newui .projects_table tbody td:nth-child(1)::before { content: '#'; }
  /* Дата создания — справа от ID */
  body.newui .projects_table tbody td:nth-child(2) {
    display: inline-block !important;
    font-size: 11px !important; color: var(--text3) !important;
    margin-left: 8px;
    font-variant-numeric: tabular-nums;
  }
  /* Название — крупное, основной заголовок */
  body.newui .projects_table tbody td:nth-child(3) {
    font-size: 15px !important; font-weight: 500 !important;
    color: var(--text) !important;
    margin: 6px 0 8px;
  }
  body.newui .projects_table tbody td:nth-child(3) a {
    color: var(--text) !important;
  }
  body.newui .projects_table tbody td:nth-child(3) a:hover { color: var(--accent) !important; }
  /* Автор */
  body.newui .projects_table tbody td:nth-child(4) {
    display: inline-block !important;
    font-size: 12px !important; color: var(--text3) !important;
    margin-right: 12px;
  }
  body.newui .projects_table tbody td:nth-child(4)::before {
    content: 'Автор: '; color: var(--text3);
  }
  /* Статус — pill */
  body.newui .projects_table tbody td:nth-child(5) {
    display: inline-block !important;
    font-size: 10px !important; font-weight: 600 !important;
    padding: 2px 8px !important;
    background: rgba(86,211,100,0.12) !important;
    color: var(--success) !important;
    border-radius: 100px;
    text-transform: uppercase;
  }
  /* Исполнитель */
  body.newui .projects_table tbody td:nth-child(6) {
    display: block !important;
    font-size: 12px !important; color: var(--text2) !important;
    margin-top: 8px;
  }
  body.newui .projects_table tbody td:nth-child(6)::before {
    content: 'Исполнитель: '; color: var(--text3);
  }
  /* Действия — внизу справа */
  body.newui .projects_table tbody td.table-actions {
    display: flex !important;
    gap: 6px; justify-content: flex-end;
    margin-top: 10px;
    padding-top: 10px !important;
    border-top: 1px solid var(--border) !important;
  }
  body.newui .projects_table tbody td.table-actions .action-link {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg3);
    display: inline-flex !important; align-items: center; justify-content: center;
    font-size: 14px !important; margin: 0 !important;
  }

  /* ── Workers/Users table: ID,Регистрация,Логин,Имя,Компания,Телефон,Почта,Проекты ── */
  body.newui .users_table tbody td:nth-child(1),
  body.newui .new_big_table tbody td:nth-child(1) {
    display: inline-block !important;
    font-size: 10px !important; font-weight: 600;
    padding: 2px 8px !important;
    background: var(--bg3); border-radius: 100px;
    color: var(--text3) !important; margin-bottom: 6px;
  }
  body.newui .users_table tbody td:nth-child(1)::before,
  body.newui .new_big_table tbody td:nth-child(1)::before { content: '#'; }
  /* Регистрация (date) — рядом с ID */
  body.newui .users_table tbody td:nth-child(2) {
    display: inline-block !important;
    font-size: 11px !important; color: var(--text3) !important;
    margin-left: 8px;
    font-variant-numeric: tabular-nums;
  }
  /* Логин — крупно */
  body.newui .users_table tbody td:nth-child(3) {
    font-size: 16px !important; font-weight: 500 !important;
    margin: 6px 0 4px;
  }
  body.newui .users_table tbody td:nth-child(3) a {
    color: var(--text) !important;
  }
  body.newui .users_table tbody td:nth-child(3) a:hover { color: var(--accent) !important; }
  /* Имя */
  body.newui .users_table tbody td:nth-child(4) {
    font-size: 13px !important; color: var(--text2) !important;
    margin-bottom: 8px;
  }
  /* Компания / Телефон / Почта — список с лейблами */
  body.newui .users_table tbody td:nth-child(5),
  body.newui .users_table tbody td:nth-child(6),
  body.newui .users_table tbody td:nth-child(7) {
    font-size: 12px !important; color: var(--text2) !important;
    padding: 4px 0 !important;
    border-top: 1px dashed var(--border) !important;
  }
  body.newui .users_table tbody td:nth-child(5):empty,
  body.newui .users_table tbody td:nth-child(6):empty,
  body.newui .users_table tbody td:nth-child(7):empty { display: none !important; }
  body.newui .users_table tbody td:nth-child(5)::before { content: 'Компания: '; color: var(--text3); }
  body.newui .users_table tbody td:nth-child(6)::before { content: 'Телефон: '; color: var(--text3); }
  body.newui .users_table tbody td:nth-child(7)::before { content: 'E-mail: '; color: var(--text3); }
  /* Проекты count — pill */
  body.newui .users_table tbody td:nth-child(8) {
    display: inline-flex !important; align-items: center; gap: 4px;
    margin-top: 10px; padding: 4px 10px !important;
    background: var(--accent-dim); color: var(--accent) !important;
    border-radius: 100px;
    font-size: 11px !important; font-weight: 600 !important;
  }
  body.newui .users_table tbody td:nth-child(8)::before {
    content: 'проектов: ';
  }
}

/* ══════════════════════════════════════════
   AUTH — login/register
   ══════════════════════════════════════════ */
body.newui section.auth-page {
  background: transparent;
  padding: 1.5rem 0 3rem !important;
}
body.newui section.auth-page > .wrap { display: block !important; }

body.newui .auth-shell {
  max-width: 420px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 1.5rem;
  align-items: stretch;
}
@media (min-width: 600px) {
  body.newui .auth-shell { padding-top: 2rem; }
}

body.newui .auth-brand {
  display: flex; align-items: center; gap: 10px;
  justify-content: center;
  font-size: 18px; font-weight: 600; color: var(--text);
  letter-spacing: -0.3px;
}
body.newui .auth-brand-logo {
  width: 36px; height: 36px;
  background: var(--accent-surface);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
body.newui .auth-brand-logo svg { width: 18px; height: 18px; }

body.newui .auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--card-shadow);
}
body.newui .auth-title {
  font-size: 22px; font-weight: 600;
  color: var(--text); letter-spacing: -0.4px;
  margin: 0 0 0.5rem;
}
body.newui .auth-sub {
  font-size: 13px; color: var(--text2);
  margin: 0 0 1.5rem; line-height: 1.5;
}

body.newui .auth-alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.4;
  margin: 0 0 1rem;
}
body.newui .auth-alert-error {
  background: rgba(255,107,99,0.10) !important;
  color: var(--danger) !important;
  border: 1px solid rgba(255,107,99,0.25) !important;
}
body.newui .auth-alert-success {
  background: rgba(86,211,100,0.10) !important;
  color: var(--success) !important;
  border: 1px solid rgba(86,211,100,0.25) !important;
}

body.newui .auth-form {
  display: flex; flex-direction: column; gap: 14px;
}
body.newui .auth-field-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 460px) {
  body.newui .auth-field-row { grid-template-columns: 1fr; }
}

body.newui .auth-field {
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
}
body.newui .auth-field label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text3);
}
body.newui .auth-field input {
  width: 100% !important;
  background: var(--bg) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-sm) !important;
  padding: 11px 14px !important;
  font-size: 15px !important;
  color: var(--text) !important;
  min-height: 44px;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
body.newui .auth-field input:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-dim) !important;
}
body.newui .auth-hint {
  font-size: 11px; color: var(--text3);
  margin-top: 2px;
}

/* Password toggle */
body.newui .auth-pwd-wrap { position: relative; }
body.newui .auth-pwd-wrap input { padding-right: 44px !important; }
body.newui .auth-pwd-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  background: transparent !important; border: 0 !important;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); cursor: pointer;
  border-radius: var(--radius-xs);
}
body.newui .auth-pwd-toggle:hover { color: var(--accent); background: var(--bg3) !important; }
body.newui .auth-pwd-toggle .ico-eye-off { display: none; }
body.newui .auth-pwd-toggle.is-shown .ico-eye { display: none; }
body.newui .auth-pwd-toggle.is-shown .ico-eye-off { display: block; }

body.newui .auth-submit {
  background: var(--accent-surface) !important;
  color: #000 !important;
  border: 0 !important;
  padding: 13px 22px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important; font-size: 15px !important;
  min-height: 48px; cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  margin-top: 6px;
  width: 100%;
}
body.newui .auth-submit:hover { background: var(--accent-surface-hover) !important; }
body.newui .auth-submit:active { transform: scale(0.98); }

body.newui .auth-honeypot {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

body.newui .auth-terms {
  font-size: 11px; color: var(--text3);
  line-height: 1.5; margin: 8px 0 0; text-align: center;
}
body.newui .auth-terms a { color: var(--text2); text-decoration: underline; text-underline-offset: 2px; }
body.newui .auth-terms a:hover { color: var(--accent); }

body.newui .auth-footer {
  margin-top: 1.25rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center; font-size: 13px; color: var(--text2);
}
body.newui .auth-footer a {
  color: var(--accent); font-weight: 600;
  text-decoration: none;
}
body.newui .auth-footer a:hover { text-decoration: underline; }


/* ── Admin workers: header + add-worker modal ─────────────── */
body.newui .admin-workers-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 0 0 16px;
}
body.newui .admin-workers-header h1 { margin: 0; }

body.newui .admin-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
body.newui .admin-modal[hidden] { display: none !important; }
body.newui .admin-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
}
body.newui .admin-modal__panel {
  position: relative; z-index: 1;
  background: var(--bg2); color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 480px; width: 100%;
  max-height: calc(100vh - 32px); overflow: auto;
  padding: 20px 22px 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}
body.newui .admin-modal__close {
  position: absolute; top: 8px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: 0; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--text2);
}
body.newui .admin-modal__close:hover { color: var(--text); background: var(--bg3); }
body.newui .admin-modal__title { margin: 0 0 14px; font-size: 18px; }
body.newui .admin-modal__form { display: flex; flex-direction: column; gap: 10px; }
body.newui .admin-modal__row { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text2); }
body.newui .admin-modal__row em { color: var(--danger); font-style: normal; }
body.newui .admin-modal__row input {
  font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 11px;
  transition: border-color var(--transition);
}
body.newui .admin-modal__row input:focus { outline: none; border-color: var(--accent); }
body.newui .admin-modal__error {
  background: rgba(220,53,69,0.12); color: var(--danger);
  border: 1px solid rgba(220,53,69,0.35);
  padding: 8px 12px; border-radius: var(--radius-sm); font-size: 13px;
}
body.newui .admin-modal__actions {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px;
}
body.newui .admin-modal__success { display: block; }
body.newui .admin-modal__success h3 { margin: 0 0 8px; font-size: 16px; color: var(--success, #1f8a3f); }
body.newui .admin-modal__success dl { margin: 10px 0; }
body.newui .admin-modal__success dt { font-size: 12px; color: var(--text2); margin-top: 6px; }
body.newui .admin-modal__success dd { margin: 2px 0 0; }
body.newui .admin-modal__success code {
  display: inline-block; background: var(--bg3); border: 1px solid var(--border);
  padding: 4px 8px; border-radius: var(--radius-sm); font-family: ui-monospace, monospace;
  user-select: all; word-break: break-all;
}
body.newui .admin-modal__note { font-size: 12px; color: var(--text2); margin: 8px 0 0; }

/* ── Logout page (centered icon + message) ────────────────── */
body.newui .logout-page .auth-card { text-align: center; }
body.newui .logout-page .auth-title { text-align: center; margin-top: 0; }
body.newui .logout-page .auth-sub   { text-align: center; }
body.newui .logout-icon {
  width: 64px; height: 64px; margin: 4px auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg3); color: var(--text2);
}
body.newui .logout-icon svg { width: 30px; height: 30px; }
body.newui .logout-icon--done {
  background: rgba(76, 175, 80, 0.16);
  color: #1f7a2b;
}
[data-theme="dark"] body.newui .logout-icon--done {
  background: rgba(76, 175, 80, 0.22);
  color: #6ad07c;
}
body.newui .logout-page .auth-form { margin-top: 6px; }
body.newui a.auth-submit.logout-submit-link {
  display: block; text-decoration: none; text-align: center;
}
body.newui .logout-page .auth-footer {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 1rem; margin-top: 1.25rem;
}

/* ==== 06-worker-edit.css ==== */
/* artelteh — часть legacy-overrides.css. Загружается под body.newui.
 * Не редактировать вручную в продакшене без согласования.
 */
/* ══════════════════════════════════════════
   USER NOTIFICATIONS — page-usernoty.php
   ══════════════════════════════════════════ */
body.newui .notifications-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; flex-wrap: wrap; gap: 8px;
}
body.newui .notifications-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}
body.newui .notifications-list {
  display: flex; flex-direction: column; gap: 10px;
  list-style: none; padding: 0; margin: 0;
}
body.newui .notification-item,
body.newui li.notification-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  box-shadow: var(--card-shadow);
  position: relative;
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 10px 14px; align-items: start;
}
body.newui .notification-item.unread,
body.newui li.notification-item.unread {
  border-left: 3px solid var(--accent);
}
body.newui .notification-image {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0; grid-row: span 2;
}
body.newui .notification-header {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
body.newui .notification-title {
  font-size: 14px; font-weight: 600; color: var(--text);
}
body.newui .notification-badge,
body.newui .notification-global-badge {
  padding: 2px 8px; border-radius: 100px;
  font-size: 10px; font-weight: 600;
  background: var(--accent-dim); color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.5px;
}
body.newui .notification-date {
  font-size: 11px; color: var(--text3);
}
body.newui .notification-message,
body.newui .notification-content,
body.newui .notification-body {
  font-size: 13px; color: var(--text2);
  line-height: 1.5;
}
body.newui .notification-action {
  display: inline-flex; align-items: center;
  padding: 6px 12px; background: var(--bg3);
  border: 1px solid var(--border2); border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none;
  font-size: 12px; font-weight: 600;
}
body.newui .notification-action:hover { background: var(--bg4); color: var(--text); }
body.newui .notification-delete-btn {
  background: transparent; border: 0;
  color: var(--text3); cursor: pointer;
  font-size: 16px; padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: color var(--transition), background var(--transition);
}
body.newui .notification-delete-btn:hover {
  color: var(--danger); background: rgba(248,81,73,0.08);
}
body.newui .notification-empty {
  text-align: center; padding: 3rem 1rem;
  color: var(--text3); font-size: 14px;
}

/* ══════════════════════════════════════════
   WORKER PROFILE — page-worker-profile.php
   ══════════════════════════════════════════ */
body.newui .worker-profile-header {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 1rem 0 1.25rem;
}
body.newui .worker-profile-header h1 {
  font-size: 22px; font-weight: 600; letter-spacing: -0.4px;
  margin: 0 0 1.25rem;
  display: flex; align-items: center; gap: 14px;
  color: var(--text);
}
body.newui .worker-profile-header h1::before {
  content: '';
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-surface) 0%, var(--accent-hover) 100%);
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--accent-dim);
}
body.newui .worker-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 720px) {
  body.newui .worker-info { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
}
body.newui .worker-info-item {
  display: grid;
  grid-template-columns: minmax(110px, 38%) 1fr auto;
  gap: 6px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  align-items: center;
  min-height: 40px;
}
body.newui .worker-info-item:last-child { border-bottom: 0; }
body.newui .worker-info-item strong {
  font-weight: 500; color: var(--text3);
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.4px;
}
body.newui .worker-info-item span,
body.newui .worker-info-item .worker-field-value {
  color: var(--text); font-size: 14px;
  word-break: break-word;
}
body.newui .worker-field-edit {
  background: var(--bg) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-sm) !important;
  padding: 6px 10px !important; font-size: 13px !important;
  color: var(--text) !important;
  width: auto; max-width: 220px;
}
body.newui .worker-edit-btn,
body.newui .worker-save-btn,
body.newui .worker-cancel-btn {
  background: transparent !important;
  border: 1px solid var(--border) !important;
  color: var(--text3) !important;
  padding: 0 !important;
  border-radius: var(--radius-xs) !important;
  font-size: 12px !important; line-height: 1 !important;
  cursor: pointer;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
body.newui .worker-edit-btn:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
body.newui .worker-save-btn {
  background: var(--accent-surface) !important;
  color: #000 !important;
  border-color: transparent !important;
  font-weight: 600 !important;
}
body.newui .worker-cancel-btn:hover {
  background: rgba(255,107,99,0.10) !important;
  color: var(--danger) !important;
  border-color: rgba(255,107,99,0.3) !important;
}

/* Секции */
body.newui .worker-projects-section,
body.newui .worker-map-section,
body.newui .workers_projects {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 0 0 1.25rem;
}
body.newui .worker-projects-section h2,
body.newui .worker-map-section h2 {
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text3);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
body.newui .worker-projects-list {
  display: grid; grid-template-columns: 1fr;
  gap: 8px; list-style: none; padding: 0; margin: 0;
}
body.newui .worker-projects-list li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color var(--transition);
}
body.newui .worker-projects-list li:hover {
  border-color: var(--accent-border);
}
body.newui .worker-projects-list li a {
  color: var(--text); font-size: 14px; font-weight: 500;
  text-decoration: none;
}
body.newui .worker-projects-list li a:hover { color: var(--accent); }
body.newui .project-meta {
  font-size: 11px; color: var(--text3);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
body.newui .no-projects {
  padding: 2rem 1rem; text-align: center;
  color: var(--text3); font-size: 13px;
  background: transparent;
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
}
body.newui .worker-map-section .single_map_wrapper {
  height: 380px; margin-top: 0;
}

/* ══════════════════════════════════════════
   PROJECT EDIT — page-projectedit.php
   ══════════════════════════════════════════ */

/* Сбросить grid у обёртки, когда внутри project-edit (использует свой flex) */
body.newui section.single > .wrap:has(.project-edit-layout) {
  display: block !important;
  padding-top: 1rem !important;
}

body.newui .project-edit-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1rem 0 0;
  align-items: start;
}
@media (min-width: 1024px) {
  body.newui .project-edit-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

body.newui .project-edit-left,
body.newui .project-edit-right {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  width: auto !important;
  min-width: 0 !important;
}

/* Заголовок */
body.newui .project-edit-left h1 {
  font-size: 18px; font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text); margin: 0 0 1rem;
}

/* Поля */
body.newui .editpost_input {
  width: 100% !important;
  background: var(--bg) !important;
  color: var(--text) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px 12px !important;
  font-family: inherit; font-size: 14px !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
  margin: 0 !important;
}
body.newui .editpost_input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-dim) !important;
  outline: none;
}

/* Save button */
body.newui .editpost_save,
body.newui .editpost_save.btn,
body.newui input.editpost_save {
  background: var(--accent-surface) !important;
  color: #000 !important;
  border: 0 !important;
  padding: 12px 24px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important; font-size: 14px !important;
  cursor: pointer; min-height: 44px;
  margin-top: 1rem !important;
}
body.newui .editpost_save:hover { background: var(--accent-surface-hover) !important; }

/* Right column — adm_meta inside edit */
body.newui .project-edit-right .adm_meta {
  background: transparent !important;
  border: 0 !important; padding: 0 !important;
  box-shadow: none !important;
  position: static !important;
  max-height: none !important;
  margin: 0 !important;
}
body.newui .project-edit-right .adm_meta::before { display: none; }
body.newui .project-edit-right .adm_meta .row {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 6px !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid var(--border);
}
body.newui .project-edit-right .adm_meta .row:last-child { border-bottom: 0; }
body.newui .project-edit-right .adm_meta .row b {
  font-size: 11px !important; font-weight: 500 !important;
  color: var(--text3) !important;
  text-transform: uppercase; letter-spacing: 0.4px;
  min-width: 0 !important;
}

/* TinyMCE / wp_editor wrapping */
body.newui #wp-editedcontent-editor-container,
body.newui #wp-editedcontent-wrap,
body.newui .wp-editor-container {
  background: var(--bg) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
}
body.newui .wp-editor-tabs,
body.newui .wp-media-buttons {
  padding: 6px 8px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
body.newui .wp-switch-editor {
  background: var(--bg) !important;
  color: var(--text2) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-xs) !important;
  margin: 0 4px 0 0 !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
}
body.newui .wp-switch-editor.switch-tmce { color: var(--text) !important; }
body.newui .wp-editor-area,
body.newui textarea.wp-editor-area {
  background: var(--bg) !important;
  color: var(--text) !important;
  border: 0 !important;
}
body.newui .mce-toolbar-grp,
body.newui .mce-toolbar,
body.newui .mce-statusbar {
  background: var(--bg2) !important;
  border-color: var(--border) !important;
}
body.newui .mce-btn,
body.newui .mce-ico { color: var(--text) !important; }

/* Files upload */
body.newui .project-files-section { margin-top: 0.75rem; }
body.newui .project-files-upload {
  padding: 0;
}
body.newui .add_files_edit {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px !important;
  background: var(--bg3) !important;
  border: 1px dashed var(--border2) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  font-size: 13px !important; font-weight: 500 !important;
  cursor: pointer; transition: all var(--transition);
}
body.newui .add_files_edit:hover {
  border-color: var(--accent) !important;
  background: var(--bg4) !important;
}

body.newui .project-files-list {
  display: flex; flex-direction: column; gap: 6px;
  list-style: none; padding: 0; margin: 12px 0 0 !important;
}
body.newui .project-file-item,
body.newui li.project-file-item[style] {
  display: flex !important;
  align-items: center !important; justify-content: space-between !important;
  gap: 10px;
  padding: 8px 12px !important;
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  border-bottom: 1px solid var(--border) !important;
  font-size: 13px;
  color: var(--text);
}
body.newui .project-file-item a {
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.newui .project-file-item a:hover { text-decoration: underline; }
body.newui .remove-file-btn,
body.newui button.remove-file-btn[style] {
  background: transparent !important;
  color: var(--danger) !important;
  border: 1px solid rgba(255,107,99,0.3) !important;
  padding: 4px 10px !important;
  border-radius: var(--radius-xs) !important;
  font-size: 11px !important; font-weight: 500 !important;
  cursor: pointer !important;
  margin: 0 !important;
}
body.newui .remove-file-btn:hover {
  background: rgba(255,107,99,0.10) !important;
}

/* Meta date in bottom — скрыть или приглушить */
body.newui .single .meta {
  font-size: 11px; color: var(--text3);
  font-variant-numeric: tabular-nums;
  margin-top: 1rem;
}


/* ==== 07-services.css ==== */
/* artelteh — часть legacy-overrides.css. Загружается под body.newui.
 * Не редактировать вручную в продакшене без согласования.
 */
/* ══════════════════════════════════════════
   SERVICES — archive-services.php / single-services.php
   ══════════════════════════════════════════ */
body.newui section.services_archive {
  background: transparent;
  padding: 1rem 0 3rem !important;
  width: 100% !important;
  display: block !important;
}
body.newui section.services_archive > .wrap {
  width: 100% !important;
  max-width: 880px !important;
  margin: 0 auto !important;
  box-sizing: border-box;
}

body.newui .services-hero {
  margin: 0 0 1.5rem;
}
body.newui .services-hero-tag {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
body.newui .services-hero h1 {
  font-size: clamp(24px, 3vw, 32px); font-weight: 600;
  letter-spacing: -0.6px; line-height: 1.15;
  color: var(--text); margin: 0 0 0.5rem;
}
body.newui .services-hero-sub {
  font-size: 15px; color: var(--text2); line-height: 1.5;
  margin: 0;
}

body.newui .services-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 12px; list-style: none; padding: 0; margin: 0;
}
@media (min-width: 760px) { body.newui .services-grid { grid-template-columns: repeat(2,1fr); } }

body.newui .service-card {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px 14px;
  padding: 16px 18px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none; color: var(--text);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  align-items: center;
}
body.newui .service-card:hover {
  border-color: var(--accent-border);
  background: var(--bg3);
  transform: translateY(-1px);
}
body.newui .service-card-icon {
  width: 40px; height: 40px;
  background: var(--accent-dim); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
body.newui .service-card-icon svg { width: 20px; height: 20px; color: var(--accent); }
body.newui .service-card-body {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}
body.newui .service-card-title {
  font-size: 14px; font-weight: 500; line-height: 1.35;
  color: var(--text);
}
body.newui .service-card-desc {
  font-size: 12px; color: var(--text2);
  line-height: 1.45; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
body.newui .service-card-cta {
  font-size: 16px; color: var(--accent);
  align-self: center;
  transition: transform var(--transition);
}
body.newui .service-card:hover .service-card-cta { transform: translateX(2px); }

/* Single service page */
body.newui section.single-service { background: transparent; padding: 1rem 0 3rem !important; }
body.newui section.single-service {
  width: 100% !important;
  display: block !important;
}
body.newui section.single-service > .wrap {
  display: block !important;
  width: 100% !important;
  max-width: 880px !important;
  margin: 0 auto !important;
  box-sizing: border-box;
}

body.newui .service-article {
  margin: 0;
  display: flex; flex-direction: column; gap: 1.5rem;
}
body.newui .service-article-header { margin: 0; }
body.newui .service-article-tag {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--accent); margin-bottom: 0.5rem;
}
body.newui .service-article-header h1 {
  font-size: clamp(24px, 3vw, 32px); font-weight: 600;
  letter-spacing: -0.6px; line-height: 1.15;
  color: var(--text); margin: 0;
}
body.newui .service-article-body {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  font-size: 15px; line-height: 1.7; color: var(--text);
}
body.newui .service-article-body:empty,
body.newui .service-article-body:not(:has(*)),
body.newui .service-article-body:has(p:only-child:empty) {
  display: none;
}
body.newui .service-article-body p { margin: 0 0 1em; color: var(--text); font-weight: 400; }
body.newui .service-article-body p:last-child { margin: 0; }
body.newui .service-article-body h2,
body.newui .service-article-body h3 {
  margin-top: 1.5em; color: var(--text);
}
body.newui .service-article-body ul,
body.newui .service-article-body ol {
  padding-left: 1.5em; margin: 0 0 1em;
}
body.newui .service-article-body li { margin: 0.25em 0; }

body.newui .service-article-cta {
  background: linear-gradient(135deg, var(--accent-dim) 0%, var(--bg2) 70%);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem;
}
body.newui .service-article-cta-text { flex: 1; min-width: 220px; }
body.newui .service-article-cta-text h3 {
  font-size: 16px; font-weight: 600;
  color: var(--text); margin: 0 0 0.25rem;
}
body.newui .service-article-cta-text p {
  font-size: 13px; color: var(--text2); margin: 0;
}
body.newui .service-article-cta .btn-cta {
  background: var(--accent-surface); color: #000;
  font-weight: 600; font-size: 13px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  text-decoration: none; white-space: nowrap;
  border: 0; min-height: 40px;
  display: inline-flex; align-items: center;
}
body.newui .service-article-cta .btn-cta:hover { background: var(--accent-surface-hover); }

/* ══════════════════════════════════════════
   ARCHIVES
   ══════════════════════════════════════════ */
body.newui .projects_archive,
body.newui .services_archive {
  display: grid; grid-template-columns: 1fr;
  gap: 12px;
}
@media(min-width: 640px) {
  body.newui .projects_archive,
  body.newui .services_archive { grid-template-columns: repeat(2,1fr); }
}
@media(min-width: 960px) {
  body.newui .projects_archive,
  body.newui .services_archive { grid-template-columns: repeat(3,1fr); }
}
body.newui .inarchive,
body.newui .projects_archive > article,
body.newui .services_archive > article {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition), border-color var(--transition);
  display: flex; flex-direction: column; gap: 6px;
  text-decoration: none; color: inherit;
}
body.newui .inarchive:hover,
body.newui .projects_archive > article:hover,
body.newui .services_archive > article:hover {
  border-color: var(--accent-border);
  box-shadow: var(--card-shadow-hover);
}
body.newui .inarchive h2,
body.newui .inarchive h3 {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin: 0;
}
body.newui .post_date {
  font-size: 11px; color: var(--text3);
}

/* ══════════════════════════════════════════
   404
   ══════════════════════════════════════════ */
body.newui .error-404,
body.newui body.error404 section.page {
  text-align: center; padding: 4rem 1rem;
}
body.newui section.page .error404-title {
  font-size: 6rem; font-weight: 700; color: var(--accent);
  line-height: 1; margin-bottom: 1rem;
}

/* ══════════════════════════════════════════
   ADMIN TABLES — new_big_table
   ══════════════════════════════════════════ */
body.newui .new_big_table {
  width: 100%; border-collapse: collapse;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
}
body.newui .new_big_table thead th {
  background: var(--bg3); text-align: left;
  padding: 10px 12px; font-size: 11px;
  font-weight: 600; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--text3);
  border-bottom: 1px solid var(--border);
}
body.newui .new_big_table tbody td {
  padding: 10px 12px; font-size: 13px;
  color: var(--text); border-bottom: 1px solid var(--border);
}
body.newui .new_big_table tbody tr:last-child td { border-bottom: 0; }
body.newui .new_big_table tbody tr:hover { background: var(--bg3); }
body.newui .new_big_table a { color: var(--accent); }

body.newui .table-actions {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0.75rem 0;
}


/* ==== 08-polish.css ==== */
/* artelteh — часть legacy-overrides.css. Загружается под body.newui.
 * Не редактировать вручную в продакшене без согласования.
 */
/* ══════════════════════════════════════════
   POLISH — scrollbars, selection, focus, motion
   ══════════════════════════════════════════ */

body.newui ::selection {
  background: var(--accent-dim);
  color: var(--text);
}

/* Custom scrollbar (WebKit) — subtle, themed */
body.newui ::-webkit-scrollbar { width: 10px; height: 10px; }
body.newui ::-webkit-scrollbar-track { background: transparent; }
body.newui ::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 100px;
  border: 2px solid var(--bg);
}
body.newui ::-webkit-scrollbar-thumb:hover { background: var(--text3); }
body.newui { scrollbar-width: thin; scrollbar-color: var(--border2) transparent; }

/* Unified focus-visible */
body.newui *:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Tabular nums for all numeric data (dates, ids) */
body.newui .td-id,
body.newui .td-date,
body.newui .message_date,
body.newui .conversation_last_date,
body.newui .note_date {
  font-variant-numeric: tabular-nums;
}

/* Reduced motion — disable custom transitions on request */
@media (prefers-reduced-motion: reduce) {
  body.newui *,
  body.newui *::before,
  body.newui *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Active conversation highlight — clearer than hover */
body.newui .messages_conversations_list > li.active,
body.newui .messages_conversations_list > li[aria-current="true"] {
  background: var(--accent-dim) !important;
  border-left: 3px solid var(--accent);
  padding-left: 11px !important;
}

/* Consistent card hover for interactive cards */
body.newui .tile,
body.newui .inarchive,
body.newui .stat-card {
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
body.newui .tile:hover,
body.newui .inarchive:hover {
  transform: translateY(-1px);
}

/* Link underline on hover for better affordance */
body.newui .td-link:hover,
body.newui .message_author_link:hover,
body.newui a.message_author_link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Placeholder color everywhere */
body.newui input::placeholder,
body.newui textarea::placeholder {
  color: var(--text3) !important;
  opacity: 1;
}

/* Safe-area bottom padding on mobile (iOS notch) */
@media (max-width: 768px) {
  body.newui {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0)) !important;
  }

  /* Touch targets ≥44px на мобиле, кнопки крупнее */
  body.newui .topbar .icon-btn,
  body.newui .topbar .messages-link,
  body.newui .topbar .notifications-toggle,
  body.newui .topbar .topbar-user,
  body.newui .chat-back-btn,
  body.newui .icon-btn,
  body.newui .btn,
  body.newui .adm_btn,
  body.newui input[type="submit"],
  body.newui button[type="submit"] {
    min-height: 44px !important;
  }
  body.newui .topbar .icon-btn,
  body.newui .topbar .messages-link,
  body.newui .topbar .notifications-toggle {
    width: 40px !important; height: 40px !important;
    border: 1px solid var(--border) !important;
  }
  body.newui .topbar .icon-btn svg,
  body.newui .topbar .messages-link svg,
  body.newui .topbar .notifications-toggle svg {
    width: 18px !important; height: 18px !important;
  }
  body.newui .topbar {
    height: calc(56px + env(safe-area-inset-top, 0)) !important;
    padding: env(safe-area-inset-top, 0) 10px 0 !important;
    gap: 4px !important;
  }
  body.newui .topbar-spacer { flex: 1 1 auto !important; min-width: 0; }
  body.newui .topbar-logo-icon { width: 32px !important; height: 32px !important; }
  body.newui .topbar-logo-icon svg { width: 18px !important; height: 18px !important; }
  body.newui .topbar-logo-text { display: none !important; }
  body.newui .topbar-actions { margin-left: auto; }
  body.newui .topbar-actions { gap: 4px !important; }
  body.newui .topbar-user { padding: 0 !important; height: 40px !important; border: 0 !important; }
  body.newui .topbar-avatar { width: 32px !important; height: 32px !important; font-size: 12px !important; }
  body.newui .topbar-username { display: none !important; }
  /* На очень узких экранах прячем поиск (Cmd+K + поле сверху) */
  @media (max-width: 400px) {
    body.newui .topbar .search-toggle { display: none !important; }
  }

  /* Шрифты крупнее — h1, body, кнопки */
  body.newui h1 { font-size: 22px !important; }
  body.newui h2 { font-size: 18px !important; }
  body.newui .btn,
  body.newui .adm_btn,
  body.newui input[type="submit"],
  body.newui button[type="submit"] {
    font-size: 14px !important;
  }
  body.newui .btn-cta { font-size: 14px !important; padding: 10px 14px !important; }

  /* Inputs/textarea — 16px чтобы iOS не зумил */
  body.newui input[type="text"],
  body.newui input[type="email"],
  body.newui input[type="tel"],
  body.newui input[type="number"],
  body.newui input[type="password"],
  body.newui input[type="search"],
  body.newui textarea,
  body.newui select { font-size: 16px !important; }

  /* Карточки — побольше padding для тача */
  body.newui .stat-card,
  body.newui .tile,
  body.newui .service-card,
  body.newui .comment_item,
  body.newui .new-dialog-card {
    padding: 14px 16px !important;
  }
  body.newui .messages_conversations_list > li {
    padding: 14px 16px !important;
  }
  body.newui .conversation_user_name { font-size: 14px !important; }
  body.newui .conversation_preview { font-size: 13px !important; }

  /* Bottom nav крупнее */
  body.newui .bottom-nav {
    height: 64px !important;
    padding-bottom: env(safe-area-inset-bottom, 0) !important;
  }
  body.newui .bottom-nav-item {
    font-size: 11px !important; font-weight: 500 !important;
    gap: 3px !important;
    padding: 6px 0 !important;
  }
  body.newui .bottom-nav-item:not(.bottom-nav-cta) svg {
    width: 22px !important; height: 22px !important;
  }
  body.newui .bottom-nav-cta .nav-cta-circle {
    width: 46px !important; height: 46px !important;
    margin-top: -16px !important;
  }
  body.newui .bottom-nav-cta .nav-cta-circle svg {
    width: 20px !important; height: 20px !important;
  }
  body.newui .bottom-nav-cta span {
    margin-top: -2px;
  }
}

/* ==== 09-project-edit.css ==== */
/*
 * Project edit page (page-projectedit.php) — mobile-first UX.
 * Главное:
 *  - inputs 16px → iOS не зумит
 *  - touch targets ≥ 44px
 *  - sticky action bar над bottom-nav на мобиле
 *  - SVG-иконки вместо эмодзи
 */

body.newui .project-edit-page { padding-bottom: 24px; }
body.newui .project-edit-page .wrap { display: block; max-width: 1320px; }

/* Header: оставляем дыхание + чёткая иерархия */
body.newui .project-edit-header {
  display: flex; flex-direction: column; gap: 4px;
  margin: 8px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
body.newui .project-edit-header h1 {
  margin: 0; font-size: 26px; font-weight: 700;
  line-height: 1.2; letter-spacing: -0.01em;
}
body.newui .project-edit-id {
  margin: 0; color: var(--text2); font-size: 13px;
  font-variant-numeric: tabular-nums;
}

body.newui .project-edit-form {
  display: flex; flex-direction: column; gap: 18px;
}

body.newui .project-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

body.newui .project-edit-main,
body.newui .project-edit-meta {
  display: flex; flex-direction: column; gap: 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
}
[data-theme="dark"] body.newui .project-edit-main,
[data-theme="dark"] body.newui .project-edit-meta {
  box-shadow: 0 1px 3px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.02);
}

/* Внутренние разделители между секциями в основной колонке */
body.newui .project-edit-main > .pe-field + .pe-field {
  position: relative;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* Заголовок meta-сайдбара */
body.newui .pe-meta-title {
  margin: 0 0 4px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text2);
}

/* Sticky meta на десктопе: остаётся видна при скролле редактора */
@media (min-width: 901px) {
  body.newui .project-edit-meta {
    position: sticky;
    top: 76px; /* над topbar (~60px) + запас */
    max-height: calc(100vh - 96px);
    overflow-y: auto;
  }
  body.newui .project-edit-meta::-webkit-scrollbar { width: 6px; }
  body.newui .project-edit-meta::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
}

/* Fields */
body.newui .pe-field { display: flex; flex-direction: column; gap: 8px; }
body.newui .pe-field > label {
  font-size: 12px; font-weight: 600;
  color: var(--text2);
  letter-spacing: 0.04em; text-transform: uppercase;
}
body.newui .pe-input {
  width: 100%; box-sizing: border-box;
  font: inherit; font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px; min-height: 46px;
  transition: border-color 120ms, background 120ms, box-shadow 120ms;
  -webkit-appearance: none; appearance: none;
}
body.newui select.pe-input {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
body.newui .pe-input:hover { border-color: var(--border2); }
body.newui .pe-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* WP-editor wrap */
body.newui .pe-editor {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  transition: border-color 120ms, box-shadow 120ms;
}
body.newui .pe-editor:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
body.newui .pe-editor .wp-editor-wrap,
body.newui .pe-editor .wp-editor-container { background: var(--bg); border: 0; }
body.newui .pe-editor textarea {
  font-size: 15px !important;
  line-height: 1.55;
  min-height: 240px;
  padding: 14px 16px;
  background: var(--bg);
  color: var(--text);
  border: 0;
}
body.newui .pe-editor iframe { min-height: 320px; }
@media (min-width: 901px) {
  body.newui .pe-editor textarea { min-height: 320px; }
  body.newui .pe-editor iframe { min-height: 380px; }
}
body.newui .pe-editor .mce-toolbar-grp,
body.newui .pe-editor .mce-edit-area { border-color: var(--border) !important; }
body.newui .pe-editor .mce-toolbar-grp { background: var(--bg2) !important; }
body.newui .pe-editor .quicktags-toolbar {
  background: var(--bg2);
  border-color: var(--border);
  padding: 8px 8px 4px;
}
body.newui .pe-editor .quicktags-toolbar input.button {
  font-size: 13px; padding: 6px 11px; min-height: 32px;
  margin-bottom: 4px;
}

/* Files */
body.newui .pe-files-actions {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
body.newui .add_files_edit {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-style: dashed;
  font-weight: 600;
}
body.newui .add_files_edit:hover { border-style: solid; }
body.newui .add_files_edit svg { flex-shrink: 0; }
body.newui .pe-files-status { color: var(--text2); font-size: 13px; }
body.newui .pe-files-upstatus { min-height: 18px; font-size: 13px; }
body.newui .pe-up-info  { color: var(--accent); }
body.newui .pe-up-ok    { color: #28a745; }
body.newui .pe-up-warn  { color: #d99a1f; }
body.newui .pe-up-err   { color: var(--danger); }

body.newui .pe-upload-form { display: none; }

body.newui .pe-file-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
body.newui .pe-file-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 10px 10px 14px;
  transition: border-color 120ms, background 120ms;
}
body.newui .pe-file-item:hover {
  border-color: var(--border2);
  background: var(--bg3);
}
body.newui .pe-file-link {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--text); text-decoration: none;
  flex: 1; min-width: 0;
  padding: 4px 0;
}
body.newui .pe-file-ico {
  color: var(--accent);
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 8px;
}
body.newui .pe-file-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; font-weight: 500;
}
body.newui .pe-file-link:hover { color: var(--accent); }
body.newui .pe-file-link:hover .pe-file-name { text-decoration: underline; }

body.newui .pe-file-remove {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--danger);
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background var(--transition), border-color var(--transition);
}
body.newui .pe-file-remove:hover {
  background: rgba(220,53,69,0.1);
  border-color: rgba(220,53,69,0.4);
}
body.newui .pe-file-remove:active { transform: scale(0.94); }
body.newui .pe-file-remove:disabled { opacity: 0.5; cursor: progress; }
body.newui .pe-file-empty {
  color: var(--text2); font-style: italic; font-size: 13px;
  margin: 8px 0 0;
}

/* Action bar */
body.newui .project-edit-actions {
  display: flex; gap: 12px; justify-content: flex-end; align-items: center;
  padding: 16px 22px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
}
body.newui .project-edit-actions .btn {
  min-height: 46px; min-width: 140px;
  font-size: 15px; font-weight: 600;
  padding: 0 22px;
}
body.newui .project-edit-actions .btn-primary { min-width: 180px; }
body.newui .pe-btn-cancel {
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Sticky action bar на десктопе: всегда видна в нижней части viewport.
   Контент уже имеет padding-bottom через .project-edit-page. */
@media (min-width: 901px) {
  body.newui .project-edit-page { padding-bottom: 96px; }
  body.newui .project-edit-actions {
    position: sticky;
    bottom: 16px;
    z-index: 5;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

/* ── Mobile (<= 900px): single column ────────────────── */
@media (max-width: 900px) {
  body.newui .project-edit-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* ── Mobile (<= 768px): action bar просто внизу страницы, без fixed ── */
@media (max-width: 768px) {
  body.newui .project-edit-page { padding-bottom: 24px; }

  body.newui .project-edit-main,
  body.newui .project-edit-meta { padding: 14px; }

  body.newui .project-edit-header h1 { font-size: 20px; }

  body.newui .project-edit-actions {
    padding: 12px 14px;
  }
  body.newui .project-edit-actions .btn {
    flex: 1; min-width: 0; min-height: 48px;
  }

  body.newui .pe-files-actions { gap: 6px; }
  body.newui .add_files_edit { width: 100%; justify-content: center; }
  body.newui .pe-files-status { width: 100%; }
}

@media (max-width: 480px) {
  body.newui .project-edit-main,
  body.newui .project-edit-meta { padding: 12px; }
  body.newui .pe-field > label { font-size: 12px; }
  body.newui .pe-file-name { font-size: 13px; }
}

/* Dark-theme tweaks для wp-editor */
[data-theme="dark"] body.newui .pe-editor textarea {
  background: var(--bg); color: var(--text);
}
[data-theme="dark"] body.newui .pe-editor .quicktags-toolbar { background: var(--bg2); }

/* ==== 10-features.css ==== */
/*
 * Новые функции (features #2/#4/#5): дашборд-аналитика, рейтинг, фотоотчёты.
 * Все под body.newui, дизайн-токены из shared.css.
 */

/* ── #5 Дашборд ─────────────────────────────── */
body.newui .dash { margin: 0 0 28px; }
body.newui .dash-cards {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  margin-bottom: 18px;
}
body.newui .dash-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
body.newui .dash-card-val { font-size: 26px; font-weight: 700; line-height: 1; color: var(--text); }
body.newui .dash-card-lbl { font-size: 12px; color: var(--text2); }
body.newui .dash-card--accent .dash-card-val { color: var(--accent, #bf9523); }
body.newui .dash-card--ok .dash-card-val { color: #1f8a3f; }
[data-theme="dark"] body.newui .dash-card--ok .dash-card-val { color: #4fd06b; }

body.newui .dash-cols {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { body.newui .dash-cols { grid-template-columns: 1.2fr 1fr; } }

body.newui .dash-panel {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
}
body.newui .dash-panel-title { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--text); }

body.newui .dash-funnel { display: flex; flex-direction: column; gap: 8px; }
body.newui .dash-funnel-row {
  display: grid; grid-template-columns: 96px 1fr 32px; align-items: center; gap: 8px;
}
body.newui .dash-funnel-lbl { font-size: 12px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.newui .dash-funnel-bar {
  height: 18px; border-radius: 5px;
  background: linear-gradient(90deg, var(--accent, #bf9523), color-mix(in srgb, var(--accent, #bf9523) 55%, transparent));
  min-width: 3px; transition: width var(--transition);
}
body.newui .dash-funnel-num { font-size: 13px; font-weight: 600; text-align: right; color: var(--text); }

body.newui .dash-workers { display: flex; flex-direction: column; gap: 6px; }
body.newui .dash-worker {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text);
  transition: background var(--transition);
}
body.newui .dash-worker:hover { background: var(--bg3); }
body.newui .dash-worker-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
body.newui .dash-worker-name { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.newui .dash-worker-cnt {
  font-size: 13px; font-weight: 700; color: var(--accent, #bf9523);
  background: color-mix(in srgb, var(--accent, #bf9523) 14%, transparent);
  border-radius: 999px; padding: 2px 10px; min-width: 28px; text-align: center;
}
body.newui .dash-empty { color: var(--text2); font-size: 13px; font-style: italic; margin: 0; }

/* ── #4 Рейтинг / отзывы ────────────────────── */
body.newui .rating-stars { display: inline-flex; gap: 2px; vertical-align: middle; }
body.newui .rating-stars svg { width: 18px; height: 18px; }
body.newui .rating-star-on { color: #f5b301; fill: #f5b301; }
body.newui .rating-star-off { color: var(--border2, #ccc); fill: none; }

body.newui .rating-block {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; margin: 20px 0;
}
body.newui .rating-block h3 { margin: 0 0 12px; font-size: 16px; }
body.newui .rating-input { display: flex; gap: 4px; margin-bottom: 12px; }
body.newui .rating-input button {
  background: none; border: 0; cursor: pointer; padding: 2px;
  color: var(--border2, #ccc); line-height: 0;
}
body.newui .rating-input button svg { width: 30px; height: 30px; }
body.newui .rating-input button.is-active { color: #f5b301; fill: #f5b301; }
body.newui .rating-block textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 15px;
  min-height: 80px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  resize: vertical; margin-bottom: 12px;
}
body.newui .rating-existing {
  display: flex; flex-direction: column; gap: 8px;
}
body.newui .rating-existing-head { display: flex; align-items: center; gap: 10px; }
body.newui .rating-existing-text { color: var(--text2); font-size: 14px; margin: 0; line-height: 1.5; }
body.newui .rating-msg { font-size: 13px; margin: 8px 0 0; }
body.newui .rating-msg.err { color: var(--danger); }
body.newui .rating-msg.ok { color: #1f8a3f; }

/* рейтинг в worker-profile / карточках */
body.newui .worker-rating-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600;
}
body.newui .worker-rating-badge .rating-stars svg { width: 16px; height: 16px; }
body.newui .worker-rating-count { color: var(--text2); font-weight: 400; font-size: 13px; }

/* ── #2 Фотоотчёты по стадиям ───────────────── */
body.newui .photo-reports { margin: 20px 0; }
body.newui .photo-reports h3 { margin: 0 0 14px; font-size: 16px; }
body.newui .photo-report-stage {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px; background: var(--bg2);
}
body.newui .photo-report-stage-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
body.newui .photo-report-stage-name { font-size: 14px; font-weight: 600; }
body.newui .photo-report-stage-date { font-size: 12px; color: var(--text2); }
body.newui .photo-report-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
}
body.newui .photo-report-thumb {
  display: block; aspect-ratio: 1; border-radius: var(--radius-sm);
  overflow: hidden; border: 1px solid var(--border); background: var(--bg3);
}
body.newui .photo-report-thumb img { width: 100%; height: 100%; object-fit: cover; }
body.newui .photo-report-empty { color: var(--text2); font-size: 13px; font-style: italic; }

/* аплоад фотоотчёта (worker) */
body.newui .photo-report-upload {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-top: 6px;
}
body.newui .photo-report-upload .btn { min-height: 44px; }

/* ── Таймлайн заявки ────────────────────────── */
body.newui .project_timeline {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; margin: 20px 0;
}
body.newui .project_timeline .ptl-head { margin: 0 0 14px; font-size: 15px; color: var(--text); }
body.newui .ptl-list { list-style: none; margin: 0; padding: 0; position: relative; }
/* вертикальная линия слева от иконок */
body.newui .ptl-list::before {
  content: ''; position: absolute; left: 13px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
body.newui .ptl-item {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  padding: 0 0 16px 0;
}
body.newui .ptl-item:last-child { padding-bottom: 0; }
body.newui .ptl-icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); z-index: 1;
}
body.newui .ptl-item--status .ptl-icon { color: #1f8a3f; border-color: color-mix(in srgb, #1f8a3f 40%, var(--border)); }
[data-theme="dark"] body.newui .ptl-item--status .ptl-icon { color: #4fd06b; }
body.newui .ptl-item--checkin .ptl-icon { color: var(--accent, #bf9523); border-color: color-mix(in srgb, var(--accent, #bf9523) 45%, var(--border)); }
body.newui .ptl-item--photo_report .ptl-icon { color: #2f6fed; border-color: color-mix(in srgb, #2f6fed 40%, var(--border)); }
body.newui .ptl-item--created .ptl-icon { color: var(--text); }
body.newui .ptl-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 3px; }
body.newui .ptl-label { font-size: 14px; color: var(--text); font-weight: 500; }
body.newui .ptl-meta { font-size: 12px; color: var(--text2); }

/* ── #11 Skeleton / плавное появление ────────── */
/* Превью фотоотчёта: shimmer-плейсхолдер, гаснет когда <img data-fade> загрузился. */
body.newui .photo-report-thumb { position: relative; }
body.newui .photo-report-thumb::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(100deg,
    var(--bg3) 30%,
    color-mix(in srgb, var(--bg3) 55%, var(--border)) 50%,
    var(--bg3) 70%);
  background-size: 200% 100%;
  animation: art-shimmer 1.2s ease-in-out infinite;
}
body.newui .photo-report-thumb.is-loaded::before { content: none; animation: none; }
body.newui .photo-report-thumb img {
  position: relative; z-index: 1;
  opacity: 0; transition: opacity .35s ease;
}
body.newui .photo-report-thumb img.is-loaded { opacity: 1; }
@keyframes art-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Таймлайн: мягкое поэтапное появление вместо резкого снапа (SSR). */
@media (prefers-reduced-motion: no-preference) {
  body.newui .ptl-item { animation: art-tl-enter .32s ease both; }
  body.newui .ptl-item:nth-child(2)   { animation-delay: .04s; }
  body.newui .ptl-item:nth-child(3)   { animation-delay: .08s; }
  body.newui .ptl-item:nth-child(4)   { animation-delay: .12s; }
  body.newui .ptl-item:nth-child(5)   { animation-delay: .16s; }
  body.newui .ptl-item:nth-child(n+6) { animation-delay: .2s; }
}
@keyframes art-tl-enter {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* Уважать reduced-motion: без shimmer/сдвига, картинка появляется мгновенно. */
@media (prefers-reduced-motion: reduce) {
  body.newui .photo-report-thumb::before { animation: none; }
  body.newui .photo-report-thumb img { transition: none; opacity: 1; }
}

