*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #020617;
    color: #e5e7eb;
}

a {
    color: inherit;
    text-decoration: none;
}

.layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #020617;
    border-bottom: 1px solid #111827;
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #38bdf8;
    color: #020617;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 8px;
}

.nav-title {
    font-weight: 600;
}

.nav-links a {
    margin-left: 16px;
    font-size: 0.95rem;
    color: #9ca3af;
}

.nav-links a.active,
.nav-links a:hover {
    color: #e5e7eb;
}

.content {
    flex: 1;
    padding: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.hero {
    background: radial-gradient(circle at top left, rgba(56,189,248,0.15), transparent),
                #020617;
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid #111827;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.hero p {
    color: #9ca3af;
    margin-bottom: 16px;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #38bdf8;
    color: #020617;
    font-weight: 600;
}

.btn-secondary {
    background: transparent;
    color: #e5e7eb;
    border: 1px solid #38bdf8;
}

.btn-primary:hover {
    background: #0ea5e9;
}

.btn-secondary:hover {
    background: rgba(56,189,248,0.1);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.card {
    background: #020617;
    border-radius: 20px;
    border: 1px solid #111827;
    padding: 20px;
}

.card h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.footer {
    border-top: 1px solid #111827;
    padding: 12px 24px;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Auth */

.auth-layout {
    align-items: center;
    justify-content: center;
}

.auth-card {
    max-width: 380px;
    width: 100%;
}

.auth-card form label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #111827;
    background: #020617;
    color: #e5e7eb;
}

.auth-switch {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #9ca3af;
}

.alert-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid #ef4444;
    color: #fecaca;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

/* Forms */

.plan-form label,
.withdraw-form label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.plan-form input[type="number"],
.plan-form select,
.withdraw-form input[type="number"],
.withdraw-form input[type="text"],
.withdraw-form select {
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #111827;
    background: #020617;
    color: #e5e7eb;
}

/* Tables */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th,
.table td {
    padding: 6px 8px;
    border-bottom: 1px solid #111827;
}

.table th {
    text-align: left;
    color: #9ca3af;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.btn-small {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 999px;
    border: 1px solid #38bdf8;
    background: transparent;
    color: #e5e7eb;
    cursor: pointer;
}

.btn-small:hover {
    background: rgba(56,189,248,0.1);
}

@media (max-width: 640px) {
    .navbar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .content {
        padding: 16px;
    }
}
