/* Melkavid design system — shared by marketing + app chrome.
   Tokens follow the logo green (#009444). Do not change behavior; visual only. */

:root {
  --bg: #f3f7f4;
  --bg-deep: #e7f0ea;
  --surface: #ffffff;
  --surface-2: #f7fbf8;
  --border: #d4e5db;
  --text: #10241b;
  --muted: #5b7166;
  --green: #009444;
  --blue: #2563eb;
  --yellow: #c4a35a;
  --red: #dc2626;
  --purple: #7c3aed;
  --orange: #ea580c;
  --primary: #009444;
  --hover-bg: #eaf4ee;
  --active-bg: #e3f6eb;
  --table-hover: #f1f8f4;
  --log-bg: #eef5f1;
  --nav-section: #7a9085;
  --badge-running-bg: #dcfce7;
  --badge-completed-bg: #dbeafe;
  --badge-failed-bg: #fee2e2;
  --badge-pending-bg: #fef3c7;
  --badge-stopped-bg: #f3e8ff;
  --badge-paused-bg: #fef9c3;
  --badge-gray-bg: #e7efea;
  --badge-info-bg: #dbeafe;
  --msg-success-bg: #dcfce7;
  --msg-warning-bg: #fef3c7;
  --msg-error-bg: #fee2e2;
  --toggle-bg: #e7efea;
  --textarea-bg: #f7faf8;
  --textarea-color: #10241b;
  --ts-color: #7a9085;
  --btn-gray-bg: #eef4f0;
  --brand: #009444;
  --brand-deep: #067a38;
  --brand-soft: #e5f6ec;
  --accent: #c4a35a;
  --ink: #10241b;
  --line: #d4e5db;
  --shadow: 0 12px 36px rgba(16, 36, 27, 0.07);
  --shadow-lg: 0 22px 54px rgba(16, 36, 27, 0.11);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Vazirmatn", Tahoma, sans-serif;
  --brand-en: "Manrope", "Vazirmatn", sans-serif;
  --sidebar-w: 248px;
  --topbar-h: 60px;
}

html[data-theme="dark"] {
  --bg: #0c1410;
  --bg-deep: #0a110e;
  --surface: #141e19;
  --surface-2: #1a2620;
  --border: #2a3b32;
  --text: #e7eee9;
  --muted: #93a69b;
  --green: #3dcf7a;
  --blue: #58a6ff;
  --yellow: #e0b45a;
  --red: #f85149;
  --purple: #bc8cff;
  --orange: #f0883e;
  --primary: #3dcf7a;
  --hover-bg: #1c2a23;
  --active-bg: #1a3326;
  --table-hover: #1a2620;
  --log-bg: #0a110e;
  --nav-section: #6d8076;
  --badge-running-bg: #163325;
  --badge-completed-bg: #152536;
  --badge-failed-bg: #3a1a1a;
  --badge-pending-bg: #2a2206;
  --badge-stopped-bg: #2a1a3a;
  --badge-paused-bg: #2a2a0a;
  --badge-gray-bg: #1a2620;
  --badge-info-bg: #152536;
  --msg-success-bg: #163325;
  --msg-warning-bg: #2a2206;
  --msg-error-bg: #3a1a1a;
  --toggle-bg: #1c2a23;
  --textarea-bg: #0c1410;
  --textarea-color: #e7eee9;
  --ts-color: #6d8076;
  --btn-gray-bg: #1c2a23;
  --brand: #3dcf7a;
  --brand-deep: #2ea043;
  --brand-soft: #163325;
  --accent: #e0b45a;
  --ink: #e7eee9;
  --line: #2a3b32;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.45);
}

html[data-theme="light"] {
  --bg: #f3f7f4;
  --bg-deep: #e7f0ea;
  --surface: #ffffff;
  --surface-2: #f7fbf8;
  --border: #d4e5db;
  --text: #10241b;
  --muted: #5b7166;
  --green: #009444;
  --blue: #2563eb;
  --yellow: #c4a35a;
  --red: #dc2626;
  --purple: #7c3aed;
  --orange: #ea580c;
  --primary: #009444;
  --hover-bg: #eaf4ee;
  --active-bg: #e3f6eb;
  --table-hover: #f1f8f4;
  --log-bg: #eef5f1;
  --nav-section: #7a9085;
  --badge-running-bg: #dcfce7;
  --badge-completed-bg: #dbeafe;
  --badge-failed-bg: #fee2e2;
  --badge-pending-bg: #fef3c7;
  --badge-stopped-bg: #f3e8ff;
  --badge-paused-bg: #fef9c3;
  --badge-gray-bg: #e7efea;
  --badge-info-bg: #dbeafe;
  --msg-success-bg: #dcfce7;
  --msg-warning-bg: #fef3c7;
  --msg-error-bg: #fee2e2;
  --toggle-bg: #e7efea;
  --textarea-bg: #f7faf8;
  --textarea-color: #10241b;
  --ts-color: #7a9085;
  --btn-gray-bg: #eef4f0;
  --brand: #009444;
  --brand-deep: #067a38;
  --brand-soft: #e5f6ec;
  --accent: #c4a35a;
  --ink: #10241b;
  --line: #d4e5db;
  --shadow: 0 12px 36px rgba(16, 36, 27, 0.07);
  --shadow-lg: 0 22px 54px rgba(16, 36, 27, 0.11);
}

html[data-theme="sand"] {
  --bg: #0f0f0b;
  --bg-deep: #0a0a08;
  --surface: #161610;
  --surface-2: #1c1c14;
  --border: #2c2a20;
  --text: #f6f4ed;
  --muted: #b7b19d;
  --green: #84cc16;
  --blue: #60a5fa;
  --yellow: #f59e0b;
  --red: #ef4444;
  --purple: #a78bfa;
  --orange: #fb923c;
  --primary: #84cc16;
  --hover-bg: #1f1e18;
  --active-bg: #1f1e18;
  --table-hover: #1a1914;
  --log-bg: #0a0a08;
  --nav-section: #6b6558;
  --badge-running-bg: #1a2e0e;
  --badge-completed-bg: #0e1f2e;
  --badge-failed-bg: #2e0e0e;
  --badge-pending-bg: #2e2a0e;
  --badge-stopped-bg: #1e0e2e;
  --badge-paused-bg: #2e2a0e;
  --badge-gray-bg: #1a1914;
  --badge-info-bg: #0e1f2e;
  --msg-success-bg: #1a2e0e;
  --msg-warning-bg: #2e2a0e;
  --msg-error-bg: #2e0e0e;
  --toggle-bg: #1f1e18;
  --textarea-bg: #0a0a08;
  --textarea-color: #f6f4ed;
  --ts-color: #6b6558;
  --btn-gray-bg: #1f1e18;
  --brand: #84cc16;
  --brand-deep: #65a30d;
  --brand-soft: #1a2e0e;
  --accent: #f59e0b;
  --ink: #f6f4ed;
  --line: #2c2a20;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.45);
}

html[data-theme="ocean"] {
  --bg: #0a1420;
  --bg-deep: #060e16;
  --surface: #0f1f2f;
  --surface-2: #13263a;
  --border: #223047;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --green: #22c55e;
  --blue: #38bdf8;
  --yellow: #fbbf24;
  --red: #f87171;
  --purple: #a78bfa;
  --orange: #fb923c;
  --primary: #22c55e;
  --hover-bg: #162a3d;
  --active-bg: #162a3d;
  --table-hover: #122435;
  --log-bg: #060e16;
  --nav-section: #64748b;
  --badge-running-bg: #0f2e1a;
  --badge-completed-bg: #0f1f2e;
  --badge-failed-bg: #2e0f0f;
  --badge-pending-bg: #2e2a0a;
  --badge-stopped-bg: #1f0f2e;
  --badge-paused-bg: #2e2a0a;
  --badge-gray-bg: #122435;
  --badge-info-bg: #0f1f2e;
  --msg-success-bg: #0f2e1a;
  --msg-warning-bg: #2e2a0a;
  --msg-error-bg: #2e0f0f;
  --toggle-bg: #162a3d;
  --textarea-bg: #060e16;
  --textarea-color: #e2e8f0;
  --ts-color: #64748b;
  --btn-gray-bg: #162a3d;
  --brand: #22c55e;
  --brand-deep: #16a34a;
  --brand-soft: #0f2e1a;
  --accent: #fbbf24;
  --ink: #e2e8f0;
  --line: #223047;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.45);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  margin: 0;
  line-height: 1.65;
}

html[dir="rtl"] body { font-family: var(--font); }

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Chart.js + Leaflet size the canvas themselves. height:auto / max-width:100%
   start a resize loop that shrinks the chart after first paint. */
canvas {
  display: block;
  max-width: none;
}

a { color: inherit; text-decoration: none; }

/* ── App sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 50;
  transition: left 0.2s, right 0.2s, width 0.25s ease;
  box-shadow: 4px 0 24px rgba(16, 36, 27, 0.04);
}
html[dir="rtl"] .sidebar {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(16, 36, 27, 0.04);
}
.sidebar .brand-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--brand-soft), transparent);
}
.sidebar .brand-date {
  padding: 8px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 9px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  direction: ltr;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}
.sidebar .brand-date i { font-size: 9px; }
.sidebar .brand-mark-img { display: none; }
.sidebar .brand-lockup { display: block; }
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  overflow-anchor: none;
}
.sidebar-foot {
  padding: 10px 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left 0.28s ease, margin-right 0.28s ease;
  background:
    radial-gradient(ellipse 80% 40% at 100% 0%, rgba(0, 148, 68, 0.05), transparent 50%),
    var(--bg);
}
html[dir="rtl"] .main {
  margin-left: 0;
  margin-right: var(--sidebar-w);
  background:
    radial-gradient(ellipse 80% 40% at 0% 0%, rgba(0, 148, 68, 0.05), transparent 50%),
    var(--bg);
}

html.sidebar-compact .sidebar {
  width: 52px;
  overflow: hidden;
}
html.sidebar-compact .sidebar .brand-head {
  justify-content: center;
  padding: 12px 10px;
}
html.sidebar-compact .sidebar .brand-lockup { display: none; }
html.sidebar-compact .sidebar .brand-mark-img { display: block; }
html.sidebar-compact .sidebar .brand-text,
html.sidebar-compact .sidebar .brand-date,
html.sidebar-compact .sidebar .nav-section {
  display: none !important;
}
html.sidebar-compact .sidebar .nav-item span:not(.fa):not(.fas):not(.far) { display: none; }
html.sidebar-compact .sidebar .nav-item {
  justify-content: center;
  padding: 8px 0;
  width: 100%;
}
html[dir="rtl"].sidebar-compact .sidebar .nav-item { justify-content: center; }
html.sidebar-compact .main { margin-left: 52px; }
html[dir="rtl"].sidebar-compact .main {
  margin-left: 0;
  margin-right: 52px;
}

.topbar {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--topbar-h);
  gap: 12px;
}
.topbar h1 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12px;
  color: var(--muted);
}
html[dir="rtl"] .user-chip { padding: 4px 4px 4px 10px; }
.trial-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.trial-chip i { color: var(--brand); font-size: 12px; }
.trial-chip-text { color: var(--muted); font-weight: 600; }
.trial-chip strong {
  font-variant-numeric: tabular-nums;
  font-family: var(--brand-en), ui-monospace, monospace;
  letter-spacing: 0.04em;
  color: var(--brand);
}
.trial-chip.is-warn {
  border-color: color-mix(in srgb, var(--red) 35%, var(--border));
  background: color-mix(in srgb, var(--red) 10%, var(--surface));
}
.trial-chip.is-warn i,
.trial-chip.is-warn strong { color: var(--red); }
@media (max-width: 768px) {
  .trial-chip-text { display: none; }
}
.user-chip img,
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.content {
  padding: 22px 24px 32px;
  min-height: calc(100vh - var(--topbar-h));
  display: flex;
  flex-direction: column;
}

/* ── Nav ── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin: 2px 8px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  width: calc(100% - 16px);
  text-align: left;
  min-height: 40px;
}
html[dir="rtl"] .nav-item {
  text-align: right;
  flex-direction: row-reverse;
}
.nav-item:hover {
  background: var(--hover-bg);
  color: var(--text);
}
.nav-item.active {
  background: var(--active-bg);
  color: var(--brand);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--brand);
}
html[dir="rtl"] .nav-item.active {
  box-shadow: inset -3px 0 0 var(--brand);
}
.nav-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nav-section);
  padding: 14px 22px 6px;
}

.nav-item.nav-ai {
  border: 1px solid color-mix(in srgb, var(--purple) 35%, var(--border));
  margin-bottom: 8px;
  background: color-mix(in srgb, var(--purple) 6%, var(--surface));
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}
.badge-running { background: var(--badge-running-bg); color: var(--green); }
.badge-completed { background: var(--badge-completed-bg); color: var(--blue); }
.badge-failed { background: var(--badge-failed-bg); color: var(--red); }
.badge-pending { background: var(--badge-pending-bg); color: var(--yellow); }
.badge-stopped { background: var(--badge-stopped-bg); color: var(--purple); }
.badge-paused { background: var(--badge-paused-bg); color: var(--yellow); }
.badge-gray { background: var(--badge-gray-bg); color: var(--muted); }
.badge-info { background: var(--badge-info-bg); color: var(--blue); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
  font-family: inherit;
  min-height: 40px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-green,
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 28%, transparent);
}
.btn-green:hover,
.btn-primary:hover { filter: brightness(1.06); }
.btn-blue {
  background: #1f6feb;
  border-color: #388bfd;
  color: #fff;
}
.btn-blue:hover { background: #388bfd; }
.btn-purple {
  background: #6f42c1;
  border-color: #a855f7;
  color: #fff;
}
.btn-purple:hover { background: #7e52d0; }
.btn-red {
  background: #b91c1c;
  border-color: #f85149;
  color: #fff;
}
.btn-red:hover { background: #f85149; }
.btn-yellow {
  background: #936e0f;
  border-color: #eab308;
  color: #fff;
}
.btn-yellow:hover { background: #ca8a04; }
.btn-gray {
  background: var(--btn-gray-bg);
  border-color: var(--border);
  color: var(--text);
}
.btn-gray:hover { filter: brightness(1.04); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}
.btn-sm { padding: 4px 10px; font-size: 12px; min-height: 32px; }
.btn-lg { padding: 12px 22px; font-size: 0.95rem; min-height: 48px; }

/* ── Table ── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--surface-2);
}
html[dir="rtl"] .table th,
html[dir="rtl"] .table td { text-align: right; }
.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--table-hover); }

/* ── Forms ── */
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="url"],
input[type="date"],
select,
textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea {
  background: var(--textarea-bg);
  color: var(--textarea-color);
  line-height: 1.7;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}

.log-box {
  background: var(--log-bg);
  border-radius: 10px;
  padding: 12px;
  font-family: "Consolas", ui-monospace, monospace;
  font-size: 12px;
  overflow-y: auto;
  direction: ltr;
  text-align: left;
  max-height: 520px;
  border: 1px solid var(--border);
}
.log-line { padding: 1px 0; line-height: 1.6; }
.log-INFO { color: var(--muted); }
.log-ERROR { color: var(--red); }
.log-WARNING { color: var(--yellow); }
.ts { color: var(--ts-color); margin-right: 8px; }

/* ── Stats ── */
.stat,
.stat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}
.stat-label,
.stat-box .lbl {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.stat-value,
.stat-box .val {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}
.stat-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.pulse { animation: pulse 1.8s ease-in-out infinite; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
}
.msg-success {
  background: var(--msg-success-bg);
  color: var(--green);
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
}
.msg-warning {
  background: var(--msg-warning-bg);
  color: var(--yellow);
  border: 1px solid color-mix(in srgb, var(--yellow) 45%, transparent);
}
.msg-error {
  background: var(--msg-error-bg);
  color: var(--red);
  border: 1px solid color-mix(in srgb, var(--red) 35%, transparent);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  background: var(--toggle-bg);
}
.lang-toggle button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.lang-toggle button.active {
  background: var(--brand);
  color: #fff;
}
.login-tabs {
  display: flex;
  width: 100%;
  align-items: stretch;
  gap: 4px;
  margin: 0 0 22px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--toggle-bg);
}
.login-shell .login-tabs button {
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transform: none;
}
.login-shell .login-tabs button:hover {
  color: var(--text);
  transform: none;
}
.login-shell .login-tabs button.active {
  background: var(--brand);
  color: #fff;
  box-shadow: none;
}
.login-shell .login-tabs button i {
  width: auto;
  font-size: 12px;
  color: inherit;
  flex-shrink: 0;
}
.login-hint {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.login-otp {
  letter-spacing: 0.42em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.login-alt {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
}
.login-alt:hover { color: var(--brand); }

.theme-select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
}

.pagination {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grid-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--btn-gray-bg);
  color: var(--muted);
  transition: all 0.15s;
  font-family: inherit;
}
.filter-tab:hover { color: var(--text); border-color: var(--brand); }
.filter-tab.active {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  align-items: center;
}
.sidebar-toggle:hover { background: var(--hover-bg); }
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 36, 27, 0.45);
  z-index: 49;
}

.analysis-page-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
}
.analysis-chart-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.analysis-chart-card .card-head { flex-shrink: 0; }
.analysis-chart-body {
  flex: 1;
  min-height: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
}
.chart-wrapper {
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
  max-height: none;
}
.chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.dash-chart {
  position: relative;
  height: 220px;
  width: 100%;
}
.dash-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.empty-note,
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 36px 16px;
  font-size: 0.95rem;
}
.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

#confirmModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(16, 36, 27, 0.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
#confirmModal .modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
#confirmModal .modal-icon { font-size: 36px; margin-bottom: 12px; }
#confirmModal .modal-title { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
#confirmModal .modal-msg { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
#confirmModal .modal-actions { display: flex; gap: 10px; justify-content: center; }

.phone-profile-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(16, 36, 27, 0.28);
  pointer-events: auto;
}
.phone-profile-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: auto;
  max-height: min(92vh, 740px);
  filter: none;
  pointer-events: auto;
}
.phone-profile-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand), var(--accent), transparent);
}
.phone-profile-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.phone-profile-card h2 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.phone-profile-lead {
  margin: 0 0 18px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.phone-profile-card .error-msg { margin: 0 0 14px; }
.phone-profile-card .btn { width: 100%; min-height: 44px; }
body.phone-profile-lock {
  overflow: hidden !important;
}
body.phone-profile-lock .sidebar,
body.phone-profile-lock .sidebar-overlay,
body.phone-profile-lock .main {
  filter: blur(8px);
  pointer-events: none !important;
  user-select: none;
}

@media (max-width: 768px) {
  .sidebar-toggle { display: flex; }
  .sidebar {
    width: 52px;
    overflow: hidden;
  }
  .sidebar.expanded { width: var(--sidebar-w); }
  .sidebar-overlay.show { display: block; }
  .main {
    margin-left: 52px;
    transition: margin-left 0.25s ease, margin-right 0.25s ease;
  }
  html[dir="rtl"] .main {
    margin-left: 0;
    margin-right: 52px;
  }
  .sidebar .brand-head {
    justify-content: center;
    padding: 12px 10px;
  }
  .sidebar .brand-lockup { display: none; }
  .sidebar .brand-mark-img { display: block; }
  .sidebar.expanded .brand-head {
    justify-content: flex-start;
    padding: 14px 16px;
  }
  .sidebar.expanded .brand-lockup { display: block; }
  .sidebar.expanded .brand-mark-img { display: none; }
  .sidebar .brand-text,
  .sidebar .brand-date,
  .sidebar .nav-section {
    display: none !important;
    white-space: nowrap;
  }
  .sidebar.expanded .brand-text,
  .sidebar.expanded .brand-date,
  .sidebar.expanded .nav-section {
    display: block !important;
  }
  .sidebar .nav-item span:not(.fa):not(.fas):not(.far) { display: none; }
  .sidebar.expanded .nav-item span:not(.fa):not(.fas):not(.far) { display: inline; }
  .sidebar .nav-item {
    justify-content: center;
    padding: 8px 0;
    width: 100%;
  }
  .sidebar.expanded .nav-item {
    justify-content: flex-start;
    padding: 8px 14px;
    width: calc(100% - 16px);
  }
  html[dir="rtl"] .sidebar .nav-item { justify-content: center; }
  html[dir="rtl"] .sidebar.expanded .nav-item { justify-content: flex-end; }
  .content { padding: 12px; }
  .topbar { padding: 10px 12px; }
  .grid-stats {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }
  .stat { padding: 12px 14px; }
  .stat-value { font-size: 20px; }
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .table th, .table td { padding: 6px 8px; }
  input[type="text"],
  input[type="number"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  select {
    width: 100% !important;
    max-width: 100% !important;
  }
  .content .card .card-head,
  .content .card .card-body { padding: 10px !important; }
  .filter-bar { flex-direction: column !important; }
  .filter-bar > div { width: 100% !important; }
  .filter-bar select,
  .filter-bar input { width: 100% !important; }
  .flex-stack-mobile {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .flex-stack-mobile > div,
  .flex-stack-mobile > button { width: 100% !important; }
  .analysis-page-shell { gap: 12px; }
  .analysis-chart-body { padding: 10px; }
  .chart-wrapper { min-height: 220px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-stats { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 16px; }
  .sidebar { width: 200px; }
  .main { margin-left: 200px; }
  html[dir="rtl"] .main {
    margin-left: 0;
    margin-right: 200px;
  }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  h1 { font-size: 15px; }
  .topbar h1 { font-size: 14px; }
}

/* ══════════════════════════════════════════
   Marketing chrome
   ══════════════════════════════════════════ */
.mkt-body {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.mkt-nav,
.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.mkt-nav-inner,
.topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}
.logo { display: inline-flex; align-items: center; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-link {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
}
.nav-link:hover,
.nav-link.is-active { color: var(--brand); background: var(--brand-soft); }

.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(0, 148, 68, 0.16), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(196, 163, 90, 0.14), transparent 50%),
    linear-gradient(165deg, #eef5f1 0%, #f7faf8 45%, #e8f0eb 100%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 148, 68, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 148, 68, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000 20%, transparent 75%);
  animation: gridDrift 28s linear infinite;
}
@keyframes gridDrift {
  from { transform: translateY(0); }
  to { transform: translateY(48px); }
}
.hero-inner {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1.15fr);
  align-items: center;
  gap: 36px 48px;
  padding: 56px 0 72px;
  animation: heroIn 0.8s ease both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-copy { min-width: 0; }
.hero-logo { margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  max-width: 18ch;
}
.hero-lead {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 28px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.login-trial-hint {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 28rem;
}
.hero-preview {
  margin: 0;
  min-width: 0;
}
.hero-preview-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 55, 35, 0.1);
  box-shadow:
    0 18px 50px rgba(20, 60, 35, 0.14),
    0 2px 8px rgba(20, 60, 35, 0.06);
}
.hero-preview-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: linear-gradient(180deg, #f7faf8, #eef3f0);
  border-bottom: 1px solid rgba(15, 55, 35, 0.08);
  direction: ltr;
}
.hero-preview-chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4dde0;
}
.hero-preview-chrome span:nth-child(1) { background: #ff6b6b; }
.hero-preview-chrome span:nth-child(2) { background: #ffd166; }
.hero-preview-chrome span:nth-child(3) { background: #06d6a0; }
.hero-preview-chrome em {
  margin-left: 8px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  direction: rtl;
}
.hero-preview-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 649;
  object-fit: cover;
  object-position: center;
}
.hero-preview figcaption {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.mkt-section,
section.mkt-section { padding: 72px 0; }
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}
.section-head h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.section-head p { color: var(--muted); font-size: 1rem; margin: 0; }

.services {
  background: linear-gradient(180deg, transparent, rgba(231, 239, 234, 0.65));
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.service {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.service:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  box-shadow: var(--shadow-lg);
}
.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 14px;
  font-size: 1.05rem;
}
.service h3 { font-size: 1.05rem; font-weight: 800; margin: 0 0 8px; }
.service p { font-size: 0.9rem; color: var(--muted); margin: 0; }

.trust {
  background: var(--brand-deep);
  color: #edf7f2;
  padding: 56px 0;
}
.trust .section-head h2 { color: #fff; }
.trust .section-head p { color: rgba(237, 247, 242, 0.72); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.trust-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #fff;
}
.trust-item p { font-size: 0.88rem; color: rgba(237, 247, 242, 0.7); margin: 0; }

.price-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.price-card,
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.price-card:hover,
.pricing-card:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.price-card.featured,
.pricing-card.featured {
  border-color: var(--brand);
  background: linear-gradient(180deg, #fff, var(--brand-soft));
}
.price-card h3,
.pricing-card-title { font-size: 1.05rem; font-weight: 800; margin: 0 0 4px; }
.price-card .meta,
.pricing-card-sub { font-size: 0.82rem; color: var(--muted); }
.price-card .amount,
.pricing-amount {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 14px 0 4px;
  letter-spacing: -0.02em;
}
.pricing-amount.custom { font-size: 1.1rem; color: var(--brand); }
.price-card .period,
.pricing-period { font-size: 0.8rem; color: var(--muted); margin-bottom: 12px; }
.pricing-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 18px;
}
.pricing-badge {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.pricing-spacer { flex: 1; }
.pricing-card-sub ul { list-style: none; padding: 8px 0 0; margin: 0; text-align: start; }
.pricing-card-sub ul li {
  position: relative;
  padding-inline-start: 14px;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
}
.pricing-card-sub ul li::before {
  content: "•";
  position: absolute;
  inset-inline-start: 0;
  color: var(--brand);
}
.tel-btn,
.pricing-phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  direction: ltr;
  margin-inline: auto;
}
.tel-btn:hover,
.pricing-phone-btn:hover { filter: brightness(1.08); color: #fff; }

.media-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.video-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg-deep);
}
.video-wrap iframe { width: 100%; height: 100%; border: 0; }
.podcast {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
}
.podcast .mic {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
}
.podcast .info { flex: 1; min-width: 180px; }
.podcast .info strong { display: block; font-size: 0.95rem; }
.podcast .info span { font-size: 0.82rem; color: var(--muted); }
.podcast audio { flex: 1; min-width: 200px; max-width: 360px; height: 40px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.blog-card {
  display: block;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.blog-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.blog-card .body { padding: 16px 18px 20px; }
.blog-card h3 { font-size: 0.98rem; font-weight: 700; margin: 0 0 6px; }
.blog-card time { font-size: 0.78rem; color: var(--muted); }
.center { text-align: center; margin-top: 22px; }

.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-q,
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: inherit;
  color: var(--ink);
}
.faq-q i,
.faq-question .icon { color: var(--brand); transition: transform 0.25s ease; font-size: 0.75rem; }
.faq-item.open .faq-q i,
.faq-item.open .faq-question .icon { transform: rotate(180deg); }
.faq-a,
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-item.open .faq-a,
.faq-item.open .faq-answer { max-height: 600px; }
.faq-a-inner,
.faq-answer-inner {
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 0.9rem;
}
.faq-a-inner a { color: var(--brand); font-weight: 700; text-decoration: none; }

.cta { padding: 64px 0 80px; }
.cta-box {
  border-radius: 24px;
  padding: 48px 28px;
  text-align: center;
  background:
    radial-gradient(circle at 20% 30%, rgba(0, 148, 68, 0.18), transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(196, 163, 90, 0.16), transparent 40%),
    linear-gradient(145deg, #ffffff, #eaf3ee);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.cta-box h2 { font-size: 1.55rem; font-weight: 800; margin: 0 0 10px; }
.cta-box p { color: var(--muted); margin: 0 0 22px; }

.site-footer,
.mkt-footer {
  border-top: 1px solid var(--line);
  background: #edf3ef;
  padding: 36px 0 28px;
  margin-top: auto;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 14px;
}
.footer-links a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
}
.footer-links a:hover { color: var(--brand); }
.footer-brand { display: flex; justify-content: center; margin-bottom: 16px; }
.footer-meta { text-align: center; font-size: 0.82rem; color: var(--muted); }

.mkt-page {
  width: min(920px, calc(100% - 40px));
  margin: 40px auto 64px;
}
.mkt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.mkt-card h1 {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.mkt-lead {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 22px;
  line-height: 1.8;
}
.about-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0 22px;
}
@media (max-width: 640px) {
  .about-values { grid-template-columns: 1fr; }
}
.mkt-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.mkt-back:hover { color: var(--brand); }

.field, .field-group { margin-bottom: 14px; }
.field label, .field-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.field .error { font-size: 11px; color: var(--red); margin-top: 4px; }
.search-box { position: relative; margin-bottom: 28px; }
.search-box input { width: 100%; padding-inline-start: 42px; padding-inline-end: 16px; }
.search-box i {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}
.category { margin-bottom: 28px; }
.category h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.page-404 {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}
.page-404 .code {
  font-size: clamp(72px, 14vw, 120px);
  font-weight: 800;
  font-family: var(--brand-en);
  line-height: 1;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -4px;
  margin-bottom: 8px;
}

/* Login */
.login-shell {
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow: auto;
}
.login-shell .grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 148, 68, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 148, 68, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
}
.login-home {
  position: fixed;
  top: 16px;
  inset-inline-end: 16px;
  z-index: 10;
  font-size: 18px;
  color: var(--muted);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.login-home:hover { color: var(--brand); border-color: var(--brand); }
.left-panel {
  position: relative;
  z-index: 2;
  width: 440px;
  min-width: 360px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 44px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-inline-end: 1px solid var(--border);
}
.left-panel .card {
  padding: 32px 28px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}
.left-panel .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand), var(--accent), transparent);
}
.login-brand { display: flex; justify-content: center; width: 100%; margin-bottom: 18px; }
.input-wrap {
  display: flex;
  align-items: center;
  background: var(--textarea-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.input-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}
.input-wrap i {
  width: 36px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  flex-shrink: 0;
}
.input-wrap select {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  box-shadow: none;
  color: var(--text);
  font-size: 14px;
  padding: 10px 12px;
  appearance: none;
}
.loc-combo { position: relative; }
.loc-combo-list {
  position: absolute;
  z-index: 30;
  inset-inline: 0;
  top: calc(100% + 4px);
  max-height: 180px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(16, 36, 27, 0.12);
}
.loc-combo-list button {
  display: block;
  width: 100%;
  text-align: inherit;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}
.loc-combo-list button:hover { background: var(--bg); }
.loc-combo-sm .loc-combo-list { min-width: 160px; }
.pwd-toggle {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0 10px;
  flex-shrink: 0;
}
.pwd-toggle:hover { color: var(--brand); }
.left-panel .btn { width: 100%; margin-top: 4px; min-height: 44px; }
.error-msg, .success-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}
.error-msg {
  background: var(--msg-error-bg);
  border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
  color: var(--red);
}
.success-msg {
  background: var(--msg-success-bg);
  border: 1px solid color-mix(in srgb, var(--green) 30%, transparent);
  color: var(--green);
}
.login-help {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.login-help a { color: var(--brand); font-weight: 700; direction: ltr; }
.right-panel {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 60% 40%, rgba(0, 148, 68, 0.12) 0%, transparent 60%),
    linear-gradient(165deg, #eef5f1, #f7faf8);
}
.login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(760px, 90%);
  padding: 12px;
  transform: translateY(-6vh);
}
.login-hero .login-tagline { order: 1; }
.login-hero .login-pills { order: 2; }
.login-hero .chart-bg { order: 3; }
.chart-bg {
  position: relative;
  width: 100%;
  height: min(280px, 36vh);
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.82;
}
.chart-bg svg {
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.chart-bg .grad-top { stop-color: var(--brand); stop-opacity: 0.3; }
.chart-bg .grad-bottom { stop-color: var(--brand); stop-opacity: 0; }

.chart-bg .axis line {
  stroke: var(--brand);
  stroke-width: 1;
  stroke-dasharray: 3 9;
  opacity: 0.18;
  animation: loginFadeIn 1.1s ease-out both;
}
.chart-bg .axis line:nth-child(2) { animation-delay: 0.12s; }
.chart-bg .axis line:nth-child(3) { animation-delay: 0.24s; }

.chart-bg .skyline { animation: loginFadeIn 1.4s ease-out 0.1s both; }
.chart-bg .skyline rect {
  fill: var(--brand);
  opacity: 0.14;
  transform-box: fill-box;
  transform-origin: bottom;
  animation: loginGrow 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.chart-bg .skyline rect:nth-child(2) { animation-delay: 0.05s; }
.chart-bg .skyline rect:nth-child(3) { animation-delay: 0.1s; }
.chart-bg .skyline rect:nth-child(4) { animation-delay: 0.15s; }
.chart-bg .skyline rect:nth-child(5) { animation-delay: 0.2s; }
.chart-bg .skyline rect:nth-child(6) { animation-delay: 0.25s; }
.chart-bg .skyline rect:nth-child(7) { animation-delay: 0.3s; }
.chart-bg .skyline rect:nth-child(8) { animation-delay: 0.35s; }
.chart-bg .skyline rect:nth-child(9) { animation-delay: 0.4s; }
.chart-bg .skyline rect:nth-child(10) { animation-delay: 0.45s; }
.chart-bg .skyline rect:nth-child(11) { animation-delay: 0.5s; }
.chart-bg .skyline rect:nth-child(12) { animation-delay: 0.55s; }
.chart-bg .skyline rect:nth-child(13) { animation-delay: 0.6s; }
.chart-bg .skyline rect:nth-child(14) { animation-delay: 0.65s; }
.chart-bg .skyline .antenna { stroke: var(--brand); stroke-width: 1.5; opacity: 0.14; }
.chart-bg .skyline .ground { stroke: var(--brand); stroke-width: 1; opacity: 0.22; }

.chart-bg .skyline-lights rect {
  fill: var(--brand);
  opacity: 0;
  animation: loginTwinkle 5s ease-in-out infinite;
}
.chart-bg .skyline-lights rect:nth-child(2) { animation-delay: 0.7s; }
.chart-bg .skyline-lights rect:nth-child(3) { animation-delay: 1.9s; }
.chart-bg .skyline-lights rect:nth-child(4) { animation-delay: 2.6s; }
.chart-bg .skyline-lights rect:nth-child(5) { animation-delay: 1.2s; }
.chart-bg .skyline-lights rect:nth-child(6) { animation-delay: 3.4s; }
.chart-bg .skyline-lights rect:nth-child(7) { animation-delay: 0.4s; }
.chart-bg .skyline-lights rect:nth-child(8) { animation-delay: 2.2s; }
.chart-bg .skyline-lights rect:nth-child(9) { animation-delay: 4.1s; }
.chart-bg .skyline-lights rect:nth-child(10) { animation-delay: 1.6s; }
.chart-bg .skyline-lights rect:nth-child(11) { animation-delay: 3.8s; }
.chart-bg .skyline-lights rect:nth-child(12) { animation-delay: 0.9s; }
.chart-bg .skyline-lights rect:nth-child(13) { animation-delay: 2.9s; }
.chart-bg .skyline-lights rect:nth-child(14) { animation-delay: 4.5s; }

.chart-bg .chart { animation: loginFloat 11s ease-in-out infinite alternate; }
.chart-bg .area { animation: loginAreaIn 1.8s ease-out 0.35s both; }
.chart-bg .line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: loginDraw 2.4s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.chart-bg .line-a { stroke: var(--brand); animation-delay: 0.2s; }
.chart-bg .line-b { stroke: var(--blue); stroke-width: 1.8; opacity: 0.7; animation-delay: 0.55s; }
.chart-bg .line-c { stroke: var(--accent); stroke-width: 1.2; opacity: 0.5; animation-delay: 0.9s; }
.chart-bg .node {
  fill: var(--brand);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: loginNode 3.6s ease-in-out 2.1s infinite;
}
.chart-bg .node:nth-child(2) { animation-delay: 2.35s; }
.chart-bg .node:nth-child(3) { animation-delay: 2.6s; }
.chart-bg .node:nth-child(4) { animation-delay: 2.85s; }
.chart-bg .node:nth-child(5) { animation-delay: 3.1s; }

@keyframes loginFadeIn {
  from { opacity: 0; }
}
@keyframes loginGrow {
  from { transform: scaleY(0.5); }
  to { transform: scaleY(1); }
}
@keyframes loginTwinkle {
  0%, 100% { opacity: 0.06; }
  45% { opacity: 0.42; }
}
@keyframes loginAreaIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes loginDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes loginNode {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 0.9; transform: scale(1.3); }
}
@keyframes loginFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: reduce) {
  .chart-bg .axis line,
  .chart-bg .skyline,
  .chart-bg .skyline rect,
  .chart-bg .skyline-lights rect,
  .chart-bg .chart,
  .chart-bg .area,
  .chart-bg .line,
  .chart-bg .node { animation: none; }
  .chart-bg .line { stroke-dashoffset: 0; }
  .chart-bg .skyline-lights rect { opacity: 0.3; }
  .chart-bg .node { opacity: 0.75; }
}
.login-tagline {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 420px;
  padding: 20px;
}
.login-tagline h2 {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1.35;
  margin: 0;
}
.login-tagline h2 strong { font-weight: 800; color: var(--brand); }
.login-tagline p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}
.login-pills {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 420px;
  margin-top: 14px;
  margin-bottom: 4px;
}
.login-pills span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.login-pills i { color: var(--brand); }
.login-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.login-footer a { color: var(--muted); font-weight: 600; }
.login-footer a:hover { color: var(--brand); }

.public-chrome {
  margin: -22px -24px 24px;
}
html[dir="rtl"] .public-chrome { margin: -22px -24px 24px; }

.public-blog {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}
.blog-content a { color: var(--brand); text-decoration: underline; }
.blog-content h2, .blog-content h3 { font-weight: 800; margin: 1.2em 0 0.5em; }
.blog-content p { margin: 0 0 0.9em; }
.blog-content img { border-radius: 12px; }

@media (max-width: 960px) {
  .service-grid, .trust-grid, .price-grid, .pricing-grid, .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero {
    min-height: 0;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 40px 0 56px;
    gap: 28px;
  }
  .hero h1 { max-width: none; }
  .left-panel { width: 100%; min-width: 0; min-height: auto; padding: 32px 20px; border: 0; }
  .right-panel { display: none; }
  .login-shell { flex-direction: column; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 28px); }
  .mkt-nav .nav-link,
  .topnav .nav-link { display: none; }
  .hero-inner { padding: 48px 0 64px; }
  .logo .brand-img--lockup { height: 28px; }
  .service-grid, .trust-grid, .price-grid, .pricing-grid, .blog-grid {
    grid-template-columns: 1fr;
  }
  .mkt-section, section.mkt-section { padding: 56px 0; }
  .mkt-page { width: calc(100% - 28px); margin: 24px auto 48px; }
  .mkt-card { padding: 24px 18px; }
}

.divar-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 4px;
  flex-shrink: 0;
  line-height: 0;
  box-shadow: inset 0 0 0 1px rgba(166, 38, 38, 0.12);
}
.divar-icon {
  width: 14px;
  height: 14px;
  display: block;
  object-fit: contain;
}
.divar-icon-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 4px;
}
.btn-divar {
  background: #fff;
  color: #a62626;
  border: 1px solid #e8c4c4;
  box-shadow: none;
}
.btn-divar:hover {
  background: #fff5f5;
  border-color: #a62626;
  filter: none;
}
.btn-divar .divar-icon-wrap {
  width: 18px;
  height: 18px;
}
.btn-divar .divar-icon {
  width: 13px;
  height: 13px;
}
html[data-theme="dark"] .btn-divar {
  background: #2a1818;
  color: #f2c7c7;
  border-color: #5a3030;
}
html[data-theme="dark"] .btn-divar:hover {
  background: #3a2020;
  border-color: #a62626;
}
html[data-theme="dark"] .divar-icon-wrap {
  background: #fff;
}

html.sidebar-compact .sidebar { width: 52px !important; overflow: hidden; }
html.sidebar-compact .main { margin-left: 52px !important; }
html[dir="rtl"].sidebar-compact .main {
  margin-left: 0 !important;
  margin-right: 52px !important;
}
