/* استودیو پروژه‌های وب — استایل اصلی */

:root {
  --bg: #0a0e13;
  --bg-soft: #0e141c;
  --panel: #121a24;
  --panel-2: #17212d;
  --panel-3: #1d2836;
  --line: #223040;
  --line-soft: #1a2432;
  --text: #e8eef6;
  --text-soft: #c3ceda;
  --muted: #8593a6;
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, .13);
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, .13);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .12);
  --violet: #a78bfa;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 20px 50px -24px rgba(0, 0, 0, .8);
  --font: "Vazirmatn", "IRANSans", "IRANSansWeb", "IRANSansX", "IRANSans_FaNum", "IranSans", "Segoe UI", Tahoma, system-ui, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", Consolas, "Courier New", monospace;
}

/* فونت IRANSans: اگر روی سیستم/سرور نصب باشد همین استفاده می‌شود.
   برای اینکه بازدیدکننده‌ها هم این فونت را ببینند، فایل‌های لایسنس‌دار را
   در assets/fonts بگذار و assets/fonts/iransans.css را از حالت نمونه خارج کن. */
@font-face {
  font-family: "IRANSans";
  src: local("IRANSans Light"), local("IRANSansWeb_Light"), local("IRANSansX Light");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IRANSans";
  src: local("IRANSans"), local("IRANSansWeb"), local("IRANSansX"), local("IRANSans Regular");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IRANSans";
  src: local("IRANSans Medium"), local("IRANSansWeb_Medium"), local("IRANSansX Medium");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IRANSans";
  src: local("IRANSans Bold"), local("IRANSansWeb_Bold"), local("IRANSansX Bold"), local("IRANSansX-Bold");
  font-weight: 700; font-style: normal; font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: clip;
}

body {
  background: radial-gradient(1200px 700px at 90% -10%, #123027 0%, transparent 55%),
              radial-gradient(900px 600px at 5% 110%, #16243a 0%, transparent 60%),
              var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: var(--mono); direction: ltr; text-align: left; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }

/* ---------- چیدمان ---------- */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w, 264px) 1fr;
  min-height: 100vh;
  transition: grid-template-columns .2s ease;
}

.sidebar {
  background: linear-gradient(180deg, rgba(18, 26, 36, .95), rgba(10, 14, 19, .95));
  border-inline-start: 1px solid var(--line-soft);
  border-inline-end: 1px solid var(--line-soft);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden auto;
  z-index: 30;
}

.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; flex: none;
  border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text-soft); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--panel-3); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; transition: transform .2s ease; }

.sidebar-toggle { background: transparent; border-color: transparent; }
.sidebar-toggle:hover { background: var(--panel); }

/* حالت جمع‌شده (فقط دسکتاپ): فقط آیکون‌ها */
@media (min-width: 761px) {
  body.side-collapsed .app { --sidebar-w: 78px; }
  body.side-collapsed .sidebar { padding: 16px 10px; }
  body.side-collapsed .brand-text,
  body.side-collapsed .nav-label,
  body.side-collapsed .sidebar-foot { display: none; }
  body.side-collapsed .sidebar-head { flex-direction: column; gap: 12px; }
  body.side-collapsed .brand { padding: 0; justify-content: center; width: 100%; }
  body.side-collapsed .nav-item { justify-content: center; padding: 11px 0; }
  body.side-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
}

.sidebar-scrim { display: none; }

.brand { display: flex; align-items: center; gap: 10px; padding: 2px 4px; min-width: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, #34d399, #0ea5e9);
  color: #052e22; font-weight: 800; font-size: 20px;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px -8px rgba(52, 211, 153, .7);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.brand-text strong { font-size: 14px; }
.brand-text span { font-size: 11px; color: var(--muted); letter-spacing: .04em; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: 1px solid transparent;
  padding: 10px 12px; border-radius: 10px;
  color: var(--text-soft); cursor: pointer; width: 100%;
  text-align: start; transition: background .15s, color .15s, border-color .15s;
}
a.nav-item { text-decoration: none; }
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active {
  background: var(--accent-soft);
  border-color: rgba(52, 211, 153, .28);
  color: var(--accent);
  font-weight: 600;
}
.nav-item svg { width: 18px; height: 18px; }
.nav-item > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-ico { display: inline-grid; place-items: center; flex: none; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.env-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; font-size: 12px; color: var(--text-soft);
  width: fit-content;
}
.env-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.env-list { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; }
.env-list span { padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); }
.env-list .ok { color: var(--accent); border-color: rgba(52, 211, 153, .3); }
.env-list .bad { color: var(--danger); border-color: rgba(248, 113, 113, .3); }

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar-lead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.menu-btn { display: none; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 22px; margin: 12px 12px 0; border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(23,33,45,.78), rgba(18,26,36,.62));
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: 0 18px 46px -28px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.04);
  position: sticky; top: 12px; z-index: 20;
}
.titles h1 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.titles p { margin: 2px 0 0; font-size: 12px; }
.topbar-actions { display: flex; align-items: flex-end; gap: 12px; }
.project-pick { display: flex; flex-direction: column; gap: 4px; min-width: 190px; }
.project-pick select { min-width: 190px; }
.project-pick label { font-size: 11px; color: var(--muted); }

.view { padding: 22px 26px 60px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ---------- کنترل‌ها ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text-soft);
  padding: 9px 14px; cursor: pointer; font-size: 13px; font-weight: 500;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-3); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(135deg, #34d399, #10b981);
  border-color: rgba(52, 211, 153, .5); color: #04281d; font-weight: 700;
}
.btn-primary:hover { background: linear-gradient(135deg, #4ade80, #34d399); color: #04281d; }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger-soft); border-color: rgba(248, 113, 113, .35); color: var(--danger); }
.btn-danger:hover { background: rgba(248, 113, 113, .2); color: #fecaca; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn-icon { padding: 7px; width: 32px; height: 32px; }

.input, .select, .textarea {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 11px; color: var(--text);
  width: 100%; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(52, 211, 153, .55);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, .12);
}
.input::placeholder, .textarea::placeholder { color: #63718457; }
.select { cursor: pointer; }
.textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12px; color: var(--muted); }
/* صفت hidden باید هر چیدمانی را کنار بزند (فیلدهای اضافی ابزارها، تب‌ها و…) */
[hidden] { display: none !important; }
.hint { font-size: 11px; color: var(--muted); }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; color: var(--text-soft); }
.switch input[type="checkbox"] {
  appearance: none; width: 16px; height: 16px; margin: 0;
  border-radius: 5px; border: 1px solid var(--line);
  background: var(--bg-soft); cursor: pointer; flex: none;
  transition: background .15s, border-color .15s;
}
.switch input[type="checkbox"]:checked {
  background: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23052e22' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 11px; background-position: center; background-repeat: no-repeat;
}
.switch.switch-warn input[type="checkbox"]:checked {
  background-color: var(--warn); border-color: var(--warn);
}

/* ---------- کارت‌ها ---------- */

.card {
  background: linear-gradient(180deg, rgba(23, 33, 45, .9), rgba(18, 26, 36, .9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; }
.card-head .sub { font-size: 12px; color: var(--muted); }
.card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .value { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stat .label { font-size: 12px; color: var(--muted); }
.stat .ico {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--panel-3); margin-bottom: 6px; color: var(--accent);
}
.stat .ico svg { width: 18px; height: 18px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text-soft);
  white-space: nowrap;
}
.badge.ok { color: var(--accent); border-color: rgba(52, 211, 153, .35); background: var(--accent-soft); }
.badge.bad { color: var(--danger); border-color: rgba(248, 113, 113, .35); background: var(--danger-soft); }
.badge.warn { color: var(--warn); border-color: rgba(251, 191, 36, .35); background: var(--warn-soft); }
.badge.blue { color: var(--blue); border-color: rgba(96, 165, 250, .35); background: var(--blue-soft); }

/* ---------- جدول ---------- */

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data th { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--panel-2); white-space: nowrap; }
table.data tbody tr:hover { background: rgba(255, 255, 255, .02); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data td.actions { text-align: end; white-space: nowrap; }

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 34px 20px; text-align: center; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty h3 { margin: 0; color: var(--text); font-size: 15px; }
.empty p { margin: 0; font-size: 12px; max-width: 460px; }
.empty svg { width: 34px; height: 34px; color: var(--line); }

/* ---------- مودال ---------- */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(4, 8, 12, .72);
  backdrop-filter: blur(4px); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 18px; overflow: auto;
  animation: fade .15s ease-out;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  width: min(720px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9);
  overflow: hidden;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-body { padding: 20px; display: grid; gap: 14px; }
.modal-body > .btn { justify-self: start; }
.modal-body .field > .btn { align-self: flex-start; }
.modal-body .form-row > .field > .btn { align-self: stretch; }
.modal-foot { display: flex; justify-content: flex-start; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line-soft); background: var(--panel-2); }
.form-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* ---------- توست ---------- */

.toast-root { position: fixed; bottom: 18px; left: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--panel-3); border: 1px solid var(--line);
  border-inline-start: 3px solid var(--accent);
  border-radius: 10px; padding: 11px 15px; font-size: 13px;
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .9);
  animation: slide .2s ease-out;
  max-width: 380px;
}
.toast.error { border-inline-start-color: var(--danger); }
.toast.warn { border-inline-start-color: var(--warn); }
@keyframes slide { from { transform: translateY(8px); opacity: 0 } to { transform: none; opacity: 1 } }

/* ---------- کد ---------- */

.code {
  background: #070b10; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px;
  font-size: 12.5px; line-height: 1.75; color: #cfe3d8;
  overflow: auto; max-height: 420px; margin: 0;
  white-space: pre;
  tab-size: 2;
}
.code .kw { color: #7dd3fc; }
.code-wrap { position: relative; }
.code-copy {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--panel-3); border: 1px solid var(--line); color: var(--text-soft);
  border-radius: 7px; padding: 3px 8px; font-size: 11px; cursor: pointer;
}
.code-copy svg { width: 13px; height: 13px; }
.code-copy:hover { color: var(--text); }

/* ---------- طراح دیتابیس ---------- */

.designer {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.tables-rail { display: flex; flex-direction: column; gap: 8px; }
.rail-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); }
.table-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-2); cursor: pointer; font-size: 13px;
  text-align: start; width: 100%; color: var(--text-soft);
}
.table-chip:hover { border-color: rgba(52, 211, 153, .35); }
.table-chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.table-chip .count { font-size: 11px; color: var(--muted); }
.table-chip.active .count { color: var(--accent); }

.editor { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.cols-head, .col-row {
  display: grid;
  grid-template-columns: minmax(110px, 1.6fr) 118px 74px 1.1fr minmax(150px, 1.3fr) 34px;
  gap: 8px; align-items: center;
}
.cols-head { font-size: 11px; color: var(--muted); padding: 0 4px; }
.col-row { padding: 6px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--bg-soft); }
.col-row.is-pk { border-color: rgba(52, 211, 153, .32); }
.cols { display: flex; flex-direction: column; gap: 6px; }

.flags { display: flex; gap: 4px; flex-wrap: wrap; }
.flag {
  font-size: 10.5px; padding: 3px 7px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  cursor: pointer; white-space: nowrap;
}
.flag:hover { color: var(--text); }
.flag.on { background: var(--accent-soft); border-color: rgba(52, 211, 153, .5); color: var(--accent); }
.flag.on.pk { background: var(--blue-soft); border-color: rgba(96, 165, 250, .5); color: var(--blue); }

.fk-row { display: grid; grid-template-columns: 1fr 1fr 1fr 130px 34px; gap: 8px; align-items: center; }

.sql-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- دستیار ---------- */

.chat {
  display: flex; flex-direction: column;
  height: calc(100vh - 190px); min-height: 430px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); background: var(--panel-2); }
.chat-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.quick-actions { padding: 9px 14px; border-bottom: 1px solid var(--line-soft); background: var(--panel-2); flex-wrap: wrap; gap: 6px; }
.quick-actions .btn { font-size: 12px; padding: 5px 10px; }
.msg { display: flex; gap: 10px; max-width: 92%; min-width: 0; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.assistant { align-self: flex-start; }
.bubble { max-width: 100%; }
.msg-avatar {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.msg.user .msg-avatar { background: var(--blue-soft); color: var(--blue); }
.msg.assistant .msg-avatar { background: var(--accent-soft); color: #04201a; }
.bubble {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 14px; font-size: 13.5px; line-height: 1.85;
  overflow-wrap: anywhere; min-width: 0;
}
.msg.user .bubble { background: var(--blue-soft); border-color: rgba(96, 165, 250, .28); }
.bubble p { margin: 0 0 8px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { margin: 6px 0; padding-inline-start: 20px; }
.bubble h4 { margin: 10px 0 6px; font-size: 13.5px; color: var(--accent); }
.bubble code.inline { background: #070b10; padding: 1px 5px; border-radius: 5px; font-size: 12px; }
.bubble .code { margin: 8px 0; max-height: 340px; }
.chat-input { border-top: 1px solid var(--line-soft); padding: 12px 14px; background: var(--panel-2); display: flex; flex-direction: column; gap: 9px; }
.chat-input .row { display: flex; align-items: flex-end; gap: 10px; }
.chat-input textarea { min-height: 52px; max-height: 180px; resize: vertical; }
.tool-line {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  align-self: center; max-width: 100%;
  background: var(--bg-soft); border: 1px dashed var(--line);
  border-radius: 9px; padding: 6px 10px; font-size: 12px; color: var(--text-soft);
}
.tool-line .tool-ico svg { width: 14px; height: 14px; color: var(--blue); display: block; }
.tool-line .tool-name { font-weight: 600; }
.tool-line .tool-detail {
  font-size: 11px; color: var(--muted); background: #070b10;
  padding: 1px 6px; border-radius: 5px; max-width: 300px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr;
}
.switch-warn { color: var(--warn); }
.switch-warn input { accent-color: var(--warn); }

.typing { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); font-size: 12px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .2 } 50% { opacity: 1 } }

/* ---------- متفرقه ---------- */

.fatal { max-width: 620px; margin: 80px auto; background: var(--panel); border: 1px solid var(--danger); border-radius: 14px; padding: 26px; }
.fatal h1 { margin-top: 0; color: var(--danger); font-size: 18px; }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kv > div { background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: 9px; padding: 9px 11px; min-width: 0; }
.kv .k { font-size: 11px; color: var(--muted); }
.kv .v { font-size: 13px; overflow-wrap: anywhere; }

.tabs { display: flex; gap: 4px; background: var(--panel-2); border: 1px solid var(--line); padding: 4px; border-radius: 10px; width: fit-content; }
.tab { background: transparent; border: none; padding: 6px 13px; border-radius: 7px; cursor: pointer; font-size: 12.5px; color: var(--muted); }
.tab.active { background: var(--panel-3); color: var(--text); }

.persona-preview { margin-top: 4px; }
.persona-preview summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.persona-preview summary:hover { color: var(--text-soft); }
.persona-preview pre {
  direction: rtl; text-align: start; white-space: pre-wrap;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin: 8px 0 0; max-height: 340px; overflow: auto;
  font-family: var(--font); font-size: 12px; line-height: 1.9; color: var(--text-soft);
}

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mt-0 { margin-top: 0; }
.sep { height: 1px; background: var(--line-soft); margin: 4px 0; }

/* ---------- ویرایشگر صفحه لندینگ ---------- */

.lp-admin-plans { display: flex; flex-direction: column; gap: 8px; }
.lp-admin-plan {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg-soft); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: 9px 11px; font-size: 12.5px; line-height: 1.8;
}
.lp-admin-plan .small { line-height: 1.7; }

/* ---------- مرورگر داخلی ---------- */

.browser {
  display: flex; flex-direction: column; min-height: 0;
  border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; background: var(--panel);
}
.browser-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--panel-2); border-bottom: 1px solid var(--line);
}
.browser-dots { display: inline-flex; gap: 6px; flex: none; }
.browser-dots i { width: 10px; height: 10px; border-radius: 50%; display: block; background: var(--panel-3); }
.browser-dots i:nth-child(1) { background: rgba(248, 113, 113, .7); }
.browser-dots i:nth-child(2) { background: rgba(251, 191, 36, .7); }
.browser-dots i:nth-child(3) { background: rgba(52, 211, 153, .7); }
.browser-url { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; }
.browser-tools {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 9px 12px; border-bottom: 1px solid var(--line-soft);
}
.browser-stage {
  flex: 1; min-height: 400px; padding: 16px;
  display: flex; justify-content: center; align-items: flex-start; overflow: auto;
  background:
    radial-gradient(600px 300px at 50% -20%, rgba(52, 211, 153, .07), transparent 70%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .014) 0 10px, transparent 10px 20px),
    var(--bg-soft);
}
.browser-frame {
  width: 100%; height: clamp(420px, 62vh, 1100px);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; box-shadow: var(--shadow);
  transition: width .18s ease, box-shadow .18s ease;
}
.browser-frame.narrow { box-shadow: 0 26px 60px -30px #000, 0 0 0 8px rgba(0, 0, 0, .25); }
.browser-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.browser-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border-top: 1px solid var(--line-soft); background: var(--panel-2);
}

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; right: 0; left: auto;
    width: 276px; max-width: 86vw; height: 100vh; z-index: 60;
    transform: translateX(102%); transition: transform .22s ease;
    box-shadow: -20px 0 50px -26px #000;
  }
  body.side-open .sidebar { transform: none; }
  .sidebar-scrim {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(4, 7, 11, .62); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  body.side-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .menu-btn { display: inline-grid; }
  .browser-bar { flex-wrap: wrap; }
  .browser-dots { display: none; }
  .browser-stage { padding: 8px; }
  .browser-frame { height: clamp(360px, 58vh, 760px); }
  .browser-frame.narrow { box-shadow: none; border-radius: 8px; }
  .topbar-lead { gap: 10px; }
  .nav-item { white-space: nowrap; }
  .brand-text, .sidebar-foot { display: flex; }
  .topbar { flex-wrap: wrap; padding: 14px 16px; }
  .view { padding: 16px 16px 50px; }
  .designer { grid-template-columns: 1fr; }
  .cols { overflow-x: auto; padding-bottom: 4px; }
  .cols-head, .col-row { min-width: 660px; }
  .fk-row { min-width: 620px; }
  #fks { overflow-x: auto; }
}

/* ---------- ابزارهای رایگان شبکه و سئو ---------- */

.toolbox {
  background: linear-gradient(180deg, rgba(23,33,45,.96), rgba(18,26,36,.96));
  border: 1px solid var(--line); border-radius: 18px;
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.tb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tb-head h2 { margin: 0 0 4px; font-size: 17px; }
.tb-head p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.9; max-width: 640px; }
.tb-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.tb-bar .field { gap: 5px; }
.tb-tool-field { flex: 0 0 210px; min-width: 180px; }
.tb-target-field { flex: 1 1 250px; min-width: 200px; }
.tb-extra { flex: 0 0 180px; min-width: 140px; }
.tb-run { flex: 0 0 auto; height: 38px; display: inline-flex; align-items: center; gap: 7px; }
.tb-run.is-busy { opacity: .8; cursor: wait; }
.tb-hint { margin: -4px 0 0; font-size: 12px; color: var(--muted); text-align: right; direction: rtl; }
.tb-foot { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.9; text-align: right; direction: rtl; }
.tb-result:empty { display: none; }
.tb-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; display: flex; flex-direction: column; gap: 14px;
}
.tb-loading { flex-direction: row; align-items: center; gap: 10px; color: var(--text-soft); font-size: 13px; }
.tb-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tb-target { font-family: var(--mono); font-size: 12.5px; color: var(--muted); word-break: break-all; }
.tb-headline { font-size: 16px; font-weight: 700; margin-top: 4px; text-align: right; direction: rtl; }
.tb-headline.ok { color: var(--accent); }
.tb-headline.warn { color: var(--warn); }
.tb-headline.bad { color: var(--danger); }
.tb-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tb-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.tb-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 11.5px; color: var(--muted); background: var(--bg-soft); }
.tb-badge .v { color: var(--text); font-weight: 700; }
.tb-badge.ok { border-color: rgba(52,211,153,.35); background: var(--accent-soft); }
.tb-badge.ok .v { color: var(--accent); }
.tb-badge.warn { border-color: rgba(251,191,36,.35); background: var(--warn-soft); }
.tb-badge.warn .v { color: var(--warn); }
.tb-badge.bad { border-color: rgba(248,113,113,.35); background: var(--danger-soft); }
.tb-badge.bad .v { color: var(--danger); }
.tb-block { display: flex; flex-direction: column; gap: 8px; }
.tb-block h4 { margin: 0; font-size: 13px; color: var(--text-soft); text-align: right; direction: rtl; }
.tb-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 14px; }
.tb-kv-row { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; border-bottom: 1px dashed var(--line-soft); padding-bottom: 5px; font-size: 12.5px; }
.tb-kv-row .k { color: var(--muted); flex: none; }
.tb-kv-row .v { text-align: start; color: var(--text); word-break: break-word; }
.tb-table-wrap { overflow-x: auto; }
.tb-table-wrap table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tb-table-wrap table.data th, .tb-table-wrap table.data td { text-align: start; padding: 7px 9px; border-bottom: 1px solid var(--line-soft); }
.tb-table-wrap table.data th { color: var(--muted); font-weight: 600; font-size: 11.5px; white-space: nowrap; }
.tb-table-wrap table.data td { color: var(--text-soft); vertical-align: top; }
.tb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.tb-li { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; line-height: 1.9; text-align: right; direction: rtl; }
.tb-li .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; flex: none; background: var(--muted); }
.tb-li.ok .dot { background: var(--accent); }
.tb-li.warn .dot { background: var(--warn); }
.tb-li.bad .dot { background: var(--danger); }
.tb-li.info .dot { background: var(--blue); }
.tb-li b { color: var(--text); font-weight: 600; }
.tb-li .hint { color: var(--muted); font-size: 11.5px; margin-top: 2px; text-align: right; direction: rtl; }
.tb-note { font-size: 12.5px; line-height: 1.95; border-radius: 10px; padding: 10px 12px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--text-soft); word-break: break-word; text-align: right; direction: rtl; }
.tb-note.ok { border-color: rgba(52,211,153,.3); background: var(--accent-soft); }
.tb-note.warn { border-color: rgba(251,191,36,.3); background: var(--warn-soft); }
.tb-note.bad { border-color: rgba(248,113,113,.3); background: var(--danger-soft); }
.tb-code, .tb-raw pre { margin: 0; background: #070b10; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-family: var(--mono); font-size: 11.5px; line-height: 1.8; color: var(--text-soft); overflow: auto; max-height: 320px; white-space: pre-wrap; word-break: break-word; }
.tb-raw summary { cursor: pointer; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.tb-meta { font-size: 11px; color: var(--muted); text-align: end; }
.tb-line { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.tb-line b { color: var(--text); }
.tb-line.bad { color: var(--danger); }
.tb-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); border-top-color: var(--accent); display: inline-block; animation: tb-spin .7s linear infinite; }
@keyframes tb-spin { to { transform: rotate(360deg); } }
@media (max-width: 720px) {
  .tb-tool-field, .tb-extra, .tb-run { flex: 1 1 140px; }
  .tb-bar .field { min-width: 130px; }
}

/* ---------- پشتیبانی ---------- */

.support { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.support-list, .support-chat { display: flex; flex-direction: column; gap: 12px; }
.support-chat { min-height: 520px; }
.sup-threads { display: flex; flex-direction: column; gap: 6px; max-height: 62vh; overflow: auto; }
.sup-thread {
  display: flex; flex-direction: column; gap: 4px; text-align: start;
  background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: 11px;
  padding: 9px 11px; cursor: pointer; color: var(--text-soft); font: inherit; width: 100%;
}
.sup-thread:hover { border-color: var(--line); }
.sup-thread.active { border-color: rgba(52,211,153,.45); background: var(--accent-soft); }
.sup-thread strong { color: var(--text); font-size: 13px; }
.sup-subject { font-size: 12px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--muted); }
.sup-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px; min-height: 220px; max-height: 52vh; }
.sup-msg { display: flex; gap: 9px; max-width: 92%; }
.sup-msg.admin { align-self: flex-end; flex-direction: row-reverse; }
.sup-avatar {
  width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; background: var(--panel-3); color: var(--text-soft);
}
.sup-msg.admin .sup-avatar { background: var(--accent-soft); color: var(--accent); }
.sup-bubble { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 9px 12px; min-width: 0; }
.sup-msg.admin .sup-bubble { background: var(--accent-soft); border-color: rgba(52,211,153,.3); }
.sup-body { font-size: 13px; line-height: 1.95; color: var(--text); word-break: break-word; }
.sup-time { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.sup-compose { border-top: 1px solid var(--line-soft); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.sup-remote { border-top: 1px dashed var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.sup-remote-connect { display: flex; flex-direction: column; gap: 8px; background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: 11px; padding: 10px; margin-top: 8px; }
.nav-badge {
  margin-inline-start: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--warn); color: #1b1405; font-size: 10.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
body.side-collapsed .nav-badge { display: none; }
@media (max-width: 860px) {
  .support { grid-template-columns: 1fr; }
  .sup-threads { max-height: 240px; }
}

/* ---------- ویرایشگر منوی هدر لندینگ ---------- */

.lp-menu-list { display: flex; flex-direction: column; gap: 8px; }
.lp-menu-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "label tab del" "url tab del";
  gap: 6px 8px; align-items: center; background: var(--bg-soft);
  border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px;
}
.lp-menu-row .input { min-width: 0; width: 100%; }
.lp-menu-row [data-menu="label"] { grid-area: label; }
.lp-menu-row [data-menu="url"] { grid-area: url; }
.lp-menu-row .lp-menu-tab { grid-area: tab; }
.lp-menu-row [data-menu-remove] { grid-area: del; align-self: center; }
.lp-menu-row .lp-menu-tab { white-space: nowrap; font-size: 11.5px; }
@media (max-width: 700px) {
  .lp-menu-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "label del" "url del" "tab tab";
  }
}

/* ---------- ویرایشگر اسلایدرهای تبلیغات سایدبار ---------- */

.lp-ads-list { display: flex; flex-direction: column; gap: 10px; }
.lp-ad-edit {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 10px;
}
.lp-ad-edit-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lp-ad-edit-head b { font-size: 12.5px; color: var(--text); }
.lp-ad-edit-head .lp-menu-tab { margin-inline-start: auto; }
.lp-ad-slides { display: flex; flex-direction: column; gap: 6px; }
.lp-ad-slide-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "img del" "link del";
  gap: 6px; align-items: center;
}
.lp-ad-slide-row .input { min-width: 0; width: 100%; }
.lp-ad-slide-row [data-slide="image"] { grid-area: img; }
.lp-ad-slide-row [data-slide="link"] { grid-area: link; }
.lp-ad-slide-row [data-ad-slide-remove] { grid-area: del; }

/* ---------- ویرایشگر نمونه‌کارهای لندینگ ---------- */

.lp-works-list { display: flex; flex-direction: column; gap: 8px; }
.lp-work-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.6fr) auto;
  grid-template-areas: "title tag del" "image image del" "link link del";
  gap: 6px; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px;
}
.lp-work-row .input { min-width: 0; width: 100%; }
.lp-work-row [data-work="title"] { grid-area: title; }
.lp-work-row [data-work="tag"] { grid-area: tag; }
.lp-work-row [data-work="image"] { grid-area: image; }
.lp-work-row [data-work="link"] { grid-area: link; }
.lp-work-row [data-work-remove] { grid-area: del; align-self: center; }
@media (max-width: 700px) {
  .lp-work-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title del" "tag del" "image del" "link del"; }
}

/* ---------- چیدمان تمام‌عرض در همه‌ی صفحه‌ها ---------- */
.lp-wrap, .acc, .buy-wrap, .tools-page, .doc, .setup { max-width: none; }
@media (min-width: 1700px) {
  .view { padding-inline: 34px; }
}

/* ---------- هدر مدرن یکپارچه (landing/account/buy/tools) ---------- */
.site-head-wrap { position: sticky; top: 0; z-index: 40; margin: 0 0 18px; }
.lp-head-wrap { position: sticky; top: 0; z-index: 40; margin: 0 0 18px; }
.lp-head, .site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 18px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(23,33,45,.78), rgba(18,26,36,.62));
  border: 1px solid var(--line); backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: 0 18px 46px -28px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.04);
  transition: box-shadow .25s ease, border-color .25s ease;
}
.lp-head:hover, .site-head:hover { border-color: rgba(52,211,153,.22); box-shadow: 0 22px 54px -26px rgba(52,211,153,.18); }
.lp-head .brand, .site-head .brand { display: flex; align-items: center; gap: 11px; min-width: 0; text-decoration: none; color: inherit; }
.lp-head .brand-mark, .site-head .brand-mark {
  width: 40px; height: 40px; border-radius: 13px; flex: none;
  background: linear-gradient(135deg, #34d399 0%, #0ea5e9 100%);
  color: #052e22; font-weight: 800; font-size: 19px;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px -10px rgba(52,211,153,.85), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .25s ease;
}
.lp-head .brand:hover .brand-mark, .site-head .brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.lp-head .brand-text, .site-head .brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.lp-head .brand-text strong, .site-head .brand-text strong { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.lp-head .brand-text span, .site-head .brand-text span { font-size: 11px; color: var(--muted); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.lp-head nav, .site-head nav {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: center;
  font-size: 13px; flex: 1 1 auto; min-width: 0; max-width: 100%;
  padding: 4px; border-radius: 999px; background: rgba(255,255,255,.03); border: 1px solid var(--line-soft);
}
.lp-head nav a, .site-head nav a {
  color: var(--text-soft); padding: 7px 14px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap; text-decoration: none;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.lp-head nav a:hover, .site-head nav a:hover { color: var(--text); background: rgba(255,255,255,.07); border-color: var(--line-soft); transform: translateY(-1px); }
.lp-head nav a.btn, .site-head nav a.btn { color: var(--text); padding: 8px 16px; background: var(--accent-soft); border-color: rgba(52,211,153,.3); }
.lp-head nav a.btn:hover, .site-head nav a.btn:hover { background: rgba(52,211,153,.22); border-color: rgba(52,211,153,.5); }
.lp-head-phone, .site-head-phone {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: 13px; color: var(--text); text-decoration: none;
  padding: 8px 14px 8px 10px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(52,211,153,.18), rgba(14,165,233,.12));
  border: 1px solid rgba(52,211,153,.35);
  box-shadow: 0 8px 20px -12px rgba(52,211,153,.6);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.lp-head-phone:hover, .site-head-phone:hover { transform: translateY(-2px); border-color: rgba(52,211,153,.6); box-shadow: 0 14px 28px -12px rgba(52,211,153,.75); }
.lp-head-phone .lp-phone-icon, .site-head-phone .site-phone-icon {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: #34d399; color: #052e22;
  box-shadow: 0 4px 10px -4px rgba(52,211,153,.9);
}
.lp-head-phone .lp-phone-icon svg, .site-head-phone .site-phone-icon svg { width: 13px; height: 13px; }
.lp-head-phone .lp-phone-num, .site-head-phone .site-phone-num { font-family: var(--mono); direction: ltr; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.lp-head-phone .lp-phone-label, .site-head-phone .site-phone-label { font-size: 11.5px; color: var(--text-soft); }
@media (max-width: 900px) {
  .lp-head nav, .site-head nav { order: 3; width: 100%; justify-content: flex-start; }
}
@media (max-width: 720px) {
  .lp-head, .site-head { padding: 10px 12px; gap: 10px; border-radius: 14px; }
  .lp-head .brand-text span, .site-head .brand-text span { display: none; }
  .lp-head nav, .site-head nav { gap: 1px; padding: 3px; }
  .lp-head nav a, .site-head nav a { padding: 6px 9px; font-size: 12.5px; }
  .lp-head-phone, .site-head-phone { padding: 7px 12px 7px 8px; }
  .lp-head-phone .lp-phone-label, .site-head-phone .site-phone-label { display: none; }
}

/* ===== Modern animated background (shared across all pages) ===== */
body {
  background:
    radial-gradient(1200px 700px at 80% -8%, rgba(99,102,241,.20) 0%, transparent 58%),
    radial-gradient(900px 600px at 10% 108%, rgba(59,130,246,.18) 0%, transparent 62%),
    radial-gradient(700px 500px at 50% 50%, rgba(139,92,246,.10) 0%, transparent 72%),
    radial-gradient(520px 420px at 72% 78%, rgba(34,211,238,.09) 0%, transparent 68%),
    radial-gradient(460px 360px at 28% 30%, rgba(236,72,153,.07) 0%, transparent 70%),
    var(--bg);
  background-attachment: fixed;
  animation: lp-bgshift 28s ease-in-out infinite alternate;
}
@keyframes lp-bgshift {
  0%   { background-position: 0% 0%, 100% 100%, 50% 50%, 72% 78%, 28% 30%, 0 0; }
  50%  { background-position: 10% 5%, 90% 95%, 46% 54%, 62% 70%, 34% 36%, 0 0; }
  100% { background-position: 5% 3%, 95% 97%, 54% 46%, 78% 82%, 22% 26%, 0 0; }
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 88% 68% at 50% 42%, #000 22%, transparent 84%);
  -webkit-mask-image: radial-gradient(ellipse 88% 68% at 50% 42%, #000 22%, transparent 84%);
  animation: lp-gridrift 36s linear infinite;
}
@keyframes lp-gridrift { from { background-position: 0 0; } to { background-position: 72px 72px; } }
body::after {
  content: ""; position: fixed; inset: -22%; z-index: 0; pointer-events: none;
  background:
    conic-gradient(from 200deg at 50% 50%, rgba(99,102,241,.16), rgba(59,130,246,.13), rgba(139,92,246,.12), rgba(34,211,238,.10), rgba(236,72,153,.08), rgba(99,102,241,.16));
  filter: blur(110px) saturate(1.15);
  animation: lp-aurora 30s ease-in-out infinite alternate;
  opacity: .5;
}
@keyframes lp-aurora { 0% { transform: rotate(0deg) scale(1.08); } 100% { transform: rotate(22deg) scale(1.16); } }
.lp-orb { position: fixed; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0; mix-blend-mode: screen; }
.lp-orb.o1 { width: 520px; height: 520px; background: radial-gradient(circle, #6366f1, transparent 70%); top: -160px; right: -140px; animation: lp-orb1 20s ease-in-out infinite; opacity: .45; }
.lp-orb.o2 { width: 440px; height: 440px; background: radial-gradient(circle, #3b82f6, transparent 70%); bottom: -120px; left: -100px; animation: lp-orb2 24s ease-in-out infinite; opacity: .4; animation-delay: -8s; }
.lp-orb.o3 { width: 340px; height: 340px; background: radial-gradient(circle, #8b5cf6, transparent 70%); top: 36%; left: 36%; animation: lp-orb3 28s ease-in-out infinite; opacity: .32; animation-delay: -14s; }
.lp-orb.o4 { width: 260px; height: 260px; background: radial-gradient(circle, #22d3ee, transparent 70%); top: 60%; right: 10%; animation: lp-orb4 22s ease-in-out infinite; opacity: .3; animation-delay: -5s; }
.lp-orb.o5 { width: 200px; height: 200px; background: radial-gradient(circle, #ec4899, transparent 70%); bottom: 16%; right: 28%; animation: lp-orb5 26s ease-in-out infinite; opacity: .26; animation-delay: -16s; }
.lp-orb.o6 { width: 160px; height: 160px; background: radial-gradient(circle, #a78bfa, transparent 70%); top: 14%; left: 18%; animation: lp-orb6 30s ease-in-out infinite; opacity: .22; animation-delay: -10s; }
@keyframes lp-orb1 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(70px,-50px) scale(1.10); } 66% { transform: translate(-40px,60px) scale(.95); } }
@keyframes lp-orb2 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(-60px,40px) scale(1.06); } 66% { transform: translate(50px,-70px) scale(.93); } }
@keyframes lp-orb3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(80px,50px) scale(1.14); } }
@keyframes lp-orb4 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-50px,-60px); } }
@keyframes lp-orb5 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(60px,40px); } }
@keyframes lp-orb6 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px,50px) scale(1.08); } }
.lp-comet { position: fixed; z-index: 0; pointer-events: none; width: 140px; height: 1px; background: linear-gradient(90deg, transparent, rgba(147,197,253,.9), transparent); filter: blur(.4px); animation: lp-comet 9s linear infinite; opacity: 0; }
.lp-comet.c1 { top: 18%; left: -20%; animation-delay: 0s; }
.lp-comet.c2 { top: 52%; left: -20%; animation-delay: -4.5s; }
.lp-comet.c3 { top: 78%; left: -20%; animation-delay: -7s; }
@keyframes lp-comet { 0% { transform: translateX(0) rotate(22deg); opacity: 0; } 8% { opacity: .9; } 92% { opacity: .9; } 100% { transform: translateX(140vw) rotate(22deg); opacity: 0; } }
.lp-dust { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.lp-dust span { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 8px rgba(147,197,253,.7); animation: lp-dust 14s linear infinite; }
.lp-dust span:nth-child(1) { left: 8%; top: 12%; animation-delay: 0s; }
.lp-dust span:nth-child(2) { left: 22%; top: 68%; animation-delay: -3s; }
.lp-dust span:nth-child(3) { left: 41%; top: 24%; animation-delay: -6s; }
.lp-dust span:nth-child(4) { left: 63%; top: 78%; animation-delay: -9s; }
.lp-dust span:nth-child(5) { left: 79%; top: 36%; animation-delay: -2s; }
.lp-dust span:nth-child(6) { left: 91%; top: 58%; animation-delay: -5s; }
.lp-dust span:nth-child(7) { left: 33%; top: 90%; animation-delay: -8s; }
.lp-dust span:nth-child(8) { left: 55%; top: 8%; animation-delay: -11s; }
.lp-dust span:nth-child(9) { left: 14%; top: 44%; animation-delay: -1.5s; }
.lp-dust span:nth-child(10) { left: 68%; top: 16%; animation-delay: -7.5s; }
@keyframes lp-dust { 0% { transform: translateY(0) translateX(0); opacity: 0; } 10% { opacity: .9; } 90% { opacity: .9; } 100% { transform: translateY(-120vh) translateX(50px); opacity: 0; } }
.lp-noise { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* keep page content above animated background layers */
.app, .acc, .buy-wrap, .tools-page, .sec-wrap, .ssh-wrap, .ac-wrap, .login-wrap {
  position: relative; z-index: 1;
}
