/* ============================================================
   LABSTARS MILLING CENTR — Modern Dark Refined
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #070b14;
  --bg-2:      #0b1120;
  --panel:     rgba(20, 27, 45, .72);
  --panel-2:   rgba(28, 37, 58, .85);
  --panel-solid: #131b2c;
  --border:    rgba(255, 255, 255, .08);
  --border-2:  rgba(255, 255, 255, .14);

  --text:      #e8eefc;
  --muted:     #7c8db5;
  --muted-2:   #9aa9c9;

  --accent:    #10b981;   /* emerald */
  --accent-2:  #34d399;
  --lime:      #a3e635;   /* свежий лабораторный штрих */
  --cyan:      #22d3ee;

  --ok:        #34d399;
  --warn:      #fbbf24;
  --danger:    #f87171;

  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 20px 60px -20px rgba(0,0,0,.6);
  --glow:      0 0 0 1px rgba(16,185,129,.25), 0 8px 32px -8px rgba(16,185,129,.35);
}

html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Фоновая сетка + свечение */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, #000 20%, transparent 75%);
}

body::after {
  content: '';
  position: fixed;
  top: -30vh; left: 50%;
  transform: translateX(-50%);
  width: 120vw; height: 80vh;
  background: radial-gradient(ellipse at center,
      rgba(16,185,129,.16) 0%,
      rgba(34,211,238,.08) 35%,
      transparent 65%);
  pointer-events: none;
  z-index: 0;
  filter: blur(20px);
}

/* Контент поверх фона */
.topbar, main, .toasts { position: relative; z-index: 1; }

/* ============================ Шапка ============================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 32px;
  background: rgba(7, 11, 20, .72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 12px; }

.logo {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--lime), var(--accent));
  color: #052e1f;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -.5px;
  box-shadow:
    0 0 0 1px rgba(163,230,53,.35),
    0 8px 24px -8px rgba(16,185,129,.6);
  font-family: 'JetBrains Mono', monospace;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 1.5px;
  color: #fff;
}
.brand-sub {
  font-size: 10.5px;
  letter-spacing: 2.4px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 2px;
}

/* Навигация */
nav { display: flex; gap: 6px; }

nav a {
  color: var(--muted-2);
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .2px;
  transition: all .2s ease;
  border: 1px solid transparent;
}

nav a:hover {
  color: var(--text);
  background: rgba(255,255,255,.04);
  border-color: var(--border);
}

nav a.active {
  color: #052e1f;
  background: linear-gradient(135deg, var(--lime), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 6px 20px -8px rgba(163,230,53,.6);
}

/* ============================ Обёртка ============================ */
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 44px 28px 100px;
}

/* Hero */
.hero {
  margin-bottom: 36px;
  max-width: 720px;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 14px;
}

.hero .eyebrow::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--lime);
  opacity: .6;
}

.hero h1 {
  font-size: clamp(26px, 4.2vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #fff 0%, #b9c4dd 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--muted-2);
  font-size: 15.5px;
  max-width: 560px;
}

/* ============================ Карточки ============================ */
.card {
  background: var(--panel);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

/* Тонкая верхняя подсветка */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(163,230,53,.5),
    rgba(34,211,238,.4),
    transparent);
  opacity: .55;
}

.card-head {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--border);
}

.card-head h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.2px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.card-head h2 .num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--lime);
  background: rgba(163,230,53,.1);
  border: 1px solid rgba(163,230,53,.25);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 1px;
}

.card-head .card-sub {
  color: var(--muted);
  font-size: 13.5px;
}

/* Секции формы */
.form-section {
  border: none;
  margin-bottom: 22px;
}

.form-section legend {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.form-section legend::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* Сетка полей */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.grid .full { grid-column: 1 / -1; }

/* Поля */
.field { display: flex; flex-direction: column; gap: 7px; }

.field label {
  font-size: 12.5px;
  color: var(--muted-2);
  font-weight: 600;
  letter-spacing: .2px;
}
.field label .req { color: var(--lime); margin-left: 2px; }

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(10, 16, 28, .7);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all .2s ease;
}

input::placeholder, textarea::placeholder {
  color: #566179;
}

input:hover, select:hover, textarea:hover {
  border-color: var(--border-2);
  background: rgba(14, 21, 36, .8);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  background: rgba(16, 24, 40, .95);
  box-shadow: 0 0 0 4px rgba(16,185,129,.12);
}

textarea {
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
}

/* Стилизация date-picker иконки */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(.7) sepia(1) saturate(3) hue-rotate(90deg);
  cursor: pointer;
}

/* Кнопки */
button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .2px;
  padding: 13px 24px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--lime), var(--accent));
  color: #052e1f;
  box-shadow:
    0 0 0 1px rgba(163,230,53,.4),
    0 12px 30px -10px rgba(163,230,53,.5);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(163,230,53,.6),
    0 16px 40px -10px rgba(163,230,53,.7);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: rgba(255,255,255,.04);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255,255,255,.08);
  border-color: var(--border-2);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 12.5px;
  border-radius: 8px;
  font-weight: 600;
}

.form-actions {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.form-actions .hint {
  font-size: 12.5px;
  color: var(--muted);
}

/* ============================ Таблица ============================ */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.toolbar h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar h2::before {
  content: '';
  width: 6px; height: 22px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--lime), var(--accent));
}

.filters { display: flex; gap: 6px; flex-wrap: wrap; }

.filters button {
  background: rgba(255,255,255,.04);
  color: var(--muted-2);
  border: 1px solid var(--border);
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
}

.filters button:hover {
  color: var(--text);
  border-color: var(--border-2);
}

.filters button.active {
  background: linear-gradient(135deg, var(--lime), var(--accent-2));
  color: #052e1f;
  border-color: transparent;
  box-shadow: 0 6px 20px -8px rgba(163,230,53,.6);
}

.counter {
  font-size: 13px;
  color: var(--muted);
}
.counter b { color: var(--lime); font-weight: 700; }

.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(10, 16, 28, .4);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 960px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  padding: 14px 16px;
  background: rgba(19, 27, 44, .95);
  backdrop-filter: blur(8px);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}

tbody tr {
  transition: background .15s ease;
}

tbody tr:hover {
  background: rgba(16, 185, 129, .05);
}

.id-cell {
  font-family: 'JetBrains Mono', monospace;
  color: var(--lime);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .3px;
}

.muted { color: var(--muted); font-size: 12px; }

/* Бейджи статусов и приоритетов */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.b-new         { background: rgba(34,211,238,.12); color: #67e8f9; border-color: rgba(34,211,238,.3); }
.b-in_progress { background: rgba(251,191,36,.12); color: #fcd34d; border-color: rgba(251,191,36,.3); }
.b-done        { background: rgba(52,211,153,.12); color: #6ee7b7; border-color: rgba(52,211,153,.3); }

.b-low    { background: rgba(148,163,184,.1); color: #94a3b8; border-color: rgba(148,163,184,.25); }
.b-normal { background: rgba(148,163,184,.12); color: #cbd5e1; border-color: rgba(148,163,184,.3); }
.b-high   { background: rgba(251,146,60,.12); color: #fdba74; border-color: rgba(251,146,60,.3); }
.b-urgent { background: rgba(248,113,113,.14); color: #fca5a5; border-color: rgba(248,113,113,.35); }

/* Пустое состояние */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 14px;
}

.empty::before {
  content: '⚗';
  display: block;
  font-size: 42px;
  margin-bottom: 14px;
  opacity: .35;
}

/* ============================ Тосты ============================ */
.toasts {
  position: fixed;
  top: 88px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  pointer-events: none;
}

.toast {
  background: rgba(19, 27, 44, .96);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--text);
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.7);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: toastIn .35s cubic-bezier(.21,1.02,.73,1);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}

.toast.ok::before    { background: var(--ok); }
.toast.err::before   { background: var(--danger); }
.toast.info::before  { background: var(--cyan); }

.toast .icon { font-size: 16px; line-height: 1; margin-top: 1px; }
.toast b { color: var(--lime); font-family: 'JetBrains Mono', monospace; }

.toast.fade-out {
  animation: toastOut .3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(40px) scale(.96); }
}

/* ============================ Адаптив ============================ */
@media (max-width: 820px) {
  .grid { grid-template-columns: 1fr; }

  .topbar {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .brand-sub { display: none; }

  nav a { padding: 8px 12px; font-size: 13px; }

  .wrap { padding: 28px 16px 70px; }

  .card { padding: 20px; }

  .toolbar { flex-direction: column; align-items: flex-start; }

  .filters { width: 100%; overflow-x: auto; padding-bottom: 4px; }

  .toasts {
    top: auto;
    bottom: 16px;
    left: 16px; right: 16px;
    max-width: none;
  }

  /* Таблица → карточки на мобильных */
  .table-wrap { border: none; background: none; overflow: visible; }
  table { min-width: 0; width: 100%; }
  thead { display: none; }
  tbody { display: block; }

  tbody tr {
    display: block;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
  }

  tbody tr:hover { background: var(--panel); }

  tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 8px 0;
    border-top: 1px dashed var(--border);
    text-align: right;
  }

  tbody td:first-child { border-top: none; padding-top: 0; }

  tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 700;
    flex-shrink: 0;
    text-align: left;
  }

  tbody td[data-label="Действия"] {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
  }
  tbody td[data-label="Действия"]::before { display: none; }
}/* ============================================================
   ДОПОЛНЕНИЯ ДЛЯ ЛЕНДИНГА ЗАКАЗЧИКА
   ============================================================ */

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 90px; }

/* ============================ Topbar: правый блок ============================ */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background .2s ease;
}
.topbar-phone:hover { background: rgba(255,255,255,.05); }

.topbar-phone-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .4; }
}

/* Логотип-ссылка — убираем подчёркивание */
.brand { text-decoration: none; color: inherit; }

/* ============================ Hero block ============================ */
.hero-block {
  padding: 72px 0 40px;
  position: relative;
}

.hero-block .wrap { padding-top: 0; padding-bottom: 0; }

.hero-lead {
  font-size: 16.5px;
  color: var(--muted-2);
  max-width: 640px;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s ease;
  font-size: 14px;
  cursor: pointer;
}
.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(16,185,129,.06);
}

/* Кнопка-primary как ссылка */
a.btn-primary {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  font-size: 13.5px;
  color: var(--muted-2);
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-item .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
}

/* ============================ Stats ============================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), var(--accent), transparent);
  opacity: .7;
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1px;
  color: #fff;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-value span {
  color: var(--lime);
  font-size: 20px;
  margin-left: 2px;
}

.stat-label {
  font-size: 12.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* ============================ Секции ============================ */
.section { margin-bottom: 72px; }

.section-head {
  margin-bottom: 32px;
  max-width: 680px;
}

.num-badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--lime);
  background: rgba(163,230,53,.08);
  border: 1px solid rgba(163,230,53,.25);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -.8px;
  line-height: 1.15;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #fff 0%, #b9c4dd 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-head p {
  color: var(--muted-2);
  font-size: 15px;
}

/* ============================ Услуги ============================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.service {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(16px);
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}

.service::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
  opacity: 0;
  transition: opacity .25s ease;
}

.service:hover {
  border-color: var(--border-2);
  transform: translateY(-3px);
  box-shadow: 0 24px 50px -24px rgba(16,185,129,.4);
}

.service:hover::before { opacity: .7; }

.service-icon {
  font-size: 26px;
  margin-bottom: 14px;
  display: block;
  line-height: 1;
}

.service h3 {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.2px;
  margin-bottom: 8px;
  color: #fff;
}

.service p {
  font-size: 13.5px;
  color: var(--muted-2);
  line-height: 1.55;
}

/* ============================ Шаги ============================ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -2px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(163,230,53,.55);
  margin-bottom: 14px;
  line-height: 1;
}

.step h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
  letter-spacing: -.2px;
}

.step p {
  font-size: 13px;
  color: var(--muted-2);
  line-height: 1.55;
}

/* ============================ Чекбокс согласия ============================ */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.02);
  cursor: pointer;
  font-size: 13px;
  color: var(--muted-2);
  transition: border-color .2s ease;
}
.checkbox-row:hover { border-color: var(--border-2); }

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ============================ Проверка статуса ============================ */
.status-form {
  display: flex;
  gap: 10px;
  max-width: 520px;
  margin-bottom: 20px;
}

.status-form input {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.status-form button {
  padding: 12px 26px;
  white-space: nowrap;
}

.status-result { max-width: 720px; }

.status-loading,
.status-notfound {
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  color: var(--muted-2);
  font-size: 14px;
  background: rgba(255,255,255,.02);
}
.status-notfound b { color: var(--lime); font-family: 'JetBrains Mono', monospace; }

.status-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  animation: cardIn .35s ease;
}

.status-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime), var(--accent), transparent);
  opacity: .8;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.status-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px dashed var(--border);
  flex-wrap: wrap;
}

.status-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: var(--lime);
  letter-spacing: .5px;
  margin-bottom: 4px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.status-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-grid span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 700;
}

.status-grid b {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.status-notes {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  font-size: 13.5px;
  color: var(--muted-2);
  line-height: 1.6;
}
.status-notes span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}

/* ============================ FAQ ============================ */
.faq { max-width: 820px; display: flex; flex-direction: column; gap: 10px; }

.faq details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  overflow: hidden;
  transition: border-color .2s ease;
}

.faq details[open] { border-color: rgba(163,230,53,.3); }
.faq details:hover  { border-color: var(--border-2); }

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '+';
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 400;
  color: var(--lime);
  transition: transform .25s ease;
  line-height: 1;
  flex-shrink: 0;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p {
  padding: 0 22px 20px;
  font-size: 13.5px;
  color: var(--muted-2);
  line-height: 1.65;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
  margin-top: 2px;
}

/* ============================ Контакты ============================ */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.contact-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(16px);
  text-decoration: none;
  color: inherit;
  transition: all .25s ease;
  display: block;
}

a.contact-card:hover {
  border-color: var(--border-2);
  transform: translateY(-3px);
  box-shadow: 0 24px 50px -24px rgba(16,185,129,.35);
}

.contact-icon {
  font-size: 22px;
  margin-bottom: 12px;
  display: block;
  line-height: 1;
}

.contact-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.contact-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

.map-placeholder {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(10,16,28,.4);
  height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
}

.map-placeholder-inner span { font-size: 40px; display: block; margin-bottom: 12px; opacity: .5; }
.map-placeholder-inner p {
  font-size: 15px;
  color: var(--muted-2);
  font-weight: 600;
  margin-bottom: 6px;
}
.map-placeholder-inner small { color: var(--muted); font-size: 12.5px; }

/* ============================ Футер ============================ */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(7, 11, 20, .6);
  margin-top: 40px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-top: 40px;
  padding-bottom: 30px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 320px;
}

.footer-name {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.4px;
  color: #fff;
  margin-bottom: 4px;
}

.footer-sub {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.footer-cols {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13.5px;
}

.footer-col-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.footer-col a {
  color: var(--muted-2);
  text-decoration: none;
  transition: color .2s ease;
}
.footer-col a:hover { color: var(--lime); }
.footer-col span { color: var(--muted-2); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

/* ============================ Анимация появления ============================ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================ Адаптив ============================ */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .steps         { grid-template-columns: repeat(2, 1fr); }
  .contacts-grid { grid-template-columns: repeat(2, 1fr); }
  .stats         { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .topbar { flex-wrap: wrap; }
  .topbar nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
  }
  .topbar-right { margin-left: auto; }
  .topbar-phone span:last-child { display: none; }
  .topbar-phone { padding: 8px 10px; }

  .hero-block { padding: 40px 0 24px; }
  .hero-cta   { margin-bottom: 28px; }
  .hero-trust { font-size: 12.5px; gap: 10px 18px; }

  .services-grid { grid-template-columns: 1fr; }
  .steps         { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .stats         { grid-template-columns: repeat(2, 1fr); }

  .status-grid { grid-template-columns: 1fr; }
  .status-form { flex-direction: column; }

  .footer-inner  { flex-direction: column; gap: 30px; }
  .footer-cols   { gap: 34px; }
  .footer-bottom { flex-direction: column; }
}/* ============================================================
   ОБНОВЛЁННЫЕ КАРТОЧКИ УСЛУГ
   ============================================================ */

/* --- Общее: карточка + иконка --- */
.service {
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.service-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.service-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(163,230,53,.14), rgba(16,185,129,.09));
  border: 1px solid rgba(163,230,53,.28);
  color: var(--lime);
  font-size: 0; /* прячем возможные эмодзи */
  flex-shrink: 0;
}
.service-icon svg {
  width: 22px;
  height: 22px;
}

/* --- Сетки --- */
.services-flagship {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.services-regular {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* ============================================================
   ФЛАГМАНСКИЕ КАРТОЧКИ
   ============================================================ */
.service-featured {
  padding: 26px 24px 22px;
  background: linear-gradient(180deg, rgba(16,185,129,.06), var(--panel));
  border-color: rgba(163,230,53,.22);
  box-shadow:
    0 0 0 1px rgba(163,230,53,.06),
    inset 0 1px 0 rgba(255,255,255,.03),
    0 20px 50px -30px rgba(16,185,129,.5);
}

/* Верхняя светящаяся линия — постоянная, а не только на hover */
.service-featured::before {
  opacity: .8;
}

/* Бейдж "Флагман" */
.service-flag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #052e1f;
  background: linear-gradient(135deg, var(--lime), var(--accent-2));
  padding: 4px 9px;
  border-radius: 6px;
  box-shadow: 0 4px 14px -4px rgba(163,230,53,.5);
  white-space: nowrap;
}

/* Крупнее иконка у флагманов */
.service-featured .service-icon {
  width: 50px;
  height: 50px;
  border-radius: 13px;
}
.service-featured .service-icon svg {
  width: 26px;
  height: 26px;
}

.service-featured h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.3px;
  line-height: 1.25;
  margin-bottom: 10px;
  color: #fff;
}

.service-featured p {
  font-size: 13.5px;
  color: var(--muted-2);
  line-height: 1.55;
  margin-bottom: 18px;
}

/* Мета-цифры внизу карточки */
.service-meta {
  list-style: none;
  display: flex;
  gap: 16px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.service-meta li {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .3px;
  text-transform: uppercase;
  font-weight: 600;
}

.service-meta b {
  display: inline-block;
  color: var(--lime);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  margin-right: 2px;
}

/* ============================================================
   КОМПАКТНЫЕ КАРТОЧКИ
   ============================================================ */
.services-regular .service {
  padding: 20px;
}

.services-regular .service-top {
  margin-bottom: 14px;
}

.services-regular .service h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.2px;
  margin-bottom: 8px;
  color: #fff;
}

.services-regular .service p {
  font-size: 13px;
  color: var(--muted-2);
  line-height: 1.55;
}

/* ============================================================
   ШИРОКАЯ КАРТОЧКА — ПЕЧАТЬ И ПРОТОТИПИРОВАНИЕ
   ============================================================ */
.service-wide {
  margin-top: 14px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(16,185,129,.05), var(--panel));
  border-color: rgba(163,230,53,.22);
  position: relative;
  overflow: hidden;
}

.service-wide::before {
  opacity: .55;
}

.service-wide-head {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--border);
}

.service-wide-head .service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex-shrink: 0;
}
.service-wide-head .service-icon svg {
  width: 28px;
  height: 28px;
}

.service-wide-head h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: #fff;
  margin-bottom: 6px;
}

.service-wide-head p {
  font-size: 13.5px;
  color: var(--muted-2);
  line-height: 1.55;
  max-width: 620px;
}

/* Сетка из 4-х подблоков */
.service-wide-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.service-sub {
  position: relative;
  padding-left: 16px;
}

.service-sub::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 2px;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--lime), transparent 90%);
}

.service-sub-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -.1px;
  line-height: 1.3;
}

.service-sub-text {
  font-size: 12.5px;
  color: var(--muted-2);
  line-height: 1.55;
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 1024px) {
  .services-flagship { grid-template-columns: repeat(3, 1fr); }
  .services-regular  { grid-template-columns: repeat(2, 1fr); }
  .service-wide-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 820px) {
  .services-flagship { grid-template-columns: 1fr; }
  .services-regular  { grid-template-columns: 1fr; }
  .service-wide-grid { grid-template-columns: 1fr; gap: 18px; }

  .service-wide-head {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .service-featured { padding: 22px 20px; }
  .service-wide     { padding: 22px 20px; }
}

@media (max-width: 480px) {
  .service-meta {
    flex-wrap: wrap;
    gap: 10px 16px;
  }
}/* ============================================================
   АВТОСКРЫТИЕ ВЕРХНЕЙ ШАПКИ
   ============================================================ */

.topbar {
  transition: transform .38s cubic-bezier(.4, 0, .2, 1),
              box-shadow .3s ease,
              background .3s ease;
  will-change: transform;
}

/* Шапка прижата к верху — добавляем мягкую тень */
.topbar.scrolled {
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, .8);
  background: rgba(7, 11, 20, .88);
}

/* Скрытое состояние — уехала вверх */
.topbar.hidden {
  transform: translateY(-110%);
  box-shadow: none;
}

/* ============================================================
   КНОПКА ВОЗВРАТА ШАПКИ
   ============================================================ */

.topbar-restore {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;

  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;

  background: rgba(19, 27, 44, .92);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(163, 230, 53, .3);
  border-radius: 999px;

  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
  cursor: pointer;

  box-shadow:
    0 0 0 1px rgba(163, 230, 53, .12),
    0 16px 40px -12px rgba(0, 0, 0, .8),
    0 0 40px -14px rgba(163, 230, 53, .55);

  opacity: 0;
  transform: translateY(14px) scale(.94);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, border-color .2s ease;
}

.topbar-restore.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.topbar-restore:hover {
  border-color: rgba(163, 230, 53, .55);
  transform: translateY(-2px) scale(1.02);
}

.topbar-restore svg {
  width: 15px;
  height: 15px;
  color: var(--lime);
}

/* На мобильных — компактнее и чуть выше от низа */
@media (max-width: 820px) {
  .topbar-restore {
    right: 14px;
    bottom: 14px;
    padding: 10px 14px;
    font-size: 12.5px;
  }
  .topbar-restore span { display: none; }  /* остаётся только иконка */
}/* ============================================================
   FIX: topbar на fixed (замена sticky) для стабильного автоскрытия
   ============================================================ */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 30;
}

/* Компенсируем высоту шапки — переменную обновляет JS */
body {
  padding-top: var(--topbar-h, 68px);
}

@media (max-width: 820px) {
  body { padding-top: var(--topbar-h, 62px); }
}/* ============================================================
   КНОПКА «НАВЕРХ» — круглая, с иконкой
   ============================================================ */

.topbar-restore {
  /* Круглый вид */
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;

  /* Центрируем иконку */
  display: inline-flex;
  align-items: center;

  /* Чуть более заметное свечение при появлении */
  box-shadow:
    0 0 0 1px rgba(163, 230, 53, .18),
    0 16px 40px -12px rgba(0, 0, 0, .85),
    0 0 40px -12px rgba(163, 230, 53, .65);
}

.topbar-restore:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: rgba(163, 230, 53, .7);
}

.topbar-restore svg {
  width: 20px;
  height: 20px;
}

/* На мобильных — компактнее, но всё ещё круг */
@media (max-width: 820px) {
  .topbar-restore {
    width: 44px;
    height: 44px;
    right: 14px;
    bottom: 14px;
    padding: 0;
  }
  .topbar-restore svg {
    width: 18px;
    height: 18px;
  }
  /* Текст «Наверх» скрываем — остаётся только стрелка */
  .topbar-restore span {
    display: none;
  }
}/* ============================================================
   ССЫЛКА НА СТРАНИЦУ СОТРУДНИКА
   ============================================================ */

.topbar-staff {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2px;
  text-decoration: none;
  transition: all .2s ease;
  white-space: nowrap;
}

.topbar-staff svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.topbar-staff:hover {
  color: var(--lime);
  border-color: rgba(163, 230, 53, .45);
  background: rgba(163, 230, 53, .08);
  box-shadow: 0 0 0 1px rgba(163, 230, 53, .1),
              0 6px 20px -8px rgba(163, 230, 53, .4);
}

@media (max-width: 1100px) {
  /* Скрываем текст раньше, чтобы шапка не разъезжалась */
  .topbar-staff span { display: none; }
  .topbar-staff { padding: 8px 10px; }
}/* ============================================================
   СТРАНИЦЫ АВТОРИЗАЦИИ (login, register)
   ============================================================ */

.auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 30px;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 30px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.auth-card-wide {
  max-width: 560px;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime), var(--accent), transparent);
  opacity: .8;
}

.auth-logo-link {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 20px;
}

.auth-logo {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--lime), var(--accent));
  color: #052e1f;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -.5px;
  font-family: 'JetBrains Mono', monospace;
  box-shadow:
    0 0 0 1px rgba(163, 230, 53, .35),
    0 12px 30px -8px rgba(16, 185, 129, .55);
  transition: transform .2s ease;
}
.auth-logo-link:hover .auth-logo {
  transform: scale(1.05) rotate(-2deg);
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: #fff;
  margin-bottom: 8px;
}

.auth-sub {
  font-size: 13.5px;
  color: var(--muted-2);
  margin-bottom: 26px;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.auth-form .grid {
  gap: 14px;
}

.auth-pass-wrap {
  position: relative;
}

.auth-pass-wrap input {
  padding-right: 46px;
}

.auth-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  transition: color .2s ease, background .2s ease;
}

.auth-eye:hover {
  color: var(--lime);
  background: rgba(255, 255, 255, .04);
}

.auth-eye.active {
  color: var(--lime);
}

.auth-eye svg {
  width: 17px;
  height: 17px;
}

.field-hint {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.auth-error {
  min-height: 0;
  font-size: 13px;
  color: var(--danger);
  font-weight: 600;
  letter-spacing: .2px;
  padding: 0;
  border-radius: 8px;
  transition: all .2s ease;
}

.auth-error.visible {
  min-height: 20px;
  padding: 10px 14px;
  background: rgba(248, 113, 113, .1);
  border: 1px solid rgba(248, 113, 113, .3);
}

.auth-submit {
  width: 100%;
  justify-content: center;
  padding: 13px 20px;
  font-size: 14.5px;
  margin-top: 4px;
}

.auth-divider {
  position: relative;
  margin: 22px 0;
  text-align: center;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  position: relative;
  display: inline-block;
  padding: 0 12px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 700;
}

.auth-secondary {
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  text-decoration: none;
}

.auth-back {
  display: inline-block;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}
.auth-back:hover { color: var(--lime); }

.auth-footer {
  margin-top: 28px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* На узких экранах — компактнее */
@media (max-width: 520px) {
  .auth-card {
    padding: 28px 22px 24px;
    border-radius: 14px;
  }
  .auth-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 18px;
  }
  .auth-title { font-size: 19px; }
  .auth-sub   { font-size: 13px; margin-bottom: 22px; }
}/* Плашка "вы уже вошли" на странице регистрации */
.auth-already {
  text-align: center;
  padding: 22px 18px;
  background: rgba(163, 230, 53, .06);
  border: 1px solid rgba(163, 230, 53, .25);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.auth-already-icon {
  font-size: 34px;
  margin-bottom: 10px;
  line-height: 1;
}

.auth-already-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -.2px;
}

.auth-already-text {
  font-size: 13.5px;
  color: var(--muted-2);
  margin-bottom: 14px;
}
.auth-already-text b { color: var(--lime); }

.auth-already-hint {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

#forceLogout {
  width: 100%;
}/* ============================================================
   КАБИНЕТЫ — пользователь в шапке, гостевые предупреждения, модалка, журнал
   ============================================================ */

.topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid rgba(163, 230, 53, .25);
  background: rgba(163, 230, 53, .06);
  color: var(--lime);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all .2s ease;
}
.topbar-user:hover {
  background: rgba(163, 230, 53, .12);
  border-color: rgba(163, 230, 53, .5);
}

@media (max-width: 1100px) {
  .topbar-user span { display: none; }
  .topbar-user { padding: 8px 10px; }
}

/* Гостевое предупреждение в форме */
.guest-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 22px;
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, .08);
  border: 1px solid rgba(251, 191, 36, .3);
  color: #fcd34d;
  font-size: 13.5px;
  line-height: 1.55;
}
.guest-warning b { color: #fde68a; }
.guest-warning a {
  color: var(--lime);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed var(--lime);
  margin: 0 2px;
}
.guest-warning a:hover { color: #fff; }

/* Модальное окно деталей заказа */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
  position: relative;
  animation: modalIn .25s cubic-bezier(.21, 1.02, .73, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime), var(--accent), transparent);
  opacity: .7;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px dashed var(--border);
}

.modal-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  transition: all .2s ease;
}
.modal-close:hover {
  color: var(--danger);
  border-color: rgba(248, 113, 113, .4);
  background: rgba(248, 113, 113, .08);
}

/* История заказа */
.status-history {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
}
.status-history-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 14px;
}
.status-history-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  position: relative;
}
.status-history-dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  flex-shrink: 0;
}
.status-history-action {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.status-history-action + .muted { font-size: 11.5px; }

/* Журнал активности */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 480px;
  overflow-y: auto;
}

.activity-item {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  border-bottom: 1px dashed var(--border);
  font-size: 13.5px;
  transition: background .15s ease;
}
.activity-item:hover { background: rgba(163, 230, 53, .04); }
.activity-item:last-child { border-bottom: none; }

.activity-action {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.activity-details {
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .activity-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .activity-meta { font-size: 11.5px; }
}

/* Кнопки-ссылки рядом в шапке — единое расстояние */
.topbar-right > * + * { margin-left: 6px; }
/* ============================================================
   СМЕНА ПАРОЛЯ
   ============================================================ */

/* Поле с кнопкой «глаз» внутри карточек кабинета — переиспользуем .auth-pass-wrap */
.card .auth-pass-wrap input {
  padding-right: 46px;
}

/* В карточке «Безопасность» заголовок h2 без иконки — просто аккуратный */
#security .card-head {
  border-bottom-color: var(--border);
}

/* Небольшой отступ у подсказки под полем */
.field .field-hint {
  display: block;
  margin-top: 4px;
}
/* ============================================================
   УПРАВЛЕНИЕ СОТРУДНИКАМИ
   ============================================================ */

#staffSection .toolbar {
  flex-wrap: wrap;
  gap: 12px;
}

.modal .auth-form .field label {
  font-size: 12.5px;
}

.modal input[type="text"][name="password"],
.modal input[type="text"][name="newPassword"] {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
}

/* ============================================================
   СМЕНА ПАРОЛЯ
   ============================================================ */

.card .auth-pass-wrap input {
  padding-right: 46px;
}

.field .field-hint {
  display: block;
  margin-top: 4px;
}
/* ============================================================
   ТАБЫ (админ-панель и кабинет сотрудника)
   ============================================================ */

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px;
  background: rgba(10, 16, 28, .55);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 26px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: calc(var(--topbar-h, 68px) + 12px);
  z-index: 15;
}

.tab-btn {
  flex: 1 1 auto;
  min-width: 130px;
  padding: 11px 16px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--muted-2);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: .1px;
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, .05);
  color: var(--text);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--lime), var(--accent-2));
  color: #052e1f;
  box-shadow: 0 10px 26px -10px rgba(163, 230, 53, .6);
}

.tab-btn .tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  font-size: 11px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.tab-btn.active .tab-badge {
  background: rgba(5, 46, 31, .22);
  color: #052e1f;
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: tabFade .25s ease; }

@keyframes tabFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ДАШБОРД
   ============================================================ */

.dash-section {
  margin-bottom: 26px;
}

.dash-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.dash-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}

.dash-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.dash-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), var(--accent), transparent);
  opacity: .75;
}

.dash-card.accent-cyan::before    { background: linear-gradient(90deg, var(--cyan), transparent); }
.dash-card.accent-warn::before    { background: linear-gradient(90deg, var(--warn), transparent); }
.dash-card.accent-ok::before      { background: linear-gradient(90deg, var(--ok), transparent); }
.dash-card.accent-danger::before  { background: linear-gradient(90deg, var(--danger), transparent); }

.dash-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 10px;
}

.dash-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 34px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  letter-spacing: -1.5px;
}

.dash-value small {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 5px;
  letter-spacing: 0;
}

.dash-sub {
  font-size: 12.5px;
  color: var(--muted-2);
  margin-top: 10px;
  line-height: 1.4;
}

.dash-sub b { color: var(--lime); font-weight: 700; }

/* Табличка топ-сотрудников / топ-клиентов */
.dash-list {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 4px;
  backdrop-filter: blur(16px);
}

.dash-list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px dashed var(--border);
  font-size: 13.5px;
}
.dash-list-row:last-child { border-bottom: none; }

.dash-list-name {
  color: var(--text);
  font-weight: 600;
}
.dash-list-name small {
  color: var(--muted);
  font-weight: 500;
  margin-left: 8px;
  font-size: 11.5px;
  font-family: 'JetBrains Mono', monospace;
}

.dash-list-count {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--lime);
  font-size: 15px;
  white-space: nowrap;
}

.dash-list-count small {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  margin-left: 3px;
}

/* Разделение дашборда на две колонки */
.dash-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .dash-grid  { grid-template-columns: repeat(2, 1fr); }
  .dash-cols  { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .tabs {
    position: static;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn {
    flex: 0 0 auto;
    min-width: 0;
    padding: 10px 14px;
    font-size: 13px;
  }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-value { font-size: 28px; }
}
/* ============================================================
   КОМПАКТНАЯ ТАБЛИЦА ЗАКАЗОВ — чтобы всё влезало без скролла
   ============================================================ */

.table-wrap table.orders-compact {
  min-width: 760px;
  font-size: 12.5px;
}

.orders-compact thead th {
  padding: 10px 10px;
  font-size: 10.5px;
  letter-spacing: .4px;
}

.orders-compact tbody td {
  padding: 11px 10px;
  line-height: 1.45;
  vertical-align: top;
}

.orders-compact .id-cell {
  font-size: 11.5px;
  letter-spacing: 0;
  word-break: break-all;
  max-width: 110px;
  display: inline-block;
}

.orders-compact .badge {
  padding: 3px 8px;
  font-size: 10.5px;
  gap: 5px;
}

.orders-compact .badge::before {
  width: 5px;
  height: 5px;
}

.orders-compact .btn-sm {
  padding: 5px 9px;
  font-size: 11.5px;
  border-radius: 6px;
}

.orders-compact .muted {
  font-size: 11px;
  margin-top: 2px;
}

.orders-compact .row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
}

.orders-compact .row-actions .icon-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  color: var(--muted-2);
  cursor: pointer;
  font-size: 13px;
  transition: all .18s ease;
}

.orders-compact .row-actions .icon-btn:hover {
  color: var(--lime);
  border-color: rgba(163, 230, 53, .5);
  background: rgba(163, 230, 53, .08);
}

.orders-compact .row-actions .icon-btn.danger:hover {
  color: var(--danger);
  border-color: rgba(248, 113, 113, .5);
  background: rgba(248, 113, 113, .08);
}

.orders-compact .row-actions .btn-sm {
  padding: 5px 9px;
  font-size: 11.5px;
  height: 28px;
  display: inline-flex;
  align-items: center;
}

/* На мобильных — не форсируем минимум, там карточки */
@media (max-width: 820px) {
  .table-wrap table.orders-compact {
    min-width: 0;
  }
  .orders-compact .id-cell {
    max-width: none;
  }
  .orders-compact .row-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
/* ============================================================
   УВЕДОМЛЕНИЯ — колокольчик + панель
   ============================================================ */

.notif-wrap {
  position: relative;
}

.notif-bell {
  position: relative;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
  color: var(--muted-2);
  cursor: pointer;
  transition: all .2s ease;
  padding: 0;
}

.notif-bell:hover {
  color: var(--lime);
  border-color: rgba(163, 230, 53, .4);
  background: rgba(163, 230, 53, .06);
}

.notif-bell svg {
  width: 18px;
  height: 18px;
}

.notif-bell.has-unread {
  color: var(--lime);
  border-color: rgba(163, 230, 53, .35);
  background: rgba(163, 230, 53, .06);
}

.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--lime), var(--accent-2));
  color: #052e1f;
  font-size: 10.5px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--bg), 0 4px 12px -2px rgba(163, 230, 53, .6);
  animation: notifPulse 2s ease-in-out infinite;
}

@keyframes notifPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}

.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, .85),
    0 0 0 1px rgba(163, 230, 53, .08);
  z-index: 60;
  display: none;
  overflow: hidden;
  animation: notifIn .2s ease;
}

.notif-panel.open { display: block; }

@keyframes notifIn {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime), var(--accent), transparent);
  opacity: .7;
}

.notif-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.2px;
}

.notif-clear {
  padding: 5px 11px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s ease;
}

.notif-clear:hover {
  color: var(--lime);
  border-color: rgba(163, 230, 53, .5);
  background: rgba(163, 230, 53, .06);
}

.notif-list {
  max-height: 440px;
  overflow-y: auto;
  padding: 4px 0;
}

.notif-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.notif-empty::before {
  content: '🔔';
  display: block;
  font-size: 32px;
  margin-bottom: 12px;
  opacity: .25;
}

.notif-item {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 12px;
  padding: 13px 18px;
  cursor: pointer;
  transition: background .15s ease;
  border-bottom: 1px dashed var(--border);
  align-items: flex-start;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(163, 230, 53, .04); }

.notif-item-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  flex-shrink: 0;
  transition: all .2s ease;
}

.notif-item.read .notif-item-dot {
  background: var(--muted);
  box-shadow: none;
}

.notif-item-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 5px;
}

.notif-item.read .notif-item-text {
  color: var(--muted-2);
}

.notif-item-meta {
  font-size: 11.5px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

.notif-item-id {
  color: var(--lime);
  font-weight: 700;
}

.notif-item.read .notif-item-id {
  color: var(--muted-2);
}

@media (max-width: 520px) {
  .notif-panel {
    position: fixed;
    top: auto;
    bottom: 16px;
    left: 16px;
    right: 16px;
    width: auto;
    max-height: 75vh;
  }
  .notif-list { max-height: calc(75vh - 60px); }
}
/* ============================================================
   СТАТУС «ОТМЕНЁН» + ДЕЙСТВИЯ В ТАБЛИЦЕ ЗАКАЗОВ ЗАКАЗЧИКА
   ============================================================ */

.badge.b-cancelled {
  background: rgba(148, 163, 184, .14);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, .35);
}
.badge.b-cancelled::before {
  box-shadow: none;
  opacity: .6;
}

/* Строка с отменённым заказом — приглушаем */
tbody tr.row-cancelled td {
  opacity: .65;
}

/* Действия в строке */
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
}

.row-actions .btn-sm {
  white-space: nowrap;
}

@media (max-width: 820px) {
  .row-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
/* ============================================================
   ЗАГРУЗКА ФАЙЛОВ
   ============================================================ */

.file-drop {
  display: block;
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-sm);
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(10, 16, 28, .4);
  transition: all .2s ease;
  position: relative;
}

.file-drop:hover,
.file-drop.dragover {
  border-color: rgba(163, 230, 53, .6);
  background: rgba(163, 230, 53, .04);
  box-shadow: inset 0 0 30px rgba(163, 230, 53, .06);
}

.file-drop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.file-drop-icon {
  font-size: 30px;
  line-height: 1;
  margin-bottom: 4px;
  filter: grayscale(.3);
}

.file-drop-text { display: flex; flex-direction: column; gap: 4px; }
.file-drop-text b { font-size: 14px; color: var(--text); font-weight: 600; }
.file-drop-text span { font-size: 12px; color: var(--muted); }

.file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.file-list:empty { margin-top: 0; }

.file-item {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(10, 16, 28, .5);
  font-size: 13px;
}

.file-item-icon { font-size: 15px; line-height: 1; opacity: .7; }

.file-item-name {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item-size {
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  white-space: nowrap;
}

.file-item-remove {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  display: grid;
  place-items: center;
  transition: all .15s ease;
}

.file-item-remove:hover {
  color: var(--danger);
  background: rgba(248, 113, 113, .1);
}

/* Иконка-скрепка в таблице заказов */
.attach-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--lime);
  background: rgba(163, 230, 53, .1);
  border: 1px solid rgba(163, 230, 53, .25);
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 3px;
}

/* Список вложений внутри модалки */
.order-files {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
}

.order-files-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 10px;
}

.order-file {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(10, 16, 28, .5);
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 6px;
  transition: all .18s ease;
}

.order-file:hover {
  border-color: rgba(163, 230, 53, .5);
  background: rgba(163, 230, 53, .05);
}

.order-file-icon { font-size: 15px; opacity: .7; text-align: center; }

.order-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-file-size {
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  white-space: nowrap;
}
/* ============================================================
   ПРАЙС-ЛИСТ И КАЛЬКУЛЯТОР
   ============================================================ */

.price-intro {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 16px 20px;
  background: rgba(163, 230, 53, .05);
  border: 1px solid rgba(163, 230, 53, .22);
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
  font-size: 13.5px;
  color: var(--muted-2);
}

.price-intro b { color: var(--lime); }

.price-intro-updated {
  font-size: 12px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

.price-cat {
  margin-bottom: 26px;
}

.price-cat-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--lime);
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.price-cat-title .count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.price-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.price-table th.right,
.price-table td.right { text-align: right; }

.price-table td {
  padding: 11px 10px;
  border-bottom: 1px dashed var(--border);
  vertical-align: middle;
}

.price-table tr:last-child td { border-bottom: none; }

.price-table .item-name {
  color: var(--text);
  font-weight: 600;
}

.price-table .item-note {
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 2px;
  font-weight: 400;
}

.price-table .item-unit {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.price-table .item-price {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}

.price-table .item-qty {
  width: 90px;
}

.price-table .item-qty input {
  width: 70px;
  padding: 6px 8px;
  font-size: 13px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}

.price-table .item-sum {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--lime);
  font-size: 14px;
  white-space: nowrap;
  min-width: 90px;
}

.price-table .item-sum.zero {
  color: var(--muted);
  font-weight: 500;
}

/* Итоговая панель */
.price-total-bar {
  position: sticky;
  bottom: 20px;
  z-index: 10;
  margin-top: 20px;
  padding: 18px 24px;
  background: linear-gradient(135deg,
    rgba(16, 185, 129, .12),
    rgba(163, 230, 53, .08));
  border: 1px solid rgba(163, 230, 53, .35);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 24px 60px -20px rgba(0, 0, 0, .7),
    0 0 0 1px rgba(163, 230, 53, .1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.price-total-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted-2);
  font-weight: 700;
  margin-bottom: 4px;
}

.price-total-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1px;
  color: #fff;
  line-height: 1;
}

.price-total-value span {
  color: var(--lime);
  font-size: 20px;
  margin-left: 4px;
}

.price-total-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Кнопки в панели итога */
.price-total-bar .btn-primary,
.price-total-bar .btn-ghost {
  padding: 11px 18px;
  font-size: 13.5px;
}

/* Блок управления прайсом (админ) */
.price-editor {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.price-editor-cat {
  background: rgba(10, 16, 28, .4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.price-editor-cat-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.price-editor-cat-name {
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .02);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #fff;
}

.price-editor-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-editor-item {
  display: grid;
  grid-template-columns: 2fr 90px 100px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: rgba(255, 255, 255, .015);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.price-editor-item input {
  padding: 8px 10px;
  font-size: 13px;
  border-radius: 7px;
}

.price-editor-item input[type="number"] {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

.price-editor-add {
  margin-top: 10px;
}

/* Мелочи */
.price-currency {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(163, 230, 53, .1);
  border: 1px solid rgba(163, 230, 53, .25);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--lime);
  font-weight: 700;
}

@media (max-width: 720px) {
  .price-editor-item {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .price-editor-item .del-btn { grid-column: 1 / -1; justify-self: end; }

  .price-total-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .price-total-actions { justify-content: center; }
}
/* ============================================================
   ЦЕНОВАЯ СТАТИСТИКА ЗАКАЗЧИКА
   ============================================================ */

.cost-hero {
  background: linear-gradient(135deg,
    rgba(16, 185, 129, .08),
    rgba(163, 230, 53, .04));
  border: 1px solid rgba(163, 230, 53, .25);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.cost-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime), var(--accent), transparent);
  opacity: .7;
}

.cost-hero-main { flex: 1 1 auto; }

.cost-hero-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted-2);
  font-weight: 700;
  margin-bottom: 8px;
}

.cost-hero-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1.5px;
  color: #fff;
  line-height: 1;
}

.cost-hero-value span {
  font-size: 22px;
  color: var(--lime);
  margin-left: 4px;
}

.cost-hero-sub {
  font-size: 13px;
  color: var(--muted-2);
  margin-top: 10px;
  line-height: 1.55;
}

.cost-hero-sub b { color: var(--lime); font-weight: 700; }

.cost-hero-badges {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
}

.cost-badge {
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 16, 28, .55);
  backdrop-filter: blur(12px);
  min-width: 140px;
}

.cost-badge-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.cost-badge-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

/* Таблица по материалам */
.cost-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.cost-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.cost-table th.right,
.cost-table td.right { text-align: right; }

.cost-table td {
  padding: 12px 12px;
  border-bottom: 1px dashed var(--border);
  vertical-align: middle;
}

.cost-table tr:last-child td { border-bottom: none; }

.cost-table .mat-name { color: var(--text); font-weight: 600; }
.cost-table .mat-count { color: var(--muted-2); font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.cost-table .mat-sum { color: var(--lime); font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 14px; }
.cost-table .mat-avg { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 12px; }

/* Плашка "нет данных" */
.cost-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13.5px;
}
.cost-empty::before {
  content: '💸';
  display: block;
  font-size: 32px;
  margin-bottom: 12px;
  opacity: .3;
}

/* Разделитель секций внутри вкладки */
.tab-section {
  margin-bottom: 32px;
}

.tab-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tab-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

@media (max-width: 820px) {
  .cost-hero {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
  }
  .cost-hero-value { font-size: 34px; }
  .cost-hero-badges { flex-direction: row; }
  .cost-badge { flex: 1; min-width: 0; }
}
/* ============================================================
   3D-ВЬЮВЕР
   ============================================================ */

.viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, .94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  animation: fadeIn .25s ease;
}

.viewer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(11, 18, 32, .85);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.viewer-head::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime), var(--accent), transparent);
  opacity: .5;
}

.viewer-title {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .3px;
  margin-bottom: 4px;
  word-break: break-all;
}

.viewer-hint {
  font-size: 12px;
  color: var(--muted);
}

.viewer-close {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  font-family: inherit;
  display: grid;
  place-items: center;
  transition: all .2s ease;
  flex-shrink: 0;
}

.viewer-close:hover {
  color: var(--danger);
  border-color: rgba(248, 113, 113, .5);
  background: rgba(248, 113, 113, .08);
}

.viewer-canvas {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.viewer-canvas canvas {
  display: block;
  outline: none;
}

.viewer-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted-2);
  font-size: 14px;
  z-index: 2;
  pointer-events: none;
}

.viewer-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(163, 230, 53, .18);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: viewerSpin 0.85s linear infinite;
}

@keyframes viewerSpin {
  to { transform: rotate(360deg); }
}

/* Кнопка 3D в списке файлов */
.view-3d-btn {
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(163, 230, 53, .08);
  border: 1px solid rgba(163, 230, 53, .3) !important;
  color: var(--lime) !important;
  border-radius: 6px;
  cursor: pointer;
  transition: all .18s ease;
}

.view-3d-btn:hover {
  background: rgba(163, 230, 53, .18);
  border-color: rgba(163, 230, 53, .6) !important;
  transform: scale(1.05);
}

.view-3d-btn svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 820px) {
  .viewer-head {
    padding: 12px 16px;
  }
  .viewer-title {
    font-size: 13px;
  }
  .viewer-hint {
    font-size: 11px;
  }
  .viewer-close {
    width: 36px;
    height: 36px;
  }
}
/* ============================================================
   КАРТОЧКА ЗАКАЗЧИКА (модалка админа) + СКИДКА
   ============================================================ */

.customer-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.customer-info-item {
  padding: 12px 16px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.customer-info-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 5px;
}

.customer-info-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}

.customer-info-value b { color: var(--lime); }

.discount-block {
  margin: 22px 0;
  padding: 22px 24px;
  background: linear-gradient(135deg,
    rgba(163, 230, 53, .08),
    rgba(16, 185, 129, .04));
  border: 1px solid rgba(163, 230, 53, .3);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.discount-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime), var(--accent), transparent);
  opacity: .7;
}

.discount-block-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--lime);
  font-weight: 700;
  margin-bottom: 14px;
}

.discount-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.discount-row label {
  font-size: 13.5px;
  color: var(--muted-2);
}

.discount-row input {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 16px;
  padding: 10px 12px;
}

.discount-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.discount-save {
  width: 100%;
  justify-content: center;
}

.customer-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.customer-stat {
  padding: 14px 16px;
  background: rgba(10, 16, 28, .5);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
}

.customer-stat-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.customer-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.customer-stat-value.lime { color: var(--lime); }

.customer-orders-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
  font-weight: 700;
  margin: 20px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}

.customer-orders {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.customer-order-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}

.customer-order-row .id-cell { font-size: 12px; }

.customer-order-row .order-price {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--lime);
  font-size: 13px;
  white-space: nowrap;
}

.customer-order-row .order-price-old {
  font-size: 11px;
  color: var(--muted);
  text-decoration: line-through;
  margin-right: 5px;
}

/* Баннер скидки в кабинете заказчика */
.discount-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  background: linear-gradient(135deg,
    rgba(163, 230, 53, .12),
    rgba(16, 185, 129, .06));
  border: 1px solid rgba(163, 230, 53, .35);
  border-radius: var(--radius);
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}

.discount-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime), var(--accent), transparent);
  opacity: .7;
}

.discount-banner-icon {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(163, 230, 53, .5));
}

.discount-banner-text { flex: 1; }

.discount-banner-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.discount-banner-sub {
  font-size: 12.5px;
  color: var(--muted-2);
}

.discount-banner-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 700;
  color: var(--lime);
  letter-spacing: -1px;
}

.cost-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.cost-breakdown-item {
  padding: 14px 16px;
  background: rgba(10, 16, 28, .5);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.cost-breakdown-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.cost-breakdown-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.cost-breakdown-value.lime   { color: var(--lime); }
.cost-breakdown-value.muted  { color: var(--muted-2); text-decoration: line-through; }
.cost-breakdown-value.danger { color: #fbbf24; }

@media (max-width: 720px) {
  .customer-info-grid,
  .customer-stats,
  .cost-breakdown { grid-template-columns: 1fr; }

  .discount-row { grid-template-columns: 1fr; }

  .customer-order-row { grid-template-columns: 1fr auto; }
  .customer-order-row .id-cell { grid-column: 1 / -1; }
}
/* ============================================================
   ЧАТ
   ============================================================ */
.chat-wrap {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: calc(100vh - 240px);
  min-height: 480px;
  backdrop-filter: blur(16px);
}

.chat-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 16, 28, .5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  position: relative;
}

.chat-head::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime), var(--accent), transparent);
  opacity: .4;
}

.chat-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}

.chat-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--lime);
  font-weight: 600;
  white-space: nowrap;
}

.chat-status::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--lime);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-msg {
  max-width: 72%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.theirs { align-self: flex-start; }

.chat-author {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  padding: 0 6px;
}

.chat-bubble {
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-width: 100%;
}

.chat-msg.mine .chat-bubble {
  background: linear-gradient(135deg, var(--lime), var(--accent-2));
  color: #052e1f;
  border-bottom-right-radius: 4px;
  box-shadow: 0 6px 18px -8px rgba(163, 230, 53, .5);
}

.chat-msg.theirs .chat-bubble {
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-time {
  font-size: 10.5px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  padding: 0 6px;
}

.chat-empty {
  margin: auto;
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13.5px;
}

.chat-empty::before {
  content: '💬';
  display: block;
  font-size: 40px;
  margin-bottom: 14px;
  opacity: .3;
}

.chat-input-bar {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(10, 16, 28, .55);
  border-top: 1px solid var(--border);
  align-items: flex-end;
  flex-shrink: 0;
}

.chat-input-bar textarea {
  flex: 1;
  resize: none;
  min-height: 42px;
  max-height: 160px;
  padding: 11px 14px;
  font-size: 14px;
  line-height: 1.4;
  font-family: inherit;
  border-radius: 10px;
}

.chat-input-bar button {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.chat-input-bar button svg { width: 18px; height: 18px; }

/* Список чатов (админ) */
.chats-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  height: calc(100vh - 240px);
  min-height: 480px;
}

.chats-list {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-y: auto;
  backdrop-filter: blur(16px);
}

.chat-list-item {
  padding: 14px 18px;
  border-bottom: 1px dashed var(--border);
  cursor: pointer;
  transition: background .15s ease;
}

.chat-list-item:hover { background: rgba(255,255,255,.03); }
.chat-list-item.active {
  background: rgba(163, 230, 53, .08);
  border-left: 3px solid var(--lime);
}
.chat-list-item:last-child { border-bottom: none; }

.chat-list-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.chat-list-unread {
  background: linear-gradient(135deg, var(--lime), var(--accent-2));
  color: #052e1f;
  font-size: 10.5px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.chat-list-last {
  font-size: 12.5px;
  color: var(--muted-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-time {
  font-size: 10.5px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 4px;
}

@media (max-width: 820px) {
  .chats-layout { grid-template-columns: 1fr; }
  .chats-list { max-height: 240px; }
  .chat-msg { max-width: 88%; }
  .chat-wrap { height: calc(100vh - 200px); }
}