/* ============================================
   SmsDireto — Digital Circuit Dark Theme
   Font: JetBrains Mono (display) + DM Sans (body)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  --bg-deep: #060d1b;
  --bg: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-light: #334155;
  --bg-surface-lighter: #475569;

  --cyan: #0ea5e9;
  --cyan-bright: #38bdf8;
  --cyan-dim: #0284c7;
  --cyan-glow: rgba(14, 165, 233, 0.25);
  --cyan-glow-strong: rgba(14, 165, 233, 0.45);

  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --success: #22c55e;
  --success-dim: #16a34a;
  --error: #ef4444;
  --error-dim: #dc2626;
  --warning: #f59e0b;

  --font-display: 'JetBrains Mono', 'Fira Code', monospace;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-card: 0 2px 12px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 20px var(--cyan-glow), 0 0 60px rgba(14,165,233,0.08);
  --shadow-glow-sm: 0 0 8px var(--cyan-glow);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);

  --container: 1140px;
  --header-h: 64px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a { color: var(--cyan-bright); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text); }

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

::selection { background: var(--cyan); color: var(--bg-deep); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- Utility ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

@media (min-width: 768px) { .container { padding: 0 32px; } }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--bg-surface-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-dim); }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(6, 13, 27, 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(14, 165, 233, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-dim) 100%);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--bg-deep);
  box-shadow: var(--shadow-glow-sm);
}

.logo span { color: var(--cyan-bright); }

#navAuth { display: flex; align-items: center; gap: 10px; }

.nav-user { display: flex; align-items: center; gap: 12px; }

.nav-balance {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--success);
  background: rgba(34, 197, 94, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--text); }
.nav-logout { color: var(--text-muted); }
.nav-logout:hover { color: var(--error); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-dim) 100%);
  color: var(--bg-deep);
  box-shadow: 0 2px 12px var(--cyan-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--cyan-bright) 0%, var(--cyan) 100%);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
  color: var(--bg-deep);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--bg-surface-light);
}
.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan-bright);
  background: rgba(14, 165, 233, 0.06);
}

.btn-sm { font-size: 0.8rem; padding: 6px 14px; border-radius: var(--radius-sm); }

.btn-success {
  background: var(--success);
  color: var(--bg-deep);
}
.btn-success:hover { background: var(--success-dim); }

.btn-danger {
  background: transparent;
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.1); border-color: var(--error); }

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.btn-icon:hover { color: var(--cyan-bright); background: var(--cyan-glow); }

.btn-buy {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  margin-top: 12px;
}

.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.input-field {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--bg-surface-light);
  border-radius: var(--radius);
  transition: all var(--transition);
  outline: none;
}
.input-field::placeholder { color: var(--text-muted); }
.input-field:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(14, 165, 233, 0.12) 0%, transparent 70%),
    radial-gradient(circle at 80% 80%, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* Circuit grid pattern */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  pointer-events: none;
}

/* Floating circuit nodes */
.hero-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-node {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow-strong);
  opacity: 0;
  animation: nodePulse 4s ease-in-out infinite;
}

.hero-node:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; }
.hero-node:nth-child(2) { top: 30%; right: 15%; animation-delay: 0.8s; }
.hero-node:nth-child(3) { bottom: 25%; left: 20%; animation-delay: 1.6s; }
.hero-node:nth-child(4) { top: 50%; right: 8%; animation-delay: 2.4s; }
.hero-node:nth-child(5) { bottom: 15%; right: 25%; animation-delay: 3.2s; }
.hero-node:nth-child(6) { top: 20%; left: 40%; animation-delay: 0.4s; }

@keyframes nodePulse {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 0.7; transform: scale(1); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--cyan-bright);
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 28px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: fadeSlideUp 0.6s ease-out both;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  animation: fadeSlideUp 0.6s ease-out 0.1s both;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--cyan-bright) 0%, #67e8f9 40%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeSlideUp 0.6s ease-out 0.2s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  animation: fadeSlideUp 0.6s ease-out 0.3s both;
}

.hero-cta .btn-primary {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 56px;
  animation: fadeSlideUp 0.6s ease-out 0.45s both;
}

.hero-stat {
  text-align: center;
}
.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SECTIONS — General
   ============================================ */
.section {
  padding: 80px 0;
  position: relative;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 48px;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  margin-top: 24px;
}

.section-label:first-child { margin-top: 0; }

/* ============================================
   HOW IT WORKS
   ============================================ */
.how-section { background: var(--bg-deep); }

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
}

.step-card {
  background: var(--bg);
  border: 1px solid rgba(14, 165, 233, 0.08);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: all var(--transition);
}
.step-card:hover {
  border-color: rgba(14, 165, 233, 0.2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-dim) 100%);
  color: var(--bg-deep);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-glow-sm);
}

.step-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.step-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   POPULAR SERVICES — Landing
   ============================================ */
.services-section { background: var(--bg); }

.popular-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 768px) { .popular-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

.popular-card {
  background: var(--bg-surface);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: default;
  transition: all var(--transition);
}
.popular-card:hover {
  border-color: rgba(14, 165, 233, 0.15);
  background: var(--bg-surface-light);
  transform: translateY(-2px);
}

.popular-icon { font-size: 2rem; margin-bottom: 10px; display: block; }
.popular-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.popular-price {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--cyan-bright);
}

/* ============================================
   FEATURES
   ============================================ */
.features-section { background: var(--bg-deep); }

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.feature-card {
  background: var(--bg);
  border: 1px solid rgba(14, 165, 233, 0.06);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all var(--transition);
}
.feature-card:hover {
  border-color: rgba(14, 165, 233, 0.15);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: rgba(14, 165, 233, 0.08);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================
   FAQ
   ============================================ */
.faq-section { background: var(--bg); }

.faq-list {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item.open { border-color: rgba(14, 165, 233, 0.2); }

.faq-question {
  width: 100%;
  background: var(--bg-surface);
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--bg-surface-light); }

.faq-chevron {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--cyan); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 0 20px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
}
.footer-logo span { color: var(--cyan-dim); }

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ============================================
   AUTH PAGE — Login / Register
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(ellipse 50% 40% at 50% 20%, rgba(14, 165, 233, 0.07) 0%, transparent 70%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: var(--shadow-card);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo a {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.auth-logo a span { color: var(--cyan-bright); }

.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 28px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.tab-btn.active {
  background: var(--bg-surface-light);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.tab-btn:hover:not(.active) { color: var(--text-secondary); }

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-form .btn-primary {
  width: 100%;
  padding: 13px;
  font-size: 0.95rem;
  margin-top: 4px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--error);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}
.auth-error.show { display: block; }

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-page {
  min-height: 100vh;
  padding-top: var(--header-h);
  background: var(--bg);
}

.dashboard-wrap {
  padding: 32px 20px 60px;
}

@media (min-width: 768px) { .dashboard-wrap { padding: 32px 32px 60px; } }
@media (min-width: 1024px) { .dashboard-wrap { padding: 32px 40px 60px; } }

/* ---- Balance Bar ---- */
.balance-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(14, 165, 233, 0.03) 100%);
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 24px;
}

.balance-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.balance-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.balance-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.balance-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.deposit-inline {
  display: flex;
  gap: 8px;
}

.deposit-inline .input-field {
  width: 110px;
}

.input-sm {
  padding: 8px 12px;
  font-size: 0.85rem;
}

/* ---- Active Activations Banner ---- */
.active-banner {
  background: var(--bg-surface);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
}

.active-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--warning);
  transition: background var(--transition);
  user-select: none;
}

.active-banner-header:hover {
  background: rgba(245, 158, 11, 0.05);
}

.active-banner-chevron {
  font-size: 0.7rem;
  transition: transform var(--transition);
}

.active-banner.collapsed .active-banner-chevron {
  transform: rotate(-90deg);
}

.active-banner-body {
  padding: 0 20px 20px;
}

.active-banner.collapsed .active-banner-body {
  display: none;
}

/* ---- Catalog Section ---- */
.catalog-section {
  margin-bottom: 32px;
}

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.catalog-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.catalog-search {
  flex: 0 1 280px;
}

/* ---- Category Tabs ---- */
.category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 20px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.cat-tab:hover {
  color: var(--text-secondary);
  border-color: rgba(14, 165, 233, 0.15);
}

.cat-tab.active {
  background: rgba(14, 165, 233, 0.1);
  color: var(--cyan-bright);
  border-color: var(--cyan);
}

/* ---- Service Catalog Grid ---- */
.service-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.svc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px 16px;
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  color: var(--text);
  text-align: center;
}

.svc-card:hover {
  border-color: rgba(14, 165, 233, 0.2);
  background: var(--bg-surface-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-sm);
}

.svc-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.svc-name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}

/* ---- Country Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 13, 27, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.country-modal-content {
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.modal-overlay.active .country-modal-content {
  transform: scale(1) translateY(0);
}

.country-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  flex-shrink: 0;
}

.country-modal-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.country-modal-search {
  padding: 0 24px 16px;
  flex-shrink: 0;
}

.country-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 20px;
  min-height: 200px;
}

.cm-section {
  margin-bottom: 16px;
}

.cm-section-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.cm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 6px;
}

.cm-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  font-size: inherit;
  color: var(--text);
}

.cm-card:hover {
  border-color: rgba(14, 165, 233, 0.2);
  background: var(--bg-surface-light);
}

.cm-card.selected {
  border-color: var(--cyan);
  background: rgba(14, 165, 233, 0.08);
  box-shadow: var(--shadow-glow-sm);
}

.cm-flag { font-size: 1.3rem; }
.cm-name { font-size: 0.65rem; color: var(--text-secondary); text-align: center; line-height: 1.2; }

/* ---- Buy Bar (modal footer) ---- */
.country-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: var(--bg-deep);
  flex-shrink: 0;
}

.buy-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.buy-bar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.buy-bar-country {
  font-size: 0.85rem;
  font-weight: 500;
}

.buy-bar-price {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cyan-bright);
  transition: color var(--transition);
}

.buy-bar-price.unavailable {
  color: var(--error);
  font-size: 0.9rem;
}

.buy-bar-qty {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.buy-bar .btn {
  min-width: 120px;
}

/* ---- History Section (Tabs) ---- */
.history-section {
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.history-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.history-tab {
  flex: 1;
  padding: 14px 20px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.history-tab.active {
  color: var(--cyan-bright);
  box-shadow: inset 0 -2px 0 var(--cyan);
}

.history-tab:hover:not(.active) {
  color: var(--text-secondary);
}

.history-content {
  padding: 20px;
}

/* ============================================
   ACTIVATION CARDS
   ============================================ */
.activation-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  transition: all var(--transition);
}

.activation-card.waiting {
  border-left: 3px solid var(--warning);
}

.activation-card.received {
  border-left: 3px solid var(--success);
  background: rgba(34, 197, 94, 0.04);
}

.activation-card.finished {
  border-left: 3px solid var(--text-muted);
  opacity: 0.7;
}

.act-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.act-service {
  font-weight: 600;
  font-size: 0.95rem;
}

.act-status {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.act-status.waiting {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}
.act-status.received {
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
}

.act-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.phone-number {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.act-code {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
}

.code-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.code-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--success);
  letter-spacing: 0.06em;
}

.act-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.act-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.act-timer {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--warning);
}

/* (Old country/service/price card styles removed — replaced by catalog + modal above) */

/* ============================================
   TRANSACTION ROWS
   ============================================ */
.tx-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.tx-row:last-child { border-bottom: none; }

.tx-info { display: flex; flex-direction: column; gap: 2px; }
.tx-reason { font-size: 0.88rem; font-weight: 500; }
.tx-date { font-size: 0.75rem; color: var(--text-muted); }

.tx-amount {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}
.tx-amount.positive { color: var(--success); }
.tx-amount.negative { color: var(--error); }

/* ============================================
   HISTORY ROWS
   ============================================ */
.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.history-row:last-child { border-bottom: none; }

.history-info { display: flex; flex-direction: column; gap: 2px; }
.history-service { font-weight: 500; font-size: 0.88rem; }
.history-phone { font-family: var(--font-display); font-size: 0.8rem; color: var(--text-secondary); }

.history-details {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.history-code {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cyan-bright);
}

.history-status {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-waiting_sms { background: rgba(245,158,11,0.12); color: var(--warning); }
.status-received    { background: rgba(34,197,94,0.12); color: var(--success); }
.status-finished    { background: rgba(148,163,184,0.12); color: var(--text-muted); }
.status-cancelled   { background: rgba(239,68,68,0.1); color: var(--error); }
.status-expired     { background: rgba(239,68,68,0.1); color: var(--error); }

.history-date { font-size: 0.75rem; color: var(--text-muted); }
.history-cost {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ============================================
   PIX MODAL
   ============================================ */
#pixModal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 13, 27, 0.85);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}
#pixModal.active {
  opacity: 1;
  pointer-events: all;
}

.pix-modal-content {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
#pixModal.active .pix-modal-content {
  transform: scale(1);
}

.pix-modal-header {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.pix-amount {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cyan-bright);
  margin-bottom: 24px;
}

.pix-qr {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  margin: 0 auto 20px;
  background: #fff;
  padding: 8px;
}

.pix-code-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.pix-code {
  flex: 1;
  font-family: var(--font-display);
  font-size: 0.7rem;
  padding: 10px;
  background: var(--bg-deep);
  border: 1px solid var(--bg-surface-light);
  color: var(--text);
  border-radius: var(--radius-sm);
  outline: none;
}

.pix-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.pix-status .loading-spinner-inline {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--bg-surface-light);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-surface);
  color: var(--text);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  z-index: 300;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  border: 1px solid rgba(255,255,255,0.06);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.toast.success { border-color: rgba(34, 197, 94, 0.3); }
.toast.error   { border-color: rgba(239, 68, 68, 0.3); }

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--bg-surface-light);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 32px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 28px 16px;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
  .hero { padding: 80px 0 60px; min-height: auto; }
  .hero-stats { gap: 20px; }
  .hero-stat-value { font-size: 1.2rem; }
  .section { padding: 56px 0; }
  .auth-card { padding: 28px 20px; }
  .history-details { justify-content: flex-end; }
  .act-phone { flex-wrap: wrap; }
  .phone-number { font-size: 1rem; }

  /* Dashboard mobile */
  .balance-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 16px;
  }
  .balance-bar-left { justify-content: center; }
  .balance-bar-right { justify-content: center; flex-wrap: wrap; }
  .deposit-inline { flex: 1; }
  .deposit-inline .input-field { flex: 1; width: auto; }

  .service-catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }
  .svc-card { padding: 16px 8px 12px; }
  .svc-icon { font-size: 1.5rem; }
  .svc-name { font-size: 0.72rem; }

  .country-modal-content {
    max-height: 95vh;
    border-radius: var(--radius-lg);
  }
  .cm-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }

  .buy-bar { flex-direction: column; text-align: center; gap: 12px; }
  .buy-bar .btn { width: 100%; }
}

@media (min-width: 768px) {
  .popular-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .container { padding: 0 40px; }
}

@media (min-width: 1200px) {
  :root { --container: 1140px; }
}
