@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Open+Sans:wght@400;500;600&display=swap');

:root {
  --navy:      #0d1b2a;
  --navy2:     #152336;
  --navy3:     #1e3350;
  --blue:      #4a9ede;
  --blue-light:#6db8f0;
  --blue-pale: #e8f4fd;
  --white:     #ffffff;
  --gray-bg:   #f4f7fb;
  --gray-light:#eef2f7;
  --gray-mid:  #c5d0de;
  --text-dark: #0d1b2a;
  --text-body: #2d4059;
  --text-muted:#6b7a8d;
  --success:   #2ecc71;
  --danger:    #e74c3c;
  --shadow:    0 4px 20px rgba(13,27,42,0.10);
  --shadow-lg: 0 8px 40px rgba(13,27,42,0.16);
  --radius:    12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
}

/* ── ТЁМНАЯ ТЕМА ── */
[data-theme="dark"] {
  --navy:      #e2eaf4;
  --navy2:     #c8d8ee;
  --navy3:     #a8bcd8;
  --blue:      #6db8f0;
  --blue-light:#90ccff;
  --blue-pale: #1a2a3d;
  --white:     #111827;
  --gray-bg:   #0f1623;
  --gray-light:#1a2234;
  --gray-mid:  #2d3f55;
  --text-dark: #e8f0fa;
  --text-body: #b8cce0;
  --text-muted:#7a90a8;
  --success:   #27ae60;
  --danger:    #c0392b;
  --shadow:    0 4px 20px rgba(0,0,0,0.40);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.55);
}
[data-theme="dark"] body { background: var(--gray-bg); color: var(--text-body); }
[data-theme="dark"] .card,
[data-theme="dark"] .order-card,
[data-theme="dark"] .work-card,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .review-card,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .price-card,
[data-theme="dark"] .step-card { background: var(--gray-light) !important; border-color: var(--gray-mid) !important; }
[data-theme="dark"] .site-header { background: #0d1627 !important; box-shadow: 0 2px 16px rgba(0,0,0,0.5) !important; }
[data-theme="dark"] .site-footer { background: #0a0f1a !important; }
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea { background: #1e2d42 !important; color: var(--text-body) !important; border-color: var(--gray-mid) !important; }
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: var(--text-muted) !important; }
[data-theme="dark"] .btn-primary { color: #fff !important; }
[data-theme="dark"] .btn-primary:hover { color: #fff !important; }
[data-theme="dark"] .btn-navy { background: #162035 !important; color: #e8f0fa !important; }
[data-theme="dark"] .btn-navy:hover { background: #1e2d47 !important; color: #e8f0fa !important; }
[data-theme="dark"] .btn-outline { border-color: var(--blue) !important; color: var(--blue) !important; }
[data-theme="dark"] .btn-outline:hover { background: var(--blue) !important; color: #fff !important; }
[data-theme="dark"] table th { background: #1a2234 !important; }
[data-theme="dark"] table tr:nth-child(even) { background: #141d2e !important; }
/* Logo & Nav */
[data-theme="dark"] .logo-name { color: #e8f0fa !important; }
[data-theme="dark"] .hamburger span { background: #e8f0fa !important; }
[data-theme="dark"] .mobile-menu { background: #0d1627 !important; }
[data-theme="dark"] .mobile-menu a { color: #e8f0fa !important; }
[data-theme="dark"] .mobile-menu a:hover { color: var(--blue) !important; }
[data-theme="dark"] .mobile-menu-close { color: #e8f0fa !important; background: rgba(255,255,255,0.08) !important; }
/* Hero & stats */
[data-theme="dark"] .hero { background: linear-gradient(135deg, #0a1520 0%, #0d1e33 100%) !important; }
[data-theme="dark"] .hero h1 { color: #e8f0fa !important; }
[data-theme="dark"] .stat-num { color: #e8f0fa !important; }
[data-theme="dark"] .about-hero { background: linear-gradient(135deg, #0a1520 0%, #0d1e33 100%) !important; }
[data-theme="dark"] .about-hero h1 { color: #e8f0fa !important; }
/* Step numbers */
[data-theme="dark"] .step-num { color: #fff !important; }
/* Calculator */
[data-theme="dark"] .calc-side { background: #0d1627 !important; }
[data-theme="dark"] .calc-side-title { color: #e8f0fa !important; }
[data-theme="dark"] .price-label { color: rgba(232,240,250,0.6) !important; }
[data-theme="dark"] .price-value { color: #e8f0fa !important; }
/* Dashboard sidebar */
[data-theme="dark"] .dash-sidebar { background: #0d1627 !important; border-right-color: #1e2d42 !important; }
[data-theme="dark"] .dash-user { border-bottom-color: rgba(255,255,255,0.08) !important; }
[data-theme="dark"] .dash-user-name { color: #e8f0fa !important; }
[data-theme="dark"] .dash-user-email { color: rgba(232,240,250,0.5) !important; }
[data-theme="dark"] .dash-nav-item { color: rgba(232,240,250,0.7) !important; }
[data-theme="dark"] .dash-nav-item:hover,
[data-theme="dark"] .dash-nav-item.active { background: rgba(74,158,222,0.18) !important; color: #e8f0fa !important; }
/* Contact card */
[data-theme="dark"] .contact-card { background: #162035 !important; color: #e8f0fa !important; }
[data-theme="dark"] .contact-card h2 { color: #e8f0fa !important; }
[data-theme="dark"] .contact-card p { color: rgba(232,240,250,0.65) !important; }
[data-theme="dark"] .contact-link { color: rgba(232,240,250,0.9) !important; }
/* Footer headings */
[data-theme="dark"] .footer-col h4 { color: #e8f0fa !important; }
[data-theme="dark"] .footer-col ul li a { color: rgba(232,240,250,0.6) !important; }
/* Section alt */
[data-theme="dark"] .section-alt { background: var(--gray-light) !important; }
/* Chat */
[data-theme="dark"] .chat-modal { background: var(--gray-light) !important; }
[data-theme="dark"] .chat-head { background: #0d1627 !important; }
[data-theme="dark"] .chat-msg-other .chat-bubble { background: #1e2d42 !important; }
[data-theme="dark"] .chat-msg-mine .chat-bubble { background: #163354 !important; }
[data-theme="dark"] .chat-input { background: #1e2d42 !important; color: var(--text-body) !important; }
[data-theme="dark"] .chat-form { background: #111827 !important; border-color: var(--gray-mid) !important; }
[data-theme="dark"] .chat-attach { background: #1e2d42 !important; color: var(--text-body) !important; }
[data-theme="dark"] .chat-attach:hover { background: #2a3d55 !important; }
/* Methodology */
[data-theme="dark"] .meth-result { background: #1a2a3d !important; border-color: #2a4060 !important; }
[data-theme="dark"] .meth-raw { background: #1a2234 !important; color: #b8cce0 !important; border: 1px solid #2d3f55 !important; }
[data-theme="dark"] .meth-table td { border-color: #2d3f55 !important; }
[data-theme="dark"] .meth-label { color: #7a90a8 !important; }
/* Badges */
[data-theme="dark"] .badge-new     { background: #0d2550 !important; color: #6db8f0 !important; }
[data-theme="dark"] .badge-process { background: #352a00 !important; color: #e8c040 !important; }
[data-theme="dark"] .badge-done    { background: #0d2e19 !important; color: #4caf7d !important; }
[data-theme="dark"] .badge-cancel  { background: #2e0d0d !important; color: #e87878 !important; }
/* Text utilities */
[data-theme="dark"] .text-white { color: #e8f0fa !important; }
/* Nav active/hover state */
[data-theme="dark"] .nav-main a:hover,
[data-theme="dark"] .nav-main a.active { color: #e8f0fa !important; }
/* Section-navy (CTA sections, «Готовы начать?», «Есть вопросы?» и аналогичные) */
[data-theme="dark"] .section-navy { background: #0d1627 !important; }
[data-theme="dark"] .section-navy h1,
[data-theme="dark"] .section-navy h2,
[data-theme="dark"] .section-navy h3,
[data-theme="dark"] .section-navy h4 { color: #e8f0fa !important; }
[data-theme="dark"] .section-navy p { color: rgba(232,240,250,0.72) !important; }
/* About-hero p */
[data-theme="dark"] .about-hero p { color: rgba(232,240,250,0.7) !important; }
/* Cookie banner */
[data-theme="dark"] #cookieBanner { background: #0d1627 !important; }
/* Advantage card icon circle */
[data-theme="dark"] .advantage-card .ac-icon { background: #162035 !important; }
/* Guarantee section cards */
[data-theme="dark"] .guarantee-card { background: var(--gray-light) !important; }
::-webkit-scrollbar-track { background: var(--gray-bg); }
[data-theme="dark"] ::-webkit-scrollbar-track { background: #0f1623; }
/* Hero gradient sections – page headers with navy gradient on all pages */
[data-theme="dark"] .hero-navy { background: linear-gradient(135deg,#0a1520 0%,#0d1e33 100%) !important; }
[data-theme="dark"] .hero-navy h1 { color: #e8f0fa !important; }
[data-theme="dark"] .hero-navy p  { color: rgba(232,240,250,0.7) !important; }
/* Navy CTA / info boxes with white inline text */
[data-theme="dark"] .dark-box-navy { background: #162035 !important; }
[data-theme="dark"] .dark-box-navy h2,
[data-theme="dark"] .dark-box-navy h3 { color: #e8f0fa !important; }
[data-theme="dark"] .dark-box-navy p  { color: rgba(232,240,250,0.7) !important; }
/* About page stat cards (use inline background vars) */
[data-theme="dark"] .about-stats > div:nth-child(1) { background: #162035 !important; }
[data-theme="dark"] .about-stats > div:nth-child(2) { background: #1a4a7a !important; }
[data-theme="dark"] .about-stats > div:nth-child(2) > div:first-child { color: #e8f0fa !important; }
[data-theme="dark"] .about-stats > div:nth-child(4) { background: #1e2d47 !important; }
/* Footer brand paragraph */
[data-theme="dark"] .footer-brand p { color: rgba(232,240,250,0.5) !important; }
/* Blog hero section (defined via CSS class, not inline style) */
[data-theme="dark"] .blog-hero { background: linear-gradient(135deg,#0a1520 0%,#0d1e33 100%) !important; }
[data-theme="dark"] .blog-hero h1 { color: #e8f0fa !important; }
[data-theme="dark"] .blog-hero p  { color: rgba(232,240,250,0.7) !important; }
[data-theme="dark"] .blog-card .blog-title { color: #e8f0fa !important; }
[data-theme="dark"] .post-article { background: var(--gray-light) !important; }
[data-theme="dark"] .post-article h1,
[data-theme="dark"] .post-article .post-body h2,
[data-theme="dark"] .post-article .post-body h3 { color: #e8f0fa !important; }
[data-theme="dark"] .post-article .post-body { color: var(--text-body) !important; }
/* Contacts – working-hours block */
[data-theme="dark"] .contact-card h3,
[data-theme="dark"] .contact-card h4 { color: #e8f0fa !important; }
[data-theme="dark"] .contact-hours span { color: rgba(232,240,250,0.8) !important; }
/* Login / auth page */
[data-theme="dark"] .auth-page { background: linear-gradient(135deg,#080f1a 0%,#0a1625 100%) !important; }
[data-theme="dark"] .auth-box { background: #1a2234 !important; }
[data-theme="dark"] .auth-tabs { background: #111827 !important; }
[data-theme="dark"] .auth-tab.active { background: #1a2234 !important; color: #e8f0fa !important; box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important; }
[data-theme="dark"] .auth-logo h1 { color: #e8f0fa !important; }
/* Admin panel */
[data-theme="dark"] .admin-header { background: #0d1627 !important; }
[data-theme="dark"] .admin-sidebar { background: #111827 !important; }
[data-theme="dark"] .admin-content { background: var(--gray-bg); }
[data-theme="dark"] .filters-bar { background: var(--gray-light) !important; border-color: var(--gray-mid) !important; }
[data-theme="dark"] .filters-bar input,
[data-theme="dark"] .filters-bar select { background: #1e2d42 !important; color: var(--text-body) !important; border-color: var(--gray-mid) !important; }
[data-theme="dark"] .item-card { background: var(--gray-light) !important; }
[data-theme="dark"] .item-card .item-title { color: #e8f0fa !important; }
/* Admin content: btn-outline on light backgrounds must be visible */
.admin-content .btn-outline {
  color: var(--navy);
  border-color: var(--gray-mid);
}
.admin-content .btn-outline:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: transparent;
}
[data-theme="dark"] .admin-content .btn-outline { color: var(--blue) !important; border-color: var(--gray-mid) !important; }
[data-theme="dark"] .admin-content .btn-outline:hover { color: #fff !important; background: var(--blue) !important; border-color: var(--blue) !important; }
/* BYN inline logo — invert in dark mode so it stays visible */
[data-theme="dark"] .byn-inline { filter: invert(1) brightness(2); }
/* Nav user button */
.nav-user-btn { display:flex; align-items:center; gap:7px; text-decoration:none; }
.nav-user-icon { width:28px; height:28px; border-radius:50%; background:var(--blue); color:#fff; font-weight:800; font-size:0.85rem; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.nav-user-name { color:rgba(255,255,255,0.9); font-family:'Nunito',sans-serif; font-weight:700; font-size:0.85rem; max-width:90px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Кнопка переключения темы */
.theme-toggle {
  background: none;
  border: 1.5px solid var(--gray-mid);
  border-radius: 20px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition);
  line-height: 1;
}
.theme-toggle:hover { border-color: var(--blue); color: var(--blue); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--gray-bg);
  color: var(--text-body);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

h1,h2,h3,h4,h5 {
  font-family: 'Nunito', sans-serif;
  color: var(--text-dark);
  line-height: 1.25;
}

a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-light); }

img { max-width: 100%; display: block; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-bg); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 4px; }

/* ══════════════════════════════════════════
   HEADER / NAV
══════════════════════════════════════════ */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(74,158,222,0.3));
}

.logo-name {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--white);
  letter-spacing: 0.5px;
}
.logo-name span { color: var(--blue); }

.nav-main {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  flex-wrap: nowrap;
  justify-content: flex-start;
  min-width: 0;
  overflow: hidden;
}

.nav-main a {
  color: rgba(255,255,255,0.82);
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 0.84rem;
  padding: 7px 7px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-main a:hover, .nav-main a.active {
  color: var(--white);
  background: rgba(74,158,222,0.18);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nav-actions .btn { padding: 8px 14px; font-size: 0.85rem; }

/* ── Language switcher ────────────────────────────────────────── */
.lang-switcher {
  position: relative;
  flex-shrink: 0;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  letter-spacing: 0.05em;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  color: var(--white);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.lang-btn:hover { border-color: var(--blue); background: rgba(255,255,255,0.06); }
.lang-arrow { font-size: 0.65rem; opacity: 0.7; transition: transform 0.2s; }
.lang-switcher.open .lang-arrow { transform: rotate(180deg); }
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  overflow: hidden;
  z-index: 9999;
}
.lang-switcher.open .lang-dropdown { display: block; }
.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  transition: background 0.15s;
}
.lang-dropdown a:hover { background: var(--gray-bg); }
.lang-dropdown a.active { background: rgba(0,90,255,0.07); color: var(--blue); }
.lang-dropdown a span { font-weight: 400; font-size: 0.78rem; opacity: 0.7; }

/* Dark theme overrides */
[data-theme="dark"] .lang-btn { border-color: rgba(255,255,255,0.2); color: #e8f0fa; }
[data-theme="dark"] .lang-btn:hover { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .lang-dropdown { background: #1a2234; border-color: rgba(255,255,255,0.12); }
[data-theme="dark"] .lang-dropdown a { color: #e8f0fa; }
[data-theme="dark"] .lang-dropdown a:hover { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .lang-dropdown a.active { background: rgba(0,90,255,0.15); color: #6ba3ff; }

@media (max-width: 480px) {
  .lang-btn { padding: 5px 8px; font-size: 0.74rem; }
  .lang-dropdown { min-width: 120px; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--blue-light);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(74,158,222,0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.35);
}
.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue-light);
  background: rgba(74,158,222,0.08);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover {
  background: var(--navy2);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger); color: #fff; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 55%, var(--navy3) 100%);
  padding: 80px 24px 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 110%, rgba(74,158,222,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(74,158,222,0.15);
  border: 1px solid rgba(74,158,222,0.35);
  color: var(--blue-light);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 16px;
  border-radius: 999px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  max-width: 700px;
  margin: 0 auto 18px;
}

.hero h1 span { color: var(--blue); }

.hero p {
  color: rgba(255,255,255,0.72);
  font-size: 1.08rem;
  max-width: 540px;
  margin: 0 auto 36px;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 56px;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }

.stat-num {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 2.2rem;
  color: var(--white);
  line-height: 1;
}
.stat-num span { color: var(--blue); }
.stat-label {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ══════════════════════════════════════════
   SECTIONS
══════════════════════════════════════════ */
.section { padding: 72px 24px; }
.section-white { background: var(--white); }
.section-gray  { background: var(--gray-bg); }
.section-navy  { background: var(--navy); }

.container { max-width: 1200px; margin: 0 auto; }

.section-label {
  display: inline-block;
  color: var(--blue);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 14px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
}

.section-head {
  margin-bottom: 48px;
}
.section-head.center { text-align: center; }
.section-head.center .section-sub { margin: 0 auto; }

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

/* Clickable service card (used on index "what we do" grid) */
a.card-service {
  text-align: center;
  color: inherit;
  text-decoration: none;
  display: block;
  border: 2px solid transparent;
}
a.card-service:hover {
  border-color: var(--blue);
  color: inherit;
}
a.card-service:hover h3 { color: var(--blue); }
a.card-service h3 { transition: color var(--transition); }

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--blue-pale);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ══════════════════════════════════════════
   STEPS / HOW IT WORKS
══════════════════════════════════════════ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 32px;
  left: calc(12.5% + 16px);
  right: calc(12.5% + 16px);
  height: 2px;
  background: linear-gradient(to right, var(--blue), var(--blue-light));
  z-index: 0;
}

.step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-num {
  width: 64px;
  height: 64px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.4rem;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(74,158,222,0.35);
}

.step h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.step p { color: var(--text-muted); font-size: 0.85rem; }

/* ══════════════════════════════════════════
   REVIEWS
══════════════════════════════════════════ */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--blue);
}

.review-stars { color: #f5a623; font-size: 1rem; margin-bottom: 12px; letter-spacing: 2px; }
.review-text { color: var(--text-body); font-size: 0.9rem; margin-bottom: 16px; font-style: italic; }
.review-author { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.9rem; color: var(--text-dark); }
.review-work { color: var(--text-muted); font-size: 0.8rem; }

/* Star picker (reviews submission form) */
.star-picker { display: inline-flex; gap: 6px; font-size: 1.6rem; line-height: 1; user-select: none; }
.star-picker .sp-star { color: #d8d8d8; cursor: pointer; transition: color 0.15s ease, transform 0.12s ease; }
.star-picker .sp-star.on { color: #f5a623; }
.star-picker .sp-star:hover { transform: scale(1.12); }

/* ══════════════════════════════════════════
   FAQ ACCORDION
══════════════════════════════════════════ */
.faq-list { max-width: 780px; margin: 0 auto; }

.faq-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 22px;
  text-align: left;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.97rem;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: color var(--transition);
}
.faq-q:hover { color: var(--blue); }

.faq-q .icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--blue-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--blue);
  transition: transform var(--transition);
}

.faq-item.open .faq-q .icon { transform: rotate(45deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-a-inner {
  padding: 0 22px 18px;
  color: var(--text-body);
  font-size: 0.92rem;
  line-height: 1.7;
  border-top: 1px solid var(--gray-light);
}
.faq-item.open .faq-a { max-height: 400px; }

/* ══════════════════════════════════════════
   CALCULATOR / ORDER PAGE
══════════════════════════════════════════ */
.calc-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 340px;
}

.calc-main { padding: 36px; }
.calc-side {
  background: var(--navy);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
}

.calc-side-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.price-display {
  background: rgba(74,158,222,0.12);
  border: 1px solid rgba(74,158,222,0.3);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
}

.price-label { color: rgba(255,255,255,0.6); font-size: 0.82rem; margin-bottom: 8px; }
.price-value {
  font-family: 'Nunito', sans-serif;
  font-weight: 600; /* thinner — matches BYN glyph weight */
  font-size: 2.4rem;
  letter-spacing: -0.01em;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.price-value img { width: 28px; height: 28px; object-fit: contain; }

/* Inline BYN ruble icon (used alongside prices in text) */
.byn-inline {
  width: 0.92em;
  height: 0.92em;
  object-fit: contain;
  vertical-align: -0.12em;
  display: inline-block;
  margin: 0 0.08em;
}

/* Hide native number-input spinner arrows (we provide our own −/+) */
.number-input input[type="number"]::-webkit-outer-spin-button,
.number-input input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.number-input input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.price-note { color: rgba(255,255,255,0.5); font-size: 0.78rem; margin-top: 8px; }

.calc-summary { flex: 1; }
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 0.85rem;
}
.summary-row .s-key { color: rgba(255,255,255,0.55); flex-shrink: 0; }
.summary-row .s-val {
  color: var(--white);
  font-weight: 500;
  text-align: right;
  min-width: 0;
  flex: 1;
  margin-left: 10px;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.3;
}

.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.form-label .req { color: var(--danger); }

.form-control {
  width: 100%;
  padding: 11px 16px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.92rem;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
  appearance: none;
}
.form-control:focus { border-color: var(--blue); }
.form-control::placeholder { color: var(--gray-mid); }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%236b7a8d' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

textarea.form-control { resize: vertical; min-height: 90px; }

.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }

.optgroup-select optgroup { font-weight: 700; color: var(--navy); }

.number-input {
  display: flex;
  align-items: center;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}
.number-input:focus-within { border-color: var(--blue); }
.number-input button {
  width: 40px;
  height: 44px;
  background: var(--gray-light);
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition);
}
.number-input button:hover { background: var(--blue); color: #fff; }
.number-input input {
  flex: 1;
  border: none;
  text-align: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
  outline: none;
  min-width: 0;
  padding: 0 6px;
}

.antiplg-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.antiplg-opt {
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.antiplg-opt:hover { border-color: var(--blue); }
.antiplg-opt.selected {
  border-color: var(--blue);
  background: var(--blue-pale);
  color: var(--navy);
}
.antiplg-opt .opt-name { font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.82rem; }
.antiplg-opt .opt-price { color: var(--blue); font-size: 0.75rem; font-weight: 600; }

.urgency-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.urgency-opt {
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.urgency-opt:hover { border-color: var(--blue); }
.urgency-opt.selected { border-color: var(--blue); background: var(--blue-pale); }
.urgency-opt .u-days { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 0.9rem; color: var(--navy); }
.urgency-opt .u-mul { font-size: 0.72rem; color: var(--text-muted); }
.urgency-opt.selected .u-days { color: var(--blue); }

/* Uniqueness slider */
.uniq-slider {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  background: var(--gray-light);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  margin: 10px 0 4px;
}
.uniq-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(74,158,222,0.45);
  cursor: pointer;
  transition: transform var(--transition);
}
.uniq-slider::-webkit-slider-thumb:hover { transform: scale(1.08); }
.uniq-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid #fff;
  cursor: pointer;
}

.negotiable-banner {
  background: var(--blue-pale);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: none;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.negotiable-banner.show { display: flex; }
.negotiable-banner .icon { font-size: 1.6rem; }
.negotiable-banner p { color: var(--navy); font-size: 0.9rem; }
.negotiable-banner strong { font-family: 'Nunito', sans-serif; }

/* ══════════════════════════════════════════
   GUARANTEES PAGE
══════════════════════════════════════════ */
.guarantee-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--blue);
}
.guarantee-card .g-icon { font-size: 2rem; margin-bottom: 14px; }
.guarantee-card h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 10px; }
.guarantee-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }

/* ══════════════════════════════════════════
   CONTACT PAGE
══════════════════════════════════════════ */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: start;
}

.contact-card {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 36px 32px;
  color: var(--white);
}
.contact-card h2 { color: var(--white); font-size: 1.5rem; margin-bottom: 8px; }
.contact-card p { color: rgba(255,255,255,0.65); margin-bottom: 28px; font-size: 0.92rem; }

.contact-links { display: flex; flex-direction: column; gap: 14px; }
.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color var(--transition);
}
.contact-link:hover { color: var(--blue-light); }
.contact-link .cl-icon {
  width: 44px;
  height: 44px;
  background: rgba(74,158,222,0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.form-card h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 22px; }

/* ══════════════════════════════════════════
   AUTH PAGE
══════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 44px 40px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo img { width: 56px; margin: 0 auto 10px; filter: none; }
.auth-logo h1 { font-size: 1.4rem; font-weight: 900; }
.auth-logo h1 span { color: var(--blue); }
.auth-logo p { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }

.auth-tabs {
  display: flex;
  background: var(--gray-bg);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 9px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all var(--transition);
  border: none;
  background: none;
}
.auth-tab.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow);
}

.form-panel { display: none; }
.form-panel.active { display: block; }

/* ══════════════════════════════════════════
   DASHBOARD
══════════════════════════════════════════ */
.dash-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 68px);
}

.dash-sidebar {
  background: var(--white);
  padding: 28px 18px;
  border-right: 1px solid var(--gray-light);
}

.dash-user {
  text-align: center;
  padding: 20px 16px;
  border-bottom: 1px solid var(--gray-light);
  margin-bottom: 20px;
}
.dash-avatar {
  width: 56px;
  height: 56px;
  background: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.4rem;
  color: #fff;
  margin: 0 auto 10px;
}
.dash-user-name { color: var(--text-dark); font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 0.95rem; }
.dash-user-email { color: var(--text-muted); font-size: 0.78rem; }

.dash-nav { display: flex; flex-direction: column; gap: 4px; }
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
  text-align: left;
  text-decoration: none;
}
.dash-nav-item:hover, .dash-nav-item.active {
  background: var(--blue-pale);
  color: var(--navy);
}
.dash-nav-item .ni-icon { font-size: 1rem; width: 20px; text-align: center; }

.dash-content { padding: 36px; background: var(--gray-bg); }
.dash-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 24px; }

.dash-panel { display: none; }
.dash-panel.active { display: block; }

.stats-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.stat-mini-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.stat-mini-card .sm-num {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--blue);
}
.stat-mini-card .sm-label { color: var(--text-muted); font-size: 0.82rem; margin-top: 4px; }

/* ══════════════════════════════════════════
   TABLE
══════════════════════════════════════════ */
.table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.table-head h3 { font-size: 1rem; font-weight: 800; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}
.data-table th {
  background: var(--gray-bg);
  padding: 12px 16px;
  text-align: left;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-light);
  vertical-align: middle;
  color: var(--text-body);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(74,158,222,0.03); }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.3px;
}
.badge-new      { background: #e3f0ff; color: #1a6dc7; }
.badge-process  { background: #fff3cd; color: #856404; }
.badge-done     { background: #d4edda; color: #155724; }
.badge-cancel   { background: #fde8e8; color: #c0392b; }

.search-input {
  padding: 8px 14px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.87rem;
  outline: none;
  width: 220px;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--blue); }

/* ══════════════════════════════════════════
   ABOUT PAGE
══════════════════════════════════════════ */
.about-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 100%);
  padding: 72px 24px;
  text-align: center;
}
.about-hero h1 { color: var(--white); font-size: 2.2rem; }
.about-hero p { color: rgba(255,255,255,0.7); max-width: 520px; margin: 14px auto 0; }
.about-history {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.about-stats > * { min-width: 0; word-wrap: break-word; }

.advantage-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.advantage-card .ac-icon {
  width: 60px;
  height: 60px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 16px;
}
.advantage-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 8px; }
.advantage-card p { color: var(--text-muted); font-size: 0.87rem; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.site-footer {
  background: var(--navy);
  padding: 48px 24px 24px;
  color: rgba(255,255,255,0.6);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .logo-wrap { margin-bottom: 14px; }
.footer-brand p { font-size: 0.87rem; line-height: 1.7; max-width: 300px; }

.footer-col h4 {
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  transition: color var(--transition);
  text-decoration: none;
}
.footer-col ul li a:hover { color: var(--blue-light); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

/* ══════════════════════════════════════════
   THANKS PAGE
══════════════════════════════════════════ */
.thanks-page {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.thanks-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 56px 48px;
  max-width: 520px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.thanks-icon { font-size: 3.5rem; margin-bottom: 20px; }
.thanks-box h1 { font-size: 1.8rem; margin-bottom: 12px; }
.thanks-box p { color: var(--text-muted); margin-bottom: 28px; }

/* ══════════════════════════════════════════
   ALERTS
══════════════════════════════════════════ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: none;
}
.alert.show { display: block; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger  { background: #fde8e8; color: #c0392b; border: 1px solid #f5c6cb; }
.alert-info    { background: var(--blue-pale); color: var(--navy); border: 1px solid rgba(74,158,222,0.3); }

/* ══════════════════════════════════════════
   MODAL
══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,27,42,0.7);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-light);
}
.modal-head h3 { font-size: 1.1rem; font-weight: 800; }
.modal-close {
  width: 32px; height: 32px;
  background: var(--gray-bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--gray-light); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.detail-item .di-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 3px; }
.detail-item .di-val { font-weight: 600; color: var(--text-dark); font-size: 0.92rem; }

/* ══════════════════════════════════════════
   UTILITY
══════════════════════════════════════════ */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-blue   { color: var(--blue); }
.text-muted  { color: var(--text-muted); }
.text-white  { color: var(--white); }
.fw-bold     { font-weight: 700; }
.mt-4        { margin-top: 4px; }
.mt-8        { margin-top: 8px; }
.mt-16       { margin-top: 16px; }
.mt-24       { margin-top: 24px; }
.mb-0        { margin-bottom: 0; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.gap-12      { gap: 12px; }
.gap-16      { gap: 16px; }

.divider { border: none; border-top: 1px solid var(--gray-light); margin: 24px 0; }

.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .calc-wrap { grid-template-columns: 1fr; }
  .calc-side { order: -1; }
  /* Планшетный flex с label слева, ценой по центру, нотой справа */
  .price-display { display: flex; align-items: center; gap: 24px; text-align: left; }

  /* Сайдбар ЛК становится горизонтальной полосой над контентом, чтобы
     заказчик мог переключаться между вкладками «Мои заказы», «Реферальная
     программа», «Профиль» — иначе на мобиле не было бы навигации. */
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar {
    background: var(--navy);
    padding: 10px 12px;
    position: sticky;
    top: 60px;
    z-index: 50;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-right: none;
  }
  .dash-user { display: none; }
  .dash-sidebar .dash-nav {
    display: flex;
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 2px;
  }
  .dash-sidebar .dash-nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 9px 13px;
    font-size: 0.85rem;
    margin-top: 0 !important;     /* «Выйти» не должен прижиматься к низу в горизонтали */
    color: rgba(255,255,255,0.75);
  }
  .dash-sidebar .dash-nav-item:hover,
  .dash-sidebar .dash-nav-item.active {
    background: rgba(74,158,222,0.2);
    color: #fff;
  }
}

/* На телефонах горизонтальный flex давит цену — возвращаем стек,
   тогда clamp(font-size) даёт цене всю ширину карточки. */
@media (max-width: 768px) {
  .price-display {
    display: block;
    text-align: center;
    gap: 0;
  }
}

/* Intermediate breakpoint — switch to burger before items wrap */
@media (max-width: 1380px) {
  .nav-main { display: none; }
  .hamburger { display: flex; margin-left: auto; order: 99; }
  .nav-actions { order: 98; margin-left: auto; }
}

/* ═════════════  TABLET (≤ 900px)  ═════════════ */
@media (max-width: 900px) {
  .container { padding: 0 16px; }

  /* Admin layout: sidebar → top bar */
  .admin-layout { grid-template-columns: 1fr !important; }
  .admin-sidebar {
    padding: 10px 12px !important;
    position: sticky;
    top: 60px;
    z-index: 99;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-sidebar .dash-nav {
    flex-direction: row !important;
    gap: 6px !important;
    min-width: max-content;
  }
  .admin-sidebar .dash-nav-item { white-space: nowrap; padding: 9px 12px !important; }
  .admin-content { padding: 20px 16px !important; }
}

/* ═════════════  MOBILE (≤ 768px)  ═════════════ */
@media (max-width: 768px) {
  .nav-main { display: none; }
  .hamburger { display: flex; }
  .nav-actions .btn-outline { display: none; }
  .nav-actions .btn { padding: 7px 12px; font-size: 0.8rem; }

  .header-inner { padding: 0 14px; gap: 10px; height: 60px; }
  .logo-img { width: 36px; height: 36px; }
  .logo-name { font-size: 1.08rem; }

  /* Section padding tight */
  .section { padding: 48px 16px; }
  .hero { padding: 44px 18px 52px; }
  .hero h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .hero p { font-size: 0.98rem; margin-bottom: 28px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { padding: 12px 22px; font-size: 0.9rem; }
  .hero-stats { gap: 20px; margin-top: 36px; }
  .stat-num { font-size: 1.7rem; }

  .section-head { margin-bottom: 32px; }
  .section-title { font-size: 1.5rem; }

  .card { padding: 22px 18px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 16px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 18px; }
  .steps::before { display: none; }

  .reviews-grid { grid-template-columns: 1fr; gap: 16px; }
  .contact-wrap { grid-template-columns: 1fr; gap: 20px; }

  .footer-inner { grid-template-columns: 1fr; gap: 28px; padding-bottom: 26px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .site-footer { padding: 36px 18px 20px; }

  /* Calculator */
  .calc-wrap { border-radius: var(--radius); overflow: hidden; }
  .calc-main { padding: 18px 14px; min-width: 0; }
  .calc-side { padding: 22px 16px; min-width: 0; order: -1; }
  .calc-side-title { font-size: 1rem; margin-bottom: 14px; }
  .price-display {
    padding: 18px 12px;
    margin-bottom: 18px;
    min-width: 0;
    background: rgba(74,158,222,0.18);
    border: 1.5px solid rgba(74,158,222,0.45);
    box-shadow: 0 2px 14px rgba(74,158,222,0.12);
  }
  .price-label {
    font-size: 0.82rem;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  /* Цена крупно и жирно — главный CTA. Шрифт автоматически сжимается под ширину
     (clamp от 1.1rem до 2.4rem). overflow:hidden убран, чтобы число НЕ обрезалось. */
  .price-value {
    font-size: clamp(1.1rem, 7vw, 2.4rem);
    flex-wrap: nowrap;
    gap: 6px;
    white-space: nowrap;
    word-break: normal;
    overflow: visible;
    font-weight: 800;
    min-width: 0;
    max-width: 100%;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
    line-height: 1.1;
  }
  .price-value img { width: 0.85em; height: 0.85em; flex-shrink: 0; }
  .price-display .price-label,
  .price-display .price-note { text-align: center; }
  .price-note { font-size: 0.78rem; color: rgba(255,255,255,0.78); margin-top: 8px; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; gap: 14px; }
  .form-control { max-width: 100%; min-width: 0; }
  .urgency-options { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .urgency-opt { padding: 8px 4px; min-width: 0; }
  .urgency-opt .u-days { font-size: 0.78rem; white-space: nowrap; }
  .antiplg-options { grid-template-columns: 1fr; gap: 8px; }
  .antiplg-opt { min-width: 0; padding: 10px 12px; }
  .antiplg-opt .opt-name { white-space: normal; overflow-wrap: anywhere; font-size: 0.85rem; }
  .antiplg-opt .opt-price { white-space: nowrap; font-size: 0.8rem; }
  .number-input { max-width: 100%; }
  /* Summary rows — keep key/value on ONE line, no column stacking */
  .summary-row { flex-wrap: nowrap; gap: 8px; align-items: baseline; }
  .summary-row .s-key { white-space: nowrap; flex-shrink: 0; }
  .summary-row .s-val {
    max-width: none;
    min-width: 0;
    flex: 1;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .summary-row:last-child .s-val { font-size: 0.95rem; }

  /* Dashboard + Admin */
  .stats-mini { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-mini-card { padding: 16px 14px; }
  .stat-mini-card .sm-num { font-size: 1.4rem; }
  .stat-mini-card .sm-label { font-size: 0.75rem; }

  .detail-grid { grid-template-columns: 1fr; }
  .dash-content { padding: 20px 16px; }
  .dash-title { font-size: 1.2rem; margin-bottom: 16px; }

  /* Tables always scroll horizontally (never break layout) */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { font-size: 0.8rem; min-width: 560px; }
  .data-table th, .data-table td { padding: 9px 10px; }
  .table-head { padding: 14px 16px; }
  .table-head h3 { font-size: 0.95rem; }
  .search-input { width: 100%; }

  /* Auth / thanks */
  .auth-box { padding: 28px 20px; margin: 0 4px; }
  .thanks-box { padding: 36px 22px; }
  .thanks-icon { font-size: 2.8rem; }
  .thanks-box h1 { font-size: 1.4rem; }

  /* Modal */
  .modal-overlay { padding: 12px; }
  .modal { padding: 22px 18px; max-height: 92vh; }
  .modal-head h3 { font-size: 1rem; }

  /* Admin-specific inline bits */
  .filters-bar { grid-template-columns: 1fr 1fr !important; padding: 14px !important; gap: 10px !important; }
  .admin-header { padding: 0 14px !important; }
  .admin-header .logo-name { font-size: 0.95rem !important; }
  .admin-header .admin-badge { display: none !important; }
  #panelVersion { display: none !important; }
  #deployBanner { font-size: 0.78rem !important; padding: 9px 10px !important; }
  #deployBanner button { font-size: 0.72rem !important; padding: 5px 9px !important; }

  /* Item-card actions wrap cleanly */
  .item-card { padding: 16px !important; }
  .item-card .actions .btn { padding: 7px 12px; font-size: 0.78rem; }

  /* About/page headers */
  .about-hero { padding: 48px 18px; }
  .about-hero h1 { font-size: 1.6rem; }
  .about-history { grid-template-columns: 1fr; gap: 24px; }
  .about-stats { gap: 12px; }
  .about-stats > div { padding: 18px 12px !important; }
  .about-stats > div > div:first-child { font-size: 1.7rem !important; }
}

/* ═════════════  SMALL PHONE (≤ 480px)  ═════════════ */
@media (max-width: 480px) {
  html { font-size: 15px; }
  .header-inner { gap: 8px; padding: 0 12px; }
  .logo-img { width: 32px; height: 32px; filter: none; }
  .logo-name { font-size: 1rem; }
  .nav-actions .btn { padding: 6px 10px; font-size: 0.76rem; }

  .section { padding: 40px 14px; }
  .hero { padding: 36px 14px 44px; }
  .hero-badge { font-size: 0.72rem; padding: 5px 12px; }
  .hero h1 { font-size: 1.6rem; line-height: 1.22; }
  .hero-stats { gap: 14px; margin-top: 28px; }
  .stat-num { font-size: 1.4rem; }
  .stat-label { font-size: 0.72rem; }

  .steps { grid-template-columns: 1fr; }
  .step-num { width: 52px; height: 52px; font-size: 1.15rem; }

  .card { padding: 18px 15px; }
  .card-icon { width: 44px; height: 44px; font-size: 1.25rem; margin-bottom: 14px; }

  .calc-main { padding: 16px 12px; }
  .calc-side { padding: 20px 14px; }
  .price-value { font-size: clamp(1rem, 8vw, 1.9rem); gap: 5px; font-weight: 800; }
  .price-value img { width: 0.85em; height: 0.85em; }
  .form-control { padding: 10px 12px; font-size: 0.88rem; }
  .number-input button { width: 36px; height: 40px; font-size: 1rem; }
  .urgency-options { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .urgency-opt .u-days { font-size: 0.72rem; }
  .antiplg-opt .opt-name { font-size: 0.8rem; }
  .summary-row { font-size: 0.8rem; padding: 7px 0; }
  .summary-row .s-key { font-size: 0.76rem; }

  .stats-mini { grid-template-columns: 1fr; }

  .admin-header { height: 54px !important; padding: 0 12px !important; }
  .admin-header .btn-sm { padding: 5px 10px; font-size: 0.72rem; }
  .admin-header a { font-size: 0.78rem !important; }
  .admin-sidebar { top: 54px !important; padding: 8px !important; }
  .admin-sidebar .dash-nav-item { padding: 7px 10px !important; font-size: 0.82rem; }
  .admin-sidebar .ni-icon { font-size: 0.9rem !important; }
  .admin-content { padding: 16px 12px !important; }

  .filters-bar { grid-template-columns: 1fr !important; }

  .modal { padding: 18px 14px; border-radius: 10px; }
  .modal-head { padding-bottom: 12px; margin-bottom: 14px; }

  .auth-box { padding: 24px 18px; }
  .auth-logo img { width: 44px; }
  .auth-logo h1 { font-size: 1.2rem; }

  .site-footer { padding: 28px 14px 18px; }
  .footer-col h4 { font-size: 0.82rem; }

  /* BYN inline in text shouldn't break word-spacing on small screens */
  .byn-inline { width: 0.86em; height: 0.86em; }

  /* Mobile menu items slightly bigger tap target */
  .mobile-menu { padding: 72px 20px 24px; }
  .mobile-menu a { font-size: 1.02rem; padding: 12px 0; }

  /* Any horizontally-heavy inline headers in admin wrap tidily */
  .admin-header > div:first-child { gap: 8px !important; }
}

/* ═════════════  XS PHONE (≤ 360px)  ═════════════ */
@media (max-width: 360px) {
  .hero h1 { font-size: 1.4rem; }
  .nav-actions .btn { padding: 5px 9px; font-size: 0.72rem; }
  .logo-name { font-size: 0.92rem; }
  .admin-header a { display: none !important; }   /* "← На сайт" прячем на совсем узких */
  .price-value { font-size: 1.2rem; gap: 4px; }
  .price-value img { width: 14px; height: 14px; }
  .summary-row { font-size: 0.75rem; }
  .urgency-opt .u-days { font-size: 0.68rem; }
}

/* Mobile menu drawer — slides in from the right, narrower than full screen */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6,14,24,0.55);
  z-index: 1490;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu-backdrop.show { opacity: 1; visibility: visible; }

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(78vw, 320px); /* drawer width — not full screen */
  background: var(--navy);
  z-index: 1500;
  padding: 68px 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateX(105%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  box-shadow: -12px 0 40px rgba(0,0,0,0.35);
  border-left: 1px solid rgba(255,255,255,0.06);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
}
/* Close-button: visible only when the menu is open, large tappable target, top-right */
.mobile-menu-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  z-index: 1510;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus { background: rgba(74,158,222,0.35); transform: scale(1.05); }
body.menu-open { overflow: hidden; }

/* ── Mobile FIXED price bar (calculator page, always visible at bottom) ─ */
.mobile-price-bar { display: none; }
@media (max-width: 1024px) {
  .mobile-price-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--navy);
    color: var(--white);
    box-shadow: 0 -6px 20px rgba(13,27,42,0.35);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid rgba(74,158,222,0.35);
  }
  .mobile-price-bar .mpb-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    font-family: 'Nunito', sans-serif;
    font-weight: 500;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .mobile-price-bar .mpb-value {
    font-family: 'Nunito', sans-serif;
    font-weight: 600; /* thin — matches BYN weight */
    font-size: 1.3rem;
    color: var(--blue-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }
  .mobile-price-bar .mpb-value img { width: 16px; height: 16px; object-fit: contain; }

  /* When the bar is visible, reserve room at page bottom so content isn't covered */
  body.has-price-bar { padding-bottom: 70px; }
}


/* ══════════════════════════════════════════
   REFERRAL — реферальная программа
══════════════════════════════════════════ */
.ref-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
@media (max-width: 900px) { .ref-grid { grid-template-columns: 1fr; } }

.ref-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
.ref-card h3 {
  font-size: 1.02rem;
  margin-bottom: 14px;
  color: var(--text-dark);
}

/* Бейдж тира */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.tier-badge .dot {
  width: 8px; height: 8px;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
}
.tier-badge[data-level="0"] { background: linear-gradient(135deg,#94a3b8,#64748b); }
.tier-badge[data-level="1"] { background: linear-gradient(135deg,#22c55e,#16a34a); } /* зелёный */
.tier-badge[data-level="2"] { background: linear-gradient(135deg,#3b82f6,#2563eb); } /* синий */
.tier-badge[data-level="3"] { background: linear-gradient(135deg,#a855f7,#7e22ce); } /* фиолетовый */
.tier-badge[data-level="4"] { background: linear-gradient(135deg,#f97316,#ea580c); } /* оранжевый */
.tier-badge[data-level="5"] { background: linear-gradient(135deg,#ef4444,#b91c1c); } /* красный */

/* Прогресс-бар до следующего тира */
.tier-progress {
  height: 8px;
  background: var(--gray-light);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}
.tier-progress > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg,var(--blue),var(--blue-light));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.tier-progress-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Большая «карточка» с кодом */
.ref-code-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--blue-pale);
  border: 1px dashed var(--blue);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 10px;
}
.ref-code-box code {
  font-family: 'Nunito', monospace;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 1.5px;
  color: var(--navy);
  flex: 1;
  word-break: break-all;
}
.ref-code-copy {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  font-size: 0.84rem;
}
.ref-code-copy:hover { background: var(--blue-light); }
.ref-code-copy.copied { background: var(--success); }

.ref-balance-num {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  color: var(--navy);
}
.ref-balance-num small { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }

.ref-stat {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  color: var(--text-body);
  padding: 7px 0;
  border-bottom: 1px dashed var(--gray-light);
}
.ref-stat:last-child { border-bottom: none; }
.ref-stat strong { color: var(--text-dark); }

/* Таблица тиров */
.tiers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin-top: 10px;
}
.tiers-table th, .tiers-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--gray-light);
  text-align: left;
  vertical-align: top;
}
.tiers-table th {
  background: var(--gray-bg);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}
.tiers-table tr.current-tier td { background: rgba(74,158,222,0.06); }

/* Бесплатные перки */
.perk-card {
  background: linear-gradient(135deg,#fff7ed,#ffedd5);
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 10px;
  font-size: 0.88rem;
}
.perk-card.partner { background: linear-gradient(135deg,#fee2e2,#fecaca); border-color: #fca5a5; }
.perk-card strong { color: #9a3412; }
.perk-card.partner strong { color: #991b1b; }

/* Tier-cell в admin таблице */
td.tier-cell { white-space: nowrap; }

/* ══════════════════════════════════════════
   ORDER CHAT — модалка чата по заказу
══════════════════════════════════════════ */
.chat-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(8,14,28,0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 20px;
}
.chat-modal-bg.open {
  opacity: 1;
  pointer-events: auto;
}
.chat-modal {
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  transform: translateY(8px);
  transition: transform 0.2s ease;
}
.chat-modal-bg.open .chat-modal { transform: translateY(0); }
.chat-modal.chat-dragover { outline: 3px dashed var(--blue); outline-offset: -8px; }

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: var(--navy);
  color: #fff;
  gap: 14px;
}
.chat-head .chat-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.04rem;
  letter-spacing: 0.2px;
}
.chat-head .chat-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.62);
  margin-top: 2px;
  word-break: break-word;
}
.chat-search-inp {
  flex: 1;
  min-width: 0;
  max-width: 160px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.82rem;
  color: #fff;
  outline: none;
}
.chat-search-inp::placeholder { color: rgba(255,255,255,0.45); }
.chat-search-inp:focus { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); }

.chat-pinned-section {
  background: var(--blue-pale);
  border-left: 3px solid var(--blue);
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
}
.chat-pinned-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 6px;
}
.chat-pin-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.35;
  padding: 0 3px;
  transition: opacity 0.15s;
  vertical-align: middle;
  margin-left: 4px;
}
.chat-pin-btn:hover, .chat-pin-btn.chat-pin-active { opacity: 1; }
.chat-pinned-mark { font-size: 0.8rem; margin-right: 3px; }

.chat-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.chat-close:hover { background: rgba(255,255,255,0.12); }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  background: #f4f7fb;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
}
.chat-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 30px 8px;
  font-size: 0.92rem;
}

.chat-msg { display: flex; max-width: 100%; }
.chat-msg-mine { justify-content: flex-end; }
.chat-msg-other { justify-content: flex-start; }
.chat-bubble {
  background: #fff;
  border-radius: 14px;
  padding: 10px 14px 12px;
  max-width: 80%;
  box-shadow: 0 1px 2px rgba(13,27,42,0.06);
  font-size: 0.92rem;
  line-height: 1.55;
  word-wrap: break-word;
  word-break: break-word;
}
.chat-msg-mine .chat-bubble {
  background: linear-gradient(135deg, #4a9ede, #3a82c6);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg-other .chat-bubble {
  background: #fff;
  border-bottom-left-radius: 4px;
}
.chat-bubble-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.chat-msg-mine .chat-bubble-meta { color: rgba(255,255,255,0.78); }
.chat-bubble-body { white-space: pre-wrap; }
.chat-bubble-body a { color: inherit; text-decoration: underline; }

.chat-attachment-img {
  display: block;
  margin-top: 8px;
  border-radius: 8px;
  overflow: hidden;
}
.chat-attachment-img img {
  max-width: 100%;
  max-height: 280px;
  display: block;
}
.chat-attachment-meta {
  margin-top: 6px;
  font-size: 0.78rem;
}
.chat-attachment-file {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.18);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}
.chat-msg-other .chat-attachment-file {
  background: var(--gray-light);
  color: var(--text-dark);
}
.chat-attachment-icon { font-size: 1.4rem; line-height: 1; }
.chat-attachment-text { display: flex; flex-direction: column; min-width: 0; }
.chat-attachment-name {
  font-weight: 700;
  font-size: 0.86rem;
  word-break: break-word;
}
.chat-attachment-text small { font-size: 0.7rem; opacity: 0.75; }

.chat-form {
  border-top: 1px solid var(--gray-light);
  padding: 10px 14px 14px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-input {
  width: 100%;
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.92rem;
  resize: none;
  outline: none;
  min-height: 40px;
  max-height: 140px;
  background: #fff;
}
.chat-input:focus { border-color: var(--blue); }
.chat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.chat-attach {
  cursor: pointer;
  background: var(--gray-light);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1.1rem;
  user-select: none;
}
.chat-attach:hover { background: #e2e8f0; }
.chat-send { padding: 9px 18px; }
.chat-form-status {
  font-size: 0.78rem;
  color: var(--text-muted);
  min-height: 1em;
}
.chat-methodology-result { margin-top: 8px; max-height: 45vh; overflow-y: auto; border-radius: 8px; }
/* ── Cookie banner ── */
#cookieBanner {
  position: fixed;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: rgba(255,255,255,0.9);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  max-width: 600px;
  width: calc(100% - 32px);
  transition: bottom 0.35s ease;
  font-size: 0.88rem;
}
#cookieBanner.cookie-visible { bottom: 24px; }
.cookie-text { flex: 1; }
.cookie-text a { color: var(--blue-light); }
.cookie-accept {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.cookie-accept:hover { background: #3588c8; }
.cookie-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.cookie-close:hover { color: #fff; }

/* ── Order drop zone ── */
.order-drop-zone {
  border: 2px dashed var(--gray-mid);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: var(--gray-bg);
  margin-top: 8px;
}
.order-drop-zone:hover,
.order-drop-zone.drag-over {
  border-color: var(--blue);
  background: var(--blue-pale);
}
.odz-text { font-size: 0.88rem; color: var(--text-muted); line-height: 1.5; }
.odz-text small { font-size: 0.78rem; }
.odz-file { display: flex; align-items: center; gap: 10px; justify-content: center; font-size: 0.88rem; font-weight: 600; }
.odz-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; padding: 2px 6px; border-radius: 4px; }
.odz-remove:hover { color: var(--danger); background: var(--gray-light); }

.meth-loading { font-size: 0.85rem; color: var(--text-muted); padding: 8px 0; }
.meth-error { font-size: 0.85rem; color: var(--danger); padding: 6px 0; }
.meth-result { background: var(--blue-pale); border: 1px solid var(--blue-light); border-radius: 10px; padding: 12px 14px; position: relative; }
.meth-title { font-weight: 700; font-size: 0.92rem; margin-bottom: 6px; }
.meth-summary { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 8px; }
.meth-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.meth-table td { padding: 4px 6px; border-bottom: 1px solid #dde8f4; vertical-align: top; }
.meth-label { color: var(--text-muted); width: 55%; }
.meth-value { font-weight: 600; }
.meth-na { font-weight: 400; color: var(--text-muted); font-style: italic; }
.meth-raw { font-size: 0.78rem; white-space: pre-wrap; overflow: auto; max-height: 200px; background: #f5f8ff; border-radius: 6px; padding: 8px; }
.meth-close { position: absolute; top: 8px; right: 10px; background: none; border: none; cursor: pointer; font-size: 0.8rem; color: var(--text-muted); }
.chat-attached {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--blue-pale);
  border: 1px dashed var(--blue);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.84rem;
}
.chat-attach-x {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.92rem;
  padding: 0 6px;
}

/* Бейдж непрочитанных */
.chat-badge {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  margin-left: 4px;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  vertical-align: middle;
}
.chat-open-btn { white-space: nowrap; }
body.chat-open { overflow-y: scroll; overflow-x: hidden; position: fixed; width: 100%; }

@media (max-width: 600px) {
  .chat-modal-bg { padding: 0; }
  .chat-modal {
    max-height: 100vh;
    height: 100vh;
    max-width: 100vw;
    border-radius: 0;
  }
  .chat-bubble { max-width: 92%; }
}

/* ══════════════════════════════════════════
   ADMIN: КАЛЕНДАРЬ
══════════════════════════════════════════ */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
}
.cal-day-name {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 6px 4px;
  letter-spacing: 0.4px;
}
.cal-cell {
  background: var(--gray-bg);
  border-radius: 8px;
  min-height: 96px;
  padding: 6px 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cal-cell.cal-empty { background: transparent; }
.cal-cell-day {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.cal-cell.cal-today {
  outline: 2px solid var(--blue);
}
.cal-cell.cal-today .cal-cell-day {
  color: var(--blue);
}
.cal-cell-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  max-height: 140px;
}
.cal-chip {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--gray-light);
  color: var(--text-dark);
  border-left: 3px solid var(--text-muted);
}
.cal-chip:hover { filter: brightness(0.95); }

.cal-stage-prepayment_pending { background:#fef3c7; color:#92400e; border-left-color:#f59e0b; }
.cal-stage-in_progress        { background:#dbeafe; color:#1e3a8a; border-left-color:#3b82f6; }
.cal-stage-ready              { background:#fed7aa; color:#9a3412; border-left-color:#f97316; }
.cal-stage-revision           { background:#ede9fe; color:#5b21b6; border-left-color:#a855f7; }
.cal-stage-completed          { background:#d1fae5; color:#065f46; border-left-color:#10b981; }
.cal-stage-cancelled          { background:#e5e7eb; color:#374151; border-left-color:#6b7280; }
.cal-stage-new, .cal-stage-discussion { background:#eef2f7; color:#334155; border-left-color:#94a3b8; }

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.78rem;
}
.cal-legend .cal-chip { cursor: default; }

@media (max-width: 700px) {
  .cal-cell { min-height: 70px; padding: 4px; }
  .cal-cell-day { font-size: 0.76rem; }
  .cal-chip { font-size: 0.66rem; padding: 2px 5px; }
}

/* ══════════════════════════════════════════
   ADMIN: ФИНАНСЫ
══════════════════════════════════════════ */
.finance-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.fin-tile {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fin-tile-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
}
.fin-tile-value {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--navy);
}
.fin-tile-sub { font-size: 0.78rem; color: var(--text-muted); }
.fin-tile-net {
  background: linear-gradient(135deg, #0d1b2a 0%, #1e3350 100%);
  color: #fff;
}
.fin-tile-net .fin-tile-label,
.fin-tile-net .fin-tile-sub { color: rgba(255,255,255,0.6); }
.fin-tile-net .fin-tile-value { color: #fff; }

/* ══════════════════════════════════════════════════════════════════
   ❶  MOBILE CARDS — таблицы заказов в виде карточек на телефонах
   ══════════════════════════════════════════════════════════════════ */
/* По умолчанию список в мобильном-списочном виде скрыт */
.cal-mobile-list { display: none; }

@media (max-width: 640px) {
  /* Превращаем таблицу заказов / архива в стек карточек */
  #userOrdersBody, #archiveBody, #ordersBody {
    display: block;
  }
  #userOrdersBody tr, #archiveBody tr, #ordersBody tr {
    display: block;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    padding: 14px 14px 8px;
    border: none;
  }
  #userOrdersBody tr td, #archiveBody tr td, #ordersBody tr td {
    display: block;
    border: none !important;
    padding: 6px 0;
    font-size: 0.92rem;
  }
  /* Метка-подпись "Статус: " перед значением */
  #userOrdersBody tr td::before,
  #archiveBody  tr td::before,
  #ordersBody   tr td::before {
    content: attr(data-label) ' ';
    display: inline-block;
    min-width: 110px;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-right: 8px;
    vertical-align: top;
  }
  /* Первая ячейка (#…) — крупный заголовок карточки, без префикса */
  #userOrdersBody tr td:first-child,
  #archiveBody  tr td:first-child,
  #ordersBody   tr td:first-child {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--navy);
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--gray-light) !important;
    margin-bottom: 4px;
  }
  #userOrdersBody tr td:first-child::before,
  #archiveBody  tr td:first-child::before,
  #ordersBody   tr td:first-child::before { display: none; }

  /* Колонка действий — кнопки в ряд */
  #ordersBody tr td.actions-cell { padding-top: 10px; }
  #ordersBody tr td.actions-cell::before { display: none; }
  #ordersBody tr td.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
  #ordersBody tr td.actions-cell .btn { min-height: 36px; min-width: 44px; }

  /* Спрятать строку «загрузка / нет данных» — у неё colspan, ничего лишнего */
  #userOrdersBody tr td.text-center::before,
  #archiveBody  tr td.text-center::before,
  #ordersBody   tr td.text-center::before { display: none; }

  /* table-wrap уже не нужен горизонтальный скролл */
  .dash-content .table-wrap { overflow-x: visible !important; }
  .data-table { min-width: 0 !important; }
  thead.table-mobile-hide,
  #userOrdersBody ~ thead { display: none; }

  /* Hide thead inside customer/admin/archive tables on mobile */
  #panelOrders thead, #panelArchive thead, .dash-panel #panelOrders thead {
    display: none;
  }
  table.data-table thead { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
   ❷  ADMIN MOBILE — мелкие фиксы
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Кнопки в admin-orders, item-card actions удобны для пальца */
  .actions-cell .btn { min-height: 36px; }

  /* Календарь: header кнопок переносится */
  #panelCalendar > div:first-child > div:last-child { gap: 4px; flex-wrap: wrap; }
  #calMonthLabel { min-width: auto !important; font-size: 0.94rem; }

  /* Filters bar в одну колонку на маленьком */
  .filters-bar { grid-template-columns: 1fr !important; }

  /* Order edit/view modal — удобный фуллскрин */
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal {
    border-radius: 0;
    max-width: 100% !important;
    width: 100%;
    max-height: 100vh !important;
    height: 100vh;
    margin: 0;
    overflow-y: auto;
  }
  .modal-head {
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 5;
    padding-top: 14px;
    margin-top: -2px;
  }
}

/* ══════════════════════════════════════════════════════════════════
   ❸  CALENDAR MOBILE — на телефоне сетку прячем, показываем список
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  #panelCalendar .calendar-grid { display: none; }
  #panelCalendar .cal-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .cal-mobile-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 28px 14px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
  }
  .cal-mobile-day {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 12px 14px 14px;
  }
  .cal-mobile-day.is-today {
    outline: 2px solid var(--blue);
  }
  .cal-mobile-date {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--navy);
    margin-bottom: 8px;
    text-transform: capitalize;
  }
  .cal-mobile-orders {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .cal-mobile-order {
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    border-left: 4px solid var(--text-muted);
  }
  .cal-mobile-order-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    margin-bottom: 4px;
  }
  .cal-mobile-order-head strong { color: var(--navy); }
  .cal-mobile-order-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
  }
  .cal-mobile-order-topic {
    font-size: 0.85rem;
    margin-top: 4px;
    color: var(--text-dark);
  }
}

/* ══════════════════════════════════════════════════════════════════
   ❹  REFERRAL MOBILE: код-блок и таблица тиров не должны вылезать
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .ref-code-box { flex-wrap: wrap; }
  .ref-code-box code { font-size: 0.92rem !important; word-break: break-all; }
  .tiers-table { font-size: 0.78rem; min-width: 0; }
  .tiers-table th, .tiers-table td { padding: 6px 5px; }
  .ref-balance-num { font-size: 1.6rem; }
}

/* ══════════════════════════════════════════════════════════════════
   ❺  TOUCH TARGETS — все кнопки минимум 36px высоты на мобильном
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .btn-sm { min-height: 34px; padding: 7px 12px; }
  /* Радиокнопка / чекбокс в формах — увеличиваем тапаемость */
  input[type="checkbox"], input[type="radio"] { transform: scale(1.15); margin-right: 4px; }
  /* Мобильная кнопка чата по заказу — крупная и без переноса */
  .chat-open-btn { padding: 8px 12px; font-size: 0.84rem; }
  /* Bottom-sheet чата — input-zone не прижимается клавиатурой */
  .chat-modal { padding-bottom: env(safe-area-inset-bottom, 0px); }
  /* Финансы: график не вылезает */
  #finChart { max-width: 100%; height: 260px !important; }
}

/* ─── CART BUY MODAL ────────────────────────────────── */
.buy-modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.buy-modal-bg.open { display: flex; }
.buy-modal {
  background: var(--white);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0,0,0,.22);
  max-height: 90vh;
  overflow-y: auto;
}
.buy-modal h3 { font-size: 1.15rem; font-weight: 800; margin: 0 0 8px; }
.buy-modal p  { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 14px; }
.buy-summary  { background: var(--gray-bg); border-radius: 10px; padding: 12px 14px; font-size: 0.88rem; margin-bottom: 14px; line-height: 1.6; }
[data-theme="dark"] .buy-modal { background: var(--white); }

/* ─── SITE BANNER ───────────────────────────────────── */
#siteBanner {
  width: 100%;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  position: relative;
  z-index: 1000;
}
.banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}
.banner-msg { flex: 1; min-width: 0; }
.banner-code {
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 3px 10px;
  white-space: nowrap;
}
.banner-close {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.banner-close:hover { opacity: 1; }

/* ─── CART ICON & BADGE ─────────────────────────────── */
.cart-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 1.3rem;
  padding: 4px 6px;
  border-radius: 8px;
  text-decoration: none;
  transition: background var(--transition);
  line-height: 1;
}
.cart-icon-wrap:hover { background: rgba(74,158,222,0.12); }
.cart-badge {
  position: absolute;
  top: 0px;
  right: -2px;
  background: var(--danger);
  color: #fff;
  font-size: 0.60rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}
/* "В корзину" button toggled state */
[data-cart-id].in-cart {
  background: var(--success) !important;
  border-color: var(--success) !important;
  color: #fff !important;
}
/* Cart page */
.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.cart-items-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title { font-weight: 700; font-size: 0.95rem; color: var(--navy); margin-bottom: 2px; }
.cart-item-meta { font-size: 0.8rem; color: var(--text-muted); }
.cart-item-price { font-size: 1.1rem; font-weight: 800; color: var(--navy); white-space: nowrap; }
.cart-item-remove {
  background: none; border: none; cursor: pointer;
  font-size: 1rem; color: var(--text-muted); padding: 4px 6px;
  border-radius: 6px; transition: color var(--transition);
}
.cart-item-remove:hover { color: var(--danger); }
.cart-summary {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  max-width: 400px;
  margin-left: auto;
}
.cart-total-line { display: flex; justify-content: space-between; font-size: 0.92rem; margin-bottom: 8px; color: var(--text-body); }
.cart-total-final { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 800; color: var(--navy); margin-top: 10px; padding-top: 10px; border-top: 2px solid var(--gray-light); }
.cart-discount-note { font-size: 0.8rem; color: var(--success); font-weight: 600; margin-bottom: 14px; }

/* ─── NOTIFICATION BELL ─────────────────────────────── */
.notif-bell-wrap {
  position: relative;
}
.notif-bell {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 6px 8px;
  border-radius: 8px;
  position: relative;
  line-height: 1;
  transition: background var(--transition);
  display: flex;
  align-items: center;
}
.notif-bell:hover { background: rgba(74,158,222,0.12); }
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--danger);
  color: #fff;
  font-size: 0.60rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 3px;
  pointer-events: none;
}
.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 420px;
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-light);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--navy);
  flex-shrink: 0;
}
.notif-mark-all {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.76rem;
  color: var(--blue);
  padding: 2px 4px;
  font-weight: 600;
}
.notif-mark-all:hover { text-decoration: underline; }
.notif-list {
  overflow-y: auto;
  flex: 1;
}
.notif-item {
  display: block;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-light);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  color: inherit;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--blue-pale); }
.notif-item.unread { background: #eef7ff; }
[data-theme="dark"] .notif-item.unread { background: #1a2a40; }
.notif-item-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
}
.notif-item-body {
  font-size: 0.77rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item-time {
  font-size: 0.70rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.notif-empty {
  padding: 28px 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
@media (max-width: 480px) {
  .notif-panel {
    width: calc(100vw - 24px);
    right: -12px;
  }
}
