/* ============================================================
   GAPGPT DESIGN SYSTEM — RTL-READY WITH LOGICAL PROPERTIES
   ============================================================ */

@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root,
[data-theme="dark"] {
  --q-primary: #32946a;
  --q-dark-page: #212121;
  --surface-primary: #212121;
  --surface-secondary: #171717;
  --surface-ternary: #424242;
  --message-surface: #2e2e2e;
  --text-primary: #ececec;
  --text-secondary: #f3f3f3;
  --text-muted: #999;
  --border-light: rgba(255, 255, 255, 0.1);
  --border-light-2: #4d4d4d;
  --brand-green: #10a37f;
  --link-color: #3a88ff;
  --q-negative: #c10015;
  --scrollbar-color: rgba(255, 255, 255, 0.2);
  --scrollbar-hover-color: rgba(255, 255, 255, 0.3);
  --font-fa: 'Vazirmatn';
  --font-en: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --line-height: 1.75;
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.18);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.15);
  --shadow-btn: 0 4px 20px rgba(50, 148, 106, 0.3);
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  --container-max: 1200px;
  --container-padding: 24px;
  --dir: ltr;
}

/* ============================================================
   LIGHT THEME — Premium Redesign
   Inspired by Linear, Stripe, Vercel, Notion
   ============================================================ */

[data-theme="light"] {
  /* Brand */
  --q-primary: #4f6af5;
  --q-accent: #4f6af5;
  --q-positive: #22a06b;
  --q-negative: #e5484d;
  --q-warning: #f5a623;
  --q-info: #4f8ff7;
  --brand-green: #22a06b;
  --link-color: #4f6af5;
  --selected-text-color: #4f6af5;

  /* Background hierarchy */
  --q-dark-page: #f4f4f2;
  --surface-primary: #ffffff;
  --surface-secondary: #ececea;
  --surface-ternary: #e2e2de;

  /* Surfaces */
  --message-surface: #ffffff;
  --sidebar-surface: #eaeae8;
  --highlighted: #ececea;
  --message-highlighted: #e2e2de;
  --highlight-header: #e6e6e4;

  /* Text */
  --text-primary: #1a1a18;
  --text-secondary: #5b5b56;
  --text-ternary: #6f6ff5;
  --text-muted: #8f8f89;
  --inverted-main: #000;
  --inverted-text: #fff;

  /* Borders */
  --border-light: rgba(0, 0, 0, 0.06);
  --border-light-2: #d4d4d0;

  /* Purple accents */
  --purple-text: #5b5bf0;
  --purple-background: #eeedff;
  --bg-ternary: #eeedff;

  /* Scrollbar */
  --scrollbar-color: rgba(0, 0, 0, 0.12);
  --scrollbar-hover-color: rgba(0, 0, 0, 0.18);

  /* Shadows — soft & modern */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
  --shadow-btn: 0 2px 8px rgba(79, 106, 245, 0.25);
}

/* ============================================================
   LIGHT — Global Elements
   ============================================================ */

[data-theme="light"] .header,
[data-theme="light"] .d-topbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .d-topbar {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .navbar-brand,
[data-theme="light"] .d-logo-text { color: var(--text-primary); }
[data-theme="light"] .logo h1 { color: var(--text-primary); }
[data-theme="light"] .logo p { color: var(--text-muted); }

/* ============================================================
   LIGHT — Navigation
   ============================================================ */

[data-theme="light"] .nav-links a { color: var(--text-muted); }
[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active { color: var(--text-primary); }

[data-theme="light"] .d-sidebar {
  background: var(--sidebar-surface);
  border-inline-end: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .d-sidebar-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .d-sidebar-header {
  border-bottom-color: var(--border-light);
}

[data-theme="light"] .d-nav-item {
  color: var(--text-secondary);
  border-radius: 6px;
}

[data-theme="light"] .d-nav-item:hover {
  background: rgba(79, 106, 245, 0.06);
  color: var(--text-primary);
}

[data-theme="light"] .d-nav-item.active {
  background: rgba(79, 106, 245, 0.1);
  color: var(--q-primary);
  font-weight: 600;
}

[data-theme="light"] .d-sidebar-footer {
  border-top-color: var(--border-light);
}

/* ============================================================
   LIGHT — Buttons
   ============================================================ */

[data-theme="light"] .btn {
  font-weight: 500;
  transition: all 0.15s ease;
}

[data-theme="light"] .btn-primary {
  background: var(--q-primary);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

[data-theme="light"] .btn-primary:hover {
  background: #3d56d4;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 106, 245, 0.3);
}

[data-theme="light"] .btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light-2);
}

[data-theme="light"] .btn-outline:hover {
  border-color: var(--q-primary);
  color: var(--q-primary);
  background: rgba(79, 106, 245, 0.04);
}

[data-theme="light"] .btn-ghost {
  color: var(--text-muted);
}

[data-theme="light"] .btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .btn-danger {
  background: var(--q-negative);
  color: #fff;
}

[data-theme="light"] .btn-danger:hover {
  background: #d13b40;
}

/* ============================================================
   LIGHT — Cards
   ============================================================ */

[data-theme="light"] .d-card,
[data-theme="light"] .d-stat-card,
[data-theme="light"] .pricing-card,
[data-theme="light"] .m-card,
[data-theme="light"] .lp-model-card,
[data-theme="light"] .lp-feature-card,
[data-theme="light"] .m-provider-card,
[data-theme="light"] .feature-item,
[data-theme="light"] .faq-item,
[data-theme="light"] .auth-card,
[data-theme="light"] .d-modal {
  background: var(--message-surface);
  box-shadow: var(--shadow-card);
  border-color: var(--border-light);
}

[data-theme="light"] .d-stat-card:hover,
[data-theme="light"] .m-card:hover,
[data-theme="light"] .lp-model-card:hover,
[data-theme="light"] .pricing-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(79, 106, 245, 0.1);
  border-color: rgba(79, 106, 245, 0.12);
  transform: translateY(-1px);
}

[data-theme="light"] .d-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 0 0 1px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .d-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .pricing-card.popular {
  border-color: var(--q-primary);
  box-shadow: 0 0 0 1px var(--q-primary), var(--shadow-md);
}

[data-theme="light"] .m-featured-card {
  background: linear-gradient(135deg, #fff, rgba(79, 106, 245, 0.03));
  border-color: rgba(79, 106, 245, 0.12);
}

/* ============================================================
   LIGHT — Typography
   ============================================================ */

[data-theme="light"] .d-page-title,
[data-theme="light"] .d-card-header h3,
[data-theme="light"] .m-section-title h3,
[data-theme="light"] .d-key-name,
[data-theme="light"] .d-user-name,
[data-theme="light"] .plan-name,
[data-theme="light"] .pricing-card-header .price {
  color: var(--text-primary);
}

[data-theme="light"] .d-stat-value,
[data-theme="light"] .m-stat-value,
[data-theme="light"] .d-summary-value {
  color: var(--text-primary);
  font-weight: 600;
}

[data-theme="light"] .d-stat-label,
[data-theme="light"] .d-page-desc,
[data-theme="light"] .m-stat-label,
[data-theme="light"] .d-summary-label,
[data-theme="light"] .price-desc {
  color: var(--text-muted);
}

[data-theme="light"] .d-stat-icon {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .d-table th {
  color: var(--text-muted);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-weight: 600;
  letter-spacing: 0.02em;
}

[data-theme="light"] .d-table td {
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  padding: 14px 16px;
}

[data-theme="light"] .d-table tbody tr {
  transition: background 0.15s ease;
}

[data-theme="light"] .d-table tbody tr:hover {
  background: rgba(79, 106, 245, 0.04);
}

[data-theme="light"] .d-model-badge {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-secondary);
}

[data-theme="light"] .d-status.success {
  background: rgba(34, 160, 107, 0.08);
  color: var(--q-positive);
}

[data-theme="light"] .d-status.error {
  background: rgba(229, 72, 77, 0.08);
  color: var(--q-negative);
}

[data-theme="light"] .pricing-card-header .price span {
  color: var(--text-muted);
}

/* ============================================================
   LIGHT — Forms & Inputs
   ============================================================ */

[data-theme="light"] .form-group label {
  color: var(--text-secondary);
  font-weight: 500;
}

[data-theme="light"] .form-control {
  color: var(--text-primary);
  background: #fff;
  border-color: var(--border-light-2);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="light"] .form-control:focus {
  border-color: var(--q-primary);
  box-shadow: 0 0 0 3px rgba(79, 106, 245, 0.1);
}

[data-theme="light"] .form-control::placeholder {
  color: var(--text-muted);
}

[data-theme="light"] .phone-wrap {
  border-color: var(--border-light-2);
  background: #fff;
}

[data-theme="light"] .phone-wrap:focus-within {
  border-color: var(--q-primary);
  box-shadow: 0 0 0 3px rgba(79, 106, 245, 0.1);
}

[data-theme="light"] .phone-prefix {
  color: var(--text-muted);
}

[data-theme="light"] .phone-prefix::after {
  background: var(--border-light-2);
}

[data-theme="light"] .m-search-bar {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="light"] .m-search-bar:focus-within {
  border-color: var(--q-primary);
  box-shadow: 0 0 0 3px rgba(79, 106, 245, 0.1), 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .m-search-input {
  color: var(--text-primary);
}

[data-theme="light"] .m-search-input::placeholder {
  color: var(--text-muted);
}

[data-theme="light"] .m-filter-select {
  color: var(--text-primary);
  background-color: #fff;
  border-color: var(--border-light-2);
}

[data-theme="light"] .m-filter-select:focus {
  border-color: var(--q-primary);
}

[data-theme="light"] .m-filter-select option {
  background: #fff;
  color: var(--text-primary);
}

/* ============================================================
   LIGHT — Sidebar & Topbar specifics
   ============================================================ */

[data-theme="light"] .d-plan-badge {
  background: rgba(79, 106, 245, 0.08);
  color: var(--q-primary);
}

[data-theme="light"] .d-icon-btn {
  color: var(--text-muted);
}

[data-theme="light"] .d-icon-btn:hover {
  color: var(--text-primary);
}

[data-theme="light"] .d-avatar {
  background: var(--q-primary);
  color: #fff;
}

[data-theme="light"] .d-badge {
  background: var(--q-negative);
}

[data-theme="light"] .d-search {
  background: #fff;
  border-color: var(--border-light-2);
}

[data-theme="light"] .d-search:focus-within {
  border-color: var(--q-primary);
  box-shadow: 0 0 0 3px rgba(79, 106, 245, 0.1);
}

[data-theme="light"] .d-search-input {
  color: var(--text-primary);
}

[data-theme="light"] .d-search-input::placeholder {
  color: var(--text-muted);
}

/* ============================================================
   LIGHT — Landing Page
   ============================================================ */

[data-theme="light"] .lp-hero {
  background: linear-gradient(180deg, rgba(79, 106, 245, 0.03) 0%, transparent 100%);
  padding-bottom: 60px;
}

[data-theme="light"] .lp-hero-bg {
  background: radial-gradient(ellipse at 50% 0%, rgba(79, 106, 245, 0.05) 0%, transparent 60%);
}

[data-theme="light"] .lp-hero h1 { color: var(--text-primary); }
[data-theme="light"] .lp-hero p { color: var(--text-muted); }

[data-theme="light"] .lp-hero-badge {
  background: rgba(79, 106, 245, 0.08);
  color: var(--q-primary);
}

[data-theme="light"] .lp-hero h1 span {
  background: linear-gradient(135deg, var(--q-primary), #7c8ff7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .lp-stat strong { color: var(--text-primary); }
[data-theme="light"] .lp-stat span { color: var(--text-muted); }

[data-theme="light"] .lp-model-provider { color: var(--text-muted); }
[data-theme="light"] .lp-model-card h3 { color: var(--text-primary); }
[data-theme="light"] .lp-model-specs > span { color: var(--text-secondary); }
[data-theme="light"] .lp-label { color: var(--text-muted); }
[data-theme="light"] .lp-model-tags span {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-secondary);
}

[data-theme="light"] .lp-feature-card h3 { color: var(--text-primary); }
[data-theme="light"] .lp-feature-card p { color: var(--text-muted); }
[data-theme="light"] .lp-features { background: var(--surface-secondary); }

[data-theme="light"] .lp-section-header h2 { color: var(--text-primary); }
[data-theme="light"] .lp-section-header p { color: var(--text-muted); }

[data-theme="light"] .lp-cta h2 { color: var(--text-primary); }
[data-theme="light"] .lp-cta p { color: var(--text-muted); }

/* ============================================================
   LIGHT — Pricing Page
   ============================================================ */

[data-theme="light"] .hero h1 { color: var(--text-primary); }
[data-theme="light"] .hero p { color: var(--text-muted); }

[data-theme="light"] .billing-toggle span { color: var(--text-muted); }
[data-theme="light"] .billing-toggle span.active { color: var(--text-primary); }

[data-theme="light"] .toggle-switch {
  background: var(--border-light-2);
}

[data-theme="light"] .toggle-switch.active {
  background: var(--q-primary);
}

[data-theme="light"] .pricing-card-header .plan-name { color: var(--text-primary); }
[data-theme="light"] .pricing-features li { color: var(--text-secondary); border-bottom-color: var(--border-light); }

[data-theme="light"] .section-header h2 { color: var(--text-primary); }
[data-theme="light"] .section-header p { color: var(--text-muted); }
[data-theme="light"] .faq-section h2 { color: var(--text-primary); }
[data-theme="light"] .features-section h2 { color: var(--text-primary); }

/* ============================================================
   LIGHT — Modal
   ============================================================ */

[data-theme="light"] .d-modal-overlay {
  background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .d-modal-header h3 { color: var(--text-primary); }
[data-theme="light"] .d-modal-desc { color: var(--text-secondary); }
[data-theme="light"] .d-key-output {
  background: rgba(0, 0, 0, 0.02);
  border-color: var(--border-light);
}

[data-theme="light"] .d-key-generated {
  color: var(--q-primary);
}

[data-theme="light"] .d-toast {
  background: var(--q-primary);
  color: #fff;
}

/* ============================================================
   LIGHT — Provider Cards
   ============================================================ */

[data-theme="light"] .m-provider-card h4 { color: var(--text-primary); }
[data-theme="light"] .m-provider-card p { color: var(--text-muted); }
[data-theme="light"] .m-provider-count { color: var(--q-primary); }

/* ============================================================
   LIGHT — Empty State
   ============================================================ */

[data-theme="light"] .d-empty-state h3 { color: var(--text-primary); }
[data-theme="light"] .d-empty-state p { color: var(--text-muted); }

/* ============================================================
   LIGHT — Timer, Back, Hint
   ============================================================ */

[data-theme="light"] .timer { color: var(--text-muted); }
[data-theme="light"] .back-btn { color: var(--text-muted); }
[data-theme="light"] .back-btn:hover { color: var(--text-primary); }
[data-theme="light"] .hint { color: var(--text-muted); }

/* ============================================================
   LIGHT — Footer
   ============================================================ */

[data-theme="light"] .footer {
  border-top-color: var(--border-light);
}

[data-theme="light"] .footer-copy,
[data-theme="light"] .footer-links a { color: var(--text-muted); }
[data-theme="light"] .footer-links a:hover { color: var(--text-primary); }

/* ============================================================
   LIGHT — Scrollbar
   ============================================================ */

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: var(--scrollbar-color);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-hover-color);
}

/* ============================================================
   V2 HOMEPAGE — Complete Redesign
   ============================================================ */

/* Container */
.v2-section { padding: 80px 0; }
.v2-section-center { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.v2-mt-3 { margin-top: 32px; }

/* Chip */
.v2-section-chip {
  display: inline-flex;
  background: rgba(79,106,245,0.08);
  color: #4f6af5;
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.v2-section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 12px;
}

.v2-section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---- Hero ---- */
.v2-hero {
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}

.v2-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.v2-hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}

.v2-glow-1 {
  width: 600px;
  height: 600px;
  background: #4f6af5;
  top: -200px;
  left: -200px;
}

[dir="rtl"] .v2-glow-1 { left: auto; right: -200px; }

.v2-glow-2 {
  width: 400px;
  height: 400px;
  background: #22a06b;
  bottom: -100px;
  right: -100px;
}

[dir="rtl"] .v2-glow-2 { right: auto; left: -100px; }

.v2-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.v2-hero-content {
  max-width: 600px;
}

.v2-hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.v2-hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

@media (max-width: 768px) {
  .v2-hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .v2-hero-image { display: none; }
}

.v2-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(79,106,245,0.1);
  border: 1px solid rgba(79,106,245,0.15);
  color: #4f6af5;
  font-size: .8rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.v2-chip-dot {
  width: 6px;
  height: 6px;
  background: #4f6af5;
  border-radius: 50%;
  animation: v2Pulse 2s ease-in-out infinite;
}

@keyframes v2Pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.v2-hero-title {
  font-size: 4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.v2-gradient-text {
  background: linear-gradient(135deg, #4f6af5, #22a06b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.v2-hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 520px;
}

.v2-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */
.v2-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 500;
  font-size: .95rem;
  transition: all .2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-decoration: none;
}

.v2-btn-primary {
  background: #4f6af5;
  color: #fff;
  box-shadow: 0 4px 16px rgba(79,106,245,0.3);
}

.v2-btn-primary:hover {
  background: #3d56d4;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79,106,245,0.35);
}

.v2-btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.v2-btn-ghost:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}

.v2-btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light-2);
  justify-content: center;
}

.v2-btn-outline:hover {
  border-color: #4f6af5;
  color: #4f6af5;
}

.v2-btn-full { width: 100%; justify-content: center; }
.v2-btn-large { padding: 16px 40px; font-size: 1.05rem; border-radius: 12px; }

.v2-btn-arrow { font-size: 1.1rem; }



/* ---- Providers ---- */
.v2-providers {
  padding: 40px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.v2-providers-label {
  text-align: center;
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.v2-providers-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.v2-providers-grid span {
  font-size: .9rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color .2s;
}

.v2-providers-grid span:hover { color: #fff; }

/* ---- Models Grid ---- */
.v2-models-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
}

.v2-models-2col {
  grid-template-columns: 1fr 1fr;
  max-width: 700px;
  margin: 0 auto;
}

.v2-model-card {
  background: var(--message-surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: all .3s;
  position: relative;
}

.v2-model-card:hover {
  border-color: rgba(79,106,245,0.2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.v2-model-featured {
  border-color: rgba(79,106,245,0.15);
  background: linear-gradient(135deg, var(--message-surface), rgba(79,106,245,0.02));
}

.v2-model-badge-popular {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #4f6af5;
  color: #fff;
  font-size: .65rem;
  font-weight: 600;
  padding: 3px 14px;
  border-radius: 100px;
  white-space: nowrap;
}

[dir="rtl"] .v2-model-badge-popular {
  left: auto;
  right: 50%;
  transform: translateX(50%);
}

.v2-model-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.v2-model-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.v2-model-status {
  font-size: .7rem;
  color: #22a06b;
  background: rgba(34,160,107,0.1);
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 500;
}

.v2-model-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.v2-model-provider {
  font-size: .8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}

.v2-model-desc {
  font-size: .8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}

.v2-model-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.v2-model-tags span {
  font-size: .7rem;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
}

/* ---- Stats ---- */
.v2-stats-section {
  background: var(--surface-secondary);
}

.v2-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.v2-stat-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--message-surface);
  border-radius: 14px;
  border: 1px solid var(--border-light);
  transition: all .3s;
}

.v2-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.v2-stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: #4f6af5;
  line-height: 1;
  margin-bottom: 8px;
}

.v2-stat-label {
  font-size: .85rem;
  color: var(--text-muted);
}

/* ---- Features ---- */
.v2-features-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
}

.v2-feature-card {
  background: var(--message-surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 28px 24px;
  transition: all .3s;
}

.v2-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(79,106,245,0.15);
}

.v2-feature-large {
  background: linear-gradient(135deg, var(--message-surface), rgba(79,106,245,0.02));
  border-color: rgba(79,106,245,0.1);
}

.v2-feature-accent {
  background: linear-gradient(135deg, var(--message-surface), rgba(34,160,107,0.02));
  border-color: rgba(34,160,107,0.1);
}

.v2-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.v2-feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.v2-feature-card p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- Testimonials ---- */
.v2-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.v2-testimonial {
  background: var(--message-surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 28px 24px;
  transition: all .3s;
}

.v2-testimonial:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.v2-testimonial-stars {
  color: #f5a623;
  font-size: .9rem;
  margin-bottom: 14px;
}

.v2-testimonial p {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}

.v2-testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.v2-testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: .85rem;
  flex-shrink: 0;
}

.v2-testimonial-author strong {
  display: block;
  font-size: .85rem;
  color: #fff;
  font-weight: 600;
}

.v2-testimonial-author span {
  font-size: .75rem;
  color: var(--text-muted);
}

/* ---- CTA ---- */
.v2-cta {
  position: relative;
  padding: 100px 0;
  text-align: center;
  overflow: hidden;
}

.v2-cta-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(79,106,245,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.v2-cta-content {
  position: relative;
  z-index: 1;
}

.v2-cta h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.v2-cta p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .v2-hero-title { font-size: 3rem; }
  .v2-models-grid { grid-template-columns: 1fr 1fr; }
  .v2-models-grid .v2-model-card:first-child { grid-column: 1 / -1; }
  .v2-features-grid { grid-template-columns: 1fr 1fr; }
  .v2-features-grid .v2-feature-card:first-child { grid-column: 1 / -1; }
  .v2-float-elements { display: none; }
}

@media (max-width: 768px) {
  .v2-hero { padding: 80px 0 60px; }
  .v2-hero-title { font-size: 2.2rem; }
  .v2-hero-sub { font-size: 1rem; }
  .v2-section { padding: 48px 0; }
  .v2-section-title { font-size: 1.6rem; }
  .v2-models-grid { grid-template-columns: 1fr; }
  .v2-features-grid { grid-template-columns: 1fr; }
  .v2-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .v2-testimonials-grid { grid-template-columns: 1fr; }
  .v2-cta { padding: 60px 0; }
  .v2-cta h2 { font-size: 1.8rem; }
  .v2-providers-grid { gap: 20px; }
}

@media (max-width: 480px) {
  .v2-stats-grid { grid-template-columns: 1fr; }
  .v2-hero-title { font-size: 1.8rem; }
}

/* Light Theme Overrides */
[data-theme="light"] .v2-hero h1,
[data-theme="light"] .v2-hero-title { color: var(--text-primary); }
[data-theme="light"] .v2-hero-sub { color: var(--text-muted); }
[data-theme="light"] .v2-hero-chip { background: rgba(79,106,245,0.08); color: #4f6af5; }
[data-theme="light"] .v2-float-card,
[data-theme="light"] .v2-float-stat { background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.08); color: var(--text-primary); }
[data-theme="light"] .v2-float-stat strong { color: var(--text-primary); }
[data-theme="light"] .v2-float-stat { color: var(--text-muted); }
[data-theme="light"] .v2-btn-ghost { color: var(--text-muted); border-color: var(--border-light-2); }
[data-theme="light"] .v2-btn-ghost:hover { color: var(--text-primary); border-color: var(--text-muted); }
[data-theme="light"] .v2-btn-outline { color: var(--text-secondary); border-color: var(--border-light-2); }
[data-theme="light"] .v2-btn-outline:hover { border-color: #4f6af5; color: #4f6af5; }
[data-theme="light"] .v2-section-title { color: var(--text-primary); }
[data-theme="light"] .v2-section-desc { color: var(--text-muted); }
[data-theme="light"] .v2-model-card h3 { color: var(--text-primary); }
[data-theme="light"] .v2-model-desc { color: var(--text-secondary); }
[data-theme="light"] .v2-model-tags span { background: rgba(0,0,0,0.04); color: var(--text-secondary); }
[data-theme="light"] .v2-feature-card h3,
[data-theme="light"] .features-section h2,
[data-theme="light"] .feature-item h3,
[data-theme="light"] .faq-question,
[data-theme="light"] .plan-name { color: var(--text-primary); }
[data-theme="light"] .v2-feature-card p { color: var(--text-muted); }
[data-theme="light"] .v2-testimonial-author strong { color: var(--text-primary); }
[data-theme="light"] .v2-cta h2 { color: var(--text-primary); }
[data-theme="light"] .v2-cta p { color: var(--text-muted); }
[data-theme="light"] .v2-stat-label { color: var(--text-muted); }
[data-theme="light"] .v2-providers-grid span { color: var(--text-muted); }
[data-theme="light"] .v2-providers-grid span:hover { color: var(--text-primary); }
[data-theme="light"] .navbar .locale-btn { border-color: var(--border-light-2); color: var(--text-muted); }
[data-theme="light"] .navbar-brand,
[data-theme="light"] [data-i18n="brand"] { color: var(--text-primary) !important; }
[data-theme="light"] .navbar .locale-btn:hover { border-color: var(--q-primary); color: var(--q-primary); }
[data-theme="light"] .v2-hero-chip,
[data-theme="light"] .v2-section-chip { background: rgba(79,106,245,0.08); color: #4f6af5; }
[data-theme="light"] .v2-model-card h3,
[data-theme="light"] .v2-feature-card h3,
[data-theme="light"] .v2-testimonial-author strong { color: var(--text-primary); }
[data-theme="light"] .v2-model-desc,
[data-theme="light"] .v2-feature-card p,
[data-theme="light"] .v2-testimonial p { color: var(--text-secondary); }

/* Landing Page Typography - uses global Vazirmatn */

[dir="rtl"] {
  --dir: rtl;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-fa);
  background: var(--q-dark-page);
  color: var(--text-primary);
  line-height: var(--line-height);
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input { font-family: inherit; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover-color); }

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* ---- Header ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(33, 33, 33, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-slow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--q-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

[dir="rtl"] .nav-links { gap: 24px; }

.nav-links a {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: color var(--transition-base);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  inset-inline-start: 0;
  width: 0;
  height: 2px;
  background: var(--q-primary);
  transition: width var(--transition-base);
  border-radius: 1px;
}

.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: #fff; }
.nav-links a.active::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.locale-btn {
  background: none;
  border: 1px solid var(--border-light-2);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-fa);
}

.locale-btn:hover {
  border-color: var(--q-primary);
  color: #fff;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-block: 10px;
  padding-inline: 24px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: var(--font-size-sm);
  border: none;
  transition: all var(--transition-base);
  font-family: inherit;
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
}

[dir="rtl"] .btn { gap: 6px; }

.btn-primary {
  background: var(--q-primary);
  color: #fff;
}

.btn-primary:hover {
  background: #2a7d59;
  box-shadow: var(--shadow-btn);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light-2);
}

.btn-outline:hover {
  border-color: var(--q-primary);
  color: var(--q-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding-block: 8px;
  padding-inline: 16px;
}

.btn-ghost:hover { color: #fff; }

.btn-lg {
  padding-block: 14px;
  padding-inline: 32px;
  font-size: 1rem;
  border-radius: var(--radius-md);
  height: 56px;
}

.btn-block { width: 100%; }

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding-block: 80px 60px;
}

[dir="rtl"] .hero { text-align: center; }

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

[dir="rtl"] .hero h1 { letter-spacing: 0; }

.hero h1 span {
  background: linear-gradient(135deg, var(--q-primary), #10a37f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Landing Page ---- */
.lp-hero {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
  overflow: hidden;
}

.lp-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(50,148,106,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.lp-hero-content { position: relative; z-index: 1; }

.lp-hero-badge {
  display: inline-flex;
  background: rgba(50,148,106,0.12);
  color: var(--q-primary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}

.lp-hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.lp-hero h1 span {
  background: linear-gradient(135deg, var(--q-primary), #10a37f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lp-hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.lp-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.lp-hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
}

.lp-stat { text-align: center; }

.lp-stat strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}

.lp-stat span {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* Sections */
.lp-section { padding: 80px 0; }

.lp-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.lp-section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.lp-section-header p {
  color: var(--text-muted);
  font-size: var(--font-size-base);
}

/* Models Grid */
.lp-models-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.lp-model-card {
  background: var(--message-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.lp-model-card:hover {
  border-color: rgba(50,148,106,0.25);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.lp-model-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.lp-model-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.lp-model-provider {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
}

.lp-model-specs {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.lp-model-specs > span {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  font-weight: 500;
}

.lp-label {
  color: var(--text-muted);
  font-weight: 400;
  margin-inline-end: 4px;
}

.lp-model-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  flex: 1;
}

.lp-model-tags span {
  font-size: .65rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
}

.lp-models-cta { text-align: center; }

/* Features */
.lp-features { background: var(--surface-secondary); }

.lp-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.lp-feature-card {
  background: var(--message-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: all var(--transition-base);
}

.lp-feature-card:hover {
  border-color: rgba(50,148,106,0.2);
  transform: translateY(-2px);
}

.lp-feature-icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.lp-feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.lp-feature-card p {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  line-height: 1.7;
}

/* CTA */
.lp-cta {
  text-align: center;
  padding: 80px 0;
}

.lp-cta h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.lp-cta p {
  color: var(--text-muted);
  font-size: var(--font-size-base);
  margin-bottom: 28px;
}

/* Responsive */
@media (max-width: 1024px) {
  .lp-hero h1 { font-size: 2.5rem; }
  .lp-models-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .lp-hero { padding: 60px 0 40px; }
  .lp-hero h1 { font-size: 1.8rem; }
  .lp-hero p { font-size: 1rem; }
  .lp-hero-stats { gap: 24px; flex-wrap: wrap; }
  .lp-stat strong { font-size: 1.4rem; }
  .lp-models-grid { grid-template-columns: 1fr; max-width: 400px; margin-inline: auto; }
  .lp-features-grid { grid-template-columns: 1fr; }
  .lp-section { padding: 48px 0; }
}

/* ---- Billing Toggle ---- */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.billing-toggle span {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.billing-toggle span.active { color: #fff; }

.toggle-switch {
  width: 44px;
  height: 24px;
  background: var(--surface-ternary);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background var(--transition-base);
  border: none;
  padding: 0;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: inset-inline-start var(--transition-base);
}

.toggle-switch.active { background: var(--q-primary); }
.toggle-switch.active::after { inset-inline-start: 23px; }

.save-badge {
  background: rgba(50, 148, 106, 0.15);
  color: var(--q-primary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding-block: 3px;
  padding-inline: 10px;
  border-radius: var(--radius-full);
}

/* ---- Pricing Grid ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--message-surface);
  border-radius: var(--radius-lg);
  padding-block: 40px;
  padding-inline: 32px;
  border: 1px solid var(--border-light);
  position: relative;
  transition: all var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  border-color: rgba(50, 148, 106, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
  border-color: var(--q-primary);
  box-shadow: 0 0 0 1px var(--q-primary), var(--shadow-card);
  transform: scale(1.03);
  z-index: 2;
}

.pricing-card.popular:hover {
  box-shadow: 0 0 0 1px var(--q-primary), var(--shadow-xl);
  transform: scale(1.03) translateY(-2px);
}

.pricing-card .badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--q-primary);
  color: #fff;
  padding-block: 5px;
  padding-inline: 18px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

[dir="rtl"] .pricing-card .badge {
  left: auto;
  right: 50%;
  transform: translateX(50%);
}

.pricing-card-header { text-align: center; margin-bottom: 28px; }

.pricing-card-header .plan-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}

.pricing-card-header .price {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}

[dir="rtl"] .pricing-card-header .price { letter-spacing: 0; }

.pricing-card-header .price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-card-header .price-desc {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin-top: 8px;
}

.pricing-features {
  list-style: none;
  flex: 1;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pricing-features li {
  padding-block: 10px;
  padding-inline: 0;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
}

.pricing-features li:last-child { border-bottom: none; }

.feature-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.feature-icon.check {
  background: rgba(50, 148, 106, 0.15);
  color: var(--q-primary);
}

.feature-icon.cross {
  background: rgba(193, 0, 21, 0.1);
  color: var(--q-negative);
}

.pricing-card .btn { margin-top: auto; }

/* ---- Features Section ---- */
.features-section {
  padding-block: 80px;
  border-top: 1px solid var(--border-light);
}

.features-section h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-item {
  background: var(--message-surface);
  border-radius: var(--radius-md);
  padding-block: 28px;
  padding-inline: 24px;
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
}

.feature-item:hover {
  border-color: rgba(50, 148, 106, 0.2);
  transform: translateY(-2px);
}

.feature-item .icon {
  width: 44px;
  height: 44px;
  background: rgba(50, 148, 106, 0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.feature-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.feature-item p {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

/* ---- FAQ ---- */
.faq-section {
  padding-block: 80px;
}

.faq-section h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 40px;
}

.faq-grid {
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--message-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: border-color var(--transition-base);
}

.faq-item:hover { border-color: rgba(50, 148, 106, 0.2); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 18px;
  padding-inline: 20px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-align: start;
  transition: color var(--transition-base);
}

.faq-question:hover { color: #fff; }

.faq-question .arrow {
  transition: transform var(--transition-base);
  color: var(--text-muted);
  font-size: 1rem;
  display: inline-block;
}

.faq-item.open .faq-question .arrow {
  transform: rotate(180deg);
}

[dir="rtl"] .faq-item.open .faq-question .arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
  padding-inline: 20px;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding-block-end: 18px;
}

.faq-answer p {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.7;
}

/* ---- CTA ---- */
.cta-section {
  text-align: center;
  padding-block: 80px;
  border-top: 1px solid var(--border-light);
}

.cta-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.cta-section p {
  color: var(--text-muted);
  font-size: var(--font-size-base);
  margin-bottom: 24px;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border-light);
  padding-block: 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

[dir="rtl"] .footer-links { gap: 20px; }

.footer-links a {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  transition: color var(--transition-base);
}

.footer-links a:hover { color: #fff; }

.footer-copy {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.footer-seal img {
  width: 90px;
  height: auto;
}

/* ---- Auth Page ---- */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--message-surface);
  border-radius: var(--radius-lg);
  padding-block: 36px 32px;
  padding-inline: 32px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl);
}

.auth-card .auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card .auth-logo .icon {
  width: 48px;
  height: 48px;
  background: var(--q-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.auth-card .auth-logo h1 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
}

.auth-card .auth-logo p {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin-top: 4px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[dir="rtl"] .form-group label { letter-spacing: 0; }

.form-control {
  width: 100%;
  padding-block: 14px;
  padding-inline: 16px;
  background: transparent;
  border: 1px solid var(--border-light-2);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: var(--font-size-sm);
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--q-primary);
  box-shadow: 0 0 0 3px rgba(50, 148, 106, 0.1);
}

.form-control::placeholder { color: var(--text-muted); }

.phone-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-light-2);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  direction: ltr;
}

.phone-wrap:focus-within {
  border-color: var(--q-primary);
  box-shadow: 0 0 0 3px rgba(50, 148, 106, 0.1);
}

.phone-prefix {
  padding: 14px 16px 14px 12px;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}

.phone-prefix::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--border-light-2);
}

.phone-wrap .form-control {
  border: none;
  padding: 14px 8px 14px 4px;
  direction: ltr;
  text-align: left;
}

.phone-wrap .form-control:focus { box-shadow: none; }

.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.otp-inputs input {
  width: 52px;
  height: 56px;
  background: transparent;
  border: 1px solid var(--border-light-2);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1.3rem;
  text-align: center;
  outline: none;
  transition: border-color var(--transition-base);
}

.otp-inputs input:focus {
  border-color: var(--q-primary);
  box-shadow: 0 0 0 3px rgba(50, 148, 106, 0.1);
}

.pw-wrap { position: relative; }

.pw-wrap .form-control {
  padding-inline-end: 44px;
}

.pw-toggle {
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  line-height: 1;
}

.step { display: none; }
.step.active { display: block; }

.error-msg {
  color: var(--q-negative);
  font-size: var(--font-size-xs);
  margin-top: 6px;
  display: none;
}

.error-msg.show { display: block; }

.timer {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  margin-top: 14px;
}

.timer a { color: var(--link-color); cursor: pointer; }

.back-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-block: 0 16px;
  padding-inline: 0;
  font-family: inherit;
  transition: color var(--transition-base);
}

.back-btn:hover { color: #fff; }

[dir="rtl"] .back-btn { flex-direction: row; }

.divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin-block: 24px;
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */

.dashboard-body {
  background: var(--surface-secondary);
  overflow: hidden;
}

.d-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---- Sidebar ---- */
.d-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--surface-primary);
  border-inline-end: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  z-index: 100;
  transition: transform var(--transition-slow);
  overflow-y: auto;
}

.d-sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.d-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.d-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--q-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.d-sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
}

.d-sidebar-nav {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.d-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all var(--transition-base);
  text-decoration: none;
}

.d-nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.d-nav-item.active {
  background: rgba(50,148,106,0.12);
  color: var(--q-primary);
}

.d-nav-icon { font-size: 1.1rem; width: 24px; text-align: center; }

.d-sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border-light);
}

/* ---- Main Area ---- */
.d-main {
  flex: 1;
  margin-inline-start: 260px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ---- Topbar ---- */
.d-topbar {
  height: 64px;
  flex-shrink: 0;
  background: rgba(33,33,33,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 24px;
  gap: 16px;
}

.d-topbar-start {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.d-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 28px;
  height: 20px;
  position: relative;
}

.d-hamburger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  margin-bottom: 5px;
  transition: all var(--transition-base);
}

.d-hamburger span:last-child { margin-bottom: 0; }

.d-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--message-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  max-width: 320px;
  width: 100%;
  transition: border-color var(--transition-base);
}

.d-search:focus-within {
  border-color: var(--q-primary);
}

.d-search-icon { font-size: .9rem; }

.d-search-input {
  background: none;
  border: none;
  color: #fff;
  font-size: var(--font-size-sm);
  outline: none;
  width: 100%;
  font-family: inherit;
}

.d-search-input::placeholder { color: var(--text-muted); }

.d-topbar-end {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.d-plan-badge {
  background: rgba(50,148,106,0.12);
  color: var(--q-primary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.d-icon-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition-base);
}

.d-icon-btn:hover { color: #fff; }

.d-badge {
  position: absolute;
  top: -4px;
  inset-inline-end: -6px;
  background: var(--q-negative);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.d-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.d-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--q-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--font-size-sm);
}

.d-user-info {
  display: flex;
  flex-direction: column;
}

.d-user-name {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.d-user-email {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ---- Content ---- */
.d-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.d-content::-webkit-scrollbar { width: 4px; }
.d-content::-webkit-scrollbar-thumb { background: var(--scrollbar-color); border-radius: 2px; }

/* ---- Overlay ---- */
.d-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ---- Stats Grid ---- */
.d-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.d-stat-card {
  background: var(--message-surface);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
}

.d-stat-card:hover {
  border-color: rgba(50,148,106,0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.d-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.d-stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.d-stat-label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.d-stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

/* ---- Card ---- */
.d-card {
  background: var(--message-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 24px;
  margin-bottom: 24px;
}

.d-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.d-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.d-card-actions {
  display: flex;
  gap: 16px;
}

.d-view-all {
  color: var(--q-primary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: color var(--transition-base);
  text-decoration: none;
}

.d-view-all:hover { color: #10a37f; }

/* ---- Chart ---- */
.d-usage-card { overflow: hidden; }

.d-chart-wrap {
  width: 100%;
  overflow-x: auto;
}

.d-chart-wrap canvas {
  width: 100%;
  height: auto;
  min-height: 200px;
}

.d-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.d-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* ---- Usage Summary ---- */
.d-usage-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.d-summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  margin-bottom: 0;
}

.d-summary-icon {
  font-size: 1.5rem;
  width: 40px;
  text-align: center;
}

.d-summary-label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.d-summary-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}

/* ---- 2 Column Row ---- */
.d-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.d-row-2col .d-card { margin-bottom: 0; }

/* ---- Quick Actions ---- */
.d-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.d-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
  text-align: center;
  text-decoration: none;
}

.d-quick-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--q-color, var(--q-primary));
  transform: translateY(-2px);
}

.d-quick-icon { font-size: 1.5rem; }

.d-quick-title {
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* ---- Announcements ---- */
.d-announcements {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.d-announcement {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-light);
  transition: all var(--transition-base);
}

.d-announcement:hover { background: rgba(255,255,255,0.04); }

.d-announcement.warning { border-color: rgba(242,192,55,0.2); }
.d-announcement.promo { border-color: rgba(50,148,106,0.2); }
.d-announcement.info { border-color: rgba(49,204,236,0.15); }

.d-announcement-icon { font-size: 1.2rem; padding-top: 2px; }

.d-announcement-body { flex: 1; }

.d-announcement-body strong {
  display: block;
  font-size: var(--font-size-sm);
  color: #fff;
  margin-bottom: 4px;
}

.d-announcement-body p {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 4px;
}

.d-announcement-date {
  font-size: .7rem;
  color: var(--text-muted);
}

/* ---- Table ---- */
.d-table-wrap {
  overflow-x: auto;
}

.d-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.d-table th {
  text-align: start;
  padding: 12px 14px;
  font-weight: 500;
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

[dir="rtl"] .d-table th { letter-spacing: 0; }

.d-table td {
  padding: 12px 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.d-table tbody tr {
  transition: background var(--transition-base);
}

.d-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

.d-model-badge {
  background: rgba(255,255,255,0.06);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

.d-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.d-status.success {
  background: rgba(33,186,69,0.1);
  color: var(--q-positive);
}

.d-status.error {
  background: rgba(193,0,21,0.1);
  color: var(--q-negative);
}

/* ---- API Keys ---- */
.d-apikeys-card .d-card-header {
  flex-wrap: wrap;
  gap: 12px;
}

.d-apikeys-card .d-card-header .btn {
  flex-shrink: 0;
}

.d-key-name {
  font-weight: 500;
  color: #fff;
}

.d-key-value {
  background: rgba(255,255,255,0.05);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: var(--font-size-xs);
  font-family: 'Courier New', monospace;
  color: var(--text-secondary);
  direction: ltr;
  display: inline-block;
}

.d-row-actions {
  display: flex;
  gap: 6px;
}

/* ---- Admin Subscription Management ---- */
.adm-search-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
  margin-top: 4px;
}
.adm-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.adm-search-item:hover { background: rgba(79,106,245,0.04); }
.adm-search-item:last-child { border-bottom: none; }
.adm-search-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--q-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .85rem; flex-shrink: 0;
}
.adm-search-info { flex: 1; min-width: 0; }
.adm-search-info strong { display: block; font-size: var(--font-size-sm); color: var(--text-primary); }
.adm-search-info span { font-size: var(--font-size-xs); color: var(--text-muted); }
.adm-search-plan { font-size: var(--font-size-xs); color: var(--q-primary); font-weight: 500; white-space: nowrap; }
.adm-plans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adm-plan-card { padding: 16px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); cursor: pointer; transition: all .2s; text-align: center; }
.adm-plan-card:hover { border-color: rgba(79,106,245,0.2); }
.adm-plan-card.selected { border-color: var(--q-primary); box-shadow: 0 0 0 1px var(--q-primary); }
.adm-plan-name { font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.adm-plan-specs { display: flex; justify-content: center; gap: 8px; font-size: var(--font-size-xs); color: var(--text-muted); flex-wrap: wrap; }
.adm-plan-expire { font-size: var(--font-size-xs); color: var(--text-muted); margin-top: 4px; }
.adm-badge-unlimited { background: rgba(79,106,245,0.08); color: var(--q-primary); font-size: .65rem; font-weight: 600; padding: 2px 8px; border-radius: 100px; }
.adm-user-info { padding: 16px 0; }
@media (max-width: 768px) { .adm-plans-grid { grid-template-columns: 1fr; } }

.d-icon-btn-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.d-icon-btn-sm:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* Empty State */
.d-empty-state {
  text-align: center;
  padding: 60px 20px;
}

.d-empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.d-empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.d-empty-state p {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin-bottom: 24px;
}

/* Page Header */
.d-page-header {
  margin-bottom: 24px;
}

.d-page-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.d-page-desc {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  max-width: 560px;
}

/* Modal */
.d-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.d-modal-overlay.open { display: flex; }

.d-modal {
  background: var(--message-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: dModalIn 0.25s ease;
}

.d-modal-sm { max-width: 400px; }

@keyframes dModalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.d-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.d-modal-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.d-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition-base);
}

.d-modal-close:hover { color: #fff; }

.d-modal-body {
  padding: 20px 24px;
}

.d-modal-desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.d-modal-body .form-group { margin-bottom: 16px; }
.d-modal-body .form-group:last-child { margin-bottom: 0; }

.d-modal-body .form-control {
  font-size: var(--font-size-sm);
}

.d-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 24px 20px;
}

.d-modal-footer .btn {
  min-width: 100px;
  justify-content: center;
}

/* Key Output */
.d-key-output {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.d-key-generated {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: var(--font-size-sm);
  color: var(--q-primary);
  direction: ltr;
  text-align: left;
  user-select: all;
  word-break: break-all;
}

.d-key-output .btn { flex-shrink: 0; }

/* Toast */
.d-toast {
  display: none;
  background: rgba(50,148,106,0.9);
  color: #fff;
  font-size: var(--font-size-xs);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  text-align: center;
  animation: dToastIn 0.3s ease;
}

.d-toast.show { display: block; }

@keyframes dToastIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Delete btn */
.btn-danger {
  background: var(--q-negative);
  color: #fff;
}

.btn-danger:hover {
  background: #a00012;
}

/* ---- AI Models Page ---- */
.m-section-title {
  margin-bottom: 20px;
}

.m-section-title h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

/* Featured */
.m-featured-section { margin-bottom: 32px; }

.m-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.m-featured-card {
  border-color: rgba(50,148,106,0.3) !important;
  background: linear-gradient(135deg, var(--message-surface), rgba(50,148,106,0.05)) !important;
}

/* Model Card */
.m-card {
  background: var(--message-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 20px;
  transition: all var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.m-card:hover {
  border-color: rgba(50,148,106,0.25);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.m-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.m-provider-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.m-card-badge {
  font-size: .65rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.m-card-badge.popular { background: rgba(50,148,106,0.15); color: var(--q-primary); }
.m-card-badge.free { background: rgba(33,186,69,0.15); color: var(--q-positive); }

.m-card-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.m-card-provider {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-bottom: 6px;
}

.m-card-rating {
  font-size: var(--font-size-xs);
  color: var(--q-warning);
  margin-bottom: 8px;
}

.m-card-desc {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.m-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.m-stat { text-align: center; }

.m-stat-label {
  display: block;
  font-size: .6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

[dir="rtl"] .m-stat-label { letter-spacing: 0; }

.m-stat-value {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: #fff;
}

.m-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.m-tag {
  font-size: .65rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.m-tag.vision { background: rgba(49,204,236,0.12); color: #31ccec; }
.m-tag.reasoning { background: rgba(156,39,176,0.12); color: #ce93d8; }
.m-tag.code { background: rgba(33,150,243,0.12); color: #64b5f6; }
.m-tag.streaming { background: rgba(76,175,80,0.12); color: #81c784; }
.m-tag.tools { background: rgba(255,152,0,0.12); color: #ffb74d; }
.m-tag.voice { background: rgba(233,30,99,0.12); color: #f48fb1; }
.m-tag.files { background: rgba(121,85,72,0.12); color: #a1887f; }

.m-card-actions {
  display: flex;
  gap: 8px;
}

.m-card-actions .btn { flex: 1; justify-content: center; }

/* Grid */
.m-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

/* Search */
.m-search-section { margin-bottom: 16px; }

.m-search-bar {
  display: flex;
  align-items: center;
  background: var(--message-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 4px 16px;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.m-search-bar:focus-within {
  border-color: var(--q-primary);
  box-shadow: 0 0 0 3px rgba(50,148,106,0.08);
}

.m-search-icon { font-size: 1rem; color: var(--text-muted); flex-shrink: 0; }

.m-search-input {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-size: var(--font-size-sm);
  padding: 14px 12px;
  outline: none;
  font-family: inherit;
}

.m-search-input::placeholder { color: var(--text-muted); }

.m-search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .85rem;
  padding: 4px;
  display: none;
}

.m-search-clear.show { display: block; }
.m-search-clear:hover { color: #fff; }

/* Filters */
.m-filters { margin-bottom: 24px; }

.m-filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.m-filter-select {
  background: var(--message-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: var(--font-size-sm);
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-base);
  min-width: 150px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-inline-start: 36px;
  padding-inline-end: 14px;
}

[dir="rtl"] .m-filter-select {
  background-position: right 12px center;
  padding-inline-start: 14px;
  padding-inline-end: 36px;
}

.m-filter-select:focus { border-color: var(--q-primary); }

.m-filter-select option { background: var(--surface-secondary); color: #fff; }

/* Empty */
.m-empty {
  text-align: center;
  padding: 60px 20px;
  display: none;
}

.m-empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }

.m-empty h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.m-empty p { color: var(--text-muted); font-size: var(--font-size-sm); margin-bottom: 24px; }

/* Providers */
.m-providers-section { margin-bottom: 24px; }

.m-providers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.m-provider-card {
  background: var(--message-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.m-provider-card:hover {
  border-color: rgba(50,148,106,0.25);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.m-provider-icon-lg {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.m-provider-card h4 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.m-provider-count {
  font-size: var(--font-size-xs);
  color: var(--q-primary);
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
}

.m-provider-card p {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

/* Responsive Models */
@media (max-width: 1200px) {
  .m-featured-grid { grid-template-columns: repeat(2, 1fr); }
  .m-grid { grid-template-columns: repeat(2, 1fr); }
  .m-providers-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .m-featured-grid { grid-template-columns: 1fr; }
  .m-grid { grid-template-columns: 1fr; }
  .m-providers-grid { grid-template-columns: repeat(2, 1fr); }
  .m-filter-group { flex-direction: column; }
  .m-filter-select { width: 100%; }
}

@media (max-width: 480px) {
  .m-providers-grid { grid-template-columns: 1fr; }
}

/* ---- Responsive Dashboard ---- */
@media (max-width: 1200px) {
  .d-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .d-usage-summary-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .d-row-2col { grid-template-columns: 1fr; }
  .d-quick-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .d-sidebar {
    transform: translateX(-100%);
  }

  [dir="rtl"] .d-sidebar {
    transform: translateX(100%);
  }

  .d-sidebar.open {
    transform: translateX(0);
  }

  .d-overlay.open { display: block; }

  .d-main { margin-inline-start: 0; }

  .d-hamburger { display: block; }

  .d-sidebar-close { display: block; }

  .d-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .d-usage-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .d-topbar { padding-inline: 16px; }

  .d-search { max-width: 200px; }
  .d-user-info { display: none; }
  .d-content { padding: 16px; }
}

@media (max-width: 480px) {
  .d-stats-grid { grid-template-columns: 1fr; }
  .d-usage-summary-grid { grid-template-columns: 1fr; }
  .d-quick-grid { grid-template-columns: repeat(2, 1fr); }
  .d-stat-card { padding: 16px; }
  .d-card { padding: 16px; }
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-card.popular { transform: none; }
  .pricing-card.popular:hover { transform: translateY(-2px); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero { padding-block: 48px 40px; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-inline: auto; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-card { padding-block: 28px; padding-inline: 24px; }
  .nav-links { display: none; }
  :root { --container-padding: 16px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 1rem; }
  .pricing-card-header .price { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
