/* ============ CUBE theme: dark navy / cyan / black / silver ============ */
:root {
  --bg-0: #05080f;        /* near-black */
  --bg-1: #0a1224;        /* deep navy */
  --bg-2: #0f1b33;        /* navy card */
  --bg-3: #16264a;        /* lighter navy */
  --cyan: #22d3ee;
  --cyan-dim: #0e7490;
  --silver: #c9d2e3;
  --silver-dim: #7a8699;
  --green: #34d399;
  --red: #f87171;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Tajawal for Arabic */
body.lang-ar,
body.lang-ar input,
body.lang-ar select,
body.lang-ar button,
html[lang="ar"] { font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse at top, var(--bg-1) 0%, var(--bg-0) 70%);
  color: var(--silver);
  min-height: 100vh;
}

/* ============ cube logo ============ */
.cube-logo {
  width: 80px; height: 80px;
  perspective: 400px;
  margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
}
.cube-logo.small { width: 34px; height: 34px; margin: 0; }
.cube {
  position: relative;
  width: 44px; height: 44px;
  transform-style: preserve-3d;
  animation: spin 10s linear infinite;
}
.cube-logo.small .cube { width: 20px; height: 20px; }
.face {
  position: absolute; inset: 0;
  background: rgba(34, 211, 238, 0.10);
  border: 1.5px solid var(--cyan);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.35) inset;
}
.cube .front  { transform: translateZ(22px); }
.cube .back   { transform: rotateY(180deg) translateZ(22px); }
.cube .right  { transform: rotateY(90deg) translateZ(22px); }
.cube .left   { transform: rotateY(-90deg) translateZ(22px); }
.cube .top    { transform: rotateX(90deg) translateZ(22px); }
.cube .bottom { transform: rotateX(-90deg) translateZ(22px); }
.cube-logo.small .front  { transform: translateZ(10px); }
.cube-logo.small .back   { transform: rotateY(180deg) translateZ(10px); }
.cube-logo.small .right  { transform: rotateY(90deg) translateZ(10px); }
.cube-logo.small .left   { transform: rotateY(-90deg) translateZ(10px); }
.cube-logo.small .top    { transform: rotateX(90deg) translateZ(10px); }
.cube-logo.small .bottom { transform: rotateX(-90deg) translateZ(10px); }
@keyframes spin {
  from { transform: rotateX(-20deg) rotateY(0deg); }
  to   { transform: rotateX(-20deg) rotateY(360deg); }
}

.brand-name {
  font-size: 34px; font-weight: 800; letter-spacing: 10px;
  color: #fff; text-align: center;
  text-shadow: 0 0 24px rgba(34, 211, 238, 0.6);
}
.brand-sub { text-align: center; color: var(--silver-dim); letter-spacing: 2px; font-size: 12px; text-transform: uppercase; }

/* ============ auth page ============ */
.auth-body { display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-wrap { width: 100%; max-width: 420px; }
.brand { margin-bottom: 28px; }

.card {
  background: var(--bg-2);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab {
  flex: 1; padding: 10px; border: none; border-radius: 10px;
  background: transparent; color: var(--silver-dim);
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.tab.active { background: var(--bg-3); color: var(--cyan); }

.form { display: none; flex-direction: column; gap: 14px; }
.form.active { display: flex; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--silver-dim); }
input {
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(201, 210, 227, 0.15);
  background: var(--bg-1); color: #fff; font-size: 15px;
  outline: none;
}
input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15); }

.captcha-q {
  color: var(--cyan); font-weight: 700; font-size: 15px;
  background: var(--bg-1); border: 1px dashed var(--cyan-dim);
  border-radius: 8px; padding: 2px 10px; display: inline-block;
}

.btn-primary {
  margin-top: 6px; padding: 13px;
  border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, var(--cyan) 0%, #0891b2 100%);
  color: #04121a; font-size: 16px; font-weight: 700;
}
.btn-primary:hover { filter: brightness(1.1); }

.error { color: var(--red); font-size: 13px; min-height: 16px; }

/* ============ app ============ */
.app-body { padding-bottom: 110px; }

.app-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: rgba(10, 18, 36, 0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(34, 211, 238, 0.15);
}
.header-brand { display: flex; align-items: center; gap: 12px; }
.header-brand .brand-name { font-size: 18px; letter-spacing: 5px; }
.header-user { color: var(--cyan); font-weight: 600; font-size: 14px; }

.app-main { padding: 20px 18px; max-width: 560px; margin: 0 auto; }
.page { display: none; flex-direction: column; gap: 16px; }
.page.active { display: flex; }
.page h2 { color: #fff; font-size: 22px; }

.hero h2 { color: #fff; font-size: 22px; }
.muted { color: var(--silver-dim); font-size: 13px; }

.balance-card {
  background: linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: var(--radius); padding: 20px;
}
.balance-big { font-size: 34px; font-weight: 800; color: #fff; margin-top: 4px; }

.section-title { color: var(--silver); font-size: 15px; }

.market-list, .info-card {
  background: var(--bg-2);
  border: 1px solid rgba(201, 210, 227, 0.08);
  border-radius: var(--radius); padding: 6px 16px;
}
.market-row, .info-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid rgba(201, 210, 227, 0.07);
}
.market-row:last-child, .info-row:last-child { border-bottom: none; }

/* compact market rows on the home page */
.market-row { padding: 9px 0; font-size: 13px; }
.market-row .pair-col { gap: 0; }
.market-row .pair { font-size: 13px; }
.market-row .muted { font-size: 11px; }
.market-row .price { font-size: 13px; }
.market-row .change { font-size: 12px; }

.pair { font-weight: 600; color: #fff; }
.price { color: var(--silver); }
.change.up { color: var(--green); }
.change.down { color: var(--red); }

.info-card { padding: 14px 16px; }
.badge {
  background: rgba(34, 211, 238, 0.12); color: var(--cyan);
  border-radius: 20px; padding: 3px 12px; font-size: 12px; font-weight: 600;
}

.asset-options { display: flex; gap: 10px; margin-top: 12px; }
.asset-btn {
  flex: 1; padding: 12px; border-radius: 10px; cursor: pointer;
  background: var(--bg-1); color: var(--silver);
  border: 1px solid rgba(34, 211, 238, 0.25); font-weight: 600;
}
.asset-btn:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-danger {
  padding: 13px; border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 10px; cursor: pointer;
  background: rgba(248, 113, 113, 0.08); color: var(--red);
  font-size: 15px; font-weight: 600;
}

/* ============ bottom navbar — liquid glass ============ */
.bottom-nav {
  position: fixed; z-index: 20;
  left: 50%; transform: translateX(-50%);
  bottom: max(12px, env(safe-area-inset-bottom));
  width: min(94%, 520px);
  display: flex;
  background: linear-gradient(135deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.03) 100%);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  padding: 6px 4px;
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  color: var(--silver-dim); font-size: 11px; padding: 6px 0;
}
.nav-btn svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.nav-btn { border-radius: 20px; }
.nav-btn.active {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.10);
}
.nav-btn.active svg { filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.7)); }

/* ============ notification bell ============ */
.bell-btn {
  position: relative;
  background: none; border: none; cursor: pointer;
  color: var(--silver); padding: 6px;
}
.bell-btn svg {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.bell-btn:hover { color: var(--cyan); }
.bell-dot {
  position: absolute; top: 0; right: 0;
  display: none; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 10px;
  background: #e53935; color: #fff;
  font-size: 10px; font-weight: 800; line-height: 1;
  border: 2px solid var(--bg-1);
  box-shadow: 0 0 6px rgba(229, 57, 53, 0.7);
}
.notif-panel {
  display: none;
  position: absolute; top: 56px; right: 14px; z-index: 30;
  width: 260px; padding: 14px 16px;
  background: rgba(15, 27, 51, 0.92);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.notif-panel.open { display: block; }
.notif-title { color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 6px; }

/* ============ quick actions ============ */
.quick-actions { display: flex; gap: 12px; }
.qa-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  color: var(--silver); font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.qa-btn:hover { border-color: rgba(34, 211, 238, 0.5); color: var(--cyan); }
.qa-btn svg {
  width: 24px; height: 24px;
  fill: none; stroke: var(--cyan); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ============ balance card (home) ============ */
.bc-top { display: flex; align-items: flex-start; justify-content: space-between; }
.bc-name { font-size: 18px; font-weight: 700; color: #fff; margin-top: 2px; }
.bc-bottom {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid rgba(201, 210, 227, 0.1);
}
.bc-ref {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  background: rgba(5, 8, 15, 0.4); border-radius: 10px; padding: 8px 12px;
}
.ref-inline {
  flex: 1; font-family: ui-monospace, Menlo, monospace; font-weight: 700;
  color: var(--cyan); letter-spacing: 1px;
}
.ref-copy-btn {
  border: none; background: var(--cyan); color: #04121a;
  border-radius: 8px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.ref-copy-btn:hover { filter: brightness(1.1); }

/* ============ wallet summary + chart ============ */
.wallet-summary {
  background: linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%);
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px;
}
.ws-row { display: flex; align-items: center; justify-content: space-between; }
.ws-name { color: #fff; font-weight: 600; }
.ws-balance {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 6px; padding-top: 12px; border-top: 1px solid rgba(201, 210, 227, 0.1);
}
.ws-balance-val { font-size: 30px; font-weight: 800; color: #fff; }
.ws-balance-val small { font-size: 13px; color: var(--silver-dim); font-weight: 600; }
.ws-today { display: flex; align-items: center; justify-content: space-between; }

.mini-chart {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 6px; height: 140px; padding: 8px 0;
}
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.chart-bar-wrap { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart-bar {
  width: 70%; min-height: 6px; border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--cyan) 0%, var(--cyan-dim) 100%);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
  transition: height 0.5s ease;
}
.chart-val { font-size: 10px; color: var(--silver); font-variant-numeric: tabular-nums; }
.chart-label { font-size: 10px; }

/* ============ footer ============ */
.app-footer {
  text-align: center; margin-top: 24px; padding: 18px 0;
  border-top: 1px solid rgba(201, 210, 227, 0.08);
  display: flex; flex-direction: column; gap: 4px;
}
.footer-brand { color: var(--silver); font-weight: 700; font-size: 14px; }
.footer-brand span { color: var(--cyan); }
.app-footer .muted { font-size: 12px; }
.footer-  { color: var(--silver-dim); font-style: italic; }

/* ============ admin search ============ */
.admin-search {
  width: 100%; margin-bottom: 14px; padding: 12px 14px;
  border-radius: 10px; border: 1px solid rgba(201, 210, 227, 0.18);
  background: var(--bg-1); color: #fff; font-size: 14px; outline: none;
}
.admin-search:focus { border-color: var(--cyan); }

/* ============ trust badges + how it works ============ */
.trust-badges {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between;
}
.trust-badge {
  flex: 1; min-width: 60px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 4px;
  background: linear-gradient(135deg, rgba(34,211,238,0.08) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(34, 211, 238, 0.16); border-radius: 14px;
  font-size: 12px; font-weight: 600; color: var(--silver);
}
.tb-icon svg {
  width: 24px; height: 24px;
  fill: none; stroke: var(--cyan); stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.4));
}

.how-card { display: flex; flex-direction: column; gap: 4px; padding: 8px 16px 16px; }
.how-step {
  display: flex; align-items: flex-start; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid rgba(201, 210, 227, 0.07);
}
.how-step:last-of-type { border-bottom: none; }
.how-icon {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(34, 211, 238, 0.10);
  border: 1px solid rgba(34, 211, 238, 0.25);
}
.how-icon svg {
  width: 20px; height: 20px;
  fill: none; stroke: var(--cyan); stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.how-title { color: #fff; font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.how-note {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px; padding: 12px; border-radius: 10px;
  background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.25);
  font-size: 13px; color: var(--silver);
}
.how-note-icon { flex: none; }
.how-note-icon svg {
  width: 22px; height: 22px;
  fill: none; stroke: var(--green); stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ============ settings menu rows ============ */
.menu-card { padding: 4px 16px; }
.menu-row {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 15px 0; background: none; border: none; cursor: pointer;
  color: var(--silver); font-size: 15px; text-align: start;
  border-bottom: 1px solid rgba(201, 210, 227, 0.07);
}
.menu-row:last-child { border-bottom: none; }
.menu-row:hover { color: #fff; }
.menu-arrow { color: var(--silver-dim); font-size: 20px; }
[dir="rtl"] .menu-arrow { transform: scaleX(-1); }

.fb-textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(201, 210, 227, 0.15);
  background: var(--bg-1); color: #fff; font-size: 15px;
  font-family: inherit; resize: vertical; outline: none;
}
.fb-textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15); }

/* ============ toggle switches ============ */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0; border-radius: 26px;
  background: var(--bg-3); border: 1px solid rgba(201, 210, 227, 0.2);
  transition: 0.25s;
}
.slider::before {
  content: ''; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
  background: var(--silver-dim); border-radius: 50%; transition: 0.25s;
}
.switch input:checked + .slider {
  background: linear-gradient(135deg, var(--cyan) 0%, #0891b2 100%);
  border-color: transparent;
}
.switch input:checked + .slider::before { transform: translateX(20px); background: #04121a; }

.autowd-box {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px; margin: 4px 0 8px;
  background: var(--bg-1); border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.18);
}
.autowd-box .btn-primary { margin-top: 2px; }

/* withdraw fee breakdown */
.wd-breakdown {
  background: var(--bg-1); border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.wd-line { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.wd-receive { font-weight: 700; color: #fff; padding-top: 6px; border-top: 1px solid rgba(201,210,227,0.1); }
.wd-receive span:last-child { color: var(--green); }

.optional { color: var(--silver-dim); font-size: 11px; font-weight: 400; }

/* ============ nav loading bar ============ */
#nav-loader {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: 3px; pointer-events: none; background: transparent;
}
#nav-loader-bar {
  height: 100%; width: 0%; opacity: 0;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  box-shadow: 0 0 10px var(--cyan);
  transition: width 0.35s ease, opacity 0.3s ease;
}

/* ============ package coin badge (all pairs) ============ */
.coin-badge {
  width: 56px; height: 56px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #1b2540 0%, #0d1526 100%);
  box-shadow: 0 0 16px color-mix(in srgb, var(--glow) 70%, transparent),
              0 0 38px color-mix(in srgb, var(--glow) 40%, transparent),
              inset 0 1px 4px rgba(255, 255, 255, 0.2);
  animation: badgeGlow 2.6s ease-in-out infinite;
}
@keyframes badgeGlow {
  50% { box-shadow: 0 0 24px color-mix(in srgb, var(--glow) 90%, transparent),
                    0 0 56px color-mix(in srgb, var(--glow) 55%, transparent),
                    inset 0 1px 4px rgba(255, 255, 255, 0.25); }
}
.coin-badge svg { width: 40px; height: 40px; display: block; }
.package-card { margin-bottom: 16px; }

/* ============ solana coin (package) ============ */
.sol-coin {
  width: 56px; height: 56px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #241a3a 0%, #12101f 100%);
  box-shadow: 0 0 18px rgba(153, 69, 255, 0.6), 0 0 40px rgba(20, 241, 149, 0.35),
    inset 0 1px 4px rgba(255, 255, 255, 0.25);
  animation: solGlow 2.6s ease-in-out infinite;
}
@keyframes solGlow {
  50% { box-shadow: 0 0 26px rgba(153, 69, 255, 0.9), 0 0 60px rgba(20, 241, 149, 0.55),
    inset 0 1px 4px rgba(255, 255, 255, 0.3); }
}
.sol-mark { width: 34px; height: 34px; }

/* ============ deposit method chooser ============ */
.method-list { display: flex; flex-direction: column; gap: 10px; }
.method-btn {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 16px; cursor: pointer;
  background: var(--bg-2); border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 14px; color: var(--silver); text-align: left;
}
.method-btn:hover { border-color: var(--cyan); }
.method-logo svg { width: 34px; height: 34px; display: block; }
.method-logo img { width: 34px; height: 34px; object-fit: contain; display: block; }
.method-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.method-name { font-weight: 600; color: #fff; }
.method-arrow { color: var(--silver-dim); font-size: 22px; }

/* ============ modals ============ */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 50;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(3, 6, 12, 0.72); backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal {
  width: 100%; max-width: 400px;
  background: var(--bg-2); border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 18px; padding: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  display: flex; flex-direction: column; gap: 12px;
}

.pay-timer {
  font-size: 30px; font-weight: 800; text-align: center; color: var(--cyan);
  font-variant-numeric: tabular-nums; letter-spacing: 2px;
}
.addr-label { margin-top: 2px; }
.addr-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-1); border: 1px dashed var(--cyan-dim);
  border-radius: 10px; padding: 10px 12px;
}
.addr-text { flex: 1; font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--silver); word-break: break-all; }
.copy-addr {
  flex: none; background: var(--bg-3); color: var(--cyan);
  border: none; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 12px;
}
.btn-ghost {
  padding: 11px; border: 1px solid rgba(201, 210, 227, 0.2);
  border-radius: 10px; background: transparent; color: var(--silver-dim);
  cursor: pointer; font-size: 14px; font-weight: 600;
}
.btn-ghost:hover { color: var(--silver); }
.confirm-addr {
  font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--cyan);
  background: var(--bg-1); border-radius: 8px; padding: 10px; word-break: break-all; text-align: center;
}
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions .btn-primary, .confirm-actions .btn-ghost { flex: 1; margin: 0; }

/* ============ countdown / working area extras ============ */
.countdown-box { text-align: center; display: flex; flex-direction: column; gap: 8px; }
.countdown {
  font-size: 30px; font-weight: 800; color: #fff; letter-spacing: 2px;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 16px rgba(34, 211, 238, 0.5);
}
.cd-day { font-size: 12px; }

/* ============ notifications list ============ */
.notif-item { padding: 8px 0; border-bottom: 1px solid rgba(201, 210, 227, 0.08); }
.notif-item:last-child { border-bottom: none; }
.notif-item p { font-size: 13px; color: var(--silver); }
.notif-item .muted { font-size: 11px; }

/* ============ admin panel ============ */
.admin-body { padding-bottom: 40px; }
.admin-gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.admin-card { width: 100%; max-width: 360px; text-align: center; }
.admin-card .brand-sub { margin-top: 4px; }

.admin-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.admin-tab {
  flex: 1; padding: 10px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--bg-2); color: var(--silver-dim); font-weight: 600; font-size: 14px;
}
.admin-tab.active { background: var(--bg-3); color: var(--cyan); }
.tab-count {
  background: var(--cyan); color: #04121a; border-radius: 20px;
  padding: 0 7px; font-size: 11px; font-weight: 800; margin-left: 4px;
}
.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-row {
  display: grid; grid-template-columns: 1.2fr 1fr 0.9fr 1.1fr 0.8fr 0.8fr 0.9fr; gap: 10px;
  padding: 12px 4px; border-bottom: 1px solid rgba(201, 210, 227, 0.07);
  font-size: 12.5px; align-items: center;
}
.review-btn {
  border: 1px solid rgba(201, 210, 227, 0.25); background: transparent;
  color: var(--silver-dim); border-radius: 8px; padding: 5px 10px;
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.review-btn:hover { color: var(--silver); }
.review-btn.on {
  background: rgba(245, 197, 24, 0.15); border-color: rgba(245, 197, 24, 0.5); color: #f5c518;
}
.admin-row:last-child { border-bottom: none; }
.admin-head { color: var(--silver-dim); font-weight: 700; font-size: 12px; text-transform: uppercase; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

.ticket-card {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--bg-2); border: 1px solid rgba(201, 210, 227, 0.1);
  border-radius: 14px; padding: 16px; margin-bottom: 12px;
}
.ticket-name { color: #fff; font-weight: 600; }
.ticket-amt { color: var(--green); font-weight: 800; font-size: 18px; margin: 2px 0; }
.ticket-card .btn-primary { margin: 0; flex: none; padding: 10px 18px; }

/* ============ account under review notice ============ */
.review-notice {
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(245, 197, 24, 0.08);
  border: 1px solid rgba(245, 197, 24, 0.35);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.rn-icon { flex: none; }
.rn-icon svg {
  width: 26px; height: 26px; fill: none; stroke: #f5c518;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.rn-title { color: #fff; font-weight: 700; margin-bottom: 4px; }
.rn-text { color: var(--silver); font-size: 13px; line-height: 1.5; }
.rn-ar { margin-top: 4px; direction: rtl; color: var(--silver-dim); }

/* ============ language switcher (auth page) ============ */
.lang-switch {
  position: fixed; top: 16px; right: 16px; z-index: 40;
  display: flex; gap: 2px; padding: 3px;
  background: rgba(15, 27, 51, 0.8); backdrop-filter: blur(10px);
  border: 1px solid rgba(34, 211, 238, 0.2); border-radius: 22px;
}
[dir="rtl"] .lang-switch { right: auto; left: 16px; }
.ls-btn {
  min-width: 38px; padding: 6px 10px; border: none; cursor: pointer;
  background: transparent; color: var(--silver-dim);
  border-radius: 20px; font-size: 14px; font-weight: 700;
}
.ls-btn.active {
  background: linear-gradient(135deg, var(--cyan) 0%, #0891b2 100%);
  color: #04121a;
}

/* ============ language chooser + phone/country ============ */
.lang-choices { display: flex; gap: 12px; margin-top: 18px; }
.lang-choice {
  flex: 1; padding: 16px; border-radius: 12px; cursor: pointer;
  background: var(--bg-1); border: 1px solid rgba(34, 211, 238, 0.3);
  color: #fff; font-size: 17px; font-weight: 700;
}
.lang-choice:hover { border-color: var(--cyan); background: rgba(34, 211, 238, 0.08); }
.phone-row { display: flex; gap: 8px; align-items: stretch; }
.phone-code {
  display: flex; align-items: center; padding: 0 12px;
  background: var(--bg-3); border: 1px solid rgba(201, 210, 227, 0.15);
  border-radius: 10px; color: var(--cyan); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.phone-row input { flex: 1; }
[dir="rtl"] .phone-code { direction: ltr; }


.app-header { top: 0; }
#nav-loader { top: 0; }

/* ============ coin logo in payment modal ============ */
.pay-coin-wrap { display: flex; justify-content: center; margin: 6px 0; }
.pay-coin-logo {
  width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
}
.pay-coin-logo svg { width: 100%; height: 100%; display: block; }
.pay-coin-logo img { width: 100%; height: 100%; object-fit: contain; }
.pay-coin-label { text-align: center; color: #fff; font-weight: 700; font-size: 15px; }

/* ============ admin: activate-by-ref + copy ============ */
.activate-ref-card { padding: 16px; margin-bottom: 14px; }
.ar-title { color: #fff; font-weight: 700; margin-bottom: 10px; }
.ar-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ar-row > * { flex: 1; min-width: 120px; }
.ar-row .btn-primary { flex: none; }
.ar-msg { font-size: 13px; margin-top: 8px; }
.ref-cell { display: flex; align-items: center; gap: 6px; }
.copy-ref-sm {
  border: none; background: rgba(34, 211, 238, 0.15); color: var(--cyan);
  border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 700; cursor: pointer;
}
.copy-ref-sm:hover { background: rgba(34, 211, 238, 0.3); }



/* ============ working area ============ */
.working-area {
  background: var(--bg-2);
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: var(--radius); padding: 16px;
}
.wa-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.wa-title { font-weight: 700; color: #fff; }
.wa-status {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  padding: 3px 10px; border-radius: 20px;
  color: var(--silver-dim); background: rgba(201, 210, 227, 0.1);
}
.wa-status.ready { color: var(--cyan); background: rgba(34, 211, 238, 0.12); }
.wa-status.live { color: var(--green); background: rgba(52, 211, 153, 0.14); }
.wa-status.live::before {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); margin-right: 5px; animation: pulse 1.2s infinite;
}
.wa-pkg { color: #fff; margin-bottom: 4px; }
.wa-start { width: 100%; margin-top: 14px; }

/* ---- bot console / trading animation ---- */
.bot-console { display: flex; flex-direction: column; gap: 12px; }
.bot-lead { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 14px; }
.bot-spin {
  width: 16px; height: 16px; flex: none;
  border: 2px solid rgba(34, 211, 238, 0.25);
  border-top-color: var(--cyan);
  border-radius: 50%; animation: spin360 0.8s linear infinite;
}
@keyframes spin360 { to { transform: rotate(360deg); } }

.engine { display: flex; flex-direction: column; gap: 8px; }
.engine-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--silver-dim); }
.engine-row .bar {
  flex: 1; max-width: 130px; height: 6px; border-radius: 4px;
  background: var(--bg-1); overflow: hidden; position: relative;
}
.engine-row .bar i {
  position: absolute; top: 0; left: -40%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: sweep 1.4s linear infinite;
}
.engine-row:nth-child(2) .bar i { animation-delay: 0.4s; }
.engine-row:nth-child(3) .bar i { animation-delay: 0.8s; }
@keyframes sweep { to { left: 110%; } }

.ticker-mini {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-1); border-radius: 10px; padding: 10px 12px;
}
.ticker-price { color: var(--green); font-weight: 700; font-variant-numeric: tabular-nums; }

.bot-log {
  display: flex; flex-direction: column; gap: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px; min-height: 20px;
}
.log-line { color: var(--cyan); opacity: 0.9; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } }

.wa-progress { display: flex; flex-direction: column; gap: 6px; }
.progress-track { height: 8px; border-radius: 6px; background: var(--bg-1); overflow: hidden; }
.progress-fill {
  height: 100%; width: 4%;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  border-radius: 6px; transition: width 0.5s linear;
}

/* ============ investment package card ============ */
.package-card {
  background: linear-gradient(160deg, var(--bg-3) 0%, var(--bg-2) 100%);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: var(--radius); padding: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
.pkg-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.pkg-name { font-size: 20px; font-weight: 800; color: #fff; }

/* glowing USDT coin */
.usdt-coin {
  width: 56px; height: 56px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #4be0c0 0%, #26a17b 55%, #1a7d5e 100%);
  box-shadow:
    0 0 18px rgba(38, 161, 123, 0.85),
    0 0 42px rgba(38, 161, 123, 0.5),
    inset 0 2px 6px rgba(255, 255, 255, 0.45),
    inset 0 -3px 8px rgba(0, 0, 0, 0.35);
  animation: coinGlow 2.4s ease-in-out infinite;
}
@keyframes coinGlow {
  50% { box-shadow:
    0 0 26px rgba(38, 161, 123, 1),
    0 0 60px rgba(38, 161, 123, 0.7),
    inset 0 2px 6px rgba(255, 255, 255, 0.5),
    inset 0 -3px 8px rgba(0, 0, 0, 0.35); }
}
.usdt-symbol {
  font-size: 30px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.pkg-stats { display: flex; gap: 10px; margin-bottom: 16px; }
.pkg-stat {
  flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: center;
  background: var(--bg-1); border-radius: 12px; padding: 12px 6px;
}
.pkg-stat-val { font-size: 18px; font-weight: 800; color: #fff; }
.pkg-stat-val small { font-size: 11px; color: var(--silver-dim); font-weight: 600; }
.pkg-stat-val.up { color: var(--green); }
.pkg-stat .muted { font-size: 11px; }

.pkg-features { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.pkg-features li {
  position: relative; padding-left: 24px; font-size: 13px; color: var(--silver);
}
.pkg-features li::before {
  content: '✓'; position: absolute; left: 0; top: -1px;
  color: var(--cyan); font-weight: 800;
}
.pkg-target { text-align: center; margin-bottom: 14px; font-size: 13px; }
.pkg-target strong { color: var(--green); }
.pkg-activate { width: 100%; }

/* ============ wallet / settings / about ============ */
.wallet-actions { display: flex; gap: 12px; }
.wallet-actions .btn-primary { flex: 1; margin-top: 0; }
.btn-outline {
  flex: 1; padding: 13px; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--cyan);
  border: 1px solid var(--cyan); font-size: 16px; font-weight: 700;
}
.btn-outline:hover { background: rgba(34, 211, 238, 0.08); }

.lang-select {
  background: var(--bg-1); color: var(--silver);
  border: 1px solid rgba(201, 210, 227, 0.2);
  border-radius: 8px; padding: 6px 10px; font-size: 14px; outline: none;
}
.support-link { color: var(--cyan); text-decoration: none; font-weight: 600; font-size: 14px; }
.support-link:hover { text-decoration: underline; }

.about-card { padding: 16px; font-size: 14px; line-height: 1.6; color: var(--silver); }

.referral-banner {
  text-align: center; padding: 22px 16px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16) 0%, var(--bg-2) 100%);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: var(--radius);
}
.referral-earn { font-size: 20px; font-weight: 800; color: #fff; }
.referral-earn .pct {
  color: var(--cyan); font-size: 26px;
  text-shadow: 0 0 16px rgba(34, 211, 238, 0.6);
}

/* RTL tweaks */
[dir="rtl"] .info-row, [dir="rtl"] .market-row { direction: rtl; }

/* ============ referrals & live dot ============ */
.referral-card { text-align: center; padding: 20px 16px; }
.referral-code {
  margin: 14px 0; padding: 12px;
  font-size: 22px; font-weight: 800; letter-spacing: 3px; color: var(--cyan);
  background: var(--bg-1); border: 1px dashed var(--cyan-dim); border-radius: 12px;
}
.pair-col { display: flex; flex-direction: column; gap: 2px; }
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--silver-dim); margin-left: 6px; vertical-align: middle;
}
.live-dot.on { background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* ============================================================
   Lucky Wheel
   ============================================================ */

/* Home entry card */
.wheel-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left; cursor: pointer;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius); padding: 16px;
  background: linear-gradient(135deg, #2a1e05 0%, var(--bg-2) 60%);
  color: var(--silver);
}
.wheel-card.ready { animation: wheelCardPulse 2.4s ease-in-out infinite; }
@keyframes wheelCardPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(245, 158, 11, 0); }
  50% { box-shadow: 0 0 22px rgba(245, 158, 11, 0.35); }
}
.wheel-card-glow {
  position: absolute; top: -40%; left: -30%;
  width: 60%; height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255, 220, 120, 0.18), transparent);
  transform: skewX(-20deg);
  animation: wheelSheen 3.5s linear infinite;
}
@keyframes wheelSheen { to { left: 130%; } }
.wheel-card-icon {
  font-size: 34px; flex: none;
  animation: wheelWobble 3s ease-in-out infinite;
}
@keyframes wheelWobble { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
.wheel-card-text { display: flex; flex-direction: column; gap: 2px; flex: 1; z-index: 1; }
.wheel-card-title { font-weight: 800; font-size: 15px; color: #ffd88a; }
.wheel-card-sub { font-size: 12px; color: var(--silver-dim); font-variant-numeric: tabular-nums; }
.wheel-card-cta {
  flex: none; z-index: 1;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #1a1300; font-weight: 800; font-size: 13px;
  border-radius: 999px; padding: 8px 16px; letter-spacing: 1px;
}

/* Modal */
.wheel-overlay .wheel-modal {
  max-width: 420px; align-items: center; text-align: center;
  position: relative; overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: radial-gradient(ellipse at top, #12203c 0%, var(--bg-2) 70%);
}
.wheel-heading { color: #ffd88a; font-size: 20px; font-weight: 800; }
.wheel-tagline { margin-top: -4px; }

.wheel-stage { position: relative; width: 300px; height: 300px; margin: 6px auto 2px; }
.wheel-wrap { position: absolute; inset: 0; }
#wheel-canvas {
  width: 300px; height: 300px; display: block;
  border-radius: 50%;
  box-shadow: 0 0 0 6px #0b1224, 0 0 34px rgba(245, 158, 11, 0.35), inset 0 0 30px rgba(0,0,0,0.5);
  will-change: transform;
}
/* pointer at the top pointing down into the wheel */
.wheel-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 3;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 26px solid #ffd23f;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.5));
}
/* center hub / spin button */
.wheel-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 74px; height: 74px; border-radius: 50%; z-index: 2;
  border: 4px solid #fff; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #fbbf24, #f97316);
  box-shadow: 0 4px 14px rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s ease;
}
.wheel-hub:hover { transform: translate(-50%, -50%) scale(1.06); }
.wheel-hub:active { transform: translate(-50%, -50%) scale(0.94); }
.wheel-hub.disabled { background: radial-gradient(circle at 35% 30%, #64748b, #334155); cursor: default; }
.wheel-hub.disabled:hover { transform: translate(-50%, -50%); }
.wheel-hub-inner { color: #1a1300; font-weight: 900; font-size: 15px; letter-spacing: 1px; }

.wheel-result { min-height: 26px; font-weight: 800; opacity: 0; transition: opacity 0.3s ease; }
.wheel-result.show { opacity: 1; }
.wheel-win { color: var(--green); font-size: 18px; }
.wheel-jackpot {
  font-size: 20px;
  background: linear-gradient(90deg, #fbbf24, #f97316, #ef4444, #fbbf24);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: jackpotShine 1.2s linear infinite;
}
@keyframes jackpotShine { to { background-position: 300% 0; } }

.wheel-countdown {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.wheel-cd-time {
  font-size: 24px; font-weight: 800; color: var(--cyan);
  font-variant-numeric: tabular-nums; letter-spacing: 2px;
}

.wheel-spin-btn { width: 100%; margin-top: 4px; }
.wheel-modal .btn-ghost { width: 100%; }

/* confetti */
.wheel-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.confetti-piece {
  position: absolute; top: -20px; border-radius: 2px;
  animation-name: confettiFall; animation-timing-function: ease-in; animation-fill-mode: forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(560px) rotate(540deg); opacity: 0; }
}

/* ============================================================
   Support chat widget
   ============================================================ */
.support-fab {
  position: fixed; right: 16px; bottom: 84px; z-index: 45;
  width: 62px; height: 62px; border-radius: 50%; padding: 0;
  border: 3px solid var(--cyan); cursor: pointer; background: var(--bg-2);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5); overflow: visible;
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.support-fab:hover { transform: scale(1.07); }
.support-fab.hidden { opacity: 0; pointer-events: none; transform: scale(0.6); }
.support-fab-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.support-fab-badge {
  position: absolute; top: -4px; right: -4px; z-index: 2;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-0);
}
/* pulsing ring to draw attention */
.support-fab-ping {
  position: absolute; inset: -3px; border-radius: 50%; z-index: -1;
  border: 3px solid var(--cyan); opacity: 0;
}
.support-fab.has-unread .support-fab-ping { animation: supportPing 1.8s ease-out infinite; }
@keyframes supportPing {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}

.support-chat {
  position: fixed; right: 16px; bottom: 84px; z-index: 46;
  width: min(360px, calc(100vw - 32px)); height: min(520px, calc(100vh - 140px));
  background: var(--bg-1); border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,0.65);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(20px) scale(0.96); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.support-chat.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.support-chat-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  border-bottom: 1px solid rgba(34, 211, 238, 0.15);
}
.support-head-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--cyan); }
.support-head-info { display: flex; flex-direction: column; flex: 1; gap: 2px; }
.support-head-name { font-weight: 700; color: var(--silver); font-size: 14px; }
.support-head-status { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--silver-dim); }
.support-online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.support-close { background: none; border: none; color: var(--silver-dim); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.support-close:hover { color: var(--silver); }

.support-messages {
  flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  background: radial-gradient(ellipse at top, var(--bg-1), var(--bg-0));
}
.support-msg { display: flex; flex-direction: column; max-width: 82%; }
.support-msg.agent { align-self: flex-start; align-items: flex-start; }
.support-msg.user { align-self: flex-end; align-items: flex-end; }
.support-bubble {
  padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; word-break: break-word;
}
.support-msg.agent .support-bubble {
  background: var(--bg-3); color: var(--silver); border-bottom-left-radius: 4px;
}
.support-msg.user .support-bubble {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dim)); color: #04121a;
  font-weight: 500; border-bottom-right-radius: 4px;
}
.support-time { font-size: 10px; color: var(--silver-dim); margin: 3px 4px 0; }

.support-input-row {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-top: 1px solid rgba(34, 211, 238, 0.15); background: var(--bg-2);
}
.support-input-row input {
  flex: 1; padding: 10px 14px; border-radius: 999px; border: 1px solid rgba(201,210,227,0.15);
  background: var(--bg-1); color: #fff; font-size: 14px; outline: none;
}
.support-input-row input:focus { border-color: var(--cyan); }
.support-send {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dim));
  display: flex; align-items: center; justify-content: center;
}
.support-send svg { width: 20px; height: 20px; fill: none; stroke: #04121a; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.support-send:hover { filter: brightness(1.1); }

/* RTL: mirror the send icon and swap message sides feel */
body.lang-ar .support-send svg { transform: scaleX(-1); }

/* Support preview bubble (shown before the chat box is opened) */
.support-teaser {
  position: fixed; right: 16px; bottom: 156px; z-index: 46;
  width: min(300px, calc(100vw - 90px));
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg-2); border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 16px; border-bottom-right-radius: 4px; padding: 12px 12px 12px 12px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.55);
  opacity: 0; transform: translateY(14px) scale(0.94); pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease; cursor: pointer;
}
.support-teaser.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; animation: teaserPop 0.4s ease; }
@keyframes teaserPop { 0% { transform: translateY(14px) scale(0.9); } 60% { transform: translateY(-2px) scale(1.02); } 100% { transform: translateY(0) scale(1); } }
.support-teaser-img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--cyan); flex: none; }
.support-teaser-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.support-teaser-name { font-weight: 700; font-size: 13px; color: var(--cyan); }
.support-teaser-text {
  font-size: 13px; color: var(--silver); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.support-teaser-cta { font-size: 11px; color: var(--silver-dim); margin-top: 3px; font-weight: 600; }
.support-teaser-close {
  position: absolute; top: 6px; right: 8px;
  background: none; border: none; color: var(--silver-dim); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.support-teaser-close:hover { color: var(--silver); }
body.lang-ar .support-teaser { border-bottom-right-radius: 16px; border-bottom-left-radius: 4px; }

/* Telegram handoff panel (shown in the support widget when agent sets Telegram mode) */
.tg-panel {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 20px;
}
.tg-logo {
  width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #37bbfe, #229ED9);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(34, 158, 217, 0.45);
  animation: tgFloat 2.6s ease-in-out infinite;
}
@keyframes tgFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.tg-logo svg { width: 46px; height: 46px; fill: #fff; margin-right: 3px; }
.tg-title { font-size: 17px; font-weight: 800; color: var(--silver); }
.tg-open-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
  padding: 12px 24px; border-radius: 999px; text-decoration: none;
  background: linear-gradient(135deg, #37bbfe, #229ED9); color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 6px 18px rgba(34, 158, 217, 0.4);
}
.tg-open-btn svg { width: 20px; height: 20px; fill: #fff; }
.tg-open-btn:hover { filter: brightness(1.07); }

/* Clear-notifications header + clear-chat icon */
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notif-clear {
  background: none; border: none; cursor: pointer; font-size: 12px; font-weight: 700;
  color: var(--cyan); padding: 2px 4px;
}
.notif-clear:hover { text-decoration: underline; }
.support-clear {
  background: none; border: none; cursor: pointer; padding: 2px; margin-inline-start: auto;
  display: flex; align-items: center;
}
.support-clear svg { width: 19px; height: 19px; fill: none; stroke: var(--silver-dim); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.support-clear:hover svg { stroke: var(--red); }
/* keep the close button from being pushed by the auto-margin above */
.support-chat-head .support-close { margin-inline-start: 4px; }
