/* Личный кабинет FluxData (2026-10-01): тёмная тема, бирюзовый акцент, стеклянные панели.
   Свечение -- только у главного действия, прогресса и ключевых цифр; таблицы спокойные и контрастные.
   Классы, которые создаёт app.js (.chip, .hint, .autocomplete-results, .ticker-item, .ticker-city), сохранены. */
:root {
  color-scheme: dark;
  --bg: #060C14;
  --panel: rgba(13, 26, 39, 0.82);
  --panel-solid: #0D1A27;
  --field: #081420;
  --line: rgba(54, 215, 232, 0.16);
  --line-soft: rgba(54, 215, 232, 0.08);
  --accent: #36D7E8;
  --accent-ink: #04121C;
  --accent-soft: rgba(54, 215, 232, 0.12);
  --accent-line: rgba(54, 215, 232, 0.40);
  --blue: #4C8DFF;
  --text: #E4EEF5;
  --text-2: #B7C6D2;
  --muted: #8197AB;
  --dim: #6F8597;
  --off: #4E6275;
  --ok: #3DD68C;
  --warn: #F2B84B;
  --bad: #F0716B;
  --display: 'Unbounded', 'Segoe UI', sans-serif;
  --body: 'Manrope', 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(1100px 420px at 50% -8%, rgba(54, 215, 232, 0.13), rgba(54, 215, 232, 0) 70%),
    linear-gradient(rgba(54, 215, 232, 0.035) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(54, 215, 232, 0.035) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #8BEAF4; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1280px; margin: 0 auto; padding-inline: 24px; }

/* Шапка */
header.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(6, 12, 20, 0.6);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.topbar-left { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-text { display: flex; flex-direction: column; gap: 1px; }
/* Логотип: по волнам «текут данные» -- бегущие импульсы и частицы (см. templates/_logo.html). */
.logo-wave { overflow: visible; flex-shrink: 0; }
.logo-flow { animation: logo-flow 1.3s linear infinite; }
.logo-flow.slow { animation-duration: 2.1s; }
.logo-flow.fast { animation-duration: 0.9s; }
@keyframes logo-flow { to { stroke-dashoffset: -32; } }
.brand:hover .logo-flow { animation-duration: 0.6s; }
.logo-spark { animation: logo-spark 2.4s ease-in-out infinite; opacity: 0; }
.logo-spark.s2 { animation-delay: 0.6s; }
.logo-spark.s3 { animation-delay: 1.2s; }
.logo-spark.s4 { animation-delay: 1.8s; }
@keyframes logo-spark { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
/* Надпись логотипа: FLUXDATA заглавными, жирный курсив Exo 2; FLUX -- светло-голубой градиент, DATA -- бирюза. */
.brand-name {
  font-family: 'Exo 2', var(--display); font-weight: 800; font-style: italic; font-size: 23px; line-height: 1;
  letter-spacing: 0.03em; text-transform: uppercase;
  background: linear-gradient(180deg, #F2F8FF 0%, #A9C8F5 100%); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.brand-name span {
  background: linear-gradient(180deg, #7FF0FF 0%, #22BFD6 100%); -webkit-background-clip: text; background-clip: text;
  color: transparent; text-shadow: none; filter: drop-shadow(0 0 6px rgba(54, 215, 232, 0.35));
}
.brand-sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--dim); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { padding: 9px 15px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); border: 1px solid transparent; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); background: var(--accent-soft); border-color: rgba(54, 215, 232, 0.30); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--panel-solid); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.user-chip .avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--accent), var(--blue)); color: var(--accent-ink); font-weight: 700; font-size: 13px; text-transform: uppercase; }
.topbar-right .logout { font-size: 13px; color: var(--muted); }

main { max-width: 1280px; margin: 0 auto; padding: 28px 24px 56px; display: flex; flex-direction: column; gap: 22px; }
h1 { font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.25; margin: 0; text-wrap: balance; }
h2 { font-size: 17px; font-weight: 700; margin: 0; }
h3 { font-size: 15px; font-weight: 700; margin: 0; }
p { margin: 0; }
.page-head { display: flex; flex-direction: column; gap: 8px; }
.page-head .sub { color: var(--muted); font-size: 15px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.eyebrow.accent { color: var(--accent); }
.hint { color: var(--dim); font-size: 13px; line-height: 1.5; }
.error { padding: 12px 16px; border-radius: 12px; color: #FFD7D4; background: rgba(240, 113, 107, 0.12); border: 1px solid rgba(240, 113, 107, 0.40); }
.notice { padding: 12px 16px; border-radius: 12px; color: #D3F8E4; background: rgba(61, 214, 140, 0.10); border: 1px solid rgba(61, 214, 140, 0.35); }

/* Панели */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px 26px; display: flex; flex-direction: column; gap: 16px; }
.card.glow { background: linear-gradient(165deg, rgba(54, 215, 232, 0.15), rgba(13, 26, 39, 0.9) 55%); border-color: rgba(54, 215, 232, 0.55); box-shadow: 0 0 0 1px rgba(54, 215, 232, 0.08), 0 0 38px rgba(54, 215, 232, 0.16); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.grid-3 { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; align-items: start; }
.big-number { font-family: var(--display); font-weight: 600; font-size: 42px; line-height: 1.1; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv span:first-child { color: var(--muted); }
.kv b { font-family: var(--mono); font-weight: 500; color: var(--text); }
.divider { border-top: 1px solid var(--line-soft); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 11px; border: 1px solid transparent; font-family: var(--body); font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; color: var(--accent-ink); background: var(--accent); box-shadow: 0 0 22px rgba(54, 215, 232, 0.35); }
.btn:hover { color: var(--accent-ink); background: #6BE3F0; }
.btn.lg { padding: 14px 24px; font-size: 16px; border-radius: 12px; }
.btn.secondary { color: var(--text); background: rgba(76, 141, 255, 0.14); border-color: rgba(76, 141, 255, 0.45); box-shadow: none; }
.btn.secondary:hover { background: rgba(76, 141, 255, 0.24); color: var(--text); }
.btn.ghost { color: var(--text-2); background: transparent; border-color: rgba(129, 151, 171, 0.32); box-shadow: none; }
.btn.ghost:hover { color: var(--text); border-color: var(--accent-line); background: transparent; }
.btn.disabled, .btn[aria-disabled="true"] { color: var(--off); background: rgba(78, 98, 117, 0.14); border-color: rgba(78, 98, 117, 0.30); box-shadow: none; cursor: not-allowed; pointer-events: none; }
.btn.sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Поля */
form { display: flex; flex-direction: column; gap: 14px; }
form.inline { display: inline; }
label { font-size: 13px; font-weight: 600; color: var(--text-2); }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
input[type=text], input[type=password], input[type=number], input[type=email], select, textarea {
  width: 100%; padding: 12px 15px; border-radius: 11px; border: 1px solid rgba(54, 215, 232, 0.25);
  background: var(--field); color: var(--text); font-family: var(--body); font-size: 15px;
}
input::placeholder, textarea::placeholder { color: var(--off); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(54, 215, 232, 0.15); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: flex; gap: 10px; align-items: stretch; }
.field-row input { flex: 1; }

/* Чипы (создаёт app.js) */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 14px; color: #CFF7FB; background: var(--accent-soft); border: 1px solid rgba(54, 215, 232, 0.35); }
.chip button { border: none; background: none; cursor: pointer; color: var(--accent); font-weight: 700; font-size: 15px; padding: 0; line-height: 1; }
#city-chips .chip, #region-chips .chip { color: #DCE7F0; background: rgba(76, 141, 255, 0.12); border-color: rgba(76, 141, 255, 0.35); }
#city-chips .chip button, #region-chips .chip button { color: #7FA6E6; }
.autocomplete-results { border: 1px solid var(--line); border-radius: 11px; max-height: 200px; overflow-y: auto; background: var(--panel-solid); }
.autocomplete-results:empty { display: none; }
.autocomplete-results div { padding: 9px 14px; cursor: pointer; font-size: 14px; color: var(--text-2); }
.autocomplete-results div:hover { background: var(--accent-soft); color: var(--text); }
.autocomplete-results.tall { max-height: 420px; }

/* Статусы */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.running { color: var(--warn); background: rgba(242, 184, 75, 0.12); border: 1px solid rgba(242, 184, 75, 0.35); }
.pill.done { color: var(--ok); background: rgba(61, 214, 140, 0.10); border: 1px solid rgba(61, 214, 140, 0.35); }
.pill.wait { color: var(--muted); background: rgba(129, 151, 171, 0.10); border: 1px solid rgba(129, 151, 171, 0.30); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--text-2); background: rgba(129, 151, 171, 0.15); }
.badge.done, .badge.success, .badge.active { color: var(--ok); background: rgba(61, 214, 140, 0.12); }
.badge.pending, .badge.running { color: var(--warn); background: rgba(242, 184, 75, 0.12); }
.badge.failed, .badge.error { color: var(--bad); background: rgba(240, 113, 107, 0.12); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--ok); box-shadow: 0 0 12px rgba(61, 214, 140, 0.7); }
.dot.warn { background: var(--warn); box-shadow: 0 0 12px rgba(242, 184, 75, 0.6); }

/* Этапы и полоски */
.bar { height: 7px; border-radius: 4px; background: rgba(129, 151, 171, 0.15); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--blue); transition: width 0.6s ease; }
.bar > i.ok { background: var(--ok); }
.bar > i.live { background: var(--accent); box-shadow: 0 0 10px rgba(54, 215, 232, 0.6); }
.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stage { padding: 15px 16px; border-radius: 14px; background: rgba(13, 26, 39, 0.6); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; }
.stage.current { background: rgba(54, 215, 232, 0.07); border-color: rgba(54, 215, 232, 0.35); }
.stage-title { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; }
.stage-num { font-family: var(--mono); font-size: 21px; }
.stage-num small { font-size: 13px; color: var(--dim); }
.stage-list { display: flex; flex-direction: column; gap: 16px; }
.stage-row { display: grid; grid-template-columns: 34px minmax(140px, 220px) 1fr 120px; align-items: center; gap: 16px; }
.stage-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 13px; color: var(--muted); border: 1px solid rgba(129, 151, 171, 0.30); }
.stage-icon.ok { background: rgba(61, 214, 140, 0.14); border-color: rgba(61, 214, 140, 0.45); }
.stage-icon.live { color: var(--accent); border-color: rgba(54, 215, 232, 0.50); box-shadow: 0 0 12px rgba(54, 215, 232, 0.30); }
.stage-name { display: flex; flex-direction: column; gap: 1px; }
.stage-name b { font-size: 15px; font-weight: 600; }
.stage-name span { font-size: 12px; color: var(--dim); }
.stage-count { font-family: var(--mono); font-size: 14px; text-align: right; }

/* Прогресс-кольцо */
.ring-card { align-items: center; text-align: center; }
.ring { position: relative; width: 190px; height: 190px; }
.ring svg { width: 190px; height: 190px; transform: rotate(-90deg); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.ring-center b { font-family: var(--display); font-weight: 600; font-size: 38px; }
.ring-center span { font-size: 13px; color: var(--muted); }

/* Качество */
.quality { display: flex; flex-direction: column; gap: 12px; }
.quality-row { display: grid; grid-template-columns: 130px 1fr 52px; align-items: center; gap: 14px; font-size: 14px; }
.quality-row span:first-child { color: var(--text-2); }
.quality-row b { font-family: var(--mono); font-weight: 500; text-align: right; }
.quality-inline { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.quality-inline b { font-family: var(--mono); color: var(--text); font-weight: 500; }

/* Города */
.city-row { display: grid; grid-template-columns: 1fr 70px 1.3fr; align-items: center; gap: 14px; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.city-row:last-child { border-bottom: none; padding-bottom: 0; }
.city-row b { font-weight: 600; }
.city-row .mono { font-size: 14px; }
.city-row .note { font-size: 12px; color: var(--dim); }
.city-row .note.accent { color: var(--accent); }

/* Список заказов */
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-row { display: grid; grid-template-columns: 76px minmax(0, 1.6fr) minmax(0, 0.9fr) minmax(0, 1.5fr) auto; align-items: center; gap: 20px; padding: 17px 22px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.order-row:hover { border-color: rgba(54, 215, 232, 0.35); }
.order-id { font-family: var(--mono); font-size: 14px; color: var(--accent); }
.order-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.order-title a { font-size: 15px; font-weight: 700; color: var(--text); }
.order-title a:hover { color: var(--accent); }
.order-title span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-count { display: flex; flex-direction: column; gap: 2px; }
.order-count b { font-family: var(--mono); font-size: 16px; font-weight: 500; }
.order-count span { font-size: 12px; color: var(--dim); }
.order-count span.accent { color: var(--accent); }

/* Активный заказ на дашборде */
.active-order { gap: 20px; }
.active-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.active-title { display: flex; flex-direction: column; gap: 6px; }
.active-title-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Таблица компаний */
.table-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table-tools input[type=text] { width: 230px; padding: 9px 12px; font-size: 13px; border-radius: 9px; }
.filter { padding: 7px 12px; border-radius: 999px; font-family: var(--body); font-size: 12px; font-weight: 600; color: var(--muted); background: transparent; border: 1px solid rgba(129, 151, 171, 0.30); cursor: pointer; }
.filter[aria-pressed="true"] { color: #CFF7FB; background: var(--accent-soft); border-color: rgba(54, 215, 232, 0.40); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; font-size: 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.10em; text-transform: uppercase; color: var(--dim); border-bottom-color: var(--line); white-space: nowrap; }
tr:hover td { background: rgba(54, 215, 232, 0.03); }
td.name { font-weight: 600; min-width: 180px; max-width: 300px; }
td .sub { display: block; font-family: var(--mono); font-size: 12px; color: var(--dim); font-weight: 400; }
td .none { color: var(--off); }
td.phone { font-family: var(--mono); font-size: 13px; }
td.phone span { display: block; white-space: nowrap; }
td.phone .more { font-family: var(--body); font-size: 12px; color: var(--dim); }
.channels { display: flex; gap: 5px; flex-wrap: wrap; }
.channel { padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #CFE0FF; background: rgba(76, 141, 255, 0.18); }
.channel.tg { color: #DCE7F0; background: rgba(129, 151, 171, 0.22); }
.channel.wa { color: #D3F8E4; background: rgba(61, 214, 140, 0.16); }
.channel.max { color: #E9DDFF; background: rgba(155, 125, 255, 0.18); }
.channel.mail { color: #CFF7FB; background: rgba(54, 215, 232, 0.16); }

/* Бегущая строка (создаёт app.js) */
.ticker { display: flex; align-items: center; gap: 18px; overflow: hidden; white-space: nowrap; padding: 13px 20px; border-radius: 14px; background: rgba(13, 26, 39, 0.6); border: 1px solid rgba(54, 215, 232, 0.12); }
.ticker-label { flex-shrink: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--accent); }
.ticker-window { overflow: hidden; flex: 1; }
.ticker-track { display: inline-block; white-space: nowrap; animation: ticker-scroll 40s linear infinite; }
.ticker-item { display: inline-block; padding: 0 22px; font-size: 13px; color: var(--text-2); border-right: 1px solid rgba(54, 215, 232, 0.12); }
.ticker-item .ticker-city { color: var(--dim); }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Вход и регистрация */
.auth { min-height: calc(100vh - 120px); display: flex; align-items: center; justify-content: center; }
.auth .card { width: 100%; max-width: 420px; }
.auth-brand { display: flex; justify-content: center; margin-bottom: 6px; }

.pagination { display: flex; gap: 10px; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }

@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-3 > :first-child { grid-column: 1 / -1; }
  .split { grid-template-columns: 1fr; }
  .order-row { grid-template-columns: 70px minmax(0, 1fr) auto; }
  .order-row .quality-inline { grid-column: 2 / -1; }
}
@media (max-width: 760px) {
  main { padding: 20px 16px 40px; }
  header.topbar { position: static; }
  .topbar-inner { padding: 12px 16px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-row { grid-template-columns: 34px 1fr 90px; }
  .stage-row .bar { grid-column: 2 / -1; }
  .order-row { grid-template-columns: 1fr; gap: 10px; }
  .order-row .quality-inline { grid-column: auto; }
  .user-chip .email { display: none; }
  h1 { font-size: 23px; }
  .big-number { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .bar > i { transition: none; }
  .logo-flow { animation: none; }
  .logo-particles { display: none; }
  .logo-spark { animation: none; opacity: 0.7; }
}
