/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0D1B3F;
  --bg2: #112249;
  --bg3: #162b58;
  --card: #112249;
  --card-hover: #1a3060;
  --border: #1e3a6e;
  --border-light: #2a4e8a;
  --purple: #6366f1;
  --purple-light: #818cf8;
  --purple-dark: #4f46e5;
  --green: #22c55e;
  --green-dark: #16a34a;
  --orange: #f97316;
  --red: #ef4444;
  --text: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,.4);
  --shadow-card: 0 2px 16px rgba(0,0,0,.3);
  --transition: .2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }

/* ===== NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,27,63,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.25rem; color: var(--text);
}
.nav-logo svg { color: var(--purple); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  color: var(--text-secondary); font-size: .875rem;
  padding: 8px 14px; border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--bg3); }
.nav-link.active { color: var(--text); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: .9375rem; font-weight: 600; cursor: pointer;
  border: none; outline: none; transition: all var(--transition);
  line-height: 1;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border-light); }
.btn-secondary:hover { background: var(--bg3); border-color: var(--purple); }
.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { background: var(--purple-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid transparent; }
.btn-ghost:hover { color: var(--text); background: var(--bg3); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: .8125rem; }
.btn-lg { padding: 16px 32px; font-size: 1.0625rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ===== CARDS ===== */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover { border-color: var(--border-light); box-shadow: var(--shadow-card); }
.card-highlight { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple), 0 8px 32px rgba(99,102,241,.15); }

/* ===== PLAN CARDS ===== */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.plan-card { cursor: pointer; position: relative; }
.plan-card.selected { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 8px 32px rgba(34,197,94,.1); }
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--orange); color: #fff; font-size: .75rem; font-weight: 700;
  padding: 4px 14px; border-radius: 20px; white-space: nowrap;
}
.plan-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.plan-desc { font-size: .875rem; color: var(--text-secondary); margin-bottom: 20px; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 24px; }
.plan-price .currency { font-size: 1rem; color: var(--text-secondary); margin-top: 6px; }
.plan-price .amount { font-size: 2.5rem; font-weight: 800; }
.plan-price .period { font-size: .875rem; color: var(--text-secondary); }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.plan-features li { display: flex; align-items: center; gap: 10px; font-size: .875rem; }
.plan-features li svg { color: var(--green); flex-shrink: 0; }

/* ===== FORMS ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: .875rem; font-weight: 600; color: var(--text-secondary); }
.form-input {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px;
  color: var(--text); font-size: .9375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.form-input.error { border-color: var(--red); }
.form-error { font-size: .8125rem; color: var(--red); }
.form-hint { font-size: .8125rem; color: var(--text-muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
select.form-input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
textarea.form-input { resize: vertical; min-height: 100px; }

/* ===== STEPS ===== */
.steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 48px;
}
.step-item { display: flex; align-items: center; gap: 0; }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8125rem; font-weight: 700;
  border: 2px solid var(--border); background: var(--bg2); color: var(--text-muted);
  transition: all var(--transition);
}
.step-item.active .step-circle { border-color: var(--purple); background: var(--purple); color: #fff; }
.step-item.done .step-circle { border-color: var(--green); background: var(--green); color: #fff; }
.step-label { font-size: .8125rem; color: var(--text-muted); margin-left: 8px; white-space: nowrap; }
.step-item.active .step-label, .step-item.done .step-label { color: var(--text-secondary); }
.step-line { width: 48px; height: 2px; background: var(--border); flex-shrink: 0; margin: 0 4px; }
.step-item.done + .step-item .step-line { background: var(--green); }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 20px; font-size: .75rem; font-weight: 600;
}
.badge-green { background: rgba(34,197,94,.12); color: var(--green); }
.badge-yellow { background: rgba(249,115,22,.12); color: var(--orange); }
.badge-red { background: rgba(239,68,68,.12); color: var(--red); }
.badge-purple { background: rgba(99,102,241,.12); color: var(--purple); }
.badge-gray { background: rgba(148,163,184,.1); color: var(--text-secondary); }

/* ===== ALERTS ===== */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: .9rem; display: flex; align-items: flex-start; gap: 10px;
}
.alert-info { background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.25); color: var(--purple-light); }
.alert-success { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.25); color: var(--green); }
.alert-error { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25); color: #fca5a5; }
.alert-warning { background: rgba(249,115,22,.1); border: 1px solid rgba(249,115,22,.25); color: var(--orange); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: all var(--transition);
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; width: 100%; max-width: 500px;
  transform: scale(.95); transition: transform var(--transition);
  max-height: 90vh; overflow-y: auto;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 4px; background: var(--bg2); padding: 4px; border-radius: var(--radius-sm); margin-bottom: 24px; }
.tab {
  flex: 1; text-align: center; padding: 10px; border-radius: 6px;
  font-size: .875rem; font-weight: 600; color: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
}
.tab.active { background: var(--bg3); color: var(--text); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== UPLOAD ZONE ===== */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 32px; text-align: center; cursor: pointer;
  transition: all var(--transition);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--purple); background: rgba(99,102,241,.05); }
.upload-zone-icon { font-size: 2rem; margin-bottom: 8px; }
.upload-zone-text { font-size: .875rem; color: var(--text-secondary); }
.upload-zone-hint { font-size: .8125rem; color: var(--text-muted); margin-top: 4px; }
.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.file-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg2); padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: .875rem;
}
.file-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item-size { color: var(--text-muted); font-size: .8125rem; flex-shrink: 0; }
.file-item-remove { color: var(--red); cursor: pointer; flex-shrink: 0; }

/* ===== STATS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: .8125rem; color: var(--text-secondary); margin-top: 4px; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th {
  background: var(--bg2); padding: 12px 16px; text-align: left;
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-secondary); white-space: nowrap;
}
td { padding: 14px 16px; border-top: 1px solid var(--border); }
tr:hover td { background: rgba(255,255,255,.02); }

/* ===== SIDEBAR LAYOUT ===== */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; background: var(--bg2);
  border-right: 1px solid var(--border); padding: 24px 16px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; padding: 8px 12px; margin-bottom: 16px; }
.sidebar-logo svg { color: var(--purple); }
.sidebar-section { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding: 16px 12px 6px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text-secondary);
  font-size: .875rem; font-weight: 500; cursor: pointer;
  transition: all var(--transition);
}
.sidebar-link:hover { background: var(--bg3); color: var(--text); }
.sidebar-link.active { background: rgba(99,102,241,.12); color: var(--purple-light); }
.sidebar-link svg { flex-shrink: 0; }
.sidebar-spacer { flex: 1; }
.main-content { flex: 1; padding: 32px; overflow-y: auto; }
.page-header { margin-bottom: 32px; }
.page-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.page-subtitle { color: var(--text-secondary); font-size: .9375rem; }

/* ===== PIX QR ===== */
.pix-box { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px; }
.pix-qr { background: #fff; padding: 16px; border-radius: 12px; }
.pix-copy {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: .8125rem; font-family: monospace;
  color: var(--text-secondary); width: 100%; text-align: center;
  cursor: pointer; word-break: break-all;
}
.pix-copy:hover { border-color: var(--purple); color: var(--text); }

/* ===== UTILS ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.text-small { font-size: .875rem; }
.text-xs { font-size: .8125rem; }
.gap-8 { gap: 8px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.w-full { width: 100%; }
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); }
.hidden { display: none !important; }
.spinner {
  width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.2);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .6s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-green { background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse 2s infinite; }
.dot-orange { background: var(--orange); }
.dot-red { background: var(--red); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* ===== HERO ===== */
.hero { padding: 80px 0 60px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.25);
  color: var(--purple-light); font-size: .8125rem; font-weight: 600;
  padding: 6px 16px; border-radius: 20px; margin-bottom: 24px;
}
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; line-height: 1.1; margin-bottom: 20px; }
.hero-title .accent-purple { color: var(--purple-light); }
.hero-title .accent-orange { color: var(--orange); }
.hero-desc { font-size: 1.125rem; color: var(--text-secondary); max-width: 580px; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .steps { overflow-x: auto; padding-bottom: 8px; justify-content: flex-start; }
  .step-line { width: 24px; }
  .sidebar { display: none; }
  .main-content { padding: 20px; }
  .plans-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
