/* ============================================================
   GoWA — Design System v4.0 — Dark Glassmorphism
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ── Color tokens ── */
:root {
  /* Background layers — deep dark teal-navy */
  --bg:          #0d1b2a;
  --bg2:         #0a1520;
  --surface:     rgba(255,255,255,0.06);
  --surface2:    rgba(255,255,255,0.04);
  --surface3:    rgba(255,255,255,0.09);
  --surface-solid: #132030;
  --surface-solid2:#1a2e40;

  /* Glass layers */
  --glass:       rgba(255,255,255,0.07);
  --glass2:      rgba(255,255,255,0.04);
  --glass-hover: rgba(255,255,255,0.11);
  --glass-border:rgba(255,255,255,0.12);
  --glass-border2:rgba(255,255,255,0.08);

  /* Brand green */
  --green:       #25d366;
  --green-dark:  #128c4e;
  --green-mid:   #1da956;
  --green-glow:  rgba(37,211,102,0.15);
  --green-glow2: rgba(37,211,102,0.08);
  --green-light: rgba(37,211,102,0.12);

  /* Text */
  --text:        #e8f0f8;
  --text2:       #b8cad8;
  --muted:       #6b8299;
  --muted2:      #4a6278;

  /* Border */
  --border:      rgba(255,255,255,0.10);
  --border2:     rgba(255,255,255,0.07);

  /* Accents */
  --gold:        #f0a500;
  --gold-bg:     rgba(240,165,0,0.10);
  --red:         #e05252;
  --red-bg:      rgba(224,82,82,0.08);
  --blue:        #4da6ff;
  --blue-bg:     rgba(77,166,255,0.08);

  /* UI */
  --radius:      12px;
  --radius-lg:   18px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --transition:  all .2s ease;
  --shadow:      0 8px 32px rgba(0,0,0,.4);
  --shadow-lg:   0 20px 60px rgba(0,0,0,.6);
  --shadow-green:0 4px 24px rgba(37,211,102,.25);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(37,211,102,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(13,80,120,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(255,255,255,0.01) 0%, transparent 100%);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; line-height: 1.2; color: var(--text); }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code, pre, .td-code { font-family: 'IBM Plex Mono', monospace; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ══════════════════════════════════════════════════════════
   GLASS CARD COMPONENT
   ══════════════════════════════════════════════════════════ */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
}
.card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--glass-border2);
}
.card-icon { font-size: 17px; flex-shrink: 0; }
.card-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; color: var(--text); }
.card-body { padding: 20px 22px; }

/* ══════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius); border: none;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 600;
  transition: var(--transition); cursor: pointer; text-decoration: none;
  white-space: nowrap; line-height: 1; letter-spacing: .2px;
}
.btn:hover { text-decoration: none; }

/* Primary — WhatsApp green gradient */
.btn-primary {
  background: linear-gradient(135deg, #1da956 0%, #25d366 50%, #2de070 100%);
  color: #0a1a0f;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(37,211,102,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(37,211,102,0.45), inset 0 1px 0 rgba(255,255,255,0.2); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--glass);
  color: var(--text2);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}
.btn-secondary:hover { background: var(--glass-hover); color: var(--text); border-color: rgba(255,255,255,0.2); }

.btn-danger { background: rgba(224,82,82,.15); color: #f87171; border: 1px solid rgba(224,82,82,.25); }
.btn-danger:hover { background: rgba(224,82,82,.25); }

.btn-gold {
  background: linear-gradient(135deg, #c97f00, #f0a500, #ffc340);
  color: #0a0800;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(240,165,0,.3);
}
.btn-gold:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-sm { padding: 7px 16px; font-size: 12px; border-radius: 9px; }
.btn-lg { padding: 15px 28px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; }

/* ══════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text2);
  letter-spacing: .5px; margin-bottom: 8px;
}
.form-control {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius); color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px; padding: 12px 15px;
  outline: none; transition: var(--transition);
  backdrop-filter: blur(8px);
}
.form-control:focus {
  border-color: rgba(37,211,102,0.5);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px rgba(37,211,102,0.1);
}
.form-control::placeholder { color: var(--muted); opacity: .8; }
textarea.form-control { resize: vertical; min-height: 90px; line-height: 1.6; }
select.form-control { cursor: pointer; }

.input-group { display: flex; }
.input-group .form-control { border-radius: 0 var(--radius) var(--radius) 0; flex: 1; border-left: none; }
.input-group-text {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid var(--glass-border);
  border-right: none;
  padding: 12px 14px;
  font-size: 13px; color: var(--text2);
  white-space: nowrap;
  border-radius: var(--radius) 0 0 var(--radius);
  display: flex; align-items: center; gap: 6px;
}
.char-counter { font-size: 11px; color: var(--muted); text-align: right; margin-top: 5px; }

/* ══════════════════════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════════════════════ */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; line-height: 1.6; }
.alert-success { background: rgba(37,211,102,.1); border: 1px solid rgba(37,211,102,.25); color: #4ade80; }
.alert-error   { background: var(--red-bg); border: 1px solid rgba(224,82,82,.25); color: #f87171; }
.alert-warning { background: rgba(240,165,0,.08); border: 1px solid rgba(240,165,0,.25); color: #fbbf24; }
.alert-info    { background: var(--blue-bg); border: 1px solid rgba(77,166,255,.2); color: #93c5fd; }

/* ══════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════ */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-green  { background: var(--green-light); color: var(--green); border: 1px solid rgba(37,211,102,.25); }
.badge-gold   { background: var(--gold-bg); color: var(--gold); border: 1px solid rgba(240,165,0,.25); }
.badge-red    { background: var(--red-bg); color: var(--red); border: 1px solid rgba(224,82,82,.25); }
.badge-blue   { background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(77,166,255,.2); }
.badge-muted  { background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid var(--border2); }
.badge-purple { background: rgba(139,92,246,.1); color: #a78bfa; border: 1px solid rgba(139,92,246,.25); }

/* ══════════════════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { background: rgba(255,255,255,.04); padding: 11px 16px; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); white-space: nowrap; border-bottom: 1px solid var(--border); }
td { padding: 13px 16px; border-bottom: 1px solid var(--border2); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.025); }
.td-code { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--green); }
.td-muted { color: var(--muted); font-size: 12px; }

/* ══════════════════════════════════════════════════════════
   STAT CARDS
   ══════════════════════════════════════════════════════════ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg); padding: 20px;
  position: relative; overflow: hidden; transition: var(--transition);
  backdrop-filter: blur(16px);
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.stat-card.green::before  { background: linear-gradient(90deg, #128c4e, #25d366); }
.stat-card.blue::before   { background: linear-gradient(90deg, #1d4ed8, #4da6ff); }
.stat-card.gold::before   { background: linear-gradient(90deg, #b45309, var(--gold)); }
.stat-card.red::before    { background: linear-gradient(90deg, #b91c1c, var(--red)); }
.stat-card.purple::before { background: linear-gradient(90deg, #6d28d9, #a78bfa); }
.stat-icon { font-size: 24px; margin-bottom: 10px; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.stat-value { font-family: 'Space Grotesk', sans-serif; font-weight: 800; font-size: 28px; color: var(--text); line-height: 1; }
.stat-change { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ══════════════════════════════════════════════════════════
   TABS
   ══════════════════════════════════════════════════════════ */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; background: rgba(255,255,255,.04); padding: 4px; border-radius: 12px; }
.tab-btn { padding: 7px 16px; border-radius: 9px; border: none; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); flex: 1; }
.tab-btn.active { background: var(--glass-hover); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ══════════════════════════════════════════════════════════
   LAYOUT — SIDEBAR
   ══════════════════════════════════════════════════════════ */
.app-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: rgba(10,21,32,0.8);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(24px);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand { padding: 20px 18px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.sidebar-brand-name { font-family: 'Space Grotesk', sans-serif; font-weight: 800; font-size: 18px; }
/* ── Missing sidebar classes ── */
.sidebar-logo { padding: 20px 18px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.logo-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); flex-shrink: 0; animation: pulse 2.5s infinite; }
.logo-text { font-family: 'Space Grotesk', sans-serif; font-weight: 800; font-size: 18px; color: var(--text); }
.nav-section { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted2); padding: 8px 8px 4px; }
.hb-bar { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; margin: 4px auto; transition: all .28s cubic-bezier(.16,1,.3,1); }

.brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); flex-shrink: 0; animation: pulse 2.5s infinite; }
.sidebar-nav { flex: 1; padding: 12px 10px; }
.nav-section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted2); padding: 8px 8px 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius); color: var(--muted); font-size: 14px; font-weight: 500; transition: var(--transition); text-decoration: none; margin-bottom: 2px; }
.nav-item:hover { background: var(--glass); color: var(--text2); text-decoration: none; }
.nav-item.active { background: var(--green-light); color: var(--green); border: 1px solid rgba(37,211,102,.2); }
.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar-footer { padding: 14px 10px; border-top: 1px solid var(--border); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-border); }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--green-dark), var(--green)); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #0a1a0f; flex-shrink: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 11px; color: var(--muted); }
.main-content { padding: 28px; overflow-y: auto; max-height: 100vh; background: transparent; }

/* ── Mobile sidebar ── */
.mobile-header { display: none; background: rgba(10,21,32,.9); border-bottom: 1px solid var(--border); backdrop-filter: blur(20px); padding: 14px 18px; align-items: center; justify-content: space-between; }
.hamburger { background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }
@media (max-width: 768px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -260px; top: 0; z-index: 100; width: 240px; height: 100vh; transition: left .3s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { left: 0; }
  .mobile-header { display: flex; }
  .main-content { padding: 18px 14px; max-height: none; }
}

/* ══════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════ */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: rgba(19,32,48,0.95); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 12px 18px; font-size: 13px;
  min-width: 220px; max-width: 300px; display: flex; align-items: center; gap: 10px;
  transform: translateX(120%); opacity: 0; transition: all .35s cubic-bezier(.34,1.56,.64,1);
  backdrop-filter: blur(20px); box-shadow: var(--shadow);
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast-success { border-color: rgba(37,211,102,.35); }
.toast-error   { border-color: rgba(224,82,82,.35); }
.toast-warning { border-color: rgba(240,165,0,.35); }

/* ══════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════ */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(6px); z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop.open { display: flex; }
.modal { background: rgba(15,26,40,0.95); border: 1px solid var(--glass-border); border-radius: var(--radius-xl); width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; animation: scaleIn .3s cubic-bezier(.34,1.56,.64,1); backdrop-filter: blur(24px); box-shadow: var(--shadow-lg); }
.modal-header { padding: 20px 24px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 17px; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; padding: 0; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; }

/* ══════════════════════════════════════════════════════════
   PRICING CARDS (modal)
   ══════════════════════════════════════════════════════════ */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pricing-card { background: var(--glass); border: 2px solid var(--glass-border); border-radius: var(--radius-lg); padding: 18px; text-align: center; cursor: pointer; transition: var(--transition); position: relative; }
.pricing-card:hover, .pricing-card.selected { border-color: var(--green); background: var(--green-light); }
.pricing-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--green); color: #0a1a0f; font-size: 9px; font-weight: 700; padding: 2px 10px; border-radius: 20px; white-space: nowrap; }
.pricing-card.featured { border-color: rgba(37,211,102,.35); }
.price-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.price { font-family: 'Space Grotesk', sans-serif; font-weight: 800; font-size: 20px; color: var(--text); }

/* ══════════════════════════════════════════════════════════
   PROGRESS
   ══════════════════════════════════════════════════════════ */
.progress-wrap { background: rgba(255,255,255,.08); border-radius: 6px; height: 5px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 6px; transition: width .5s ease; }
.progress-bar.green  { background: linear-gradient(90deg, #128c4e, #25d366); }
.progress-bar.gold   { background: linear-gradient(90deg, #b45309, var(--gold)); }

/* ══════════════════════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════════════════════ */
.page-header { margin-bottom: 24px; }
.page-header h2 { font-size: 22px; margin-bottom: 4px; }
.page-header p { color: var(--muted); font-size: 14px; }
.topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }

/* ══════════════════════════════════════════════════════════
   LINK RESULT BOX
   ══════════════════════════════════════════════════════════ */
.link-result-box { background: rgba(255,255,255,.05); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 13px 15px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; word-break: break-all; line-height: 1.6; position: relative; }
.lrb-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 4px; }

/* ══════════════════════════════════════════════════════════
   WA PREVIEW PHONE
   ══════════════════════════════════════════════════════════ */
.preview-phone { width: 195px; background: #1a1a1a; border-radius: 30px; padding: 10px; border: 3px solid #2a2a2a; box-shadow: 0 16px 48px rgba(0,0,0,.6); }
.phone-notch { width: 56px; height: 4px; background: #333; border-radius: 4px; margin: 0 auto 10px; }
.phone-screen { background: #0d1117; border-radius: 20px; overflow: hidden; }
.chat-header { background: #075e54; padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.chat-avatar { width: 28px; height: 28px; border-radius: 50%; background: #25d366; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.chat-name { font-size: 11px; font-weight: 700; color: #fff; }
.chat-status { font-size: 9px; color: rgba(255,255,255,.7); }
.chat-body { padding: 10px 8px; display: flex; flex-direction: column; gap: 6px; min-height: 100px; background: #0d1b2a url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Ccircle cx='20' cy='20' r='1' fill='rgba(255,255,255,0.02)'/%3E%3C/g%3E%3C/svg%3E"); }
.bubble-out { background: #005c4b; border-radius: 12px 12px 2px 12px; padding: 7px 10px; font-size: 10px; line-height: 1.5; align-self: flex-end; max-width: 90%; color: #fff; }
.bubble-in { background: rgba(255,255,255,.08); border-radius: 12px 12px 12px 2px; padding: 7px 10px; font-size: 10px; line-height: 1.5; align-self: flex-start; max-width: 85%; color: var(--text); }
.bubble-time { font-size: 8px; opacity: .6; text-align: right; margin-top: 2px; }

/* ══════════════════════════════════════════════════════════
   CODE BLOCK
   ══════════════════════════════════════════════════════════ */
.code-block { background: rgba(255,255,255,.04); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 14px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; white-space: pre-wrap; word-break: break-all; line-height: 1.7; color: #86efac; }

/* ══════════════════════════════════════════════════════════
   QR CODE
   ══════════════════════════════════════════════════════════ */
.qr-container { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px; background: var(--glass2); border-radius: var(--radius-lg); border: 1px solid var(--border); }
#qrcode canvas, #qrcode img { border-radius: 8px; }

/* ══════════════════════════════════════════════════════════
   LANG BUTTONS
   ══════════════════════════════════════════════════════════ */
.lang-btn { background: var(--glass); border: 1px solid var(--glass-border); color: var(--muted); font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 20px; cursor: pointer; transition: var(--transition); letter-spacing: .5px; }
.lang-btn.active { background: var(--green-light); color: var(--green); border-color: rgba(37,211,102,.35); }
.lang-btn:hover { color: var(--text); border-color: rgba(255,255,255,.2); }

/* ══════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════ */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.text-center  { text-align: center; }
.text-gold    { color: var(--gold); }
.text-green   { color: var(--green); }
.text-muted   { color: var(--muted); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.mb-8  { margin-bottom: 8px; }  .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.mt-8  { margin-top: 8px; }     .mt-16 { margin-top: 16px; }

/* ══════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════ */
.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn    { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn   { from { opacity: 0; transform: scale(.92) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes pulse     { 0%,100% { opacity: 1; box-shadow: 0 0 10px var(--green); } 50% { opacity: .6; box-shadow: 0 0 4px var(--green); } }
@keyframes shimmer   { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes float     { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-6px);} }

/* ══════════════════════════════════════════════════════════
   MULTILANGUAGE — RTL & CJK FONT SUPPORT
   ══════════════════════════════════════════════════════════ */

/* Arabic — RTL */
:lang(ar) {
  font-family: 'Noto Sans Arabic', 'Plus Jakarta Sans', system-ui, sans-serif;
  direction: rtl;
  text-align: right;
}
[dir="rtl"] body { direction: rtl; }
[dir="rtl"] .landing-nav { flex-direction: row-reverse; }
[dir="rtl"] .nav-right { flex-direction: row-reverse; }
[dir="rtl"] .sidebar { right: 0; left: auto; border-right: none; border-left: 1px solid var(--border); }
[dir="rtl"] .app-layout { grid-template-columns: 1fr 240px; }
[dir="rtl"] .nav-item { flex-direction: row-reverse; }
[dir="rtl"] .input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); border-left: none; border-right: none; }
[dir="rtl"] .input-group-text { border-radius: 0 var(--radius) var(--radius) 0; border-left: 1px solid var(--glass-border); border-right: none; }
[dir="rtl"] .mm-link { flex-direction: row-reverse; }
[dir="rtl"] .ph-wrap .ph-input { text-align: right; }
[dir="rtl"] .ph-flag { border-right: none; border-left: 1px solid rgba(255,255,255,.08); }

/* Hindi */
:lang(hi) { font-family: 'Noto Sans Devanagari', 'Plus Jakarta Sans', system-ui, sans-serif; }

/* Thai */
:lang(th) { font-family: 'Noto Sans Thai', 'Plus Jakarta Sans', system-ui, sans-serif; line-height: 1.8; }

/* Japanese */
:lang(ja) { font-family: 'Noto Sans JP', 'Plus Jakarta Sans', system-ui, sans-serif; }

/* Korean */
:lang(ko) { font-family: 'Noto Sans KR', 'Plus Jakarta Sans', system-ui, sans-serif; }

/* Chinese */
:lang(zh-CN), :lang(zh) { font-family: 'Noto Sans SC', 'Plus Jakarta Sans', system-ui, sans-serif; }

/* Russian, Vietnamese, French, German, Spanish, Portuguese use default Plus Jakarta Sans */
