/* Лидоруб — мини-апп. Дизайн по макету «Лидоруб — макет панели»:
   тёмный неон, Montserrat + Caveat, оранжевое свечение, salyami red. */

:root {
  --bg: #0E0E0F;
  --ink: #F5F5F6;
  --muted: #B9BBC2;
  --muted2: #8D9099;
  --line: rgba(255, 255, 255, 0.13);
  --card-line: rgba(255, 255, 255, 0.09);
  --glass: rgba(255, 255, 255, 0.06);
  --orange: #FF9229;
  --orange-soft: #FFA54F;
  --red: #FF4D66;
  --gold1: #FFDC7C;
  --gold3: #FFC740;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 22px;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; }
button { font-family: inherit; }
::placeholder { color: var(--muted2); opacity: 1; }

/* Фон-«подложка»: оранжевое свечение + металлический отблеск (без растровой текстуры) */
.ground {
  position: fixed; inset: 0; z-index: -2;
  background-color: var(--bg);
  background-image:
    radial-gradient(70% 22% at 30% 8%, rgba(178, 80, 18, 0.55) 0%, rgba(0,0,0,0) 74%),
    linear-gradient(118deg, rgba(120,120,124,0) 0%, rgba(120,120,124,0.35) 24%, rgba(120,120,124,0) 50%);
}
.ground.splash {
  background-image:
    radial-gradient(88% 31% at 50% 35%, rgba(178, 80, 18, 0.6) 0%, rgba(178,80,18,0) 74%),
    linear-gradient(118deg, rgba(120,120,124,0) 10%, rgba(120,120,124,0.4) 40%, rgba(120,120,124,0) 70%);
}
.ground-dim { position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.18) 45%, rgba(0,0,0,0.45) 100%); }

/* Экран-телефон */
.screen { position: relative; min-height: 100vh; display: flex; flex-direction: column; }
.pad-bottom { padding-bottom: 92px; } /* под нижнюю навигацию */

/* Заголовки */
.neon {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800; letter-spacing: 0.01em; text-transform: uppercase; white-space: nowrap;
  color: var(--orange);
  text-shadow:
    0 0 2px #FFA347, 0 0 6px rgba(255,105,10,1), 0 0 14px rgba(250,95,5,0.9),
    0 0 28px rgba(240,85,0,0.7), 0 0 48px rgba(228,76,0,0.45);
}
.neon.xl { font-size: 64px; line-height: 60px; }
.neon.lg { font-size: 44px; line-height: 46px; }
.script {
  margin: 0; font-family: 'Caveat', cursive; font-weight: 600; color: var(--red);
  text-shadow: 0 0 6px rgba(215,20,50,0.9), 0 0 18px rgba(200,15,45,0.55);
  transform: rotate(-5deg); transform-origin: 0% 100%; white-space: nowrap;
}
.script.md { font-size: 32px; line-height: 36px; }
.script.sm { font-size: 28px; line-height: 32px; }

.app-header { flex-shrink: 0; padding: 16px 20px 0; display: flex; flex-direction: column; gap: 14px; }
.listen { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: #E9E9EC; font-weight: 500; }
.listen .dot { width: 7px; height: 7px; border-radius: 50%; background: #FFC98A; box-shadow: 0 0 2px #FFC98A, 0 0 10px #FF7A1A; }
.title-row { display: flex; align-items: flex-end; gap: 14px; }

main.content { flex-grow: 1; min-height: 0; padding: 18px 16px 0; display: flex; flex-direction: column; gap: 14px; }

/* Кнопки */
.btn { height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass);
  color: var(--ink); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; padding: 0 16px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,0.07); }
.btn:active { transform: translateY(1px); }
.btn.gold { border: none; color: #1C1300; font-weight: 700;
  background: linear-gradient(180deg, var(--gold1) 0%, #FFD360 46%, var(--gold3) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -1px 0 rgba(170,95,0,0.3),
    0 0 3px rgba(255,190,90,0.9), 0 0 14px rgba(255,120,20,0.6), 0 0 30px rgba(240,85,0,0.32); }
.btn.grow { flex-grow: 1; }
.btn.icon { width: 46px; flex-shrink: 0; padding: 0; color: var(--muted); }
.btn.tall { height: 50px; }
.btn.ghost { background: transparent; border: none; color: var(--muted); }
.row { display: flex; gap: 8px; }

/* Карточки лида */
.card { border-radius: 22px; background: linear-gradient(180deg, #1D1E22 0%, #141517 100%);
  border: 1px solid var(--card-line); box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 28px 44px -30px rgba(0,0,0,0.95);
  padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.hot-wrap { border: none; padding: 1px; border-radius: 23px;
  background: linear-gradient(140deg, #FFA54F 0%, rgba(255,150,60,0.5) 20%, rgba(255,255,255,0.16) 55%, rgba(255,255,255,0.06) 100%);
  box-shadow: 0 22px 46px -26px rgba(255,110,20,0.6), 0 0 28px -12px rgba(255,110,20,0.6); }
.card.hot-wrap > .inner { border-radius: 22px; background: linear-gradient(180deg, #231D19 0%, #151517 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; }
.card-meta .chat { flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.card-meta .time { flex-shrink: 0; color: var(--muted2); }
.card-meta .time.hot { color: var(--orange-soft); }
.card-name { display: flex; align-items: baseline; gap: 8px; }
.card-name b { font-size: 17px; line-height: 24px; font-weight: 600; }
.card-name span { font-size: 13px; color: var(--muted); }
.card-text { margin: 0; font-size: 14px; line-height: 22px; color: var(--ink); }
.card-text mark { background: rgba(255,130,30,0.2); color: #FFDDB8; border-radius: 6px; padding: 2px 5px; }
.keys { display: flex; flex-wrap: wrap; gap: 6px; }
.keys .k { font-size: 12px; color: var(--muted); background: rgba(255,255,255,0.06); border-radius: 8px; padding: 4px 9px; white-space: nowrap; }

/* Сегмент-переключатель (фильтр / режим черновика) */
.seg { display: flex; height: 48px; border-radius: 16px; background: rgba(14,14,16,0.82);
  border: 1px solid rgba(255,255,255,0.11); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
.seg button { flex: 1 1 0; height: 46px; border: none; background: transparent; padding: 4px;
  color: #C9CBD1; font-size: 13px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.seg button .pill { width: 100%; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button[aria-pressed="true"] .pill {
  background: linear-gradient(180deg, rgba(255,140,40,0.3) 0%, rgba(255,105,15,0.16) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,160,70,0.62), inset 0 1px 0 rgba(255,225,190,0.28), 0 0 16px rgba(255,120,20,0.3);
  color: #FFE9D2; font-weight: 700; }
.seg .count { color: var(--muted2); font-weight: 600; }
.seg button[aria-pressed="true"] .count { color: #FFB56B; }

/* Переключатель on/off */
.toggle { width: 44px; height: 26px; border-radius: 13px; padding: 0 3px; display: flex; align-items: center;
  background: rgba(255,255,255,0.14); cursor: pointer; border: none; transition: background .15s; }
.toggle .knob { width: 20px; height: 20px; border-radius: 50%; background: #FFF; transition: transform .15s; }
.toggle[aria-checked="true"] { background: linear-gradient(180deg, #FFB45A 0%, #FF8A1F 100%);
  box-shadow: inset 0 1px 0 rgba(255,230,200,0.5), 0 0 12px rgba(255,120,20,0.5); }
.toggle[aria-checked="true"] .knob { transform: translateX(18px); }

/* Строка настройки */
.set-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07); }
.set-row .label { flex-grow: 1; min-width: 0; }
.set-row .label b { font-size: 14px; font-weight: 600; display: block; }
.set-row .label span { font-size: 12px; color: var(--muted); }

.section-h { margin: 0 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted2); }
.hint { margin: 0 4px; display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 16px; color: var(--muted); }
.icon-btn-44 { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(14,14,16,0.6); color: #E9E9EC; display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07); cursor: pointer; }

textarea, input.text { width: 100%; border: 1px solid rgba(255,255,255,0.14); border-radius: 14px;
  background: rgba(14,14,16,0.72); color: var(--ink); font-family: inherit; font-size: 14px; line-height: 20px;
  padding: 10px 14px; outline: none; resize: none; }

/* Нижняя навигация */
.nav-fade { position: fixed; left: 0; right: 0; bottom: 0; height: 120px; z-index: 4; pointer-events: none;
  background: linear-gradient(180deg, rgba(12,12,14,0) 0%, rgba(12,12,14,0.82) 42%, #0C0C0E 74%); }
.nav { position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 5; height: 64px; border-radius: 24px;
  background: rgba(24,25,28,0.95); backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,0.11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 24px 40px -16px rgba(0,0,0,0.95); display: flex; padding: 0 6px; }
.nav a { flex: 1 1 0; display: flex; align-items: center; justify-content: center; }
.nav a .lbl { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 10px;
  font-size: 11px; line-height: 14px; color: var(--muted2); font-weight: 500; border-radius: 16px; position: relative; }
.nav a.active .lbl { background: rgba(255,130,30,0.16); box-shadow: inset 0 1px 0 rgba(255,225,190,0.16); color: #FFDDB8; font-weight: 600; }
.nav a.active svg { filter: drop-shadow(0 0 5px rgba(255,120,20,0.9)); }
.badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #FF8A1F; box-shadow: 0 0 0 2px #18191C, 0 0 10px rgba(255,120,20,0.85); color: #1C1300;
  font-size: 10px; line-height: 18px; font-weight: 800; text-align: center; }

/* Сплэш */
.splash-wrap { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.splash-logo { text-align: center; }
.splash-logo .script { position: relative; display: inline-block; transform: rotate(-8deg); color: #FFF;
  text-shadow: 0 0 4px #FFF, 0 0 9px rgba(255,255,255,0.8), 0 0 18px rgba(255,255,255,0.5); margin-top: -8px; }
.loader { position: absolute; left: 60px; right: 60px; bottom: 96px; display: flex; flex-direction: column; gap: 12px; }
.loader .bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.18); overflow: hidden; }
.loader .bar > i { display: block; height: 4px; border-radius: 2px; width: 30%;
  background: var(--orange); box-shadow: 0 0 9px rgba(250,95,5,0.9); animation: load 1.4s ease-in-out infinite; }
@keyframes load { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }
.loader p { margin: 6px 0 0; text-align: center; color: #C9CBD1; }

/* Прочее */
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 20;
  background: rgba(24,25,28,0.98); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px;
  font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,0.6); opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.spin { width: 28px; height: 28px; border: 3px solid rgba(255,255,255,0.15); border-top-color: var(--orange);
  border-radius: 50%; animation: sp 0.8s linear infinite; margin: 40px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
.back { display: inline-flex; align-items: center; gap: 10px; color: #C9CBD1; font-size: 14px; font-weight: 600; cursor: pointer; background: none; border: none; padding: 0; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { border-radius: 18px; background: var(--glass); border: 1px solid var(--card-line); padding: 14px; }
.stat b { font-size: 28px; font-weight: 800; color: var(--orange-soft); display: block; }
.stat span { font-size: 12px; color: var(--muted); }
