:root {
  --bg-page: #f8fafc;
  --bg-section: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border: #e8eef5;
  --purple: #7c3aed;
  --purple-hover: #6d28d9;
  --orange: #f97316;
  --orange-soft: #fff7ed;
  --purple-soft: #f5f3ff;
  --green-soft: #ecfdf5;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --radius: 18px;
  --container: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(var(--container), calc(100% - 32px)); margin: 0 auto; }
.section { padding: 84px 0; }
.section.alt { background: var(--bg-section); }
.section-title { font-size: 36px; line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.02em; }
.section-subtitle { margin: 0 0 36px; color: var(--text-muted); font-size: 18px; max-width: 760px; }
.badge { display:inline-flex; align-items:center; gap:8px; padding:8px 14px; border-radius:999px; background:var(--purple-soft); color:var(--purple); font-weight:600; font-size:14px; margin-bottom:18px; }
.header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display:flex; align-items:center; justify-content:space-between; min-height:74px; gap:20px; }
.logo { display:inline-flex; align-items:center; gap:10px; font-size:24px; font-weight:800; letter-spacing:-0.03em; }
.logo-wb { color: var(--purple); }
.logo-orders { color: var(--orange); }
.nav { display:flex; align-items:center; gap:28px; justify-content: center;}
.nav a { color: var(--text-muted); font-weight:500; font-size:15px; }
.nav a:hover { color: var(--text-main); }
.header-actions { display:flex; align-items:center; gap:12px; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:48px; padding:0 20px; border-radius:12px; font-weight:700; border:1px solid transparent; transition:0.2s ease; cursor:pointer; white-space:nowrap; }
.btn-primary { background: var(--purple); color:#fff; box-shadow: 0 10px 25px rgba(124, 58, 237, 0.22); }
.btn-primary:hover { background: var(--purple-hover); transform: translateY(-1px); }
.btn-secondary { background:#fff; color:var(--text-main); border-color:var(--border); }
.btn-secondary:hover { background:#f8fafc; }
.hero { padding:72px 0 64px; background: radial-gradient(circle at top right, rgba(124,58,237,0.08), transparent 26%), radial-gradient(circle at top left, rgba(249,115,22,0.06), transparent 22%), var(--bg-page); }
.hero-grid { display:grid; grid-template-columns:1fr 1fr; gap:42px; align-items:center; }
.hero-title { font-size:56px; line-height:1.02; letter-spacing:-0.04em; margin:0 0 20px; max-width:720px; }
.hero-title .accent { color: var(--orange); }
.hero-text { font-size:19px; color:var(--text-muted); margin:0 0 28px; max-width:620px; }
.hero-actions { display:flex; gap:14px; flex-wrap:wrap; margin-bottom:22px; }
.hero-points { display:flex; flex-wrap:wrap; gap:10px 14px; margin-top:12px; color:var(--text-muted); font-size:15px; }
.hero-points span { display:inline-flex; align-items:center; gap:8px; }
.hero-card { background:#fff; border:1px solid var(--border); border-radius:24px; box-shadow:var(--shadow); padding:18px;     min-width: 0;}
.dashboard-top { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px; }
.metric { background:#fff; border:1px solid var(--border); border-radius:16px; padding:14px; }
.metric-label { color:var(--text-muted); font-size:13px; margin-bottom:8px; }
.metric-value { font-size:24px; font-weight:800; letter-spacing:-0.02em; }
.chart-box, .table-box, .mock-box { background:#fff; border:1px solid var(--border); border-radius:18px; }
.chart-box { padding:16px; margin-bottom:16px; }
.chart-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; gap:16px; }
.chart-title { font-size:16px; font-weight:700; }
.chart-switch { display:inline-flex; gap:8px; flex-wrap:wrap; }
.pill { padding:8px 12px; border:1px solid var(--border); border-radius:999px; font-size:13px; color:var(--text-muted); background:#fff; }
.pill.active { background:var(--purple-soft); border-color:#ddd6fe; color:var(--purple); font-weight:700; }
.bars { display:flex; align-items:end; gap:10px; height:210px; padding-top:18px; }
.bar-col { flex:1; display:flex; flex-direction:column; align-items:center; gap:10px; }
.bar { width:100%; max-width:30px; border-radius:10px 10px 6px 6px; background:linear-gradient(180deg, #a78bfa 0%, var(--purple) 100%); min-height:24px; }
.bar.today { background:linear-gradient(180deg, #fdba74 0%, var(--orange) 100%); }
.bar-label { font-size:12px; color:var(--text-muted); }
.table-box { padding:14px;overflow-x: auto; }
.table-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
.mini-table { width:100%; border-collapse:collapse; }
.mini-table th, .mini-table td { padding:11px 8px; text-align:left; border-bottom:1px solid #f1f5f9; font-size:14px; }
.mini-table th { color:var(--text-muted); font-weight:600; }
.status { display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; font-size:12px; font-weight:700; }
.status.new { background:#eff6ff; color:#2563eb; }
.status.pvz { background:#fffbeb; color:#d97706; }
.status.done { background:#ecfdf5; color:#059669; }
.status.cancel { background:#fef2f2; color:#dc2626; }
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
.card { background:#fff; border:1px solid var(--border); border-radius:var(--radius); padding:24px; box-shadow:var(--shadow); }
.problem-icon, .feature-icon, .step-icon, .safe-icon { width:46px; height:46px; border-radius:14px; display:inline-flex; align-items:center; justify-content:center; font-size:22px; margin-bottom:16px; }
.problem-icon { background:#fef2f2; }
.feature-icon { background:var(--purple-soft); }
.step-icon { background:var(--orange-soft); }
.safe-icon { background:var(--green-soft); }
.card h3 { margin:0 0 10px; font-size:20px; letter-spacing:-0.02em; }
.card p { margin:0; color:var(--text-muted); font-size:15px; }
.shots { display:grid; grid-template-columns:repeat(2,1fr); gap:22px; }
.shot { background:#fff; border:1px solid var(--border); border-radius:20px; overflow:hidden; box-shadow:var(--shadow); }
.shot-top { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--border); background:#fcfdff; }
.shot-dots { display:flex; gap:8px; }
.shot-dots span { width:10px; height:10px; border-radius:50%; background:#e2e8f0; }
.shot-title { font-size:14px; color:var(--text-muted); font-weight:600; }
.shot-body { padding:18px; min-height:280px; }
.placeholder { min-height:240px; border:2px dashed #dbe3ec; border-radius:16px; display:flex; align-items:center; justify-content:center; color:var(--text-muted); text-align:center; padding:18px; background:#fbfdff; font-size:15px; }
.steps { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.telegram-wrap { display:grid; grid-template-columns:0.95fr 1.05fr; gap:28px; align-items:center; }
.telegram-card { background:linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); border:1px solid var(--border); border-radius:24px; padding:22px; box-shadow:var(--shadow); }
.telegram-message { background:#fff; border:1px solid var(--border); border-radius:18px; padding:18px; white-space:pre-line; font-size:15px; color:var(--text-main); box-shadow:0 8px 24px rgba(15, 23, 42, 0.04); }
.telegram-badge { display:inline-block; margin-bottom:12px; background:#eff6ff; color:#2563eb; padding:8px 12px; border-radius:999px; font-size:13px; font-weight:700; }
.pricing { max-width:520px; margin:0 auto; }
.price-card { text-align:center; background:#fff; border:1px solid var(--border); border-radius:26px; padding:34px 28px; box-shadow:var(--shadow); }
.price-plan { font-size:18px; font-weight:700; margin-bottom:10px; }
.price-num { font-size:54px; font-weight:800; letter-spacing:-0.04em; margin-bottom:8px; }
.price-muted { color:var(--text-muted); margin-bottom:24px;    text-align: center; }
.price-list { text-align:left; display:grid; gap:12px; margin:22px 0 28px; color:var(--text-main); }
.price-list span { display:flex; gap:10px; align-items:start; }
.faq-list { display:grid; gap:14px; }
.faq-item { background:#fff; border:1px solid var(--border); border-radius:16px; padding:22px; box-shadow:var(--shadow); }
.faq-q { font-size:18px; font-weight:700; margin:0 0 10px; }
.faq-a { margin:0; color:var(--text-muted); }
.cta-box { background: radial-gradient(circle at top right, rgba(124,58,237,0.08), transparent 25%), radial-gradient(circle at bottom left, rgba(249,115,22,0.08), transparent 20%), #fff; border:1px solid var(--border); border-radius:28px; padding:38px; box-shadow:var(--shadow); text-align:center; }
.cta-box h2 { margin:0 0 14px; font-size:40px; letter-spacing:-0.03em; }
.cta-box p { margin:0 auto 24px; max-width:720px; color:var(--text-muted); font-size:18px; }
.footer { padding:32px 0 44px; border-top:1px solid var(--border); background:#fff; }
.footer-inner { display:flex; justify-content:space-between; gap:18px; flex-wrap:wrap; align-items:center; }
.footer-copy { color:var(--text-muted); font-size:14px; }
.footer-links { display:flex; gap:18px; flex-wrap:wrap; color:var(--text-muted); font-size:14px; }
.auth-page { min-height:100vh; display:flex; flex-direction:column; }
.auth-wrap { flex:1; display:flex; align-items:center; justify-content:center; padding:42px 16px; }
.auth-card { width:min(460px, 100%); background:#fff; border:1px solid var(--border); border-radius:24px; box-shadow:var(--shadow); padding:32px; }
.auth-title { font-size:32px; line-height:1.1; letter-spacing:-0.03em; margin:0 0 10px; }
.auth-subtitle { margin:0 0 24px; color:var(--text-muted); font-size:16px; }
.form-group { margin-bottom:16px; }
.form-label { display:block; margin-bottom:8px; font-weight:700; font-size:14px; }
.form-input { width:100%; min-height:52px; border:1px solid #dbe3ec; border-radius:14px; padding:0 16px; font-size:15px; color:var(--text-main); background:#fff; transition:0.2s ease; }
.form-input:focus { outline:none; border-color:#c4b5fd; box-shadow:0 0 0 4px rgba(124, 58, 237, 0.08); }
.form-note { font-size:13px; color:var(--text-muted); margin-top:8px; }
.form-actions { margin-top:22px; display:flex; flex-direction:column; gap:12px; }
.form-divider { position:relative; text-align:center; margin:20px 0; color:var(--text-muted); font-size:13px; }
.form-divider::before { content:""; position:absolute; left:0; right:0; top:50%; height:1px; background:var(--border); z-index:0; }
.form-divider span { position:relative; z-index:1; background:#fff; padding:0 12px; }
.auth-links { margin-top:18px; display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; font-size:14px; color:var(--text-muted); }
.auth-links a { color:var(--purple); font-weight:600; }
.inline-alert { border:1px solid #ddd6fe; background:#faf5ff; color:#6d28d9; padding:14px 16px; border-radius:14px; font-size:14px; margin-bottom:18px; }
@media (max-width:1080px) {
  .hero-grid, .telegram-wrap, .grid-4 { grid-template-columns:1fr; }
  .dashboard-top, .grid-3, .steps, .shots { grid-template-columns:1fr 1fr; }
  .hero-title { font-size:48px; }
}
@media (max-width:760px) {
  .nav { display:none; }
  .header-inner { min-height:68px; }
  .hero { padding-top:42px; }
  .hero-title { font-size:38px; }
  .section { padding:62px 0; }
  .section-title { font-size:30px; }
  .dashboard-top, .grid-3, .steps, .shots { grid-template-columns:1fr; }
  .hero-actions { flex-direction:column; }
  .btn { width:100%; }
  .cta-box { padding:28px 20px; }
  .cta-box h2 { font-size:32px; }
  .auth-card { padding:24px; }
}

/* Dashboard */
.dashboard-body{
  margin:0;
  min-height:100vh;
  display:grid;
  grid-template-columns:280px 1fr;
  background:#f8fafc;
}

.sidebar{
  background:#ffffff;
  border-right:1px solid #e8eef5;
  padding:28px 20px;
  display:flex;
  flex-direction:column;
  min-height:100vh;
  position:sticky;
  top:0;
}

.sidebar-logo{
  margin-bottom:28px;
}

.sidebar-subtitle{
  margin-top:8px;
  color:#64748b;
  font-size:14px;
}

.sidebar-nav{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.sidebar-link{
  display:block;
  padding:12px 14px;
  border-radius:12px;
  color:#334155;
  font-weight:600;
  transition:.2s ease;
}

.sidebar-link:hover{
  background:#f8fafc;
}

.sidebar-link.active{
  background:#f5f3ff;
  color:#7c3aed;
}

.sidebar-link.danger{
  color:#dc2626;
}

.sidebar-footer{
  margin-top:auto;
  padding-top:20px;
}

.sidebar-user{
  margin-bottom:12px;
  color:#64748b;
  font-size:14px;
  word-break:break-all;
}

.btn-full{
  width:100%;
}

.dashboard-main{
  padding:28px;
}

.dashboard-topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin-bottom:24px;
}

.dashboard-title{
  margin:0 0 8px;
  font-size:34px;
  line-height:1.1;
  letter-spacing:-0.03em;
}

.dashboard-text{
  margin:0;
  color:#64748b;
  font-size:16px;
}

.topbar-actions{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 12px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
  white-space:nowrap;
}

.status-badge.success{
  background:#ecfdf5;
  color:#059669;
}

.status-badge.warning{
  background:#fff7ed;
  color:#ea580c;
}

.status-badge.info{
  background:#eff6ff;
  color:#2563eb;
}

.dashboard-grid{
  display:grid;
  gap:20px;
  margin-bottom:20px;
    grid-template-columns: repeat(2, 1fr);
}
/* ОДИНАКОВАЯ СЕТКА ДЛЯ ВСЕХ БЛОКОВ */
.main-grid,
.lower-grid {
  grid-template-columns: 1fr 1fr;
}

/* Адаптив */
@media (max-width: 960px) {
  .main-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }
}
.metrics-grid{
  grid-template-columns:repeat(4,1fr);
}

.metric-card{
  background:#ffffff;
  border:1px solid #e8eef5;
  border-radius:18px;
  padding:20px;
  box-shadow:0 10px 30px rgba(15,23,42,.04);
}

.metric-card-label{
  color:#64748b;
  font-size:14px;
  margin-bottom:10px;
}

.metric-card-value{
  font-size:32px;
  font-weight:800;
  letter-spacing:-0.03em;
  margin-bottom:8px;
}

.metric-card-meta{
  color:#64748b;
  font-size:13px;
}

.main-grid{
  grid-template-columns:1.4fr .8fr;
}

.lower-grid{
  grid-template-columns:1.4fr .8fr;
}

.panel{
  background:#ffffff;
  border:1px solid #e8eef5;
  border-radius:22px;
  padding:22px;
  box-shadow:0 10px 30px rgba(15,23,42,.04);
}

.panel-large{
  min-height:420px;
}

.panel-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:20px;
}

.panel-header h2{
  margin:0 0 8px;
  font-size:22px;
  letter-spacing:-0.02em;
}

.panel-header p{
  margin:0;
  color:#64748b;
  font-size:14px;
}

.panel-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.panel-link{
  color:#7c3aed;
  font-weight:700;
  font-size:14px;
}

.chart-area{
  background:#fbfdff;
  border:1px solid #eef2f7;
  border-radius:18px;
  padding:22px;
  min-height:300px;
  display:flex;
  align-items:flex-end;
}

.chart-columns{
  display:flex;
  align-items:flex-end;
  gap:16px;
  width:100%;
  height:240px;
}

.chart-col{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  color:#64748b;
  font-size:13px;
}

.chart-bar{
  width:100%;
  max-width:36px;
  border-radius:12px 12px 6px 6px;
  background:linear-gradient(180deg,#a78bfa 0%, #7c3aed 100%);
  min-height:24px;
}

.chart-bar.today{
  background:linear-gradient(180deg,#fdba74 0%, #f97316 100%);
}

.stack-list{
  display:grid;
  gap:14px;
}

.stack-item{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
  border:1px solid #eef2f7;
  border-radius:16px;
  padding:16px;
  background:#fcfdff;
}

.muted{
  margin-top:6px;
  color:#64748b;
  font-size:13px;
}

.table-wrap{
  overflow:auto;
}

.data-table{
  width:100%;
  border-collapse:collapse;
}

.data-table th,
.data-table td{
  padding:14px 10px;
  text-align:left;
  border-bottom:1px solid #f1f5f9;
  font-size:14px;
}

.data-table th{
  color:#64748b;
  font-weight:700;
}

.table-status{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

.table-status.new{background:#eff6ff;color:#2563eb;}
.table-status.pvz{background:#fffbeb;color:#d97706;}
.table-status.done{background:#ecfdf5;color:#059669;}
.table-status.cancel{background:#fef2f2;color:#dc2626;}

.action-list{
  display:grid;
  gap:14px;
}

.action-card{
  display:block;
  border:1px solid #eef2f7;
  border-radius:16px;
  padding:18px;
  background:#fcfdff;
  transition:.2s ease;
}

.action-card:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(15,23,42,.05);
}

.action-card.danger{
  border-color:#fecaca;
  background:#fffafa;
}

.action-title{
  font-size:16px;
  font-weight:800;
  margin-bottom:8px;
}

.action-text{
  color:#64748b;
  font-size:14px;
  line-height:1.5;
}

@media (max-width: 1180px){
  .dashboard-body{
    grid-template-columns:1fr;
  }

  .sidebar{
    position:relative;
    min-height:auto;
    border-right:none;
    border-bottom:1px solid #e8eef5;
  }

  .metrics-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .main-grid,
  .lower-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .dashboard-main{
    padding:18px;
  }

  .dashboard-topbar{
    flex-direction:column;
  }

  .metrics-grid{
    grid-template-columns:1fr;
  }

  .panel{
    padding:18px;
  }

  .dashboard-title{
    font-size:28px;
  }

  .chart-columns{
    gap:10px;
  }
}

/* Connect page */
.form-layout{
  display:grid;
  gap:18px;
}

.form-block{
  display:grid;
  gap:8px;
}

.form-label{
  font-size:15px;
  font-weight:700;
  color:#0f172a;
}

.form-input{
  width:100%;
  min-height:52px;
  border:1px solid #dbe3ec;
  border-radius:14px;
  padding:0 16px;
  font-size:15px;
  color:#0f172a;
  background:#fff;
}

.form-input:focus{
  outline:none;
  border-color:#c4b5fd;
  box-shadow:0 0 0 4px rgba(124,58,237,.08);
}

.form-help{
  color:#64748b;
  font-size:13px;
  line-height:1.5;
}

.form-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

.info-banner{
  border:1px solid #e8eef5;
  border-radius:16px;
  padding:16px 18px;
  font-size:14px;
  line-height:1.6;
}

.success-lite{
  background:#f8fffb;
  border-color:#bbf7d0;
}

.check-list{
  display:grid;
  gap:12px;
}

.check-item{
  display:grid;
  grid-template-columns:36px 1fr;
  gap:12px;
  align-items:start;
  padding:14px;
  border:1px solid #eef2f7;
  border-radius:16px;
  background:#fcfdff;
}

.check-item span{
  width:36px;
  height:36px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f5f3ff;
  color:#7c3aed;
  font-weight:800;
}

.telegram-connect-box{
  display:grid;
  gap:14px;
}

.telegram-connect-step{
  padding:16px;
  border:1px solid #eef2f7;
  border-radius:16px;
  background:#fcfdff;
}

.connect-title{
  font-size:16px;
  font-weight:800;
  margin-bottom:8px;
}

.connect-text{
  color:#64748b;
  font-size:14px;
  line-height:1.5;
}

.action-card.static{
  cursor:default;
}

.action-card.static:hover{
  transform:none;
  box-shadow:none;
}


/* App pages */
.app-main{
  padding: 34px 0 54px;
}

.app-container{
  width: min(1180px, calc(100% - 32px));
}

.app-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}

.app-nav a.nav-active{
  color: var(--text-main);
  font-weight:700;
}

.header-user{
  color: var(--text-muted);
  font-size:14px;
  font-weight:600;
}

.subnav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 0 0 22px;
  padding: 10px;
  background:#ffffff;
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow: var(--shadow);
}

.subnav-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding: 0 14px;
  border-radius:12px;
  color: var(--text-muted);
  font-weight:600;
}

.subnav-link:hover{
  background:#f8fafc;
  color: var(--text-main);
}

.subnav-link.active{
  background: var(--purple-soft);
  color: var(--purple);
}

.form-layout{
  display:grid;
  gap:18px;
}

.form-block{
  display:grid;
  gap:8px;
}

.form-help{
  color: var(--text-muted);
  font-size:13px;
}

.form-actions.row{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:center;
}

.info-banner{
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px 18px;
  font-size:14px;
  line-height:1.6;
}

.success-lite{
  background:#f8fffb;
  border-color:#cceedd;
  color:#166534;
}

.check-list{
  display:grid;
  gap:12px;
}

.check-item{
  display:grid;
  grid-template-columns:38px 1fr;
  gap:12px;
  align-items:flex-start;
  border:1px solid #eef2f7;
  background:#fcfdff;
  border-radius:16px;
  padding:14px;
}

.check-item span{
  width:38px;
  height:38px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: var(--orange-soft);
  color: var(--orange);
  font-weight:800;
}

.telegram-connect-box{
  display:grid;
  gap:14px;
}

.telegram-connect-step{
  border:1px solid #eef2f7;
  background:#fcfdff;
  border-radius:16px;
  padding:16px;
}

.connect-title{
  font-size:16px;
  font-weight:800;
  margin-bottom:8px;
}

.connect-text{
  color: var(--text-muted);
  font-size:14px;
}

.action-card.static{
  cursor:default;
}

.subscription-card{
  border:1px solid #eef2f7;
  border-radius:22px;
  background:linear-gradient(180deg,#ffffff 0%, #fbfdff 100%);
  padding:24px;
}

.subscription-price{
  font-size:44px;
  font-weight:800;
  letter-spacing:-0.04em;
  margin-bottom:8px;
}

.subscription-price span{
  font-size:18px;
  font-weight:700;
  color: var(--text-muted);
}

.subscription-plan{
  color: var(--text-muted);
  font-size:16px;
  margin-bottom:22px;
}

.price-list.compact{
  margin-top:0;
}

@media (max-width: 1180px){
  .dashboard-body{
    grid-template-columns:1fr;
  }
  .metrics-grid{
    grid-template-columns:repeat(2,1fr);
  }
  .main-grid,
  .lower-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 900px){
  .app-hero{
    flex-direction:column;
  }

  .header-user{
    display:none;
  }
}

@media (max-width: 760px){
  .app-main{
    padding-top:24px;
  }

  .subnav{
    padding:8px;
  }

  .subnav-link{
    width:100%;
    justify-content:flex-start;
  }

  .form-actions.row{
    flex-direction:column;
    align-items:stretch;
  }
}


.auth-shell{
  max-width: 760px;
}

.auth-card{
  background:#ffffff;
  border:1px solid var(--border);
  border-radius:24px;
  padding:34px;
  box-shadow:var(--shadow);
}

.auth-wide{
  max-width: 720px;
  margin: 0 auto;
}

.auth-title{
  margin:0 0 12px;
  font-size:40px;
  line-height:1.08;
  letter-spacing:-0.03em;
}

.auth-text{
  margin:0 0 24px;
  color:var(--text-muted);
  font-size:17px;
}

.auth-form{
  display:grid;
  gap:18px;
}

.steps-grid{
  grid-template-columns: repeat(3, 1fr);
}

.setup-step{
  display:grid;
  gap:14px;
  align-content:start;
}

.step-mark{
  width:46px;
  height:46px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  font-weight:800;
  background:var(--orange-soft);
  color:var(--orange);
}

.done-step .step-mark{
  background:#ecfdf5;
  color:#059669;
}

.current-step{
  border-color:#ddd6fe;
  box-shadow:0 12px 28px rgba(124,58,237,.08);
}

.current-step .step-mark{
  background:var(--purple-soft);
  color:var(--purple);
}

.setup-step h2{
  margin:0;
  font-size:22px;
  letter-spacing:-0.02em;
}

.setup-step p{
  margin:0;
  color:var(--text-muted);
}
.connect-onboarding,
.connect-security {
  background: #ffffff;
  border: 1px solid #e8eef5;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  margin-bottom: 22px;
}

.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.onboarding-card {
  border: 1px solid #eef2f7;
  background: #fcfdff;
  border-radius: 18px;
  padding: 18px;
}

.onboarding-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f5f3ff;
  color: #7c3aed;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
}

.onboarding-card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.onboarding-card p {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.onboarding-shot {
  margin-bottom: 14px;
}

.onboarding-shot-placeholder {
  min-height: 180px;
  border: 2px dashed #dbe3ec;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: #64748b;
  background: #ffffff;
  font-size: 14px;
  line-height: 1.6;
}

.onboarding-note {
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.security-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid #eef2f7;
  background: #fcfdff;
  border-radius: 18px;
  padding: 18px;
}

.security-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff7ed;
  font-size: 22px;
}

.security-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.security-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.security-banner {
  margin-top: 18px;
  border: 1px solid #cceedd;
  background: #f8fffb;
  color: #166534;
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .onboarding-grid {
    grid-template-columns: 1fr;
  }

  .security-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px){
  .steps-grid{
    grid-template-columns:1fr;
  }
}
.telegram-connected-badge {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #059669;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid #bbf7d0;
}

.telegram-connected-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.telegram-status-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid #d1fae5;
  background: #f8fffb;
  border-radius: 18px;
  margin-bottom: 18px;
}

.telegram-status-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ecfdf5;
  font-size: 24px;
}

.telegram-status-title {
  font-size: 16px;
  font-weight: 800;
  color: #065f46;
  margin-bottom: 4px;
}

.telegram-status-subtitle {
  font-size: 13px;
  color: #047857;
  line-height: 1.5;
}

.notifications-title-block {
  margin-bottom: 14px;
}

.notifications-title-block h3 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.notifications-title-block p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.notifications-grid-column {
  grid-template-columns: 1fr;
}

.notify-card-pretty {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border: 1px solid #eef2f7;
  background: #fcfdff;
  border-radius: 16px;
  transition: 0.2s ease;
}

.notify-card-pretty:hover {
  border-color: #ddd6fe;
  background: #fdfcff;
}

.notify-card-pretty input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.notify-card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notify-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.notify-card-subtitle {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}
.connect-status-card {
  margin-bottom: 14px;
}

.connect-status {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
}

.connect-status.success {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.connect-status.error {
  background: #fef2f2;
  border-color: #fecaca;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3b82f6;
}

.connect-status.error .status-dot {
  background: #ef4444;
}

.status-title {
  font-weight: 700;
}

.status-subtitle {
  font-size: 13px;
  color: #64748b;
}
.period-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.period-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.period-chip.active {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}

.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.stats-cards-grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.stats-cards-grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.stats-cards-grid6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.stat-card {
  background: #ffffff;
  border: 1px solid #e8eef5;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  text-align: center;
}

.stat-card-label {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-card-value {
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.stat-card-meta {
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.status-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.status-filter-chip {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.status-filter-chip.active {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}

.table-wrap {
  overflow-x: auto;
}

.app-table {
  width: 100%;
  border-collapse: collapse;
}

.app-table th,
.app-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
  font-size: 14px;
  text-align:center;
}

.app-table th {
  color: #475569;
  font-weight: 700;
  white-space: nowrap;
}

.app-table td {
  color: #0f172a;
}

.app-table td:first-child{
    text-align:left;
}

.single-grid {
  grid-template-columns: 1fr;
}

.chart-placeholder {
  min-height: 240px;
  border: 2px dashed #dbe3ec;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #64748b;
  background: #ffffff;
  font-size: 15px;
  line-height: 1.6;
}
.alert-panel {
  border: 2px solid #facc15;
  background: #fffbeb;
}

.alert-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
}

.alert-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}

.alert-meta {
  color: #475569;
  font-size: 14px;
  margin-bottom: 10px;
}

.alert-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}
.empty-state {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #64748b;
  font-size: 14px;
  border: 1px dashed #dbe3ec;
  border-radius: 16px;
  background: #fff;
}
.alert-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 18px;
}
.row-selected {
  background: #faf5ff;
}

.table-link {
  color: #6d28d9;
  font-weight: 700;
  text-decoration: none;
}

.table-link:hover {
  text-decoration: underline;
}
.table-row {
  cursor: pointer;
  transition: background 0.2s ease;
}

.table-row:hover {
  background: #faf7ff;
}

.row-selected {
  background: #f3e8ff;
}

/* бейджи */
.badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.badge-auto {
  background: #fde68a;
  color: #92400e;
}

.badge-regular {
  background: #e0e7ff;
  color: #3730a3;
}

/* ссылка */
.table-link {
  color: #6d28d9;
  font-weight: 700;
  text-decoration: none;
}

.table-link:hover {
  text-decoration: underline;
}
.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}

.alert-panel-danger {
  border: 2px solid #fca5a5;
  background: #fff5f5;
}
.notif-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 4px;
}

.notif-badge.success {
  background: #dcfce7;
  color: #166534;
}

.notif-badge.warning {
  background: #fef3c7;
  color: #92400e;
}
.status-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.status-filter-chip.active {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}
.status-table-block {
  display: none;
}

.status-table-block.active {
  display: block;
}

.expandable-row.is-hidden {
  display: none;
}

.table-more-wrap {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}
.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 12px;
  font-weight: 700;
}

.status-filter-chip.active .chip-count {
  background: rgba(109, 40, 217, 0.12);
  color: #6d28d9;
}
.expandable-row.is-hidden {
  display: none;
}

.table-more-wrap {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}
.table-total-row td {
  font-weight: 600;
  background: #fafafc;
  border-top: 2px solid #e5e7eb;
}
.table-total-row td:first-child {
  color: #111827;
}
.chart-box {
  height: 360px;
  position: relative;
}
.fbs-tab-block {
  display: none;
}

.fbs-tab-block.active {
  display: block;
}
.section-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  justify-content: center;
}

.section-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.section-tab:hover {
  background: #faf7ff;
  border-color: #ddd6fe;
}

.section-tab.active {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}

.section-tab-small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.section-tabs-inner {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 12px;
  font-weight: 700;
}

.section-tab.active .chip-count {
  background: rgba(109, 40, 217, 0.12);
  color: #6d28d9;
}
.row-warning {
  background: #fff7ed;
}

.row-danger {
  background: #fef2f2;
}
.mini-kpi-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.mini-kpi {
  background: #fafafc;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
}

.mini-kpi span {
  font-size: 12px;
  color: #6b7280;
}

.mini-kpi b {
  font-size: 18px;
}
.compare-kpi-grid {
  grid-template-columns: repeat(3, 1fr);
}

.kpi-delta {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
}

.kpi-delta.positive {
  color: #16a34a;
}

.kpi-delta.negative {
  color: #dc2626;
}

.chart-toolbar {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.chart-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chart-mode {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.chart-mode.active {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}
.custom-period-form {
  display: none;
  margin-bottom: 20px;
}

.custom-period-form.show {
  display: block;
}

.custom-period-fields {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.cancel-rate {
  font-weight: 600;
}

.cancel-rate-warning {
  color: #f59e0b; /* оранжевый */
  font-weight: 700;
}

.cancel-rate-danger {
  color: #dc2626; /* красный */
  font-weight: 700;
}
.risk-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.risk-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  background: #fff;
}

.risk-card-warning {
  background: #fff7ed;
  border-color: #fdba74;
}

.risk-card-danger {
  background: #fef2f2;
  border-color: #fca5a5;
}

.risk-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.risk-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.risk-card-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
}

.risk-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
}

.risk-card-metrics span {
  color: #6b7280;
  font-size: 13px;
}

.empty-state {
  padding: 12px 0;
  color: #6b7280;
}
.fbw-tab-block {
  display: none;
}

.fbw-tab-block.active {
  display: block;
}

.fbw-status-table-block {
  display: none;
}

.fbw-status-table-block.active {
  display: block;
}
.hero-note {
    margin-top: 10px;
    font-size: 12px;
    color: #9aa4c7;
}
/* =========================
   HEADER
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #ececf3;
}

.site-header-inner {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}

.site-logo {
  text-decoration: none;
  font-size: 26px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-wb {
  color: #7c3aed;
}

.logo-orders {
  color: #f59e0b;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-width: 0;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: #4b5563;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #111827;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 38px;
        height: 38px;
        padding: 8px;
}

.header-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  background: #f3f4f6;
  transition: background 0.2s ease;
}

.header-login-btn:hover {
  background: #e5e7eb;
}

.header-account {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f3f4f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.header-account-icon {
  font-size: 18px;
  line-height: 1;
}

/* Burger */

.header-burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
}

.header-burger span {
  display: block;
  height: 2px;
  background: #111827;
  margin: 5px 0;
  border-radius: 2px;
}

/* Mobile menu */

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-menu-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: min(300px, 84vw);
  height: 100vh;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  z-index: 1001;
  padding: 20px 18px;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.mobile-menu-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.mobile-menu-close {
  border: 0;
  background: #f3f4f6;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav a {
  text-decoration: none;
  color: #111827;
  font-size: 15px;
  padding: 12px 10px;
  border-radius: 10px;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: #f3f4f6;
}

body.menu-open {
  overflow: hidden;
}
.price-trust {
        margin: 20px auto 0;
    color: #0f172a;
}
.csv-upload {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

/* Кнопка скачать */
.csv-download {
  display: flex;
  justify-content: center;
}

/* Строка формы */
.csv-form-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Инпут файла */
.file-input {
  max-width: 260px;
}

/* Чтобы кнопка и input были одной высоты */
.csv-form-row .btn,
.file-input {
  height: 40px;
  display: flex;
  align-items: center;
}
.header-user {
  position: relative;
}

.header-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  min-width: 180px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  display: none;
  flex-direction: column;
  padding: 8px 0;
  z-index: 100;
}

.header-dropdown a {
  padding: 10px 14px;
  font-size: 14px;
  color: #111827;
  text-decoration: none;
}

.header-dropdown a:hover {
  background: #f3f4f6;
}

.dropdown-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 6px 0;
}

.header-dropdown .logout {
  color: #ef4444;
}
.header-user {
  position: relative;
}

.header-account {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #9b7bff);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.25);
}

.header-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid #ececf3;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  display: none;
  flex-direction: column;
  padding: 10px 0;
  z-index: 1200;
}

.header-dropdown.open {
  display: flex;
}

.header-dropdown-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 12px;
}

.header-dropdown-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #9b7bff);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-dropdown-meta {
  min-width: 0;
}

.header-dropdown-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
}

.header-dropdown-email {
  font-size: 12px;
  color: #6b7280;
  word-break: break-word;
}

.header-dropdown a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  font-size: 14px;
  color: #111827;
  transition: background 0.2s ease;
}

.header-dropdown a:hover {
  background: #f5f7fb;
}

.header-dropdown .logout {
  color: #dc2626;
}

.dropdown-divider {
  height: 1px;
  background: #ececf3;
  margin: 6px 0;
}
.connect-wizard {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.wizard-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border: 1px solid #ececf3;
  border-radius: 16px;
  background: #fafafe;
}

.wizard-step-num {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background: #7c5cff;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard-step-content h3 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.3;
  color: #111827;
}

.wizard-step-content p {
  margin: 0;
  color: #4b5563;
  line-height: 1.55;
}

.wizard-list {
  margin: 0;
  padding-left: 18px;
  color: #4b5563;
}

.wizard-list li + li {
  margin-top: 4px;
}

.connect-tip {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f5f3ff;
  color: #5b21b6;
  line-height: 1.55;
  border: 1px solid #e9ddff;
}

@media (max-width: 640px) {
  .wizard-step {
    padding: 14px;
    gap: 12px;
  }

  .wizard-step-content h3 {
    font-size: 16px;
  }

  .wizard-step-num {
    width: 30px;
    height: 30px;
    min-width: 30px;
    font-size: 14px;
  }
}
@media (max-width: 640px) {
  .header-account,
  .header-avatar {
    width: 38px;
    height: 38px;
  }

  .header-dropdown {
    min-width: 220px;
    right: 0;
  }
}
.mobile-subscription-block {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f5f3ff;
}

.mobile-subscription-status {
  font-size: 13px;
  color: #5b21b6;
  margin-bottom: 8px;
  font-weight: 500;
}

.mobile-sub-btn {
  width: 100%;
  text-align: center;
}
.connect-status-card {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #ececf3;
}

.connect-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.connect-status-head h3 {
  margin: 0;
  font-size: 18px;
}
/* Responsive */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.notify-sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.notify-section-card {
  border: 1px solid #ececf3;
  border-radius: 16px;
  padding: 18px;
  background: #fafafe;
}

.notify-section-card-full {
  grid-column: 1 / -1;
}

.notifications-grid-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 900px) {
  .notify-sections-grid {
    grid-template-columns: 1fr;
  }

  .notify-section-card-full {
    grid-column: auto;
  }

  .notifications-grid-two-cols {
    grid-template-columns: 1fr;
  }
}
.system-status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.status-card {
  border: 1px solid #ececf3;
  border-radius: 16px;
  padding: 16px 18px;
  background: #ffffff;
  transition: 0.2s ease;
}

.status-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.status-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.status-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.status-meta {
  font-size: 13px;
  color: #6b7280;
}



.table-scroll {
  overflow-x: auto;
}
.metrics-top-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.chart-card {
  position: relative;
  width: 100%;
  min-height: 340px;
}

.chart-card-wide {
  width: 100%;
}

.chart-card canvas {
  width: 100% !important;
  height: 340px !important;
  display: block;
}

.table-scroll {
  overflow-x: auto;
}
.save-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #111;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.3s;
  z-index: 9999;
  font-size: 14px;
}

.save-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.save-toast.error {
  background: #e53935;
}
.chart-controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.chart-tabs {
  display: flex;
  gap: 6px;
}

.chart-tab {
  padding: 6px 10px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  border-radius: 6px;
}

.chart-tab.active {
  background: #111;
  color: #fff;
}
.kpi-row-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.kpi-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.kpi-lines div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.kpi-lines span {
  color: #666;
}

.kpi-lines strong {
  font-weight: 600;
  white-space: nowrap;
}
.footnote {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}
.finance-donut-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
}

.finance-donut-chart {
  position: relative;
  width: 320px;
  height: 320px;
  flex: 0 0 320px;
}

.finance-donut-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.finance-donut-legend {
  width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.finance-legend-row {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  column-gap: 10px;
  font-size: 15px;
}

.finance-legend-row strong {
  white-space: nowrap;
  text-align: right;
}

.finance-total-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  font-size: 15px;
}

.finance-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.finance-dot-commission { background: #8b5cf6; }
.finance-dot-logistics { background: #f59e0b; }
.finance-dot-acquiring { background: #3b82f6; }
.finance-dot-returns { background: #ef4444; }
.finance-dot-net { background: #22c55e; }

@media (max-width: 900px) {
  .finance-donut-layout {
    flex-direction: column;
    align-items: center;
  }

  .finance-donut-chart {
    width: 280px;
    height: 280px;
    flex-basis: 280px;
  }

  .finance-donut-legend {
    width: 100%;
    max-width: 420px;
  }
}
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alert-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fafafa;
}

.alert-icon {
  font-size: 20px;
  line-height: 1;
  text-align: center;
}

.alert-content {
  min-width: 0;
}

.alert-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.alert-text {
  color: #374151;
  font-size: 14px;
}

.alert-meta {
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
  word-break: break-word;
}

.alert-action .btn {
  min-width: 110px;
}

@media (max-width: 768px) {
  .alert-item {
    grid-template-columns: 32px 1fr;
  }

  .alert-action {
    grid-column: 2;
    margin-top: 10px;
  }
}
@media (max-width: 1200px) {
  .kpi-row-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 350px) {
  .kpi-row-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 980px) {
  .metrics-top-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .metrics-top-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .system-status-grid {
    grid-template-columns: 1fr;
  }

  .status-card-wide {
    grid-column: auto;
  }
}
@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1180px) {
  .site-nav {
    gap: 14px;
  }

  .site-nav a {
    font-size: 13px;
  }
}

@media (max-width: 980px) {
  .desktop-nav {
    display: none;
  }

  .header-burger {
    display: inline-block;
  }

  .site-header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .site-logo {
    text-align: center;
    justify-self: center;
  }
}
.section-tab-small-index {
    padding: 0 6px;
}
.status-donut-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
}

.status-donut-chart {
  width: 320px;
  height: 320px;
  position: relative;
}

.status-donut-chart canvas {
  width: 100% !important;
  height: 100% !important;
}



.status-total-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.alert-success{
    margin: 16px 0;
    padding: 12px 16px;
    border-radius: 10px;
    background: #f8fafc;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.status-dot-new { background: #3b82f6; }
.status-dot-sorted { background: #f59e0b; }
.status-dot-ready_for_pickup { background: #f97316; }
.status-dot-sold { background: #22c55e; }
.status-dot-cancel { background: #ef4444; }
.status-dot-canceled { background: #ef4444; }
.status-dot-canceled_by_client { background: #ef4444; }
.status-dot-other { background: #9ca3af; }

.status-donut-legend {
  width: 520px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-legend-row {
  display: grid;
  grid-template-columns: 16px minmax(120px, 1fr) 90px 130px 70px;
  gap: 10px;
  align-items: center;
}

.status-legend-name {
  text-align: left;
}

.status-legend-qty,
.status-legend-sum,
.status-legend-pct {
  text-align: right;
  font-weight: 600;
  white-space: nowrap;
}
.locked-panel {
  opacity: 0.6;
  position: relative;
margin-bottom: 20px;
}
.locked-panel::after {
  content: "🔒";
  position: absolute;
  top: 10px;
  right: 10px;
}
.subscription-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.subscription-lock-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 22px;
  padding: 36px 24px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  margin: auto;
}

.subscription-lock-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
}

.subscription-lock-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.subscription-lock-card p {
  margin: 0 0 22px;
  color: #64748b;
  line-height: 1.5;
}
.landing-donut-card {
  padding: 6px 4px;
}

.landing-donut-card h3 {
  font-size: 22px;
  margin: 0 0 8px;
  color: #0f172a;
}

.landing-donut-card p {
  margin: 0 0 18px;
  color: #64748b;
}

.landing-donut {
  width: 260px;
  height: 260px;
  margin: 0 auto 22px;
  border-radius: 50%;
  position: relative;
}

.landing-donut::after {
  content: "";
  position: absolute;
  inset: 50px;
  background: #fff;
  border-radius: 50%;
}

.fbs-donut {
  background: conic-gradient(
    #f59e0b 0 39.8%,
    #f97316 39.8% 66.9%,
    #22c55e 66.9% 82.2%,
    #ef4444 82.2% 83%,
    #3b82f6 83% 100%
  );
}

.finance-donut {
  background: conic-gradient(
    #8b5cf6 0 28.3%,
    #f59e0b 28.3% 37.7%,
    #3b82f6 37.7% 40.4%,
    #ef4444 40.4% 41%,
    #22c55e 41% 100%
  );
}

.landing-donut-center {
  position: absolute;
  inset: 60px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.landing-donut-center strong {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.2;
}

.green-text {
  color: #16a34a !important;
}

.landing-legend {
  display: grid;
  gap: 12px;
}

.landing-legend div {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 10px;
  align-items: center;
}

.landing-legend b {
  font-weight: 500;
}

.landing-legend strong {
  font-weight: 700;
  color: #0f172a;
  text-align: right;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.orange { background: #f59e0b; }
.dot.amber { background: #f97316; }
.dot.green { background: #22c55e; }
.dot.red { background: #ef4444; }
.dot.blue { background: #3b82f6; }
.dot.purple { background: #8b5cf6; }

@media (max-width: 640px) {
  .landing-donut {
    width: 220px;
    height: 220px;
  }

  .landing-donut::after {
    inset: 40px;
  }

  .landing-donut-center {
    inset: 68px;
  }

  .landing-legend div {
    grid-template-columns: 18px 1fr;
  }

  .landing-legend strong {
    grid-column: 2;
    text-align: left;
  }
}
@media (max-width: 768px) {
  .status-donut-legend {
    width: 100%;
    max-width: 420px;
  }

  .status-legend-row {
    grid-template-columns: 16px 1fr;
    gap: 6px 10px;
    align-items: start;
  }

  .status-dot {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: 4px;
  }

  .status-legend-name {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
    font-weight: 500;
  }

  .status-legend-qty,
  .status-legend-sum,
  .status-legend-pct {
    grid-row: 2;
    text-align: right;
    font-weight: 600;
  }

  .status-legend-qty {
    grid-column: 2;
    justify-self: start;
  }

  .status-legend-sum {
    grid-column: 2;
    justify-self: center;
  }

  .status-legend-pct {
    grid-column: 2;
    justify-self: end;
  }
}
section.panel.finance-upload-panel {
    margin-bottom: 20px;
}
@media (max-width: 640px) {
  .site-header-inner {
    min-height: 64px;
    gap: 12px;
  }

  .site-logo {
    font-size: 22px;
  }

  .header-login-btn {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .header-account {
    width: 38px;
    height: 38px;
  }

  .header-burger {
    width: 38px;
    height: 38px;
    padding: 8px;
  }
}

@media (max-width: 900px) {
  .risk-cards {
    grid-template-columns: 1fr;
  }

  .risk-card-metrics {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1100px) {
  .compare-kpi-grid, .stats-cards-grid3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid { grid-template-columns: 1fr;}
    .stats-cards-grid, .stats-cards-grid4, .stats-cards-grid5, .stats-cards-grid6 {
    grid-template-columns: repeat(2, 1fr);
  }
    .nav { display:none; }
}
@media (max-width: 760px) {

  .auth-card{
    padding:24px;
  }
  .auth-title{
    font-size:32px;
  }

.panel {
  width: 100%;
  min-width: 0;
}
}

.chart-controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.chart-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .chart-controls {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .chart-tabs {
    justify-content: center;
    width: 100%;
  }

  .chart-tabs .chart-tab {
    min-width: 92px;
    text-align: center;
  }

  .chart-tabs:last-child .chart-tab {
    min-width: 120px;
  }
}
@media (max-width: 768px) {
  .chart-tabs .chart-tab {
    padding: 8px 12px;
    font-size: 14px;
  }
}