/* ============ ArtiLex site — dark / yellow ============ */
:root {
  --bg:      #06070a;
  --panel:   #0d1015;
  --panel-2: #12161d;
  --border:  #1e242e;
  --text:    #eceef2;
  --muted:   #98a0ac;
  --accent:  #f5b301;
  --accent-2:#ffd34d;
  --radius:  18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Заокруглена «рамка» сторінки — на весь екран, з тонким відступом по краях */
.frame {
  max-width: none;
  margin: 10px;
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(245,179,1,.05), transparent 60%),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 26px;
  /* env(safe-area-inset-top) — відступ під «чубчик»/годинник айфона в режимі PWA */
  padding: calc(18px + env(safe-area-inset-top)) clamp(24px, 4vw, 72px) calc(18px + env(safe-area-inset-bottom));
  min-height: calc(100vh - 20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
main { flex: 1; }

.accent { color: var(--accent); }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 6px 0 14px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { height: 34px; width: auto; }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: .2px; }

.nav { display: flex; gap: 28px; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600;
  padding: 8px 2px; position: relative; transition: color .25s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px; background: var(--accent); border-radius: 2px;
  transition: right .28s ease;
}
.nav a:hover { color: var(--text); }
.nav a:hover::after, .nav a.active::after { right: 0; }
.nav a.active { color: var(--text); }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--muted); text-decoration: none; transition: all .25s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.icon-btn.soon { opacity: .45; cursor: default; }
.icon-btn.soon:hover { color: var(--muted); border-color: var(--border); transform: none; }

.user-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
}

/* Burger (мобільний) */
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 10px; cursor: pointer; }
.burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Кнопки ---------- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #141002;
  font-weight: 800; font-size: 16px; text-decoration: none;
  padding: 15px 28px; border-radius: 14px; border: 0; cursor: pointer;
  transition: transform .22s, box-shadow .22s, background .22s;
  box-shadow: 0 6px 24px rgba(245,179,1,.22);
}
.btn-primary svg { transition: transform .22s; }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(245,179,1,.32); }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-big { font-size: 18px; padding: 17px 34px; }
.btn-full { width: 100%; justify-content: center; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--text); font-weight: 700; font-size: 15px;
  text-decoration: none; padding: 13px 24px; border-radius: 14px;
  border: 1px solid var(--border); transition: all .25s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center;
  gap: 40px; padding: 60px 0 30px; min-height: 480px;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-size: 13.5px; font-weight: 700;
  border: 1px solid rgba(245,179,1,.4); background: rgba(245,179,1,.07);
  padding: 8px 16px; border-radius: 999px; margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.08; margin: 0 0 18px; font-weight: 800; letter-spacing: -.5px;
}
.hero .sub { color: var(--muted); font-size: 16.5px; line-height: 1.6; margin: 0 0 34px; }

/* Hero art */
.hero-art { position: relative; height: 420px; }
.glow {
  position: absolute; inset: 10% 0 0 10%;
  background: radial-gradient(closest-side, rgba(245,179,1,.13), transparent 70%);
  border-radius: 50%; filter: blur(10px);
  animation: pulse 5s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }

.art-tablet {
  position: absolute; left: 6%; top: 18%; width: 66%;
  background: linear-gradient(160deg, #14181f, #0c0f14);
  border: 1px solid var(--border); border-radius: 18px; padding: 18px;
  box-shadow: 0 30px 60px rgba(0,0,0,.5);
}
.wire { stroke-dasharray: 500; stroke-dashoffset: 500; animation: draw 3.2s ease forwards; }
.wire:nth-child(2) { animation-delay: .4s; }
.wire:nth-child(3) { animation-delay: .8s; }
.wire:nth-child(4) { animation-delay: 1.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.art-card {
  position: absolute; background: linear-gradient(160deg, #171b23, #10131a);
  border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,.45); width: 180px;
}
.art-card-title { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.art-card-1 { right: 0; top: 0; }
.art-card-2 { right: 6%; bottom: 8%; }
.art-lines { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.art-lines i { display: block; height: 6px; width: 90%; border-radius: 3px; background: #232936; }
.art-lines i:nth-child(odd)::after { content: ""; }
.art-cube {
  position: absolute; left: 2%; bottom: 2%; width: 74px; height: 74px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #171b23, #10131a);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,.45);
}
.float { animation: floaty 6s ease-in-out infinite; }
.float.delay-2 { animation-delay: 1.5s; }
.float.delay-3 { animation-delay: 3s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Feature cards ---------- */
.features {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  padding: 40px 0 30px;
}
.card {
  background: linear-gradient(170deg, #12161d, #0d1015);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; text-decoration: none; color: var(--text);
  transition: transform .28s, border-color .28s, box-shadow .28s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(245,179,1,.45); box-shadow: 0 18px 40px rgba(0,0,0,.4); }
.card-ico { color: var(--accent); margin-bottom: 16px; }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------- Page head ---------- */
.page-head { text-align: center; padding: 60px 0 20px; }
.page-head h1 { font-size: clamp(30px, 4vw, 46px); margin: 0 0 14px; font-weight: 800; }
.page-head .sub { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0 0 30px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 16px; }

/* ---------- Slider ---------- */
.slider-wrap, .videos { padding: 40px 0; }
.slider-wrap h2, .videos h2, .group-title { font-size: 24px; margin: 0 0 22px; }
.slider { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.slides { display: flex; transition: transform .55s cubic-bezier(.22,.8,.24,1); }
.slide { min-width: 100%; margin: 0; position: relative; }
.slide img { width: 100%; display: block; }
.slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  color: #fff; padding: 30px 20px 14px; font-size: 14px;
}
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(13,16,21,.75); backdrop-filter: blur(6px);
  border: 1px solid var(--border); color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .25s;
}
.slider-btn:hover { color: var(--accent); border-color: var(--accent); }
.slider-btn.prev { left: 14px; } .slider-btn.next { right: 14px; }
.dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255,255,255,.35); cursor: pointer; transition: all .25s; padding: 0; }
.dots button.on { background: var(--accent); width: 22px; border-radius: 4px; }

/* ---------- Videos ---------- */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.video-card { text-decoration: none; color: var(--text); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--panel-2); transition: transform .28s, border-color .28s; }
.video-card:hover { transform: translateY(-5px); border-color: rgba(245,179,1,.45); }
.video-thumb { aspect-ratio: 16/9; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; }
.play { width: 52px; height: 52px; border-radius: 50%; background: rgba(245,179,1,.92); color: #141002; display: flex; align-items: center; justify-content: center; transition: transform .25s; }
.video-card:hover .play { transform: scale(1.12); }
.video-title { padding: 14px 16px; font-size: 14.5px; font-weight: 600; }

/* ---------- Empty blocks ---------- */
.empty-block {
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 46px 20px; text-align: center; color: var(--muted);
}
.empty-block.big { padding: 80px 20px; max-width: 640px; margin: 20px auto; }
.empty-block svg { opacity: .6; margin-bottom: 12px; }
.empty-block p { margin: 0; line-height: 1.6; font-size: 14.5px; }

/* ---------- Web tabs ---------- */
.tabs-section { padding: 26px 0; }
.group-title { display: flex; align-items: center; gap: 10px; color: var(--text); }
.group-title svg { color: var(--accent); }
.tab-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tab-tile {
  position: relative; background: linear-gradient(170deg, #12161d, #0d1015);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 18px; text-decoration: none; color: var(--text);
  transition: transform .28s, border-color .28s;
}
.tab-tile:hover { transform: translateY(-5px); border-color: rgba(245,179,1,.45); }
.tab-ico { font-size: 30px; margin-bottom: 12px; }
.tab-name { font-weight: 700; font-size: 15.5px; line-height: 1.35; }
.soon-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 11px; font-weight: 700; color: var(--accent);
  background: rgba(245,179,1,.1); border: 1px solid rgba(245,179,1,.35);
  padding: 3px 9px; border-radius: 999px;
}
.soon-tile { opacity: .8; cursor: default; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 20px 0; align-items: stretch; }
.price-card {
  position: relative; background: linear-gradient(170deg, #12161d, #0d1015);
  border: 1px solid var(--border); border-radius: 22px; padding: 30px 26px;
  display: flex; flex-direction: column; transition: transform .28s, border-color .28s;
}
.price-card:hover { transform: translateY(-6px); }
.price-card.featured { border-color: rgba(245,179,1,.55); box-shadow: 0 20px 50px rgba(245,179,1,.08); }
.tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #141002; font-size: 12px; font-weight: 800;
  padding: 5px 14px; border-radius: 999px; white-space: nowrap;
}
.plan-name { color: var(--muted); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.price { font-size: 20px; color: var(--muted); margin-bottom: 6px; }
.price .num { font-size: 46px; font-weight: 800; color: var(--text); }
.price .per { font-size: 14px; }
.save { color: var(--accent); font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 26px; flex: 1; }
.price-card li { padding: 7px 0 7px 26px; position: relative; color: var(--muted); font-size: 14.5px; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.pricing-note { text-align: center; color: var(--muted); font-size: 13.5px; padding-bottom: 30px; }

/* ---------- Login ---------- */
.login-wrap { display: flex; justify-content: center; padding: 60px 0; }
.login-card {
  width: 100%; max-width: 380px; background: linear-gradient(170deg, #12161d, #0d1015);
  border: 1px solid var(--border); border-radius: 22px; padding: 34px 30px;
  text-align: center;
}
.login-logo { height: 52px; margin-bottom: 14px; }
.login-card h1 { font-size: 22px; margin: 0 0 6px; }
.login-card .sub { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: 0 0 22px; }
.login-card label { display: block; text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); margin: 14px 0 7px; }
.login-card input {
  width: 100%; padding: 14px 15px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: 16px; transition: border-color .25s;
}
.login-card input:focus { outline: none; border-color: var(--accent); }
.login-card .btn-primary { margin-top: 24px; }
.err { background: rgba(220,50,50,.12); border: 1px solid rgba(220,50,50,.4); color: #ff9d9d; padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 6px; }
.login-hint { color: var(--muted); font-size: 13px; margin-top: 18px; }
.login-hint a { color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 0 6px; border-top: 1px solid var(--border); margin-top: 30px;
  color: var(--muted); font-size: 13.5px;
}
.socials { display: flex; gap: 10px; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .12s; }
.reveal.delay-2 { transition-delay: .24s; }
.reveal.delay-3 { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .float, .glow, .wire { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .features, .tab-grid { grid-template-columns: repeat(2, 1fr); }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; padding-top: 30px; min-height: 0; }
  .hero-art { height: 360px; max-width: 560px; }
}
@media (max-width: 800px) {
  /* ВАЖЛИВО: зберігаємо env(safe-area-inset-top) — інакше в PWA на айфоні
     контент залазить під статус-бар (годинник/батарею). */
  .frame { margin: 8px; padding: calc(16px + env(safe-area-inset-top)) 18px calc(14px + env(safe-area-inset-bottom)); border-radius: 20px; }
  .nav {
    position: absolute; top: 64px; left: 12px; right: 12px; z-index: 50;
    flex-direction: column; gap: 4px;
    background: rgba(13,16,21,.97); backdrop-filter: blur(10px);
    border: 1px solid var(--border); border-radius: 16px; padding: 12px;
    opacity: 0; pointer-events: none; transform: translateY(-8px);
    transition: opacity .28s, transform .28s;
  }
  .nav.open { opacity: 1; pointer-events: auto; transform: none; }
  .nav a { padding: 12px 14px; border-radius: 10px; }
  .nav a.active { background: rgba(245,179,1,.08); }
  .nav a::after { display: none; }
  .burger { display: flex; }
  .user-chip { display: none; }
  .pricing { grid-template-columns: 1fr; }
  .price-card.featured { order: -1; }
  .hero h1 br { display: none; }
  .hero .sub br { display: none; }
  .page-head .sub br { display: none; }
}
@media (max-width: 520px) {
  .features, .tab-grid, .video-grid { grid-template-columns: 1fr; }
  .hero-art { height: 300px; }
  .art-card { width: 150px; }
  .footer { flex-direction: column; gap: 14px; }
}

/* ================= Web-версія: інструменти ================= */
.tool-head { display: flex; align-items: center; gap: 14px; padding: 18px 0 6px; }
.tool-back {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-size: 18px; transition: all .25s;
}
.tool-back:hover { border-color: var(--accent); color: var(--accent); }
.tool-head h1 { font-size: clamp(20px, 3vw, 28px); margin: 0; font-weight: 800; }
.tool-head .tool-sub { color: var(--muted); font-size: 12.5px; margin: 2px 0 0; }

.tool-grid { display: grid; grid-template-columns: 420px 1fr; gap: 18px; padding: 14px 0 30px; align-items: start; }
.panel {
  background: linear-gradient(170deg, #12161d, #0d1015);
  border: 1px solid var(--border); border-radius: 20px; padding: 22px;
}
.panel h2 { font-size: 18px; margin: 0 0 6px; }
.panel .p-hint { color: var(--muted); font-size: 12.5px; margin: 0 0 14px; line-height: 1.5; }

.field-label { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin: 14px 0 7px; letter-spacing: .3px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 10px 16px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .2s; font-family: inherit;
}
.chip:hover { border-color: rgba(245,179,1,.5); }
.chip.on { background: rgba(245,179,1,.12); border-color: var(--accent); color: var(--accent-2); }

.tool-input {
  width: 100%; padding: 13px 15px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: 16px; font-weight: 600; font-family: inherit; transition: border-color .2s;
}
.tool-input:focus { outline: none; border-color: var(--accent); }

.select-btn {
  width: 100%; text-align: left; padding: 13px 15px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: 14.5px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: border-color .2s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.select-btn:hover { border-color: var(--accent); }

.result-big {
  font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -1px;
  cursor: pointer; margin: 4px 0; word-break: break-word; user-select: none;
}
.result-big:active { color: var(--accent); }
.copy-hint { color: var(--muted); font-size: 12.5px; }
.warn-text { color: #ff8f87; font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.spec-line { color: var(--muted); font-size: 13.5px; font-weight: 600; }

/* Слоти 400 В */
.slots { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-top: 8px; }
.slots-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.slots-head b { font-size: 14px; flex: 1; }
.mini-btn {
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 6px 11px; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all .2s;
}
.mini-btn:hover { border-color: var(--accent); color: var(--accent); }
.slot-row { display: flex; align-items: center; gap: 8px; padding: 4px 2px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.slot-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Каталог кабелів */
.cable-toolbar { display: flex; gap: 12px; align-items: center; padding: 14px 0; flex-wrap: wrap; }
.cable-toolbar .tool-input { flex: 1; min-width: 200px; width: auto; }
.count-pill {
  background: var(--accent); color: #141002; font-size: 12px; font-weight: 800;
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
}
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; padding-bottom: 30px; }
.c-card {
  background: linear-gradient(170deg, #12161d, #0d1015);
  border: 1px solid var(--border); border-radius: 18px; padding: 18px 16px;
  cursor: pointer; text-align: center; transition: transform .22s, border-color .22s;
}
.c-card:hover { transform: translateY(-4px); border-color: rgba(245,179,1,.5); }
.c-card .c-name { font-weight: 800; font-size: 15px; margin-bottom: 10px; word-break: break-word; }
.c-chip {
  display: block; background: var(--bg); border: 1px solid var(--border);
  color: var(--muted); border-radius: 10px; padding: 5px 10px;
  font-size: 12px; font-weight: 600; margin: 5px auto 0; max-width: 190px;
}
.c-card .brand-count { color: var(--muted); font-size: 12.5px; }

/* Модальний вибір кабелю */
.modal-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(4px);
  display: none; align-items: flex-end; justify-content: center;
  z-index: 3000; /* вище за Leaflet (панелі мапи мають z-index до ~1000) */
}
.modal-back.open { display: flex; }
.modal {
  width: 100%; max-width: 560px; max-height: 82vh; overflow: auto;
  background: #0f1319; border: 1px solid var(--border);
  border-radius: 22px 22px 0 0; padding: 20px;
  animation: slide-up .3s ease;
}
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { margin: 0 0 12px; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.modal h3 .mini-btn { margin-left: auto; }
.modal .list-btn {
  display: block; width: 100%; text-align: left; margin-top: 8px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: border-color .2s;
}
.modal .list-btn:hover { border-color: var(--accent); }
.modal .list-btn small { display: block; color: var(--muted); font-weight: 500; margin-top: 3px; }

/* Таблиця 230/400 */
.data-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; margin-bottom: 30px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 640px; }
.data-table th {
  background: var(--panel-2); color: var(--muted); text-align: center;
  padding: 12px 10px; font-size: 12px; letter-spacing: .3px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0;
}
.data-table td {
  text-align: center; padding: 10px 10px; border-bottom: 1px solid rgba(30,36,46,.6);
  cursor: pointer; font-weight: 600; transition: background .15s;
}
.data-table tr:hover td { background: rgba(245,179,1,.05); }
.data-table td:active { background: rgba(245,179,1,.18); }
.data-table tr:last-child td { border-bottom: none; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(80px);
  background: var(--accent); color: #141002; font-weight: 800; font-size: 14px;
  padding: 12px 22px; border-radius: 999px; z-index: 200; opacity: 0;
  transition: all .3s cubic-bezier(.22,.8,.24,1); pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.toast.show { transform: translateX(-50%); opacity: 1; }

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

/* Чекбокс «Запам'ятати мене» на сторінці входу */
.remember {
  display: flex; align-items: center; gap: 9px; margin: 16px 0 0;
  cursor: pointer; user-select: none;
}
.remember input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.remember span { color: var(--muted); font-size: 13.5px; font-weight: 600; }

/* ============ ArtilexSolar вкладки ============ */
/* Каталог: зображення в картках */
.cat-img {
  width: 100%; aspect-ratio: 4/3; border-radius: 12px; margin-bottom: 10px;
  background-color: #fff; background-size: contain;
  background-position: center; background-repeat: no-repeat;
}
.cat-img-empty {
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); color: var(--muted); font-size: 30px;
}
.kv {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 12px; margin-top: 6px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px;
}
.kv span { color: var(--muted); }
.kv b { text-align: right; word-break: break-word; }
.model-photo {
  width: 100%; height: 220px; border-radius: 14px; background-color: #fff;
  background-size: contain; background-position: center; background-repeat: no-repeat;
}
.doc-row { display: flex; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.doc-btn { padding: 10px 16px; font-size: 14px; }
.modal-wide { max-width: 720px; }

/* SketchDown */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-label.small { font-size: 11px; margin: 10px 0 6px; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.metric {
  background: linear-gradient(170deg, #12161d, #0d1015);
  border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px;
}
.metric span { display: block; color: var(--muted); font-size: 11.5px; font-weight: 700; margin-bottom: 6px; }
.metric b { font-size: 22px; font-weight: 800; }
.sketch-block { margin-bottom: 14px; padding: 16px; }
.sketch-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sketch-head b { font-size: 15px; }
.sketch-head span { color: var(--muted); font-size: 12.5px; flex: 1; }
.sketch-canvas { width: 100%; display: block; border-radius: 12px; }

/* Карта досягнень */
.map-wrap {
  border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  height: clamp(320px, 55vh, 560px);
}
#map { width: 100%; height: 100%; background: #0b1b30; }
.artx-pin-wrap { background: transparent; border: 0; }
.artx-pin {
  width: 22px; height: 22px; border-radius: 50% 50% 50% 0;
  background: #e23b3b; border: 2px solid #fff; transform: rotate(-45deg);
  box-shadow: 0 4px 10px rgba(0,0,0,.45); position: relative;
}
.artx-pin::after {
  content: ""; position: absolute; left: 6px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.85);
}
.artx-popup .leaflet-popup-content-wrapper {
  background: #0f2238; color: #eaf2ff; border-radius: 16px;
  box-shadow: 0 16px 38px rgba(0,0,0,.5); border: 1px solid rgba(127,178,255,.25);
}
.artx-popup .leaflet-popup-tip { background: #0f2238; }
.artx-popup .leaflet-popup-content { margin: 0; }
.leaflet-popup { animation: artxpop .18s ease-out; }
@keyframes artxpop {
  from { opacity: 0; transform: translateY(10px) scale(.94); }
  to { opacity: 1; transform: none; }
}
.artx-card { display: flex; gap: 11px; padding: 11px 13px; color: #eaf2ff; align-items: center; cursor: pointer; min-width: 200px; }
.artx-card:hover { background: rgba(127,178,255,.08); border-radius: 16px; }
.artx-av {
  width: 58px; height: 58px; border-radius: 12px; background-size: cover;
  background-position: center; flex: none; border: 1px solid rgba(255,255,255,.18);
}
.artx-av-empty { display: flex; align-items: center; justify-content: center; background: #1c3a5e; font-weight: 800; font-size: 15px; color: #9fc0f0; }
.artx-meta { display: flex; flex-direction: column; }
.artx-name { font-weight: 800; font-size: 14px; }
.artx-pow { font-size: 12px; color: #f5c84c; margin: 3px 0; font-weight: 700; }
.artx-hint { font-size: 11px; color: #9fb4d4; }
.st-card .cat-img { background-size: cover; background-color: var(--panel-2); }

/* Фотострічка станції */
.photo-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; }
.photo-item {
  width: 170px; height: 120px; border-radius: 12px; flex: none;
  background-size: cover; background-position: center;
  border: 1px solid var(--border); transition: transform .2s;
}
.photo-item:hover { transform: scale(1.03); }

@media (max-width: 620px) {
  .metric-row { grid-template-columns: 1fr; }
  .metric b { font-size: 18px; }
}

/* Панель фільтрів каталогу (як у ПЗ): підписані поля в адаптивній сітці */
.filter-panel {
  background: linear-gradient(170deg, #12161d, #0d1015);
  border: 1px solid var(--border); border-radius: 16px;
  padding: 14px; margin-bottom: 16px;
}
.f-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px 12px;
  margin-bottom: 12px;
}
.f-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.f-field > span {
  color: var(--muted); font-size: 11.5px; font-weight: 700;
  letter-spacing: .2px; text-transform: uppercase;
}
.f-field .tool-input { width: 100%; min-width: 0; }
.f-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.f-select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.f-select option { background: #12161d; color: var(--text); }
@media (max-width: 620px) {
  .f-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
}

/* ---- Немає доступу до вкладки (права з «Учасників») ---- */
.no-access-box {
  max-width: 620px; margin: 0 auto; padding: 46px 32px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); text-align: center;
}
.no-access-ico {
  font-size: 44px; line-height: 1; margin-bottom: 18px;
  filter: grayscale(.2);
}
.no-access-box h1, .no-access-box h2 { margin: 0 0 14px; font-size: 26px; font-weight: 800; }
.no-access-box p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 26px; }
.no-access-box .btn-primary { display: inline-block; }

/* ==================== Кнопки «Увійти / Зареєструватись» ==================== */
.btn-auth {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-weight: 800; font-size: 14.5px; white-space: nowrap;
  padding: 11px 20px; border-radius: 12px; text-decoration: none;
  transition: transform .2s, background .2s, box-shadow .2s, border-color .2s, color .2s;
}
.btn-auth-ghost {
  color: var(--text); background: transparent; border: 1px solid rgba(245,179,1,.55);
}
.btn-auth-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-auth-solid {
  color: #141002; background: var(--accent); border: 1px solid var(--accent);
  box-shadow: 0 6px 20px rgba(245,179,1,.22);
}
.btn-auth-solid:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(245,179,1,.32); }

/* ============================ Сторінки авторизації ======================== */
.auth-wrap { display: flex; justify-content: center; padding: 42px 0 60px; }
.auth-card {
  width: 100%; max-width: 420px; text-align: center;
  background: linear-gradient(170deg, #12161d, #0d1015);
  border: 1px solid var(--border); border-radius: 24px; padding: 30px 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.auth-card.wide { max-width: 520px; }
.auth-logo { height: 52px; margin-bottom: 16px; }
.auth-card h1 { font-size: 24px; margin: 0 0 6px; font-weight: 800; }
.auth-sub { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0 0 20px; }

/* Перемикач Вхід / Реєстрація */
.auth-tabs {
  display: flex; gap: 4px; padding: 4px; margin: 0 0 22px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
}
.auth-tab {
  flex: 1; padding: 10px 8px; border-radius: 10px; text-decoration: none;
  color: var(--muted); font-size: 14px; font-weight: 700; transition: all .22s;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.active { background: var(--accent); color: #141002; box-shadow: 0 4px 14px rgba(245,179,1,.25); }

/* Поля */
.fld { display: block; text-align: left; margin-bottom: 16px; }
.fld > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 7px; }
.fld input {
  width: 100%; padding: 13px 15px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: 16px; font-family: inherit; transition: border-color .2s;
}
.fld input:focus { outline: none; border-color: var(--accent); }
.fld-hint { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.hint-ok { color: #5bc97a; }
.hint-bad { color: #ff8f87; }

.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 9px;
}
.pw-eye:hover, .pw-eye.on { color: var(--accent); }

.pw-meter { display: block; height: 4px; margin-top: 9px; background: var(--border); border-radius: 3px; overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; border-radius: 3px; transition: width .28s, background .28s; }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 8px; }
.link-muted { color: var(--muted); font-size: 13px; text-decoration: none; }
.link-muted:hover { color: var(--accent); }
.auth-switch { color: var(--muted); font-size: 13.5px; margin: 18px 0 0; }
.auth-switch a { color: var(--accent); font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.agree { text-align: left; margin: 6px 0 4px; align-items: flex-start; }
.agree span { font-size: 13px; line-height: 1.45; }
.agree a { color: var(--accent); }

.ok-box {
  background: rgba(91,201,122,.09); border: 1px solid rgba(91,201,122,.35);
  color: #b8e9c6; border-radius: 12px; padding: 12px 14px;
  font-size: 13.5px; line-height: 1.5; margin-bottom: 16px; text-align: left;
}
.ok-box.big { text-align: center; padding: 22px 18px; }
.ok-box.big svg { color: #5bc97a; margin-bottom: 10px; }
.ok-box.big p { margin: 0; }

/* Оформлення підписки */
.order-box { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 6px 16px; margin: 18px 0; }
.order-row { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; font-size: 14.5px; border-bottom: 1px solid rgba(30,36,46,.7); }
.order-row:last-child { border-bottom: none; }
.order-row span { color: var(--muted); }
.order-row.total b { color: var(--accent); font-size: 20px; }

/* ================================ Ціни =================================== */
.pricing-head { text-align: center; padding: 46px 0 8px; }
.pricing-head h1 { font-size: clamp(30px, 4.4vw, 46px); margin: 14px 0 12px; font-weight: 800; letter-spacing: -.5px; }
.pricing-head .sub { color: var(--muted); font-size: 16px; line-height: 1.65; margin: 0 auto 12px; max-width: 560px; }

.price-row { display: flex; align-items: baseline; justify-content: center; gap: 3px; margin: 6px 0 2px; }
.price-row .num { font-size: 52px; font-weight: 800; letter-spacing: -2px; line-height: 1; }
.price-row .cur { font-size: 24px; font-weight: 700; color: var(--muted); }
.price-row .per { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.price-eq { text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.price-card .save {
  display: block; width: fit-content; margin: 0 auto 4px; text-align: center;
  background: rgba(245,179,1,.12); border: 1px solid rgba(245,179,1,.4);
  color: var(--accent-2); font-size: 12.5px; font-weight: 800;
  padding: 6px 13px; border-radius: 999px;
}
.price-card .plan-name { text-align: center; }

/* перелік переваг */
.plan-feats { list-style: none; padding: 0; margin: 20px 0 24px; flex: 1; }
.plan-feats li {
  display: flex; align-items: flex-start; gap: 11px; padding: 10px 0;
  font-size: 14.5px; line-height: 1.45; color: var(--text); font-weight: 600;
  border-bottom: 1px solid rgba(30,36,46,.55);
}
.plan-feats li:last-child { border-bottom: none; }
.plan-feats li svg { flex: none; color: var(--accent); margin-top: 2px; }
.price-card .plan-feats li::before { content: none; }

.btn-plan {
  display: block; text-align: center; text-decoration: none;
  font-family: inherit; font-weight: 800; font-size: 15.5px;
  padding: 15px 20px; border-radius: 14px; transition: all .22s;
}
.btn-plan-solid {
  background: var(--accent); color: #141002; border: 1px solid var(--accent);
  box-shadow: 0 8px 26px rgba(245,179,1,.26);
}
.btn-plan-solid:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(245,179,1,.36); }
.btn-plan-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-plan-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.price-card.featured {
  background:
    radial-gradient(420px 220px at 50% 0%, rgba(245,179,1,.10), transparent 70%),
    linear-gradient(170deg, #151a22, #0d1015);
}

/* Нижній ряд переваг */
.pricing-assure {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  padding: 34px 0 40px;
}
.assure-item {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  background: linear-gradient(170deg, #12161d, #0d1015);
  border: 1px solid var(--border); border-radius: 16px; padding: 22px 18px;
}
.assure-item svg { color: var(--accent); margin-bottom: 4px; }
.assure-item b { font-size: 15px; }
.assure-item span { color: var(--muted); font-size: 13px; line-height: 1.45; }

/* ============================ Мобільна адаптація ========================== */
@media (max-width: 800px) {
  .btn-auth { padding: 9px 14px; font-size: 13.5px; }
  .btn-auth-ghost { display: none; }
  .pricing-assure { grid-template-columns: 1fr; }
  .pricing-head { padding-top: 26px; }
  .pricing-head .sub br { display: none; }
  .auth-wrap { padding: 20px 0 40px; }
  .auth-card { padding: 26px 20px; border-radius: 20px; }
  .auth-sub br { display: none; }
}
@media (max-width: 480px) {
  .price-row .num { font-size: 44px; }
  .plan-feats li { font-size: 14px; }
  .btn-auth-solid { padding: 9px 13px; font-size: 13px; }
}
