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

:root {
  --bg:         #060610;
  --bg-2:       #0b0b1a;
  --bg-3:       #101026;
  --card:       #10102050;
  --card-solid: #101020;
  --border:     rgba(0, 180, 255, 0.14);
  --border-hi:  rgba(0, 200, 255, 0.4);
  --accent:     #0ea5e9;
  --accent-2:   #6366f1;
  --accent-3:   #38bdf8;
  --glow:       rgba(14, 165, 233, 0.3);
  --text:       #eef6ff;
  --text-2:     #94afc8;
  --text-3:     #445566;
  --success:    #10b981;
  --warning:    #f59e0b;
  --error:      #ef4444;
  --radius:     12px;
  --radius-lg:  20px;
  --font:       'Inter', system-ui, sans-serif;
  --mono:       'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p  { color: var(--text-2); }
a  { color: inherit; text-decoration: none; }

.container  { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 96px 0; }
.section-sm { padding: 64px 0; }

/* ─── Background ────────────────────────────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  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: 40px 40px;
}
.orb { position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(80px); opacity: 0.15; }
.orb-1 { width: 500px; height: 500px; background: var(--accent);   top: -150px; left: -100px; }
.orb-2 { width: 400px; height: 400px; background: var(--accent-2); bottom: 10%; right: -100px; }
.orb-3 { width: 300px; height: 300px; background: #06b6d4;         top: 50%;    left: 40%; }

/* ─── Navbar ────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 24px;
  background: rgba(6,6,16,0.75); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; }
.nav-logo .shield { margin-right: 6px; }
.nav-logo .hi { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.9rem; color: var(--text-2); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 4px; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: 8px; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; border: none; transition: all 0.2s; white-space: nowrap; font-family: var(--font);
}
.btn-primary { background: linear-gradient(135deg, var(--accent), #0077cc); color: #fff; box-shadow: 0 0 20px var(--glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 35px var(--glow), 0 8px 24px rgba(0,0,0,0.4); }
.btn-outline { background: transparent; color: var(--text-2); border: 1px solid var(--border); padding: 9px 21px; }
.btn-outline:hover { border-color: var(--border-hi); color: var(--text); background: rgba(14,165,233,0.07); }
.btn-ghost  { background: rgba(255,255,255,0.05); color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.09); color: var(--text); }
.btn-lg  { padding: 14px 32px; font-size: 1rem; border-radius: 10px; }
.btn-sm  { padding: 7px 16px; font-size: 0.82rem; }
.btn-success { background: linear-gradient(135deg, #059669, #047857); color: #fff; }
.btn-danger  { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #fff; }

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  backdrop-filter: blur(12px); transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--border-hi); box-shadow: 0 0 30px rgba(14,165,233,0.1); }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding: 160px 0 96px; position: relative; z-index: 1; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px;
  border-radius: 999px; font-size: 0.82rem; font-weight: 600;
  background: rgba(14,165,233,0.1); border: 1px solid rgba(14,165,233,0.3); color: var(--accent-3);
  margin-bottom: 24px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
.hero h1 { margin-bottom: 20px; }
.hero h1 .grad { background: linear-gradient(135deg, #fff 10%, var(--accent) 55%, var(--accent-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { font-size: 1.15rem; max-width: 560px; margin: 0 auto 40px; color: var(--text-2); }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 48px; justify-content: center; flex-wrap: wrap; margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--border); }
.stat { text-align: center; }
.stat-num   { font-size: 1.8rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: 0.82rem; color: var(--text-3); margin-top: 2px; }

/* ─── Section headers ────────────────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 56px; }
.section-label {
  display: inline-block; padding: 4px 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  background: rgba(14,165,233,0.1); border: 1px solid var(--border); color: var(--accent-3);
  margin-bottom: 14px;
}
.section-header p { max-width: 520px; margin: 12px auto 0; }

/* ─── Features ───────────────────────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature-card  { padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; }
.feature-icon  { font-size: 1.8rem; }
.feature-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.feature-desc  { font-size: 0.85rem; color: var(--text-2); line-height: 1.55; }

/* ─── Pricing ────────────────────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: start; }
.plan-card    { padding: 32px 28px; position: relative; }
.plan-card.highlighted { border-color: var(--accent); box-shadow: 0 0 40px rgba(14,165,233,0.18); background: linear-gradient(160deg, rgba(14,165,233,0.07), var(--card)); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 4px 16px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: linear-gradient(135deg, var(--accent), #0077cc); color: #fff; white-space: nowrap; }
.plan-name     { font-size: 1rem; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.plan-price    { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.plan-price .amount   { font-size: 2.6rem; font-weight: 800; color: var(--text); }
.plan-price .currency { font-size: 1.1rem; font-weight: 700; color: var(--text-2); align-self: flex-start; padding-top: 6px; }
.plan-price .period   { font-size: 0.85rem; color: var(--text-3); }
.plan-save     { font-size: 0.78rem; color: var(--success); font-weight: 600; margin-bottom: 6px; min-height: 1.2em; }
.plan-tagline  { font-size: 0.85rem; color: var(--text-2); margin-bottom: 24px; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.plan-features li { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--text-2); }
.plan-features li::before { content: '✓'; display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; background: rgba(16,185,129,0.15); color: var(--success); font-size: 0.7rem; font-weight: 700; }
.plan-cta { width: 100%; }

/* ─── Country preview ────────────────────────────────────────────────────── */
.countries-scroll { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.country-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 0.82rem; background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }

/* ─── Steps ──────────────────────────────────────────────────────────────── */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.step-card  { padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; }
.step-num   { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 800; background: rgba(14,165,233,0.12); color: var(--accent-3); border: 1px solid var(--border); }
.step-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.step-desc  { font-size: 0.88rem; color: var(--text-2); line-height: 1.6; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 48px 0 32px; }
.footer-inner { display: flex; gap: 32px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 40px; }
.footer-brand { max-width: 260px; }
.footer-brand p { font-size: 0.85rem; color: var(--text-3); margin-top: 10px; }
.footer-links h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 14px; font-weight: 600; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links li a { font-size: 0.88rem; color: var(--text-2); transition: color 0.2s; }
.footer-links li a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--text-3); }

/* ─── Order page ─────────────────────────────────────────────────────────── */
.order-page { min-height: 100vh; padding: 96px 0 64px; position: relative; z-index: 1; }
.order-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; align-items: start; }
.order-summary { padding: 32px; }
.summary-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 16px; font-weight: 600; }
.summary-plan  { font-size: 1.4rem; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.summary-price { font-size: 2rem; font-weight: 800; color: var(--accent-3); margin-bottom: 4px; }
.summary-save  { font-size: 0.82rem; color: var(--success); font-weight: 600; margin-bottom: 20px; }
.summary-country { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: rgba(14,165,233,0.07); border: 1px solid rgba(14,165,233,0.2); border-radius: 10px; margin-bottom: 20px; font-size: 0.9rem; color: var(--text); font-weight: 600; }

.order-form-card { padding: 32px; }

/* Duration selector */
.duration-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.duration-option { padding: 14px 10px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); cursor: pointer; text-align: center; transition: all 0.2s; user-select: none; }
.duration-option:hover { border-color: var(--border-hi); }
.duration-option.active { border-color: var(--accent); background: rgba(14,165,233,0.1); }
.duration-option .dur-name  { font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.duration-option .dur-price { font-size: 1.1rem; font-weight: 800; color: var(--accent-3); }
.duration-option .dur-save  { font-size: 0.72rem; color: var(--success); font-weight: 600; margin-top: 2px; min-height: 1em; }

/* Country search */
.country-search-wrap { position: relative; margin-bottom: 8px; }
.country-search-wrap .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 0.9rem; pointer-events: none; }
.form-input { width: 100%; padding: 11px 14px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text); font-family: var(--font); font-size: 0.9rem; transition: border-color 0.2s, box-shadow 0.2s; }
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,165,233,0.12); }
.form-input::placeholder { color: var(--text-3); }
.search-input { padding-left: 36px; }
.form-select { width: 100%; padding: 11px 14px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text); font-family: var(--font); font-size: 0.9rem; transition: border-color 0.2s; cursor: pointer; }
.form-select:focus { outline: none; border-color: var(--accent); }
.form-select option { background: var(--card-solid); color: var(--text); }

.country-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--card-solid); margin-bottom: 20px; display: none; }
.country-list.open { display: block; }
.country-item { padding: 10px 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.88rem; color: var(--text-2); transition: background 0.15s; }
.country-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.country-item.selected { background: rgba(14,165,233,0.1); color: var(--accent-3); }
.country-item .flag { font-size: 1.1rem; }
.country-selected-display { padding: 11px 14px; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text-3); font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: border-color 0.2s; }
.country-selected-display:hover { border-color: var(--border-hi); }
.country-selected-display.has-value { color: var(--text); }
.country-selected-display.has-value .flag-display { font-size: 1rem; margin-right: 8px; }

.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--text-2); }
.form-hint  { font-size: 0.78rem; color: var(--text-3); }
.divider    { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* Confirm */
.order-confirm { text-align: center; padding: 40px 20px; display: none; flex-direction: column; align-items: center; }
.order-confirm .check { font-size: 3rem; margin-bottom: 16px; }
.order-id { font-family: var(--mono); font-size: 0.9rem; color: var(--accent-3); margin: 12px 0; padding: 8px 16px; background: rgba(14,165,233,0.08); border: 1px solid rgba(14,165,233,0.2); border-radius: 6px; display: inline-block; }

/* ─── Admin ───────────────────────────────────────────────────────────────── */
.admin-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.login-card  { width: 100%; max-width: 400px; padding: 40px; }
.login-error { color: var(--error); font-size: 0.85rem; margin-bottom: 12px; display: none; }

.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex-shrink: 0; background: var(--bg-2); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; overflow-y: auto; }
.sidebar-logo { padding: 20px 20px 12px; font-size: 1.1rem; font-weight: 800; }
.sidebar-nav  { flex: 1; padding: 8px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 0.88rem; font-weight: 500; color: var(--text-2); transition: all 0.15s; margin-bottom: 2px; user-select: none; border: none; background: none; width: 100%; text-align: left; font-family: var(--font); }
.nav-item:hover  { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-item.active { background: rgba(14,165,233,0.12); color: var(--accent-3); }
.nav-item .icon  { width: 18px; text-align: center; }
.sidebar-footer  { padding: 12px 8px; border-top: 1px solid var(--border); }

.admin-main   { margin-left: 240px; flex: 1; padding: 32px; min-height: 100vh; }
.admin-header { margin-bottom: 32px; }
.admin-header h1 { font-size: 1.6rem; }
.admin-header p  { font-size: 0.9rem; color: var(--text-3); margin-top: 4px; }

.tab-panel        { display: none; }
.tab-panel.active { display: block; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { padding: 20px; border-radius: var(--radius); background: var(--card-solid); border: 1px solid var(--border); }
.stat-card .label { font-size: 0.78rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px; }
.stat-card .value { font-size: 1.8rem; font-weight: 800; color: var(--text); }
.stat-card .sub   { font-size: 0.78rem; color: var(--text-3); margin-top: 2px; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table  { width: 100%; border-collapse: collapse; }
thead tr { background: rgba(255,255,255,0.03); }
th { padding: 12px 16px; text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 14px 16px; font-size: 0.87rem; color: var(--text-2); border-bottom: 1px solid rgba(14,165,233,0.06); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-pending  { background: rgba(245,158,11,0.12);  color: var(--warning); border: 1px solid rgba(245,158,11,0.25); }
.badge-active   { background: rgba(16,185,129,0.12);  color: var(--success); border: 1px solid rgba(16,185,129,0.25); }
.badge-rejected { background: rgba(239,68,68,0.12);   color: var(--error);   border: 1px solid rgba(239,68,68,0.25); }
.badge-expired  { background: rgba(148,163,184,0.1);  color: var(--text-3);  border: 1px solid rgba(148,163,184,0.15); }

.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.panel-header h2 { font-size: 1.2rem; }

.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--card-solid); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; width: 100%; max-width: 480px; }
.modal h3 { margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

.empty-state { text-align: center; padding: 64px 20px; color: var(--text-3); }
.empty-state .icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.9rem; }

/* Top countries chart */
.top-countries { display: flex; flex-direction: column; gap: 10px; }
.top-country-row { display: flex; align-items: center; gap: 12px; }
.top-country-row .name { font-size: 0.88rem; color: var(--text-2); min-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-country-bar-wrap { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.top-country-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 3px; transition: width 0.6s ease; }
.top-country-count { font-size: 0.78rem; color: var(--text-3); min-width: 24px; text-align: right; }

.toast { position: fixed; bottom: 24px; right: 24px; z-index: 9999; padding: 12px 20px; border-radius: 8px; font-size: 0.88rem; font-weight: 500; background: var(--card-solid); border: 1px solid var(--border); color: var(--text); transform: translateY(100px); opacity: 0; transition: all 0.3s; pointer-events: none; max-width: 320px; }
.toast.show    { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(16,185,129,0.5); }
.toast.error   { border-color: rgba(239,68,68,0.5); }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open { display: flex; flex-direction: column; gap: 0; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 12px; }
  .nav-links.open a { padding: 12px; border-radius: 8px; }
  .order-grid { grid-template-columns: 1fr; }
  .duration-grid { grid-template-columns: repeat(3,1fr); }
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; padding: 20px; }
  .hero { padding: 120px 0 64px; }
  .hero-stats { gap: 32px; }
}

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.5s ease both; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(14,165,233,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(14,165,233,0.5); }
::selection { background: rgba(14,165,233,0.3); color: #fff; }
