/* =====================================================================
   Premium Aura — design system
   Light (default) + premium dark theme via CSS variables.
   Mobile-first: bottom navigation < 992px, sidebar layout ≥ 992px.
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #2563eb;
  --accent: #7c3aed;
  --background: #f4f7fe;
  --surface: #ffffff;
  --card: #ffffff;
  --card-2: #f8faff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e6ebf5;
  --shadow: 0 10px 30px rgba(30, 64, 175, .08);
  --shadow-lg: 0 24px 60px rgba(30, 64, 175, .16);
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;
  --glass: rgba(255, 255, 255, .72);
  --overlay: rgba(15, 23, 42, .45);
  --grad: linear-gradient(135deg, var(--primary), var(--accent));
  --grad-soft: linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, transparent), color-mix(in srgb, var(--accent) 12%, transparent));
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --header-h: 68px;
  --bottom-h: 72px;
  --sidebar-w: 264px;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --background: #060a18;
  --surface: #0b1226;
  --card: #0f1730;
  --card-2: #131d3b;
  --text: #e6ecff;
  --muted: #8d9bc2;
  --border: #1d2a50;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 0 0 1px rgba(59, 130, 246, .06);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5), 0 0 40px rgba(59, 130, 246, .12);
  --glass: rgba(11, 18, 38, .72);
  --overlay: rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--background);
  -webkit-font-smoothing: antialiased; min-height: calc(100vh / var(--z, 1)); overflow-x: hidden;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
[data-theme="dark"] body { background: radial-gradient(1200px 600px at 10% -10%, rgba(37, 99, 235, .18), transparent 60%), radial-gradient(900px 500px at 110% 10%, rgba(124, 58, 237, .14), transparent 60%), var(--background); background-attachment: fixed; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 600; }
h1 { font-size: 24px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); } .center { text-align: center; } .small { font-size: 12px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }

/* ----------------------------------------------------------------- layout */
.app { min-height: calc(100vh / var(--z, 1)); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 60; transform: translateX(-100%); transition: transform .3s var(--ease);
  padding: 18px 14px; overflow-y: auto; overscroll-behavior: contain;
}
.sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
.sidebar .brand { padding: 4px 8px 18px; }
.nav-section { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 16px 12px 6px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; color: var(--text); font-weight: 500;
  transition: background .2s, color .2s, transform .15s; margin-bottom: 2px; position: relative;
}
.nav-link i { width: 20px; text-align: center; color: var(--muted); font-size: 16px; transition: color .2s; }
.nav-link:hover { background: var(--card-2); }
.nav-link.active { background: var(--grad); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 35%, transparent); }
.nav-link.active i { color: #fff; }
.nav-link .count { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.sidebar-foot { margin-top: auto; padding-top: 16px; }
.sidebar-stats { background: var(--card-2); border-radius: var(--radius); padding: 12px; margin: 12px 4px; }
.sidebar-stats .row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }

.scrim { position: fixed; inset: 0; background: var(--overlay); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .3s; backdrop-filter: blur(2px); }
.scrim.show { opacity: 1; pointer-events: auto; }

.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--header-h); display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: var(--glass); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.topbar .search { flex: 1; max-width: 420px; display: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; display: inline-grid; place-items: center; border: 0; background: transparent; cursor: pointer;
  position: relative; color: var(--text); font-size: 18px; transition: background .2s, transform .1s;
}
.icon-btn:hover { background: var(--card-2); }
.icon-btn:active { transform: scale(.94); }
.badge-dot {
  position: absolute; top: 5px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger);
  color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--surface);
}
.badge-dot.pop { animation: pop .4s var(--ease); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 600; display: grid; place-items: center;
  font-size: 17px; flex: none; box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 35%, transparent);
}
.avatar.lg { width: 76px; height: 76px; font-size: 32px; }
.profile-chip { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; padding: 4px; border-radius: 16px; }
.profile-chip .meta { display: none; text-align: left; line-height: 1.2; }
.profile-chip .meta small { color: var(--success); font-size: 11px; }

.main { padding: 16px 16px calc(var(--bottom-h) + 24px + env(safe-area-inset-bottom)); max-width: 1320px; margin: 0 auto; }
.view { animation: viewIn .35s var(--ease); }
.page-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.page-head .ph-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-soft); color: var(--primary); font-size: 20px; flex: none; }
.page-head h1 { font-size: 20px; margin: 0; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; }

/* bottom navigation */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--glass); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--border); box-shadow: 0 -8px 30px rgba(15, 23, 42, .06);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 500;
  position: relative; transition: color .2s; -webkit-tap-highlight-color: transparent;
}
.bottom-nav a i { font-size: 20px; transition: transform .25s var(--ease); }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a.active i { transform: translateY(-2px) scale(1.1); }
.bottom-nav a.active::before {
  content: ''; position: absolute; top: 8px; width: 46px; height: 34px; border-radius: 14px; background: var(--grad-soft); z-index: -1;
}
.bottom-nav a:active i { transform: scale(.85); }

/* ----------------------------------------------------------------- brand */
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 18px; flex: none;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 35%, transparent); overflow: hidden;
}
.brand-mark.sm { width: 36px; height: 36px; font-size: 15px; border-radius: 11px; }
.brand-mark img, .brand-logo { width: 100%; height: 100%; object-fit: cover; }
.brand-logo { width: 42px; height: 42px; border-radius: 13px; object-fit: contain; flex: none; }
.brand strong { display: block; font-size: 17px; font-weight: 600; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: block; font-size: 11px; color: var(--muted); margin-top: -2px; white-space: nowrap; }

/* ----------------------------------------------------------------- cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; }
.card-head .link, .card-head .actions { margin-left: auto; font-size: 13px; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.grid { display: grid; gap: 14px; }
.grid > *, .stack > * { min-width: 0; }
.grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: minmax(0, 1fr); }
.stack { display: grid; gap: 16px; }
.row-flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.stat-card { display: flex; gap: 12px; align-items: center; padding: 14px; position: relative; overflow: hidden; }
.stat-card .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; color: #fff; flex: none; background: var(--grad); }
.stat-card .ic.green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.stat-card .ic.orange { background: linear-gradient(135deg, #f59e0b, #f97316); }
.stat-card .ic.purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.stat-card .ic.cyan { background: linear-gradient(135deg, #06b6d4, #0284c7); }
.stat-card .label { color: var(--muted); font-size: 12px; }
.stat-card .value { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.stat-card .value small { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat-card .sub { font-size: 11px; color: var(--success); font-weight: 500; }
.stat-card::after { content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--grad-soft); }

.hero-card { background: var(--grad); color: #fff; border: 0; position: relative; overflow: hidden; }
.hero-card::before { content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -60px; top: -80px; background: rgba(255, 255, 255, .12); }
.hero-card::after { content: ''; position: absolute; width: 160px; height: 160px; border-radius: 50%; right: 60px; bottom: -90px; background: rgba(255, 255, 255, .08); }
.hero-card > * { position: relative; z-index: 1; }
.hero-card .muted { color: rgba(255, 255, 255, .8); }

.chart-card { background: linear-gradient(160deg, #1e3a8a, #312e81 60%, #4c1d95); color: #e0e7ff; border: 0; }
[data-theme="dark"] .chart-card { background: linear-gradient(160deg, #0b1b4d, #1b1650 60%, #2a1257); }
.chart-card .card-head h2 { color: #fff; }
.chart-wrap { position: relative; height: 240px; }

/* quick app grid (mobile) */
.app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.app-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--border);
  color: var(--text); font-size: 11px; font-weight: 500; text-align: center; box-shadow: var(--shadow); transition: transform .15s;
}
.app-tile:active { transform: scale(.95); }
.app-tile .t-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 19px; color: #fff; background: var(--grad); }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 13px; letter-spacing: .01em; border: 1px solid transparent;
  font-weight: 500; font-size: 14px; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s, opacity .2s; white-space: nowrap;
  -webkit-tap-highlight-color: transparent; user-select: none; text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.loading { opacity: .6; pointer-events: none; }
.btn.loading::after { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn-primary:hover { box-shadow: 0 14px 30px color-mix(in srgb, var(--primary) 40%, transparent); }
.btn-soft { background: var(--grad-soft); color: var(--primary); }
.btn-ghost { background: var(--card-2); color: var(--text); border-color: var(--border); }
.btn-danger { background: linear-gradient(135deg, #f87171, #dc2626); color: #fff; }
.btn-success { background: linear-gradient(135deg, #34d399, #059669); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1f1300; }
.btn-white { background: #fff; color: var(--primary); }
.btn-sm { min-height: 34px; padding: 0 15px; font-size: 13px; border-radius: 11px; }
.btn-xs { min-height: 30px; padding: 0 10px; font-size: 12px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; min-height: 38px; padding: 0; border-radius: 11px; }

/* ----------------------------------------------------------------- forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 500; }
.field .hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--card-2);
  transition: border-color .2s, box-shadow .2s, background .2s; font-size: 15px;
}
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent); background: var(--card); }
.input-group { position: relative; }
.input-group > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-group .input { padding-left: 42px; }
.input-group .suffix { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 46px; height: 26px; border-radius: 99px; background: var(--border); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.switch input:checked + .track { background: var(--grad); }
.switch input:checked + .track::after { transform: translateX(20px); }
.form-grid { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
.search-box { position: relative; }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box .input { padding-left: 40px; min-height: 42px; border-radius: 99px; font-size: 14px; }

/* ----------------------------------------------------------------- chips / tabs / pills */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 500; background: var(--card-2); color: var(--muted); border: 1px solid var(--border); text-transform: capitalize; white-space: nowrap; }
.chip.success, .chip.received, .chip.approved, .chip.paid, .chip.active, .chip.online, .chip.available, .chip.completed, .chip.published { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); border-color: transparent; }
.chip.warning, .chip.pending, .chip.waiting_admin, .chip.maintenance, .chip.draft, .chip.unknown { background: color-mix(in srgb, var(--warning) 15%, transparent); color: #b45309; border-color: transparent; }
[data-theme="dark"] .chip.warning, [data-theme="dark"] .chip.pending, [data-theme="dark"] .chip.waiting_admin, [data-theme="dark"] .chip.draft, [data-theme="dark"] .chip.unknown { color: #fbbf24; }
.chip.danger, .chip.rejected, .chip.suspended, .chip.expired, .chip.error, .chip.offline, .chip.failed, .chip.disabled, .chip.inactive, .chip.reversed { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); border-color: transparent; }
.chip.info, .chip.assigned, .chip.admin, .chip.retired, .chip.released { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); border-color: transparent; }
.chip.demo { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; border: 0; letter-spacing: .06em; text-transform: uppercase; }
.chip.live { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); border: 0; }
.chip.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 8px 16px; border-radius: 99px; border: 1px solid var(--border); background: var(--card); font-weight: 500; font-size: 13px; cursor: pointer; white-space: nowrap; color: var(--text); transition: all .2s; }
.tab.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 30%, transparent); }

/* ----------------------------------------------------------------- lists */
.list { display: grid; gap: 2px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--border); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-end { text-align: right; flex: none; }
.li-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; font-size: 18px; color: #fff; background: var(--grad); }
.li-ic.event { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.li-ic.resource { background: linear-gradient(135deg, #22c55e, #15803d); }
.li-ic.premium { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.li-ic.payment, .li-ic.post, .li-ic.announcement { background: linear-gradient(135deg, #f87171, #e11d48); }
.li-ic.withdrawal { background: linear-gradient(135deg, #34d399, #059669); }
.li-ic.system, .li-ic.service { background: linear-gradient(135deg, #818cf8, #6366f1); }

/* app icon badges */
.app-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; color: #fff; font-size: 16px; flex: none; font-weight: 700; }
.app-ic.lg { width: 44px; height: 44px; font-size: 20px; border-radius: 13px; }
.app-ic.sm { width: 26px; height: 26px; font-size: 12px; border-radius: 8px; }
.app-ic .txt { font-size: 10px; letter-spacing: -.02em; }
.flag { width: 30px; height: 30px; border-radius: 50%; background-size: cover; background-position: center; flex: none; box-shadow: 0 0 0 2px var(--card), 0 2px 6px rgba(0, 0, 0, .15); }
.flag.fi { width: 30px; line-height: 30px; }

/* service cards */
.service-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
.service-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s; }
.service-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.service-card .sc-codes { font-weight: 600; font-size: 15px; display: flex; gap: 6px; align-items: center; }
.service-card .sc-name { font-size: 12px; color: var(--muted); }
.service-card .sc-count { font-weight: 600; color: var(--primary); font-size: 16px; }
.service-card .sc-body { flex: 1; min-width: 0; }
.service-card .sc-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* OTP feed */
.otp-list { display: grid; gap: 8px; }
.otp-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--card-2);
  border: 1px solid var(--border);
}
.otp-row.new { animation: slideIn .5s var(--ease); }
.otp-row .otp-meta { min-width: 0; }
.otp-row .otp-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.otp-row .otp-short { font-weight: 600; font-size: 13px; color: var(--muted); }
.otp-row .otp-code { font-size: 20px; font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.otp-row .otp-time { font-size: 11px; color: var(--muted); }
.otp-row .otp-end { display: flex; align-items: center; gap: 8px; }
.copy-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); cursor: pointer; display: grid; place-items: center; color: var(--muted); transition: all .2s; }
.copy-btn:hover { color: var(--primary); border-color: var(--primary); }
.copy-btn.done { background: var(--success); color: #fff; border-color: var(--success); }

/* tables → cards on mobile */
.table-wrap { width: 100%; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 13px; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--card-2); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.truncate { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 767.98px) {
  table.table.responsive thead { display: none; }
  table.table.responsive, table.table.responsive tbody, table.table.responsive tr, table.table.responsive td { display: block; width: 100%; }
  table.table.responsive tr { border: 1px solid var(--border); border-radius: 16px; margin-bottom: 10px; padding: 8px 12px; background: var(--card-2); }
  table.table.responsive td { border: 0; padding: 6px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.table.responsive td::before { content: attr(data-label); font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; text-align: left; flex: none; }
  table.table.responsive td.actions { justify-content: flex-end; }
  table.table.responsive td.actions::before { content: none; }
  .truncate { max-width: 160px; }
}

/* pagination */
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.pagination button { min-width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border); background: var(--card); cursor: pointer; font-weight: 500; font-size: 13px; }
.pagination button.active { background: var(--grad); color: #fff; border-color: transparent; }
.pagination button:disabled { opacity: .4; cursor: default; }
.pagination .gap { color: var(--muted); padding: 0 4px; }

/* ----------------------------------------------------------------- news */
.news-card { padding: 0; overflow: hidden; }
.news-card .news-inner { padding: 16px; }
.news-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.news-head strong { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.news-head small { color: var(--muted); font-size: 12px; display: block; }
.news-head .chip { margin-left: auto; }
.verified { color: #1d9bf0; animation: verifiedPulse 2.4s ease-in-out infinite; display: inline-block; }
.news-card h3 { font-size: 16px; margin-bottom: 6px; }
.news-body { color: var(--text); font-size: 14px; overflow-wrap: anywhere; }
.news-body img { border-radius: 12px; margin: 10px 0; }
.news-body a { text-decoration: underline; }
.news-image { width: 100%; max-height: 360px; object-fit: cover; border-radius: 14px; margin-bottom: 12px; background: var(--card-2); }
.news-actions { display: flex; gap: 6px; border-top: 1px solid var(--border); padding: 8px 10px; }
.news-actions button { flex: 1; min-height: 42px; border: 0; background: none; border-radius: 12px; cursor: pointer; color: var(--muted); font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; }
.news-actions button:hover { background: var(--card-2); }
.news-actions button.liked { color: #e11d48; }
.news-actions button.liked i { animation: heart .45s var(--ease); }
.demo-tag { font-size: 9px; font-weight: 600; background: #f59e0b; color: #fff; padding: 1px 5px; border-radius: 6px; letter-spacing: .04em; }
.news-icons { display: flex; gap: 6px; margin: 8px 0; }
.news-body.clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.article-wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; }
.article-brand { margin-bottom: 20px; }
.article h1 { font-size: 26px; }
.article { padding: 22px; }

/* ----------------------------------------------------------------- payment */
.plan-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plan-card { position: relative; text-align: center; padding: 18px 12px; border-radius: var(--radius); background: var(--card); border: 2px solid var(--border); cursor: pointer; transition: all .2s var(--ease); }
.plan-card:hover { transform: translateY(-3px); }
.plan-card.selected { border-color: var(--primary); box-shadow: 0 12px 30px color-mix(in srgb, var(--primary) 25%, transparent); }
.plan-card.featured::before { content: 'Best value'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font-size: 10px; padding: 2px 10px; border-radius: 99px; font-weight: 500; }
.plan-card .price { font-size: 28px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan-card .dur { font-weight: 500; }
.plan-card .lim { font-size: 12px; color: var(--muted); }
.pay-method { display: grid; gap: 10px; justify-items: center; text-align: center; }
.qr { width: 170px; height: 170px; border-radius: 14px; background: #fff; padding: 8px; border: 1px solid var(--border); }
.address-box { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; background: var(--card-2); border: 1px dashed var(--border); border-radius: 12px; padding: 10px; width: 100%; }
.binance-logo { color: #f0b90b; font-size: 22px; }
.upgrade-banner { background: linear-gradient(135deg, #1e3a8a, #6d28d9); color: #fff; border-radius: var(--radius); padding: 18px; display: flex; align-items: center; gap: 14px; border: 0; }
.upgrade-banner .crown { font-size: 34px; color: #fbbf24; filter: drop-shadow(0 4px 10px rgba(251, 191, 36, .5)); animation: float 3s ease-in-out infinite; }
.dropzone { display: block; border: 2px dashed var(--border); border-radius: var(--radius); padding: 18px; text-align: center; cursor: pointer; transition: all .2s; background: var(--card-2); }
.dropzone.drag, .dropzone:hover { border-color: var(--primary); background: var(--grad-soft); }
.dropzone img { max-height: 160px; margin: 8px auto 0; border-radius: 10px; }

/* progress */
.progress { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--grad); border-radius: inherit; transition: width .8s var(--ease); }

/* ----------------------------------------------------------------- overlays */
.toast-stack { position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top)); display: grid; gap: 8px; width: min(420px, calc(100% - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: toastIn .35s var(--ease); font-weight: 500; }
.toast i { font-size: 18px; }
.toast.success i { color: var(--success); } .toast.error i { color: var(--danger); } .toast.info i { color: var(--primary); } .toast.warning i { color: var(--warning); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }

.sheet-backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: 150; opacity: 0; transition: opacity .25s; backdrop-filter: blur(3px); }
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; z-index: 160; left: 0; right: 0; bottom: 0; max-height: calc(92vh / var(--z, 1)); overflow-y: auto; background: var(--surface); border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .35s var(--ease); box-shadow: var(--shadow-lg);
  overscroll-behavior: contain;
}
.sheet.show { transform: none; }
.sheet .grabber { width: 44px; height: 5px; border-radius: 99px; background: var(--border); margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; font-size: 17px; }
.sheet-head .icon-btn { margin-left: auto; width: 36px; height: 36px; }
.sheet-foot { display: flex; gap: 10px; margin-top: 16px; }
.sheet-foot .btn { flex: 1; }

.popover { position: fixed; z-index: 120; right: 12px; top: calc(var(--header-h) + 6px); width: min(380px, calc(100% - 24px)); max-height: calc(70vh / var(--z, 1)); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 8px; animation: popIn .2s var(--ease); }
.popover .pop-head { display: flex; align-items: center; padding: 8px 10px; }
.popover .pop-head h3 { margin: 0; font-size: 15px; }
.popover .pop-head button { margin-left: auto; }
.notif-item { display: flex; gap: 10px; padding: 10px; border-radius: 14px; cursor: pointer; }
.notif-item:hover { background: var(--card-2); }
.notif-item.unread { background: var(--grad-soft); }
.notif-item .li-ic { width: 38px; height: 38px; font-size: 15px; }
.notif-item .n-title { font-weight: 500; font-size: 13px; }
.notif-item .n-body { font-size: 12px; color: var(--muted); }
.notif-item .n-time { font-size: 11px; color: var(--muted); }

.search-pop { position: fixed; z-index: 170; left: 50%; top: 30%; transform: translate(-50%, -50%); background: var(--grad); color: #fff; border-radius: 18px; padding: 14px 20px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; font-weight: 500; animation: popIn .3s var(--ease); }

/* skeleton */
.skeleton { position: relative; overflow: hidden; background: var(--card-2); border-radius: 12px; }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 6%, transparent), transparent); animation: shimmer 1.3s infinite; }
.sk-line { height: 14px; margin: 8px 0; } .sk-title { height: 22px; width: 40%; margin-bottom: 16px; } .sk-card { height: 96px; border-radius: var(--radius); } .sk-block { height: 240px; border-radius: var(--radius); }

.empty { text-align: center; padding: 30px 12px; color: var(--muted); }
.empty i { font-size: 36px; margin-bottom: 10px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.code-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.code-list code { background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px; text-align: center; font-weight: 500; letter-spacing: .05em; }
.theme-toggle { display: inline-flex; background: var(--card-2); border: 1px solid var(--border); border-radius: 99px; padding: 4px; gap: 4px; }
.theme-toggle button { border: 0; background: transparent; border-radius: 99px; padding: 8px 14px; cursor: pointer; font-size: 13px; font-weight: 500; display: flex; gap: 6px; align-items: center; color: var(--muted); }
.theme-toggle button.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.install-banner { display: flex; gap: 12px; align-items: center; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 1.6s infinite; }
.conn-state { font-size: 11px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.conn-state.off .live-dot { background: var(--warning); animation: none; }
.footer-note { text-align: center; font-size: 12px; color: var(--muted); padding: 20px 0 0; }

/* ----------------------------------------------------------------- auth screens */
.auth-page { min-height: calc(100vh / var(--z, 1)); display: grid; place-items: center; padding: 20px 16px; background: var(--login-bg, none) center / cover no-repeat, var(--background); }
[data-theme="dark"] .auth-page { background: var(--login-bg, none) center / cover no-repeat, radial-gradient(900px 500px at 0% 0%, rgba(37, 99, 235, .25), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(124, 58, 237, .2), transparent 60%), var(--background); }
.auth-card { width: 100%; max-width: 430px; padding: 28px 22px; border-radius: var(--radius-lg); background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.auth-card .brand { justify-content: center; margin-bottom: 18px; }
.auth-card .brand strong { font-size: 22px; }
.auth-card h1 { font-size: 20px; margin-bottom: 2px; }
.auth-card .sub { color: var(--muted); margin-bottom: 20px; font-size: 13px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 18px; font-size: 13px; }
.auth-foot { text-align: center; font-size: 13px; margin-top: 18px; color: var(--muted); }
.pw-toggle { border: 0; background: none; cursor: pointer; color: var(--muted); width: 40px; height: 40px; }
.alert { padding: 12px 14px; border-radius: 14px; font-size: 13px; margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert.success { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }
.alert.error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.alert.info { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.alert.warning { background: color-mix(in srgb, var(--warning) 14%, transparent); color: #b45309; }
.otp-input { letter-spacing: .5em; text-align: center; font-size: 22px; font-weight: 600; }

/* ----------------------------------------------------------------- responsive */
@media (min-width: 560px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.two { grid-template-columns: 1fr 1fr; }
  .code-list { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) {
  .main { padding: 24px 24px 40px; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sheet { left: 50%; right: auto; bottom: 50%; width: min(560px, calc(100% - 32px)); border-radius: 24px; transform: translate(-50%, 60%) scale(.96); opacity: 0; transition: transform .3s var(--ease), opacity .25s; }
  .sheet.show { transform: translate(-50%, 50%); opacity: 1; }
  .sheet .grabber { display: none; }
  .sheet.wide { width: min(860px, calc(100% - 32px)); }
  .topbar .search { display: block; }
  .profile-chip .meta { display: block; }
}
@media (min-width: 992px) {
  .sidebar { transform: none; }
  .scrim, .bottom-nav, .menu-btn, .mobile-only { display: none !important; }
  .content { margin-left: var(--sidebar-w); }
  .topbar { padding: 0 28px; }
  .topbar .brand { display: none; }
  .main { padding: 24px 28px 40px; }
  .grid-stats { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-grid.mobile-quick { display: none; }
}
@media (min-width: 1280px) { .service-grid.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991.98px) { .desktop-only { display: none !important; } }
@media (max-width: 380px) { .stat-card .value { font-size: 19px; } .app-grid { gap: 8px; } }

/* ----------------------------------------------------------------- animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-24px) scale(.98); background: color-mix(in srgb, var(--primary) 18%, var(--card-2)); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px) scale(.96); } }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes heart { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes verifiedPulse { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(29, 155, 240, 0)); } 50% { transform: scale(1.12); filter: drop-shadow(0 0 6px rgba(29, 155, 240, .6)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.code-pair { min-width: 56px; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.grid > .card + .card, .grid > * + .card { margin-top: 0; }

/* compact one-line rows (number list, admin users) */
.otp-number { font-size: 12px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 2px; }
.num-list, .row-list { display: grid; gap: 8px; }
.num-row, .user-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--border); min-width: 0; }
.num-row .flag { width: 26px; height: 26px; }
.num-row.is-returned { opacity: .6; }
.num-main, .user-main { flex: 1; min-width: 0; }
.num-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.num-value { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num-sub, .user-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-mini { width: 30px; height: 30px; flex: none; border-radius: 9px; border: 1px solid var(--border); background: var(--card); color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; font-size: 13px; }
.icon-mini:hover { color: var(--primary); border-color: var(--primary); }
.icon-mini.danger:hover { color: var(--danger); border-color: var(--danger); }
.icon-mini.done { background: var(--success); color: #fff; border-color: var(--success); }
.otp-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; border: 0; cursor: pointer; background: var(--grad); color: #fff; font-weight: 600; flex: none; }
.otp-pill.done { background: var(--success); }
.user-row .avatar { width: 34px; height: 34px; font-size: 14px; box-shadow: none; }
.user-title { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-bal { font-weight: 600; font-size: 13px; flex: none; }
@media (max-width: 420px) { .user-row .chip { display: none; } .num-row { gap: 8px; padding: 9px 10px; } }
.row-list > *, .num-list > * { min-width: 0; }
.service-grid > * { min-width: 0; } .service-card .sc-codes { min-width: 0; overflow: hidden; white-space: nowrap; } .service-card .sc-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* live activity */
.act-list { display: grid; gap: 10px; }
.act-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--border); min-width: 0; }
.act-row.new { animation: slideIn .5s var(--ease); }
.act-row .flag { width: 24px; height: 24px; }
.act-main { flex: 1; min-width: 0; }
.act-title { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-num { font-size: 12px; color: var(--muted); }
.act-end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.act-ok { font-size: 11px; font-weight: 500; color: var(--success); white-space: nowrap; }
.act-time { font-size: 11px; color: var(--muted); }
.activity-card { background: linear-gradient(180deg, color-mix(in srgb, var(--success) 6%, var(--card)), var(--card)); }
.hot-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11px; font-weight: 500; color: var(--primary); background: var(--grad-soft); border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.hot-badge.is-hot { color: #c2410c; background: color-mix(in srgb, #f97316 16%, transparent); }
[data-theme="dark"] .hot-badge.is-hot { color: #fdba74; }
/* payment method tabs */
.method-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.method-tab { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 14px; border: 2px solid var(--border); background: var(--card); cursor: pointer; font-weight: 500; font-size: 13px; color: var(--text); }
.method-tab.active { border-color: var(--primary); box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 20%, transparent); }
.pay-method[hidden] { display: none !important; }
.bn-logo { display: inline-flex; font-size: 20px; }
.bn-uid { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.btn-binance { background: #F0B90B; color: #1e2026; }
.btn-binance .bn-logo svg path { fill: #1e2026; }
.tether-mark { width: 24px; height: 24px; border-radius: 50%; background: #26a17b; color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; }
.plan-card.featured { padding-top: 24px; } .plan-card.featured::before { white-space: nowrap; top: -11px; }

/* access: service picker + get button */
.svc-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; max-height: 300px; overflow-y: auto; padding: 2px; }
.svc-tile { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 14px; border: 2px solid var(--border); background: var(--card-2); cursor: pointer; text-align: left; min-width: 0; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .1s; }
.svc-tile:active { transform: scale(.97); }
.svc-tile.selected { border-color: var(--primary); background: var(--card); box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 20%, transparent); }
.svc-tile.off { opacity: .5; cursor: not-allowed; }
.svc-icons { display: flex; align-items: center; flex: none; }
.svc-icons .flag { width: 28px; height: 28px; }
.svc-icons .app-ic { margin-left: -8px; box-shadow: 0 0 0 2px var(--card); }
.svc-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.svc-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-text small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-state { flex: none; }
.ok-dot, .off-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--success); }
.off-dot { background: var(--danger); }
.hot-dot { font-size: 14px; }
.get-btn { min-height: 52px; font-size: 15px; }
.num-row.flash { animation: rowFlash 1.4s var(--ease); }
@keyframes rowFlash { 0% { background: color-mix(in srgb, var(--success) 30%, var(--card-2)); transform: scale(1.02); } 100% { background: var(--card-2); transform: none; } }
@media (min-width: 560px) { .svc-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.num-sub { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.num-sub > span { overflow: hidden; text-overflow: ellipsis; }
.num-sub .otp-pill { padding: 3px 9px; font-size: 13px; }
.limits-line { margin: 0 0 10px; text-align: center; }

/* access: range dropdown + advanced search */
.access-stack { max-width: 760px; }
.range-select { position: relative; margin-bottom: 12px; }
.range-trigger { width: 100%; min-height: 62px; display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 16px; border: 2px solid var(--border); background: var(--card-2); cursor: pointer; color: var(--text); text-align: left; transition: border-color .15s, box-shadow .15s; }
.range-select.open .range-trigger, .range-trigger:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 14%, transparent); }
.range-current { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.range-placeholder { color: var(--muted); font-weight: 500; display: inline-flex; gap: 8px; align-items: center; }
.range-caret { color: var(--muted); transition: transform .2s; }
.range-select.open .range-caret { transform: rotate(180deg); }
.range-panel { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px; animation: popIn .18s var(--ease); }
.range-panel[hidden] { display: none; }
.range-search { position: relative; margin-bottom: 6px; }
.range-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.range-search input { width: 100%; min-height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--card-2); padding: 8px 12px 8px 34px; font-size: 14px; }
.range-search input:focus { outline: 0; border-color: var(--primary); }
.range-list { max-height: 260px; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 4px; }
.range-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; color: var(--text); text-align: left; }
.range-item:hover { background: var(--card-2); }
.range-item.selected { background: var(--grad-soft); }
.range-icons { display: flex; align-items: center; flex: none; }
.range-icons .flag { width: 32px; height: 32px; }
.range-icons .app-ic { margin-left: -9px; box-shadow: 0 0 0 2px var(--surface); }
.range-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.range-text strong { font-size: 15px; }
.range-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.range-check { color: var(--primary); }
.adv-search { margin-top: 14px; padding: 12px; border-radius: 16px; background: var(--grad-soft); }
.adv-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.adv-head i { color: var(--primary); }
.adv-head .small { margin-left: auto; }
.adv-form { display: flex; gap: 8px; }
.adv-form .input { flex: 1; min-height: 46px; background: var(--card); }
.limits-line { margin: 8px 0 0; }
.speed-tag { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 11px; font-weight: 500; color: #b45309; background: color-mix(in srgb, #f59e0b 15%, transparent); border-radius: 99px; padding: 2px 8px; }
[data-theme="dark"] .speed-tag { color: #fbbf24; }

.plan-card .speed-main { font-size: 22px; font-weight: 700; color: #c2410c; margin-top: 6px; }
.plan-card .speed-main small { font-size: 13px; font-weight: 500; color: var(--muted); }
.plan-card .speed-main i { color: #f59e0b; font-size: 16px; }
.plan-card .speed-sub { font-size: 12px; font-weight: 500; color: var(--muted); }
[data-theme="dark"] .plan-card .speed-main { color: #fdba74; }
.range-item.na { opacity: .55; cursor: not-allowed; }
.range-item.na .chip { flex: none; }
.act-code { font-size: 14px; font-weight: 700; color: var(--primary); white-space: nowrap; letter-spacing: .05em; border: 0; background: none; cursor: pointer; padding: 0; }
.act-code i { font-size: 11px; color: #f59e0b; }

/* pending approval screen */
.pending-box { text-align: center; }
.pending-icon { width: 72px; height: 72px; border-radius: 22px; margin: 4px auto 14px; display: grid; place-items: center; font-size: 30px; color: #fff; background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: 0 12px 30px rgba(249, 115, 22, .35); animation: float 3s ease-in-out infinite; }
.contact-card { text-align: left; padding: 14px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--border); margin-top: 6px; }
.contact-row { display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; font-size: 15px; }
.contact-row i { color: #25D366; font-size: 22px; }
.contact-row strong { margin-left: auto; }
.btn-wa { background: #25D366; color: #fff; box-shadow: 0 10px 22px rgba(37, 211, 102, .3); }

/* Sign in with Google */
.btn-google { background: var(--card); color: var(--text); border: 1px solid var(--border); gap: 10px; font-weight: 500; }
.btn-google:hover { background: var(--card-2); }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.lost-2fa { margin-top: 12px; }

/* OTP page rows (Live Activity style) */
.otp-item { padding: 10px 12px; }
.otp-item .flag { width: 30px; height: 30px; }
.otp-item .act-title .chip { font-size: 10px; padding: 1px 7px; vertical-align: middle; }
.otp-item .act-code { font-size: 18px; padding: 4px 10px; border-radius: 10px; background: color-mix(in srgb, var(--primary) 10%, transparent); transition: transform .15s var(--ease), background .2s; }
.otp-item .act-code:active { transform: scale(.94); }
.otp-item .act-code i { color: var(--primary); font-size: 12px; }
.act-end time { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* Admin · service cards */
.svc-card { background: var(--card-2); border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; display: grid; gap: 14px; }
.svc-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.svc-top .flag { width: 32px; height: 32px; }
.svc-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.svc-name strong { font-size: 15px; font-weight: 600; }
.svc-name span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.svc-stats > div { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; text-align: center; min-width: 0; }
.svc-stats b { display: block; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.svc-stats span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.svc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.svc-actions .btn { flex: 1 1 auto; }
.svc-actions .svc-del { flex: 0 0 auto; color: #dc2626; }
@media (min-width: 992px) { .row-list:has(.svc-card) { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; } }

/* Wider boxes on phones: less empty space left/right, more room inside */
@media (max-width: 991px) {
  .main { padding-left: 10px; padding-right: 10px; }
  .card { padding: 16px 14px; }
  .num-row { padding: 12px 12px; gap: 10px; }
}
.num-value { font-size: 16px; letter-spacing: .01em; }
.num-sub .chip { font-size: 11px; padding: 2px 8px; }

/* Slightly compact header and bottom menu on phones (normal-size text) */
@media (max-width: 991px) {
  :root { --header-h: 62px; --bottom-h: 66px; }
  .topbar { gap: 10px; padding: 0 14px; }
  .topbar .brand-mark, .topbar .brand-logo { width: 38px; height: 38px; border-radius: 12px; font-size: 16px; }
  .topbar .brand strong { font-size: 16px; }
  .icon-btn { width: 40px; height: 40px; font-size: 17px; }
  .avatar { width: 38px; height: 38px; font-size: 16px; }
  .bottom-nav a i { font-size: 19px; }
  .bottom-nav a.active::before { top: 7px; width: 44px; height: 31px; border-radius: 13px; }
}

/* Range count + chips under the Select Range box */
.range-count { flex: none; font-size: 11px; font-weight: 500; color: var(--primary); background: var(--grad-soft); padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.range-strip { margin: -2px 0 12px; }
.range-strip:empty { display: none; }
.strip-head { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.strip-head i { color: var(--primary); }
.strip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.strip-row::-webkit-scrollbar { display: none; }
.range-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border-radius: 99px; border: 1px solid var(--border); background: var(--card-2); color: var(--text); cursor: pointer; font-size: 13px; transition: border-color .15s, background .15s; }
.range-chip .flag { width: 24px; height: 24px; box-shadow: none; }
.range-chip b { font-weight: 500; white-space: nowrap; }
.range-chip .hot-dot { font-size: 11px; }
.range-chip.selected { border-color: var(--primary); background: var(--grad-soft); color: var(--primary); }

/* Settings · notification preferences */
.pref-list { display: grid; }
.pref-row { display: flex; align-items: center; gap: 14px; padding: 12px 2px; cursor: pointer; }
.pref-row + .pref-row { border-top: 1px solid var(--border); }
.pref-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 17px; flex: none; }
.pref-ic.blue { background: #e0e7ff; color: #2563eb; } .pref-ic.orange { background: #ffedd5; color: #ea580c; }
.pref-ic.green { background: #dcfce7; color: #16a34a; } .pref-ic.red { background: #fee2e2; color: #dc2626; } .pref-ic.purple { background: #ede9fe; color: #7c3aed; }
:root[data-theme="dark"] .pref-ic { background: var(--card-2); }
.pref-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.pref-text strong { font-weight: 600; font-size: 14px; }
.pref-text small { color: var(--muted); font-size: 12px; }
.pref-row .switch { flex: none; margin: 0; }

/* Install-app popup */
.install-pop { text-align: center; padding: 0 4px 4px; }
.install-icon { width: 76px; height: 76px; margin: -6px auto 12px; border-radius: 22px; overflow: hidden; box-shadow: 0 14px 30px color-mix(in srgb, var(--primary) 35%, transparent); }
.install-icon img { width: 100%; height: 100%; object-fit: cover; }
.install-pop h2 { margin: 0 0 4px; font-size: 19px; }
.install-pop p { margin: 0 0 14px; font-size: 13px; }
.install-points { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; text-align: left; }
.install-points li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); font-size: 13px; }
.install-points i { color: var(--primary); width: 18px; text-align: center; }
.install-ios { padding: 12px; border-radius: 12px; background: var(--grad-soft); color: var(--primary); font-size: 13px; }

/* Admin · notify panel */
.notify-panel { border: 1px solid var(--border); border-radius: 16px; padding: 12px; background: var(--card-2); margin-bottom: 14px; }
.notify-body .field:last-child { margin-bottom: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg input, .chk input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .chk span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); cursor: pointer; font-size: 13px; font-weight: 500; }
.seg input:checked + span, .chk input:checked + span { border-color: var(--primary); background: var(--grad-soft); color: var(--primary); }
.chk-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chk-row .chk { flex: 1 1 90px; position: relative; }
.picked { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.picked:empty { display: none; }
.pick-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 99px; background: var(--grad-soft); color: var(--primary); font-size: 12px; font-weight: 500; }
.pick-chip button { border: 0; background: rgba(255,255,255,.7); color: var(--primary); width: 18px; height: 18px; border-radius: 50%; cursor: pointer; line-height: 1; }
.user-pick-list { max-height: 240px; overflow-y: auto; margin-top: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; }
.pick-row + .pick-row { border-top: 1px solid var(--border); }
.pick-row input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.pick-row .avatar { width: 30px; height: 30px; font-size: 13px; box-shadow: none; }
.pick-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.pick-text strong { font-size: 13px; font-weight: 500; }
.pick-text small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Welcome popup cards */
.welcome-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--card-2); text-align: left; margin-bottom: 10px; }
.wc-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 18px; flex: none; color: #fff; background: var(--grad); }
.wc-ic.green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.wc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.wc-text strong { font-size: 14px; font-weight: 600; }
.wc-text small { font-size: 12px; color: var(--muted); }
.install-pop .install-ios { margin: -2px 0 10px; text-align: left; }
.card-flash { animation: cardFlash 1.6s var(--ease); }
@keyframes cardFlash { 0%, 60% { box-shadow: 0 0 0 3px var(--primary); } 100% { box-shadow: var(--shadow); } }

/* Access: tighter Get Number card so the number list stays close */
.access-stack { gap: 14px; }
.get-card .range-select { margin-bottom: 10px; }
.get-card .limits-line { margin: 8px 0 0; text-align: center; }
.adv-card .adv-search { margin: 0; padding: 0; background: none; }

/* Access · Advanced Search icon */
.adv-icon { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--primary); font-weight: 500; font-size: 13px; cursor: pointer; box-shadow: var(--shadow); }
.adv-icon i { font-size: 15px; }
.adv-icon:active { transform: scale(.96); }

/* ---------------------------------------------------------------- help bot */
.bot { position: fixed; right: 14px; bottom: calc(var(--bottom-h) + 14px + env(safe-area-inset-bottom)); z-index: 90; }
@media (min-width: 992px) { .bot { bottom: 22px; right: 22px; } }
.bot-fab { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; font-size: 22px; cursor: pointer; box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 45%, transparent); position: relative; transition: transform .2s var(--ease); }
.bot-fab:active { transform: scale(.92); }
.bot.open .bot-fab { transform: scale(.9) rotate(-8deg); }
.bot-dot { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
.bot-panel { position: absolute; right: 0; bottom: 66px; width: min(370px, calc(100vw / var(--z, 1) - 28px)); height: min(560px, calc(100vh / var(--z, 1) - var(--bottom-h) - var(--header-h) - 60px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: popIn .2s var(--ease); }
.bot-panel[hidden] { display: none; }
.bot-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--grad); color: #fff; }
.bot-avatar { width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 18px; flex: none; }
.bot-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.bot-title strong { font-weight: 600; font-size: 15px; }
.bot-title small { font-size: 11px; opacity: .9; display: flex; align-items: center; gap: 6px; }
.bot-online { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.3); display: inline-block; animation: pulse 2s infinite; }
.bot-human { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 99px; background: #25D366; color: #fff; font-size: 12px; font-weight: 500; text-decoration: none; flex: none; }
.bot-x { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 32px; height: 32px; border-radius: 10px; cursor: pointer; flex: none; }
.bot-msgs { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; background: var(--background); overscroll-behavior: contain; }
.bot-msg { display: flex; }
.bot-msg.from-me { justify-content: flex-end; }
.bot-bubble { max-width: 88%; padding: 10px 12px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; background: var(--card); border: 1px solid var(--border); color: var(--text); word-wrap: break-word; }
.bot-msg.from-bot .bot-bubble { border-top-left-radius: 6px; }
.bot-msg.from-me .bot-bubble { background: var(--grad); color: #fff; border: 0; border-top-right-radius: 6px; }
.bot-bubble ol, .bot-bubble ul { margin: 6px 0; padding-left: 18px; }
.bot-bubble li { margin: 2px 0; }
.bot-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.bot-act { display: inline-flex; align-items: center; gap: 6px; margin: 6px 6px 0 0; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--primary); background: var(--card); color: var(--primary); font-size: 12px; font-weight: 500; cursor: pointer; text-decoration: none; }
.bot-act.wa { border-color: #25D366; background: #25D366; color: #fff; }
.bot-quick .bot-act { margin: 0; }
.bot-note { font-size: 11.5px; color: var(--muted); margin: 6px 0 0; }
.bot-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.bot-chips span { padding: 3px 8px; border-radius: 99px; background: var(--grad-soft); color: var(--primary); font-size: 11.5px; font-weight: 500; }
.bot-chips span.off { background: var(--card-2); color: var(--muted); text-decoration: line-through; }
.bot-plans { display: grid; gap: 6px; margin: 8px 0; }
.bot-plans > div { display: grid; grid-template-columns: 1fr auto; padding: 8px 10px; border-radius: 12px; background: var(--card-2); }
.bot-plans span { font-weight: 600; color: var(--primary); }
.bot-plans small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.bot-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: var(--surface); }
.bot-input { flex: 1; min-width: 0; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--card-2); padding: 0 12px; font-size: 14px; color: var(--text); }
.bot-input:focus { outline: 0; border-color: var(--primary); }
.bot-send { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--grad); color: #fff; cursor: pointer; flex: none; }
.bot-msg.typing .bot-bubble { display: flex; gap: 4px; padding: 12px 14px; }
.bot-msg.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: botDot 1s infinite; }
.bot-msg.typing span:nth-child(2) { animation-delay: .15s; } .bot-msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes botDot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.bot-msg { min-width: 0; max-width: 100%; }
.bot-bubble { min-width: 0; overflow-wrap: anywhere; }
.bot-msg.from-bot .bot-bubble { max-width: 92%; }
.bot-plans > div { grid-template-columns: minmax(0, 1fr) auto; }
.bot-countries { display: grid; gap: 6px; margin: 8px 0; }
.bot-countries > div { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--card-2); }
.bot-countries .bot-flag { grid-row: 1 / 3; font-size: 22px; line-height: 1; }
.bot-countries b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-countries small { color: var(--muted); font-size: 11px; }
