/* HAZ PANEL — dark theme, primary #1ac071 */
:root {
  --bg: #080a09;
  --surface: #0f1311;
  --surface-2: #151a17;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #f1f5f3;
  --muted: #8b958f;
  --primary: #1ac071;
  --primary-hover: #35d689;
  --primary-ink: #03140b;
  --primary-soft: rgba(26, 192, 113, .12);
  --primary-line: rgba(26, 192, 113, .35);
  --danger: #ef5b5b;
  --warn: #f0a93b;
  --info: #6d9bff;
  --radius: 14px;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased;
  min-height: 100vh; position: relative;
}
body::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 760px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, rgba(26, 192, 113, .20), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(#000 40%, transparent);
  mask-image: linear-gradient(#000 40%, transparent);
  opacity: .55;
}
body.app::before { display: none; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.container { width: min(1200px, 100% - 48px); margin-inline: auto; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 12px; border: 1px solid transparent;
  font: 600 15px/1.2 var(--font); cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); color: var(--primary-ink); }
.btn-ghost { background: rgba(255, 255, 255, .03); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary-line); color: var(--text); }
.btn-lg { padding: 17px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(8, 10, 9, .8); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; letter-spacing: .02em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: #e9f3ee; flex: none; }
.brand-mark img { width: 28px; height: 28px; object-fit: contain; }
.brand-name { font-size: 21px; }
.nav-links { display: flex; gap: 34px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.active { color: var(--text); border-color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); color: var(--text); width: 40px; height: 40px; border-radius: 10px; cursor: pointer; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding: 72px 0 56px; }
.hero h1 { font-size: clamp(36px, 5vw, 60px); font-weight: 800; }
.hero h1 .accent { color: var(--primary); }
.lead { color: var(--muted); font-size: 16px; margin: 22px 0 30px; max-width: 54ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { display: flex; align-items: center; gap: 10px; margin-top: 26px; color: var(--muted); font-size: 13px; }
.hero-note i { color: var(--primary); }

/* Auth card */
.card-auth { background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); border: 1px solid var(--primary-line); border-radius: 22px; padding: 38px; box-shadow: 0 30px 80px -40px rgba(26, 192, 113, .45); }
.card-auth h2 { font-size: 29px; font-weight: 700; }
.card-auth .sub { color: var(--muted); font-size: 15px; margin: 6px 0 26px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: #c8d1cc; margin-bottom: 8px; }
.input, select.input, textarea.input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text);
  border-radius: 12px; padding: 15px 16px; font: 400 16px var(--font); transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-foot { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }
.form-foot i { color: var(--primary); margin-right: 6px; }
.alert { padding: 13px 16px; border-radius: 12px; font-size: 15px; margin-bottom: 16px; border: 1px solid; }
.alert-error { background: rgba(239, 91, 91, .08); border-color: rgba(239, 91, 91, .35); color: #ffb4b4; }
.alert-success { background: var(--primary-soft); border-color: var(--primary-line); color: #bfeed6; }
.alert ul { margin: 0; padding-left: 18px; }

.auth-page { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 480px); gap: 100px; align-items: center; justify-content: center; padding: 64px 0 100px; }
.auth-page.solo { grid-template-columns: minmax(0, 500px); }
.auth-side h2 { font-size: 38px; font-weight: 800; }
.auth-side h2 .accent { color: var(--primary); }
.auth-side p { color: var(--muted); font-size: 16px; margin: 12px 0 28px; }
.tick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.tick-list li { display: flex; gap: 16px; align-items: center; color: var(--muted); font-size: 15px; }
.tick-list b { color: var(--text); }

/* Icon tile */
.ico { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--primary); font-size: 18px; }

/* Platforms strip */
.platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 34px; padding: 22px 0 56px; color: #3f4944; font-size: 24px; }
.platforms i { transition: color .15s; }
.platforms i:hover { color: var(--primary); }

/* Sections */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }
.section-head p { color: var(--muted); margin-top: 12px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 12px; font-weight: 600; color: #c8d1cc; margin-bottom: 18px; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 10px var(--primary); }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 12px; text-align: center; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; top: 0; left: 20%; right: 20%; height: 1px; background: linear-gradient(90deg, transparent, var(--primary), transparent); }
.stat b { display: block; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 17px; font-weight: 700; margin: 16px 0 8px; }
.card p { color: var(--muted); font-size: 14px; }
.card:hover { border-color: var(--primary-line); }
.svc-card .head { display: flex; align-items: center; gap: 14px; }
.svc-card .head h3 { margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; max-width: 900px; margin: 0 auto; }
.step { text-align: center; padding: 0 12px; position: relative; }
.step .ico { width: 54px; height: 54px; margin: 0 auto 16px; font-size: 20px; }
.step h3 { font-size: 17px; font-weight: 700; }
.step p { color: var(--muted); font-size: 14px; margin-top: 8px; }
.steps .step:not(:last-child)::after { content: ""; position: absolute; top: 27px; left: calc(50% + 40px); right: calc(-50% + 40px); height: 1px; background: linear-gradient(90deg, var(--primary-line), transparent); }

.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bento .card .tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding: 4px 10px; border-left: 2px solid var(--primary); background: var(--surface-2); font-size: 12px; font-weight: 600; color: #c8d1cc; border-radius: 0 6px 6px 0; }

.faq-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; align-items: start; }
.faq-col { display: grid; gap: 10px; }
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
details.faq[open] { border-color: var(--primary-line); }
details.faq summary { cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 600; font-size: 14.5px; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
details.faq[open] summary::after { content: "–"; }
details.faq .ans { padding: 0 18px 18px; color: var(--muted); font-size: 14px; }

.cta { text-align: center; padding: 56px 24px; border: 1px solid var(--primary-line); border-radius: 22px; background: radial-gradient(ellipse at 50% 0%, rgba(67,178,125,.16), transparent 70%), var(--surface); }
.cta h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.cta p { color: var(--muted); margin: 10px 0 24px; }

.prose { max-width: 760px; margin: 0 auto; padding: 56px 0 90px; }
.prose h1 { font-size: 36px; font-weight: 800; margin-bottom: 20px; }
.prose h2 { font-size: 20px; margin: 28px 0 8px; }
.prose p, .prose li { color: #b9c3be; }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 20px; }

/* Footer */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 44px 0 28px; background: rgba(255,255,255,.012); }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 14px; max-width: 36ch; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-cols h4 { margin: 0 0 12px; font-size: 13px; color: #c8d1cc; }
.footer-cols a { display: block; color: var(--muted); font-size: 14px; padding: 3px 0; }
.footer-cols a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* App (user + admin) */
.app-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 4px 10px 20px; }
.side-group { margin-top: 20px; }
.side-group h5 { margin: 0 0 6px; padding: 0 12px; font-size: 12px; letter-spacing: .08em; color: #5f6a64; font-weight: 600; text-transform: uppercase; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: #aab4af; font-size: 15px; font-weight: 500; white-space: nowrap; }
.side-link i { width: 20px; text-align: center; font-size: 15px; }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.active { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary-line); }
.side-link.soon { opacity: .45; cursor: default; }
.side-link.soon:hover { background: none; color: #aab4af; }
.side-link .badge-soon { margin-left: auto; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 36px; border-bottom: 1px solid var(--line); background: rgba(8, 10, 9, .85); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); }
.topbar-left { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--surface); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 14px; }
.content { padding: 36px; max-width: 1800px; margin-inline: auto; }
.page-title { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.page-title h1 { font-size: 30px; font-weight: 700; }
.page-title p { color: var(--muted); font-size: 15px; }
.side-toggle { display: none; background: none; border: 1px solid var(--line-strong); color: var(--text); width: 38px; height: 38px; border-radius: 10px; cursor: pointer; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.kpi small { display: block; font-size: 12px; letter-spacing: .07em; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.kpi b { display: block; font-size: 32px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 14px; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 17px; font-weight: 700; }
.panel-body { padding: 24px; }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; padding: 14px 24px; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: rgba(255,255,255,.02); white-space: nowrap; }
.tbl td { padding: 14px 24px; border-top: 1px solid var(--line); white-space: nowrap; }
.empty { text-align: center; padding: 56px 24px; color: var(--muted); font-size: 15px; }
.empty i { font-size: 32px; color: #3a443f; display: block; margin-bottom: 10px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; font-size: 15px; }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.legend .dot { width: 10px; height: 10px; border-radius: 50%; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 44px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .bento { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps .step::after { display: none; }
  .faq-cols { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; gap: 40px; padding-top: 32px; }
  .auth-side { order: -1; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links { display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 16px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border: 0; }
  .nav-actions .btn-ghost { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 40; width: 270px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  .side-toggle { display: grid; place-items: center; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .footer-cols { gap: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ===== Services & price list page ===== */
.sp-hero, .sp-tools, .sp-jump, .sp-table-card, .sp-dialog { --sp-line: var(--line); }
.sp-table-card [hidden], .sp-table [hidden] { display: none !important; }
.sp-hero { text-align: center; padding: 64px 0 8px; }
.sp-hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; }
.sp-hero p { color: var(--muted); max-width: 660px; margin: 16px auto 0; font-size: 16px; }
.sp-pills { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.sp-pill { display: inline-flex; align-items: center; gap: 10px; padding: 11px 20px; border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: 10px; background: var(--surface); font-size: 14px; font-weight: 600; }
.sp-pill i { color: var(--primary); }

.sp-tools { display: flex; gap: 12px; align-items: center; margin-top: 34px; }
.sp-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 20px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; }
.sp-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.sp-search > i { color: var(--muted); }
.sp-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: 400 16px var(--font); padding: 11px 0; }
.sp-count { font-size: 12px; color: var(--muted); padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); white-space: nowrap; }
.sp-count b { color: var(--primary); font-weight: 600; }
.sp-go { width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--primary); color: var(--primary-ink); border: 0; display: grid; place-items: center; cursor: pointer; }
.sp-go:hover { background: var(--primary-hover); }
.sp-drop { position: relative; }
.sp-btn { display: inline-flex; align-items: center; gap: 10px; height: 62px; padding: 0 22px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; color: var(--text); font: 600 15px var(--font); cursor: pointer; white-space: nowrap; }
.sp-btn:hover { border-color: var(--primary-line); }
.sp-btn i { color: var(--primary); }
.sp-caret { font-size: 12px; color: var(--muted) !important; margin-left: 4px; }
.sp-cur { cursor: default; }
.sp-menu { display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; padding: 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; z-index: 15; box-shadow: 0 20px 50px rgba(0, 0, 0, .55); }
.sp-menu.open { display: block; }
.sp-menu label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 15px; cursor: pointer; }
.sp-menu label:hover { background: var(--surface-2); }
.sp-menu input { accent-color: var(--primary); width: 16px; height: 16px; }

.sp-jump { display: flex; gap: 18px; align-items: flex-start; margin-top: 24px; }
.sp-jump-label { padding-top: 13px; font-size: 12px; letter-spacing: .14em; font-weight: 700; color: var(--muted); white-space: nowrap; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-chip { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; }
.sp-chip:hover { border-color: var(--primary-line); color: var(--text); }
.sp-chip i { color: var(--primary); }
.sp-chip small { color: var(--muted); font-size: 11px; font-weight: 500; }

.sp-table-card { margin: 28px 0 90px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.sp-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 15px; }
.sp-table thead th { text-align: left; padding: 18px 14px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--line); }
.sp-table th:first-child, .sp-table td:first-child { padding-left: 24px; }
.sp-table td { padding: 16px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.sp-table .mono { font-size: 14px; white-space: nowrap; }
.sp-table .c-id { width: 80px; color: var(--muted); }
.sp-table .c-name { min-width: 320px; }
.sp-table .c-avg { white-space: nowrap; color: #c8d1cc; }
.sp-table .c-act { text-align: right; padding-right: 20px; width: 90px; }
.sp-grp { scroll-margin-top: 96px; }
.sp-grp-head td { padding: 16px 24px; background: linear-gradient(90deg, var(--primary-soft), transparent 70%); font-weight: 700; font-size: 16px; border-top: 1px solid var(--line); }
.sp-grp:first-of-type .sp-grp-head td { border-top: 0; }
.sp-grp-ico { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 12px; border-radius: 8px; background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--primary); font-size: 14px; vertical-align: middle; }

.sp-dialog { padding: 0; width: min(580px, 92vw); max-height: 88vh; overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--primary-line); border-radius: 18px; }
.sp-dialog::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(3px); }
.sp-dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 26px 0; }
.sp-dlg-head h3 { font-size: 19px; line-height: 1.35; }
.sp-x { flex: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-strong); background: none; color: var(--text); cursor: pointer; }
.sp-x:hover { border-color: var(--primary-line); }
.sp-dlg-body { padding: 8px 26px 26px; }
.sp-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.sp-dl > div { padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.sp-dl dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.sp-dl dd { margin: 4px 0 0; font-weight: 600; font-size: 15px; }
.sp-dialog h4 { margin: 20px 0 8px; font-size: 14px; }
.sp-desc { color: var(--muted); font-size: 14px; white-space: pre-wrap; }

@media (max-width: 820px) {
  .sp-hero { padding-top: 40px; }
  .sp-tools { flex-wrap: wrap; }
  .sp-search { flex-basis: 100%; }
  .sp-btn { height: 50px; }
  .sp-jump { flex-direction: column; gap: 10px; }
  .sp-jump-label { padding-top: 0; }
  .sp-count { display: none; }
}

/* OTP input */
.otp-input { text-align: center; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 30px; letter-spacing: .5em; padding: 16px 12px 16px calc(12px + .5em); }
.otp-input::placeholder { color: #3a443f; }

/* ===== Admin: forms, toolbars, badges ===== */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar .input { width: auto; padding: 11px 14px; font-size: 15px; }
.toolbar-inline { display: flex; gap: 8px; align-items: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.inline-form { display: inline-block; margin: 0; }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tbl td.wrap { white-space: normal; min-width: 240px; }
.tbl .muted, td.muted { color: var(--muted); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.b-ok { background: var(--primary-soft); color: var(--primary); }
.b-off { background: rgba(139, 149, 143, .16); color: #aab4af; }
.btn-danger { background: rgba(229, 72, 77, .12); border-color: rgba(229, 72, 77, .35); color: #ff8a8e; }
.btn-danger:hover { background: rgba(229, 72, 77, .22); }
.chk { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; cursor: pointer; }
.chk input { width: 17px; height: 17px; accent-color: var(--primary); }
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 22px 0 8px; }
.sp-grp-head td { padding: 14px 24px; background: linear-gradient(90deg, var(--primary-soft), transparent 70%); font-weight: 700; }
.panel-head .muted { font-size: 14px; }
.panel-body small.muted { display: block; margin-top: 6px; font-size: 13px; }
.panel-body code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: 12px; word-break: break-all; }
@media (max-width: 960px) { .form-grid { grid-template-columns: 1fr; } }

/* ===== User area (reference style) ===== */
.sidebar { display: flex; flex-direction: column; }
.side-user { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); padding-bottom: 6px; }
.side-user-info { flex: 1; min-width: 0; line-height: 1.3; }
.side-user-info b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-info a { font-size: 13px; color: var(--muted); }
.side-user-info a:hover { color: var(--primary); }
.side-user-info i { font-size: 10px; margin-left: 2px; }
.side-out { color: var(--muted); padding: 8px; border-radius: 8px; }
.side-out:hover { color: var(--text); background: var(--surface-2); }
a.chip:hover { border-color: var(--primary-line); color: var(--text); }
.kpi-hl { border-color: var(--primary-line); box-shadow: 0 0 30px -12px var(--primary); }
.kpi a { color: var(--primary); }
.kpi a.btn { color: var(--primary-ink); }

.nets { display: flex; flex-wrap: wrap; gap: 10px; }
.net-chip { display: inline-flex; align-items: center; gap: 9px; padding: 11px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; color: #c8d1cc; font: 600 14px var(--font); cursor: pointer; }
.net-chip:hover { border-color: var(--primary-line); color: var(--text); }
.net-chip.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.net-chip i { font-size: 15px; }
#order-form { max-width: 820px; }
.desc-box { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 14px; line-height: 1.7; color: #c8d1cc; max-height: 260px; overflow-y: auto; }
.charge-box { display: flex; justify-content: space-between; align-items: center; background: var(--primary-soft); border: 1px solid var(--primary-line); border-radius: 12px; padding: 14px 18px; font-size: 15px; }
.charge-box b { font-size: 22px; font-variant-numeric: tabular-nums; color: var(--primary); }

.pos { color: var(--primary); }
.neg { color: #ff8a8e; }
.b-warn { background: rgba(240, 169, 59, .15); color: #f0a93b; }
.st-pending { background: rgba(240, 169, 59, .15); color: #f0a93b; }
.st-processing { background: rgba(109, 155, 255, .15); color: #8fb2ff; }
.st-in_progress { background: rgba(109, 155, 255, .15); color: #8fb2ff; }
.st-completed { background: var(--primary-soft); color: var(--primary); }
.st-partial { background: rgba(255, 138, 76, .15); color: #ff9a62; }
.st-canceled { background: rgba(139, 149, 143, .16); color: #aab4af; }
.st-refunded { background: rgba(167, 139, 250, .15); color: #b9a2fb; }
.pay-instr { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 15px; line-height: 1.7; }
.acct { max-width: 860px; display: grid; gap: 20px; }
.form-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .form-grid3 { grid-template-columns: 1fr; } .two-col { grid-template-columns: 1fr !important; } }

/* ===== Refill / Affiliates / Discount / Child panel ===== */
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .4s; }
.tbl tr.is-current td { background: var(--primary-soft); }
.panel-body .steps { max-width: none; }
@media (max-width: 760px) { .panel-body .steps { grid-template-columns: 1fr; } .panel-body .steps .step::after { display: none; } }

/* ===== Currency dropdown (topbar) ===== */
.cur-chip { padding: 4px 6px 4px 14px; gap: 6px; }
.cur-chip .cur-bal { display: inline-flex; align-items: center; gap: 8px; color: var(--text); white-space: nowrap; }
.cur-chip .cur-bal i { color: var(--primary); }
.cur-form { margin: 0; display: inline-flex; }
.cur-select { appearance: none; -webkit-appearance: none; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; font: 600 13px var(--font); padding: 6px 26px 6px 12px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b958f' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.cur-select:hover, .cur-select:focus { border-color: var(--primary-line); outline: none; }
.cur-chip-solo .cur-select { padding: 9px 30px 9px 14px; }

/* ===== New order: two-column layout ===== */
.order-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
#order-form { max-width: none; }
.order-side { display: grid; gap: 20px; position: sticky; top: 92px; }
.side-card .panel-head h3 { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.side-card .panel-head h3 i { color: var(--primary); }
.news-item { padding: 16px 24px; border-top: 1px solid var(--line); }
.news-item:first-child { border-top: 0; }
.news-item b { display: block; font-size: 15px; margin-bottom: 4px; }
.news-item small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.news-item p { color: #c8d1cc; font-size: 14px; line-height: 1.6; margin: 0; }
.help-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 18px 24px; }
.help-links.one { grid-template-columns: 1fr; }
.help-links a { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--text); }
.help-links a:hover { border-color: var(--primary-line); color: var(--primary); }
.charge-box small { display: block; color: var(--muted); font-size: 13px; text-align: right; }

/* ===== Social network chips: equal grid, tidy on mobile ===== */
.nets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.net-chip { justify-content: center; min-width: 0; padding: 12px 10px; }
.net-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nets.collapsed .net-chip:nth-child(n+13) { display: none; }
.nets-more { display: flex; justify-content: center; margin-top: 14px; }
.nets-more button { background: none; border: 0; color: var(--primary); font: 600 14px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; }
.nets-more button i { transition: transform .2s; }
.nets-more button.open i { transform: rotate(180deg); }

/* ===== Account page: centered cards ===== */
.acct-wrap { max-width: 900px; margin: 0 auto; }
.acct-wrap .acct { max-width: none; }
.panel-head.ph-rich { justify-content: flex-start; gap: 14px; }
.ph-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--primary); }
.panel-head.ph-rich h3 { font-size: 16px; margin: 0; }
.panel-head.ph-rich p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 960px) {
  .order-layout { grid-template-columns: 1fr; }
  .order-side { position: static; }
}
@media (max-width: 520px) {
  .nets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .net-chip { font-size: 13px; padding: 11px 8px; gap: 7px; }
  .nets.collapsed .net-chip:nth-child(n+9) { display: none; }
  .cur-chip { padding-left: 10px; }
  .cur-chip .cur-bal span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
  .help-links { grid-template-columns: 1fr; }
  .topbar-left span { display: none; }
}


