:root {
    --bg: #0e1621;
    --panel: #17212b;
    --panel-2: #111c28;
    --border: #24303d;
    --accent: #2aabee;
    --accent-hover: #33b8f8;
    --text: #ffffff;
    --muted: #8b9bb4;
    --green: #4caf50;
    --red: #ff6b6b;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
input, select {
    width: 100%;
    border: 1px solid var(--border);
    background: #0f1a26;
    color: var(--text);
    padding: 14px 16px;
    border-radius: 12px;
    outline: none;
}
label { display: block; margin: 14px 0 8px; color: var(--muted); font-size: 14px; }
code, .mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}
.muted { color: var(--muted); }
.small-text { font-size: 12px; }
.badge {
    display: inline-flex;
    background: rgba(42, 171, 238, 0.14);
    color: var(--accent);
    border: 1px solid rgba(42, 171, 238, 0.22);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 800;
}
.brand i { color: var(--accent); }
.brand-centered { justify-content: center; margin-bottom: 24px; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    padding: 12px 18px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: 0.2s ease;
}
.btn-small { padding: 8px 12px; border-radius: 10px; }
.btn-wide { width: 100%; }
.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 14px 30px rgba(42, 171, 238, 0.28);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost {
    border-color: var(--border);
    background: transparent;
    color: var(--text);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.04);
}
.flash-stack {
    position: fixed;
    right: 18px;
    top: 18px;
    z-index: 1000;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
}
.flash {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow);
}
.flash-success { border-color: rgba(76, 175, 80, 0.32); }
.flash-error { border-color: rgba(255, 107, 107, 0.32); }
.flash-warning { border-color: rgba(255, 196, 0, 0.32); }
.public-topbar, .topbar {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 24px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.topbar-actions, .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.page-home {
    padding-bottom: 72px;
}
.hero {
    max-width: 1240px;
    margin: 0 auto;
    padding: 56px 24px 24px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    align-items: stretch;
}
.hero-copy h1 {
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.02;
    margin: 18px 0;
}
.hero-text {
    max-width: 760px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-panel { padding: 28px; }
.hero-panel-title { font-weight: 700; margin-bottom: 14px; }
.steps-list { margin: 0; padding-left: 18px; color: var(--muted); line-height: 1.8; }
.pricing, .simple-page, .admin-page { max-width: 1240px; margin: 0 auto; padding: 0 24px 72px; }
.section-heading h2 { margin: 0 0 6px; font-size: 28px; }
.section-heading p { margin: 0; color: var(--muted); }
.pricing-grid, .proxy-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}
.price-card, .proxy-card, .empty-card { padding: 24px; }
.price-card-top, .proxy-card-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.price-value { font-size: 30px; font-weight: 800; }
.proxy-label {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.status-active {
    background: rgba(76, 175, 80, 0.15);
    color: #8df39a;
}
.connection-box, .code-box {
    position: relative;
    margin-top: 20px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px 44px 16px 16px;
}
.copy-btn {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.copy-btn:hover { color: var(--text); }
.proxy-actions { margin-top: 20px; }
.proxy-expire { margin-top: 14px; font-size: 13px; color: var(--muted); }
.dashboard-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}
.sidebar {
    background: var(--panel);
    border-right: 1px solid var(--border);
    padding: 26px 18px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.sidebar-brand { padding: 8px 10px; }
.sidebar-nav { display: grid; gap: 6px; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--muted);
}
.sidebar-link:hover, .sidebar-link.active {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}
.sidebar-user {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel-2);
}
.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #4769ff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}
.user-name { font-weight: 700; }
.user-subtitle { color: var(--muted); font-size: 13px; }
.dashboard-main { padding: 24px 24px 72px; }
.dashboard-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 28px;
}
.dashboard-header h1 { margin: 0 0 8px; font-size: 32px; }
.dashboard-section + .dashboard-section { margin-top: 32px; }
.balance-pill {
    min-width: 160px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    display: grid;
    gap: 4px;
}
.table-card { overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 16px; border-bottom: 1px solid var(--border); text-align: left; }
.data-table th { color: var(--muted); font-size: 13px; font-weight: 600; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.data-table .align-right { text-align: right; }
.table-link { color: var(--accent); font-weight: 600; }
.empty-row { text-align: center; color: var(--muted); }
.amount-minus { color: #ff8e8e; }
.amount-plus { color: #8df39a; }
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.auth-card { padding: 32px; }
.narrow-card { width: min(480px, 100%); }
.medium-card { width: min(760px, 100%); margin: 0 auto; padding: 32px; }
.auth-card h1, .checkout-card h1 { margin-top: 0; }
.auth-form { display: grid; gap: 6px; }
.auth-footer { margin: 18px 0 0; color: var(--muted); text-align: center; }
.auth-footer a { color: var(--accent); }
.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.meta-grid span { display: block; margin-bottom: 6px; }
.checkout-block, .stack-actions { display: grid; gap: 16px; }
.empty-card {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.empty-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border);
    margin-bottom: 18px;
    color: var(--accent);
}
.admin-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.compact-form input, .compact-form select { margin-bottom: 4px; }
@media (max-width: 1024px) {
    .hero,
    .pricing-grid,
    .proxy-grid,
    .admin-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-shell {
        grid-template-columns: 1fr;
    }
    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
}
@media (max-width: 760px) {
    .topbar, .public-topbar, .dashboard-main, .simple-page, .pricing {
        padding-left: 16px;
        padding-right: 16px;
    }
    .meta-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-header,
    .topbar,
    .public-topbar {
        flex-direction: column;
        align-items: stretch;
    }
    .header-actions, .topbar-actions {
        width: 100%;
        justify-content: stretch;
        flex-wrap: wrap;
    }
    .header-actions > *, .topbar-actions > * {
        flex: 1 1 auto;
    }
    .data-table { display: block; overflow-x: auto; white-space: nowrap; }
}
