/* ==========================================================================
   HFIXORA.STORE — ENTRY DESIGN SYSTEM (light, SMSEntry-inspired)
   Single stylesheet for every public page (landing, auth, dashboard,
   region pages, recent buyers). Drop-in replacement for the old dark
   theme (style.css / landing.css / dashboard.css / rental.css).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
    --bg: #f1f5f9;
    --white: #ffffff;
    --surface2: #f8fafc;
    --border: #e2e8f0;
    --border2: #cbd5e1;

    --primary: #6366f1;
    --primary-light: #eef2ff;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.14);

    --text: #1e293b;
    --text-dim: #64748b;
    --text-light: #94a3b8;

    --green: #10b981;
    --green-bg: #ecfdf5;
    --green-border: #d1fae5;
    --green-dark: #059669;

    --amber: #f59e0b;
    --amber-bg: #fffbeb;
    --amber-border: #fde68a;
    --amber-dark: #d97706;

    --red: #ef4444;
    --red-bg: #fef2f2;
    --red-border: #fecaca;

    --blue: #3b82f6;
    --blue-bg: #eff6ff;
    --blue-border: #bfdbfe;

    --shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.16);

    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 18px;
    --radius-pill: 999px;

    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.hidden { display: none !important; }

/* --------------------------------------------------------------------------
   3. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 10px 18px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    line-height: 1.2;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: var(--white); border-color: var(--border2); color: var(--text-dim); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-dim); }
.btn-ghost:hover { color: var(--primary); }
.btn-danger { background: var(--amber-bg); border-color: var(--amber-border); color: #92400e; }
.btn-danger:hover { background: var(--amber-border); color: #78350f; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); color: #fff; }
.btn-copy { background: var(--primary-light); border: 1px solid #c7d2fe; color: var(--primary); }
.btn-copy:hover { background: var(--primary); color: #fff; }
.btn-download { background: var(--green-bg); border: 1px solid var(--green-border); color: var(--green-dark); }
.btn-download:hover { background: var(--green); color: #fff; }
.btn-view { background: var(--white); border: 1px solid var(--border); color: var(--text-dim); }
.btn-view:hover { border-color: var(--primary); color: var(--primary); }

.btn-sm { padding: 7px 13px; font-size: 0.78rem; }
.btn-lg { padding: 14px 30px; font-size: 0.98rem; border-radius: 12px; }
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   4. APP NAV (dashboard / region / recent-buyers header)
   -------------------------------------------------------------------------- */
.app-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}
.app-nav .nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    margin-right: auto;
    white-space: nowrap;
}
.brand span { color: var(--primary); }
.nav-bal {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-pill);
    padding: 5px 13px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}
.nav-topup {
    background: var(--green-bg);
    color: var(--green-dark);
    border: 1px solid var(--green-border);
    border-radius: var(--radius-pill);
    padding: 5px 13px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.nav-topup:hover { background: var(--green); color: #fff; }
.nav-logout {
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
}
.nav-logout:hover { background: var(--red-bg); color: var(--red); }

.nav-menu-btn {
    display: none;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 1.1rem;
    padding: 5px 10px;
    cursor: pointer;
    color: var(--text-dim);
}
.nav-menu-btn:hover { border-color: var(--primary); color: var(--primary); }

.nav-region-links {
    display: flex;
    gap: 2px;
}
.nav-region-links a {
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dim);
    text-decoration: none;
    transition: 0.15s;
    white-space: nowrap;
}
.nav-region-links a:hover { background: var(--primary-light); color: var(--primary); }
.nav-region-links a.is-active { background: var(--primary); color: #fff; }

/* Drawer (mobile + desktop menu) */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 400;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.drawer-overlay.show { opacity: 1; pointer-events: all; }
.app-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: var(--white);
    z-index: 401;
    transform: translateX(100%);
    transition: transform 0.22s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
}
.app-drawer.open { transform: translateX(0); }
.app-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 800;
}
.app-drawer-close {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 30px;
    height: 30px;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-dim);
}
.app-drawer-user {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 18px;
    background: var(--primary-light);
    border-bottom: 1px solid #c7d2fe;
}
.app-drawer-user .username { font-weight: 800; font-size: 0.92rem; }
.app-drawer-user .balance { font-size: 0.8rem; color: var(--primary); font-weight: 700; }
.app-drawer-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.app-drawer-label {
    display: block;
    padding: 14px 18px 6px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-light);
}
.app-drawer-nav a {
    display: block;
    padding: 11px 18px;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    border-left: 3px solid transparent;
}
.app-drawer-nav a:hover { background: var(--primary-light); color: var(--primary); }
.app-drawer-nav a.is-active { border-left-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.app-drawer-nav a.logout-link { color: var(--red); }

/* --------------------------------------------------------------------------
   5. LANDING PAGE
   -------------------------------------------------------------------------- */
.landing-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.landing-nav .nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.landing-links { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.landing-links a:not(.btn) { color: var(--text-dim); font-size: 0.85rem; font-weight: 600; }
.landing-links a:not(.btn):hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }

.hero { max-width: 820px; margin: 0 auto; text-align: center; padding: 72px 24px 60px; }
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--primary-light);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-pill);
    padding: 5px 14px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}
.dot-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.85); } }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 900; line-height: 1.12; margin-bottom: 18px; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1rem; color: var(--text-dim); max-width: 540px; margin: 0 auto 36px; line-height: 1.8; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 46px; }
.btn-hero-p {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 13px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 30px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    transition: 0.15s;
}
.btn-hero-p:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-hero-s {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: 13px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 26px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.15s;
}
.btn-hero-s:hover { border-color: var(--primary); color: var(--primary); }

.stats-bar {
    display: inline-flex;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.sb-item { padding: 14px 28px; text-align: center; border-right: 1px solid var(--border); }
.sb-item:last-child { border-right: none; }
.sb-val { font-size: 1.4rem; font-weight: 800; color: var(--primary); }
.sb-label { font-size: 0.65rem; color: var(--text-light); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }

.section { max-width: 1000px; margin: 0 auto; padding: 0 24px 72px; }
.sec-title { font-size: 1.6rem; font-weight: 800; text-align: center; margin-bottom: 6px; }
.sec-title span { color: var(--primary); }
.sec-sub { font-size: 0.82rem; color: var(--text-dim); text-align: center; margin-bottom: 36px; }

.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feat {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: 0.2s;
}
.feat:hover { border-color: #c7d2fe; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feat-icon { font-size: 1.6rem; margin-bottom: 12px; }
.feat-title { font-size: 0.92rem; font-weight: 700; margin-bottom: 7px; }
.feat-desc { font-size: 0.78rem; color: var(--text-dim); line-height: 1.8; }

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.step { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 22px; text-align: center; }
.step-num {
    width: 36px; height: 36px;
    background: var(--primary-light);
    border: 1.5px solid #c7d2fe;
    border-radius: 50%;
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}
.step-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; }
.step-desc { font-size: 0.74rem; color: var(--text-dim); line-height: 1.7; }

/* Regions / pricing */
.regions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.region-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 30px 24px;
    text-align: center;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.region-card:hover { border-color: #c7d2fe; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.region-card.featured { border-color: #c7d2fe; background: linear-gradient(180deg, #ffffff, #eef2ff); }
.region-badge {
    align-self: center;
    background: var(--green-bg);
    color: var(--green-dark);
    border: 1px solid var(--green-border);
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    padding: 4px 12px;
}
.region-flag { font-size: 2.4rem; }
.region-card h3 { font-size: 1.05rem; font-weight: 800; }
.region-card p { font-size: 0.78rem; color: var(--text-dim); line-height: 1.7; }
.region-price { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 10px; }
.region-price span { font-size: 1.3rem; font-weight: 800; color: var(--primary); }

/* FAQ */
.faq-list { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 0 18px; }
.faq-item summary { font-weight: 700; font-size: 0.9rem; padding: 14px 0; cursor: pointer; color: var(--text); }
.faq-item p { font-size: 0.82rem; color: var(--text-dim); line-height: 1.8; padding-bottom: 14px; }

/* CTA */
.cta { max-width: 660px; margin: 0 auto 72px; padding: 0 24px; }
.cta-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}
.cta-card h2 { font-size: 1.7rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
.cta-card p { font-size: 0.85rem; color: rgba(255, 255, 255, 0.85); margin-bottom: 28px; line-height: 1.8; }
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--primary);
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    padding: 14px 32px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.15s;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.btn-cta:hover { background: #f1f5f9; transform: translateY(-1px); }

.footer { border-top: 1px solid var(--border); padding: 28px 20px; text-align: center; font-size: 0.72rem; color: var(--text-light); line-height: 2.4; background: var(--white); }
.footer a { color: var(--primary); text-decoration: none; }

/* --------------------------------------------------------------------------
   6. AUTH PAGES
   -------------------------------------------------------------------------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 38px 34px;
    width: 100%;
    max-width: 430px;
    box-shadow: var(--shadow-md);
}
.auth-brand { display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.auth-card h1 { font-size: 1.35rem; font-weight: 800; text-align: center; margin-bottom: 4px; }
.auth-card .subtitle { font-size: 0.82rem; color: var(--text-dim); text-align: center; margin-bottom: 24px; }
.auth-card .auth-link { text-align: center; font-size: 0.82rem; color: var(--text-dim); margin-top: 18px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.78rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.92rem;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-glow); }
.form-group small { display: block; font-size: 0.7rem; color: var(--text-light); margin-top: 5px; }
.phone-input { display: flex; align-items: center; gap: 8px; }
.phone-input .prefix { font-weight: 700; color: var(--text-dim); background: var(--surface2); border: 1.5px solid var(--border); border-radius: 10px; padding: 11px 12px; font-size: 0.9rem; }

.alert { padding: 12px 15px; border-radius: 10px; font-size: 0.82rem; margin-bottom: 18px; line-height: 1.5; }
.alert-error { background: var(--red-bg); color: #b91c1c; border: 1px solid var(--red-border); }
.alert-success { background: var(--green-bg); color: var(--green-dark); border: 1px solid var(--green-border); }
.alert-info { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-border); }
.alert-warn { background: var(--amber-bg); color: #92400e; border: 1px solid var(--amber-border); }

/* --------------------------------------------------------------------------
   7. DASHBOARD
   -------------------------------------------------------------------------- */
.page-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 3px; }
.page-sub { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 22px; }

.low-bal-alert {
    background: var(--amber-bg);
    border: 1.5px solid var(--amber-border);
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.low-bal-text { font-size: 0.82rem; color: #92400e; font-weight: 600; }
.low-bal-text span { font-weight: 400; }
.btn-topup { background: var(--amber); color: #fff; border: none; border-radius: 10px; font-size: 0.78rem; font-weight: 700; padding: 8px 16px; text-decoration: none; }
.btn-topup:hover { background: var(--amber-dark); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.stat-label { font-size: 0.68rem; font-weight: 700; color: var(--text-dim); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 8px; }
.stat-val { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.stat .stat-icon { font-size: 1.2rem; }
.stat.s-primary .stat-val { color: var(--primary); }
.stat.s-green .stat-val { color: var(--green); }
.stat.s-amber .stat-val { color: var(--amber-dark); }

.buy-region-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
.buy-region-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
    transition: 0.2s;
}
.buy-region-card:hover { border-color: #c7d2fe; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.buy-region-card .buy-region-flag { font-size: 2rem; }
.buy-region-card strong { font-size: 0.95rem; font-weight: 800; }
.buy-region-stock { font-size: 0.75rem; color: var(--text-dim); }
.buy-region-stock b { color: var(--green-dark); }

/* --------------------------------------------------------------------------
   8. REGION BUY PAGE
   -------------------------------------------------------------------------- */
.page-head {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 24px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}
.page-head h1 { font-size: 1.4rem; font-weight: 800; }
.page-head .back-link { font-size: 0.78rem; color: var(--text-dim); display: block; margin-bottom: 6px; }
.page-head .back-link:hover { color: var(--primary); }
.region-info { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.region-info .price { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.region-info .stock { font-size: 0.78rem; color: var(--text-dim); }
.region-stock-badge, .region-price-badge {
    font-size: 0.78rem; font-weight: 700; padding: 4px 12px;
    border-radius: var(--radius-pill); border: 1px solid var(--border2);
}
.region-stock-badge { background: var(--green-bg); color: var(--green-dark); border-color: var(--green-border); }
.region-price-badge { background: var(--white); color: var(--text); }

/* Buy Section */
.buy-section { background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; margin-bottom: 22px; }
.buy-form-wrap { margin-top: 14px; }
.buy-form-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.buy-info { display: flex; gap: 24px; flex-wrap: wrap; }
.buy-stock-detail, .buy-price-detail, .buy-balance-detail {
    display: flex; flex-direction: column; gap: 2px;
}
.buy-stock-label, .buy-price-label, .buy-balance-label {
    font-size: 0.7rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em;
}
.buy-stock-count { font-size: 1.3rem; font-weight: 800; }
.buy-stock-count.stock-ok { color: var(--green-dark); }
.buy-stock-count.stock-empty { color: #b91c1c; }
.buy-price-val { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.buy-balance-val { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.buy-action { flex-shrink: 0; }
.btn-buy {
    font-size: 0.95rem; font-weight: 700; padding: 12px 28px;
    border-radius: var(--radius-sm); cursor: pointer; border: none;
    background: var(--primary); color: #fff;
    transition: 0.2s;
}
.btn-buy:hover { background: var(--primary-hover, #4338ca); transform: translateY(-1px); }
.btn-buy:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-disabled {
    font-size: 0.9rem; font-weight: 700; padding: 12px 28px;
    border-radius: var(--radius-sm); border: 1px solid var(--border2);
    background: var(--bg); color: var(--text-dim); cursor: not-allowed;
}
.btn-topup {
    font-size: 0.9rem; font-weight: 700; padding: 12px 28px;
    border-radius: var(--radius-sm); border: none;
    background: #f59e0b; color: #fff; text-decoration: none;
    transition: 0.2s; display: inline-block;
}
.btn-topup:hover { background: #d97706; transform: translateY(-1px); }
.btn-topup.btn-sm { font-size: 0.8rem; padding: 8px 18px; }

/* Buy balance bar */
.buy-balance-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; border-radius: var(--radius-sm);
    background: var(--primary-light); border: 1px solid #c7d2fe;
    margin-bottom: 14px; font-size: 0.85rem;
}
.buy-balance-bar span { color: var(--text-dim); font-weight: 600; }
.buy-balance-bar strong { color: var(--primary); font-weight: 800; }

/* Buy API grid */
.buy-section .api-grid { margin-top: 14px; }
.buy-section .api-card { padding: 16px; gap: 10px; }
.buy-section .api-actions { margin-top: 8px; }
.btn-buy-api {
    font-size: 0.85rem; font-weight: 700; padding: 10px 20px;
    border-radius: var(--radius-sm); cursor: pointer; border: none;
    background: var(--primary); color: #fff; width: 100%;
    transition: 0.2s;
}
.btn-buy-api:hover { background: var(--primary-hover, #4338ca); transform: translateY(-1px); }
.btn-buy-api:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Sold-out pool card */
.api-sold-out { opacity: 0.65; }
.api-soldout-tag { font-size: 0.68rem; font-weight: 700; color: #ef4444; }
.api-empty-tag { font-size: 0.68rem; font-weight: 600; color: var(--text-dim); }

/* OTP Loading Bar */
.otp-loading-bar { margin-top: 10px; }
.otp-loading-text { font-size: 0.74rem; color: var(--text-dim); margin-bottom: 5px; font-weight: 600; }
.otp-progress-track {
    height: 4px; border-radius: 4px;
    background: var(--border, #e2e8f0); overflow: hidden;
}
.otp-progress-fill {
    height: 100%; width: 0%; border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), #818cf8);
    transition: width 1s linear;
}

.tier-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    font-weight: 800;
    font-size: 0.95rem;
    flex-wrap: wrap;
}
.tier-label-create { background: var(--blue-bg); border: 1px solid var(--blue-border); color: #1d4ed8; }
.tier-label-low { background: var(--green-bg); border: 1px solid var(--green-border); color: var(--green-dark); }
.tier-label-high { background: var(--red-bg); border: 1px solid var(--red-border); color: #b91c1c; }
.tier-price-tag { font-size: 0.78rem; font-weight: 700; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--white); border: 1px solid var(--border2); color: var(--text); }

.api-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.api-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: 0.2s;
}
.api-card:hover { border-color: #c7d2fe; box-shadow: var(--shadow-md); }
.api-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.api-badge { font-size: 0.68rem; font-weight: 700; background: var(--primary-light); color: var(--primary); border: 1px solid #c7d2fe; border-radius: var(--radius-pill); padding: 3px 10px; }
.api-live { display: inline-flex; align-items: center; gap: 6px; font-size: 0.68rem; font-weight: 600; color: var(--green-dark); }
.api-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.6s ease-in-out infinite; }
.api-card h3 { font-size: 0.95rem; font-weight: 800; }
.api-stats { display: flex; gap: 12px; font-size: 0.75rem; color: var(--text-dim); flex-wrap: wrap; }
.api-stats .available { color: var(--green-dark); font-weight: 600; }
.api-stats .sold { color: var(--text-dim); }
.api-actions { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.quantity-input {
    width: 68px;
    padding: 9px 8px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 700;
}
.quantity-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-glow); }
.no-apis {
    grid-column: 1 / -1;
    background: var(--white);
    border: 1.5px dashed var(--border2);
    border-radius: 14px;
    padding: 30px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}
.section-block { margin-top: 30px; }
.section-title { font-size: 1rem; font-weight: 800; margin-bottom: 14px; }

/* --------------------------------------------------------------------------
   9. ACTIVE RENTALS (OTP CARDS)
   -------------------------------------------------------------------------- */
.rentals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.rental-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.07);
    transition: 0.2s;
}
.rental-card:hover { box-shadow: var(--shadow-md); border-color: #c7d2fe; }
.rental-card-head {
    background: var(--primary-light);
    border-bottom: 1px solid #c7d2fe;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.rental-num-wrap { display: flex; align-items: center; gap: 8px; }
.cc-badge { background: #fff; border: 1px solid var(--border2); border-radius: 6px; font-size: 0.72rem; color: var(--text-dim); padding: 2px 7px; font-weight: 600; }
.rental-phone { font-size: 1.15rem; font-weight: 800; color: var(--primary); letter-spacing: 0.04em; font-family: var(--font-mono); }
.btn-copy-num { background: var(--white); border: 1px solid #c7d2fe; border-radius: 7px; color: var(--primary); padding: 4px 9px; cursor: pointer; font-size: 0.65rem; font-weight: 600; transition: 0.15s; display: inline-flex; align-items: center; gap: 4px; }
.btn-copy-num:hover { background: var(--primary); color: #fff; }
.timer-badge { background: var(--white); border: 1px solid #c7d2fe; border-radius: var(--radius-pill); font-size: 0.78rem; font-weight: 700; color: var(--primary); padding: 3px 12px; font-family: var(--font-mono); }
.timer-badge.t-low { background: var(--red-bg); border-color: var(--red-border); color: var(--red); }
.timer-badge.t-mid { background: var(--amber-bg); border-color: var(--amber-border); color: #92400e; }

.rental-card-body { padding: 15px; }
.rental-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700; border-radius: var(--radius-pill); padding: 4px 12px; }
.status-waiting { background: var(--amber-bg); color: #92400e; border: 1px solid var(--amber-border); }
.status-received { background: var(--green-bg); color: var(--green-dark); border: 1px solid var(--green-border); }
.rental-cat { font-size: 0.72rem; color: var(--text-dim); }

.otp-area { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 12px; min-height: 48px; }
.otp-placeholder { text-align: center; font-size: 0.78rem; color: var(--text-light); padding: 8px; }
.otp-item { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.otp-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.otp-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.otp-label { font-size: 0.65rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.otp-time { font-size: 0.62rem; color: var(--text-light); }
.otp-code-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--white);
    border: 2px solid var(--green-border);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
}
.otp-code-big { font-size: 1.9rem; font-weight: 900; color: var(--green-dark); letter-spacing: 0.16em; line-height: 1; font-family: var(--font-mono); }
.btn-copy-otp { background: var(--green); border: none; border-radius: 9px; color: #fff; font-size: 0.8rem; font-weight: 700; padding: 9px 16px; cursor: pointer; transition: 0.15s; white-space: nowrap; }
.btn-copy-otp:hover { background: var(--green-dark); }
.btn-copy-otp.copied { background: #059669; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3); }
.otp-msg-text { font-size: 0.76rem; color: var(--text-dim); word-break: break-all; line-height: 1.7; background: var(--surface2); border-radius: 7px; padding: 7px 10px; border: 1px solid var(--border); }

.rental-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.abtn { border: none; border-radius: 9px; font-size: 0.78rem; font-weight: 700; padding: 9px 14px; cursor: pointer; transition: 0.15s; flex: 1; text-align: center; }
.abtn:disabled { opacity: 0.4; cursor: not-allowed; }
.abtn-check { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2); }
.abtn-check:hover:not(:disabled) { background: var(--primary-dark); }
.abtn-refund { background: var(--amber-bg); border: 1.5px solid var(--amber-border); color: #92400e; }
.abtn-refund:hover:not(:disabled) { background: var(--amber-border); }
.abtn-complete { background: var(--green-bg); border: 1.5px solid var(--green-border); color: var(--green-dark); }
.abtn-complete:hover:not(:disabled) { background: var(--green-border); }
.cstat { font-size: 0.75rem; padding: 7px 11px; border-radius: 8px; margin-top: 8px; display: none; text-align: center; }
.cstat.ok { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); display: block; }
.cstat.err { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); display: block; }
.cstat.info { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-border); display: block; }

.spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: currentColor; border-radius: 50%; animation: spin 0.6s linear infinite; vertical-align: middle; margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   10. TABLES & BATCH ACTIONS
   -------------------------------------------------------------------------- */
.table-wrap { background: var(--white); border: 1px solid var(--border); border-radius: 14px; overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { font-size: 0.68rem; font-weight: 700; color: var(--text-dim); letter-spacing: 0.06em; text-transform: uppercase; padding: 11px 16px; text-align: left; background: var(--surface2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 0.82rem; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #fafbff; }
.empty-row td { text-align: center; padding: 30px; color: var(--text-light); font-size: 0.85rem; }

.batch-actions {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.batch-actions > span { font-size: 0.82rem; color: var(--text-dim); font-weight: 600; }
.order-numbers-preview { font-size: 0.74rem; color: var(--text-light); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); display: inline-block; vertical-align: bottom; }
.order-badge { display: inline-block; padding: 3px 11px; border-radius: var(--radius-pill); font-size: 0.7rem; font-weight: 700; }
.order-badge-multiple { background: var(--primary-light); color: var(--primary); border: 1px solid #c7d2fe; }
.order-badge-single { background: var(--surface2); color: var(--text-dim); border: 1px solid var(--border); }
.order-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.num-cell { font-weight: 700; color: var(--primary); font-family: var(--font-mono); font-size: 0.8rem; }
.price-cell { color: var(--amber-dark); font-weight: 700; }
.time-cell { color: var(--text-light); font-size: 0.74rem; white-space: nowrap; }

/* --------------------------------------------------------------------------
   11. RECENT BUYERS
   -------------------------------------------------------------------------- */
.recent-buyers { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.recent-buyers-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.recent-buyers-head h3 { font-size: 0.95rem; font-weight: 800; }
.rb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); animation: pulse 1.8s ease-in-out infinite; }
.rb-empty { font-size: 0.82rem; color: var(--text-light); text-align: center; padding: 14px; }
.rb-list { list-style: none; }
.rb-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rb-item:last-child { border-bottom: none; }
.rb-user { font-weight: 800; font-size: 0.88rem; }
.rb-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rb-qty { font-size: 0.76rem; color: var(--text-dim); font-weight: 600; }
.rb-time { font-size: 0.68rem; color: var(--text-light); }

/* --------------------------------------------------------------------------
   12. MODALS
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}
.modal-overlay.open { display: flex; }
.modal-card {
    background: var(--white);
    border-radius: 18px;
    padding: 26px 24px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    max-height: 85vh;
    overflow-y: auto;
}
.modal-card h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 6px; }
.modal-sub { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 18px; line-height: 1.5; }
.modal-card .modal-close { float: right; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; width: 30px; height: 30px; font-size: 1rem; cursor: pointer; color: var(--text-dim); }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.modal-count { margin-left: auto; font-size: 0.78rem; color: var(--text-dim); }
.numbers-list { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 6px 0; max-height: 320px; overflow-y: auto; }
.number-item { padding: 10px 14px; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.85rem; }
.number-item:last-child { border-bottom: none; }

.rf-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.rf-opt { background: var(--surface2); border: 1.5px solid var(--border); border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: 0.15s; text-align: left; font-family: inherit; display: flex; align-items: center; gap: 12px; width: 100%; }
.rf-opt:hover { border-color: var(--primary); background: var(--primary-light); }
.rf-opt.selected { border-color: var(--primary); background: var(--primary-light); }
.rf-opt-icon { font-size: 1.3rem; flex-shrink: 0; }
.rf-opt-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 2px; }
.rf-opt-desc { font-size: 0.72rem; color: var(--text-dim); }
.rf-opt.warn .rf-opt-title { color: var(--red); }
.rf-modal-footer { display: flex; gap: 8px; }
.rf-cancel { flex: 1; background: var(--surface2); border: 1.5px solid var(--border); border-radius: 10px; font-size: 0.82rem; font-weight: 600; padding: 10px; cursor: pointer; color: var(--text-dim); }
.rf-confirm { flex: 2; background: var(--amber); color: #fff; border: none; border-radius: 10px; font-size: 0.85rem; font-weight: 700; padding: 10px; cursor: not-allowed; opacity: 0.4; transition: 0.15s; }
.rf-confirm.ready { opacity: 1; cursor: pointer; }
.rf-confirm.ready:hover { background: var(--amber-dark); }

/* --------------------------------------------------------------------------
   13. CONFIRM MODAL
   -------------------------------------------------------------------------- */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.confirm-overlay.show { opacity: 1; pointer-events: all; }
.confirm-box {
    background: var(--white);
    border-radius: 18px;
    padding: 28px 26px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    text-align: center;
    transform: scale(0.92);
    transition: transform 0.2s ease;
}
.confirm-overlay.show .confirm-box { transform: scale(1); }
.confirm-icon { font-size: 36px; margin-bottom: 12px; }
.confirm-msg { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 22px; line-height: 1.6; }
.confirm-btns { display: flex; gap: 10px; }
.confirm-btns button {
    flex: 1;
    padding: 11px;
    border-radius: 11px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: 0.15s;
}
.confirm-yes { background: var(--primary); color: #fff; }
.confirm-yes:hover { background: var(--primary-dark); }
.confirm-no { background: var(--surface2); border: 1.5px solid var(--border); color: var(--text-dim); }
.confirm-no:hover { background: #e2e8f0; }
.confirm-yes.danger { background: var(--red); }
.confirm-yes.danger:hover { background: #dc2626; }

/* --------------------------------------------------------------------------
   14. TOAST
   -------------------------------------------------------------------------- */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e293b;
    color: #fff;
    padding: 13px 26px;
    border-radius: var(--radius-pill);
    z-index: 999;
    font-size: 0.84rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: 90vw;
    text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --------------------------------------------------------------------------
   14. RECENT BUYERS PAGE / MISC
   -------------------------------------------------------------------------- */
.main { max-width: 1000px; margin: 0 auto; padding: 26px 20px 60px; }
.page-footer { border-top: 1px solid var(--border); padding: 22px 18px; text-align: center; font-size: 0.72rem; color: var(--text-light); line-height: 2.2; background: var(--white); }
.page-footer a { color: var(--primary); }

/* --------------------------------------------------------------------------
   15. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .feat-grid { grid-template-columns: 1fr 1fr; }
    .steps-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .buy-region-grid { grid-template-columns: 1fr; }
    .regions-grid { grid-template-columns: 1fr; }
    .nav-menu-btn { display: block; }
    .nav-toggle { display: block; }
    .nav-region-links { display: none; }
    .landing-links { display: none; }
    .landing-links.mobile-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        padding: 12px 20px;
        gap: 6px;
        z-index: 99;
    }
    .landing-links a:not(.btn) { display: block; padding: 10px 0; }
    .landing-links .btn { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
    .feat-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .stats-bar { flex-direction: column; }
    .sb-item { border-right: none; border-bottom: 1px solid var(--border); }
    .sb-item:last-child { border-bottom: none; }
    .rentals-grid { grid-template-columns: 1fr; }
    .hero { padding: 52px 18px 44px; }
    .nav-logout { display: none; }
    .region-info { align-items: flex-start; text-align: left; }
    .buy-form-row { flex-direction: column; align-items: stretch; }
    .buy-info { gap: 16px; }
    .buy-action { width: 100%; }
    .buy-action .btn-buy, .buy-action .btn-disabled, .buy-action .btn-topup { width: 100%; text-align: center; }
}
