@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* ── Variables ───────────────────────────── */
:root {
    --primary:    #60a5fa;
    --primary-dk: #2563eb;
    --accent:     #818cf8;
    --muted:      #94a3b8;
    --surface:    rgba(255,255,255,.06);
    --surface-hv: rgba(255,255,255,.09);
    --border:     rgba(255,255,255,.08);
    --border-hv:  rgba(255,255,255,.15);
    --bg:         #0f172a;
    --px:         8%;
}

/* ── Reset ───────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
html { scroll-behavior: smooth; }

body {
    background:
        radial-gradient(circle at top left,     #1e3a8a 0%, transparent 40%),
        radial-gradient(circle at bottom right, #1e40af 0%, transparent 40%),
        var(--bg);
    color: #f8fafc;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Navbar ──────────────────────────────── */
header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    height: 68px; padding: 0 var(--px);
    display: flex; align-items: center;
    background: rgba(15,23,42,.75);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

nav { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.logo {
    font-size: 20px; font-weight: 700; letter-spacing: -.3px;
    color: #fff; text-decoration: none;
}

.logo span, .branding span { color: var(--primary); }

nav ul { display: flex; gap: 4px; list-style: none; align-items: center; }

nav a {
    position: relative;
    color: var(--muted); font-weight: 500; font-size: 14px;
    text-decoration: none; padding: 7px 14px; border-radius: 8px;
    transition: color .2s, background .2s;
}

nav a:hover, nav a.active { color: #fff; background: var(--surface-hv); }

nav a:not(.nav-cta)::after {
    content: ''; position: absolute;
    left: 14px; right: 14px; bottom: 4px;
    height: 2px; width: 0; border-radius: 2px;
    background: var(--primary);
    transition: width .5s cubic-bezier(.25,0,.1,1);
}

nav a:not(.nav-cta):hover::after,
nav a:not(.nav-cta).active::after { width: calc(100% - 28px); }

nav a.nav-cta {
    background: linear-gradient(135deg, var(--primary-dk), var(--primary));
    color: #fff; font-weight: 600;
    box-shadow: 0 4px 16px rgba(37,99,235,.4);
    transition: transform .2s, box-shadow .2s;
}

nav a.nav-cta:hover {
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(96,165,250,.45);
}

/* ── Hamburger ───────────────────────────── */
.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    width: 38px; height: 38px; padding: 8px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 9px; cursor: pointer;
    box-shadow: none; transition: background .2s;
}

.nav-toggle:hover  { background: var(--surface-hv); transform: none; box-shadow: none; }

.nav-toggle span {
    display: block; width: 100%; height: 2px;
    background: #f8fafc; border-radius: 2px;
    transition: transform .3s ease, opacity .2s;
}

nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 140px var(--px) 80px;
}

.hero-content { max-width: 820px; animation: fadeUp .8s ease; }

.hero-badge {
    display: inline-flex; align-items: center; gap: 9px;
    margin-bottom: 30px; padding: 7px 18px; border-radius: 100px;
    background: rgba(96,165,250,.08); border: 1px solid rgba(96,165,250,.22);
    color: var(--primary); font-size: 11px; font-weight: 600;
    letter-spacing: 1.2px; text-transform: uppercase;
}

.hero-badge-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--primary); box-shadow: 0 0 7px var(--primary);
    animation: pulse 2s infinite;
}

.hero-content h1, .hero-content h2 {
    font-size: 72px; line-height: 1.06;
    font-weight: 700; letter-spacing: -1.5px; margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 20%, var(--accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.hero-content p {
    color: var(--muted); font-size: 18px; line-height: 1.8; margin-bottom: 40px;
    max-width: 560px; margin-left: auto; margin-right: auto;
}

.hero-actions {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 12px; margin-bottom: 52px;
}

a.btn-ghost {
    display: inline-block; padding: 13px 26px;
    border: 1px solid rgba(255,255,255,.15); border-radius: 12px;
    background: rgba(255,255,255,.06);
    color: #e2e8f0 !important; font-size: 15px; font-weight: 500;
    text-decoration: none !important;
    transition: border-color .2s, background .2s, color .2s;
}

a.btn-ghost:hover { border-color: rgba(255,255,255,.26); background: rgba(255,255,255,.09); color: #fff !important; }

.hero-stats {
    display: flex; flex-wrap: nowrap; justify-content: center;
    max-width: 400px; margin: 0 auto;
    border: 1px solid var(--border); border-radius: 16px;
    background: rgba(255,255,255,.03); backdrop-filter: blur(14px); overflow: hidden;
}

.hero-stat {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 16px 0; flex: 1; border-right: 1px solid var(--border);
}

.hero-stat:last-child { border-right: none; }
.hero-stat strong { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -.3px; }
.hero-stat span   { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ── Buttons ─────────────────────────────── */
.btn, button {
    display: inline-block; padding: 14px 28px;
    border: none; outline: none; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-dk), var(--primary));
    color: #fff; font-size: 15px; font-weight: 600;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 4px 20px rgba(37,99,235,.32);
    transition: transform .2s, box-shadow .2s;
}

.btn:hover, button:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(96,165,250,.42); }

/* ── Inputs ──────────────────────────────── */
input, select, textarea {
    width: 100%; padding: 13px 16px; margin-bottom: 14px;
    border: 1px solid var(--border); outline: none; border-radius: 11px;
    background: rgba(255,255,255,.05); color: #f8fafc; font-size: 14px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

input::placeholder, textarea::placeholder { color: #475569; }

input:focus, select:focus, textarea:focus {
    border-color: rgba(96,165,250,.45);
    box-shadow: 0 0 0 3px rgba(96,165,250,.1);
    background: rgba(255,255,255,.08);
}

textarea { resize: none; min-height: 120px; }

select {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center;
    background-color: rgba(255,255,255,.05); padding-right: 40px;
}

select option { background: #1e293b; color: #f8fafc; }

/* ── Section header ──────────────────────── */
.section-header { text-align: center; padding: 80px var(--px) 0; }

/* shared label style (section + settings) */
.section-label, .settings-intro .tag {
    display: inline-block; margin-bottom: 14px;
    color: var(--primary); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2.5px;
}

.section-header h2 {
    font-size: 2.2rem; font-weight: 700; letter-spacing: -.6px;
    line-height: 1.2; margin-bottom: 14px;
}

.section-header p { color: var(--muted); font-size: 16px; line-height: 1.75; max-width: 500px; margin: 0 auto; }

/* ── Cards ───────────────────────────────── */
.cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
    gap: 22px; padding: 44px var(--px) 80px;
}

.card {
    padding: 32px; border-radius: 20px;
    background: var(--surface); border: 1px solid var(--border);
    backdrop-filter: blur(16px); position: relative; overflow: hidden;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.card::before {
    content: ''; position: absolute; top: 0; left: 20%; right: 20%; height: 1px; opacity: 0;
    background: linear-gradient(90deg, transparent, rgba(96,165,250,.6), transparent);
    transition: opacity .3s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0,0,0,.3), 0 0 0 1px rgba(96,165,250,.1);
    border-color: rgba(96,165,250,.16);
}

.card:hover::before { opacity: 1; }

.card-icon {
    width: 48px; height: 48px; border-radius: 13px;
    background: rgba(96,165,250,.1); border: 1px solid rgba(96,165,250,.2);
    display: flex; align-items: center; justify-content: center; margin-bottom: 22px;
}

.card-icon svg { width: 22px; height: 22px; stroke: var(--primary); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-bottom: 10px; font-size: 17px; font-weight: 600; }
.card p  { color: var(--muted); line-height: 1.7; font-size: 14px; }

/* ── Login / Register ────────────────────── */
.login-body { overflow: hidden; }
.login-container { display: flex; min-height: 100vh; }

.login-left, .login-right { flex: 1; display: flex; justify-content: center; align-items: center; padding: 60px; }
.login-left { animation: slideLeft .7s ease; }
.login-right { background: rgba(15,23,42,.85); backdrop-filter: blur(22px); border-left: 1px solid var(--border); animation: slideRight .7s ease; }

.branding { max-width: 440px; }
.branding h1 { font-size: 48px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; margin-bottom: 16px; }
.branding > p { color: var(--muted); line-height: 1.8; font-size: 15px; margin-bottom: 36px; }

.branding-features { display: flex; flex-direction: column; gap: 12px; }

.branding-feature {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border);
    transition: border-color .2s, background .2s;
}

.branding-feature:hover { border-color: var(--border-hv); background: var(--surface-hv); }

.branding-feature-icon {
    width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px;
    background: rgba(96,165,250,.1); border: 1px solid rgba(96,165,250,.2);
    display: flex; align-items: center; justify-content: center;
}

.branding-feature-icon svg { width: 16px; height: 16px; stroke: var(--primary); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.branding-feature-text strong { display: block; font-size: 13px; font-weight: 600; color: #f8fafc; margin-bottom: 2px; }
.branding-feature-text span   { font-size: 12px; color: var(--muted); }

form.form-card {
    width: 100%; max-width: 420px; padding: 42px; border-radius: 24px;
    background: rgba(255,255,255,.05); border: 1px solid var(--border);
    backdrop-filter: blur(18px); animation: fadeUp .7s ease;
}

form.form-card h2 { text-align: center; font-size: 28px; font-weight: 700; letter-spacing: -.4px; margin-bottom: 8px; }

.subtitle { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 24px; }

.address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.address-grid input, .address-grid select { margin-bottom: 0; }

.form-notice { padding: 12px 16px; margin-bottom: 14px; border-radius: 10px; background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.22); color: #f87171; font-size: 13px; }
.form-notice--success { background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.22); color: #4ade80; }

form.form-card button { width: 100%; margin-top: 6px; display: block; }

/* ── Settings ────────────────────────────── */
.settings-page { padding: 110px var(--px) 80px; }

.settings-intro { max-width: 580px; margin: 0 auto 52px; text-align: center; }
.settings-intro h1 { font-size: 2.4rem; font-weight: 700; letter-spacing: -.6px; line-height: 1.15; margin-bottom: 12px; }
.settings-intro p  { color: var(--muted); line-height: 1.8; font-size: 15px; }

.settings-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; align-items: stretch; }

.settings-card {
    padding: 32px; border-radius: 22px;
    background: var(--surface); border: 1px solid var(--border);
    backdrop-filter: blur(16px); box-shadow: 0 20px 50px rgba(0,0,0,.18);
}

.settings-card__head { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.settings-card__head h2 { font-size: 16px; font-weight: 600; margin-bottom: 5px; }
.settings-card__head p  { color: var(--muted); font-size: 13px; line-height: 1.6; }

.field-label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .8px; }

.fields-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

.settings-actions { display: flex; justify-content: flex-end; margin-top: 24px; }

/* ── Toast ───────────────────────────────── */
.toast {
    position: fixed; top: 82px; right: 24px;
    display: flex; align-items: flex-start; gap: 14px;
    min-width: 300px; max-width: 360px; padding: 16px 18px;
    border-radius: 16px; background: rgba(15,23,42,.95);
    border: 1px solid rgba(255,255,255,.1); border-left: 3px solid transparent;
    backdrop-filter: blur(22px); box-shadow: 0 8px 36px rgba(0,0,0,.45);
    opacity: 0; transform: translateX(calc(100% + 24px));
    transition: opacity .35s cubic-bezier(.4,0,.2,1), transform .35s cubic-bezier(.4,0,.2,1);
    pointer-events: none; z-index: 9999;
}

.toast.show { opacity: 1; transform: translateX(0); pointer-events: auto; }
.toast--success { border-left-color: #4ade80; }
.toast--error   { border-left-color: #f87171; }
.toast--info    { border-left-color: #60a5fa; }

.toast__icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.toast__body { flex: 1; min-width: 0; }
.toast__title { display: block; font-size: 14px; font-weight: 600; color: #f8fafc; margin-bottom: 3px; }
.toast__msg   { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; }

.toast__close {
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; padding: 0; margin-top: 1px;
    background: none; border: none; border-radius: 0;
    color: var(--muted); cursor: pointer; box-shadow: none; transition: color .2s;
}

.toast__close:hover { color: #f8fafc; transform: none; box-shadow: none; }
.toast__close svg   { width: 12px; height: 12px; }

/* ── Register ────────────────────────────── */
.register-body { overflow-y: auto; }
.register-body .login-container { align-items: flex-start; }
.register-body .login-left { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.register-body .login-right { align-items: flex-start; min-height: 100vh; }

.form-divider {
    display: flex; align-items: center; gap: 10px; margin: 4px 0 16px;
    color: #475569; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.2px;
}
.form-divider::before, .form-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Footer ──────────────────────────────── */
footer {
    padding: 28px var(--px); color: var(--muted); font-size: 13px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
}

.footer-brand { font-size: 16px; font-weight: 700; color: #fff; }
.footer-brand span { color: var(--primary); }

/* ── Animations ──────────────────────────── */
@keyframes fadeUp     { from { opacity: 0; transform: translateY(28px); }  to { opacity: 1; transform: translateY(0); } }
@keyframes slideLeft  { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideRight { from { opacity: 0; transform: translateX(36px);  } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse      { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */

/* ── Tablet ≤ 768px ──────────────────────── */
@media (max-width: 768px) {
    :root { --px: 5%; }

    /* — Hamburger — */
    .nav-toggle { display: flex; }

    nav ul {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; gap: 0; padding: 6px var(--px);
        background: rgba(13,20,40,.97); backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
        transition: max-height .35s ease, opacity .25s ease;
    }

    nav.nav-open ul { max-height: 340px; opacity: 1; pointer-events: auto; }

    nav ul li { border-bottom: 1px solid var(--border); }
    nav ul li:last-child { border-bottom: none; }

    nav a { display: block; padding: 14px 0; border-radius: 0; }
    nav a:not(.nav-cta)::after { display: none; }
    nav a.nav-cta { margin: 12px 0; text-align: center; border-radius: 10px; }

    /* — Hero — */
    .hero { padding: 120px var(--px) 60px; }
    .hero-content h1, .hero-content h2 { font-size: 52px; letter-spacing: -1px; }
    .hero-content p { font-size: 16px; }
    .hero-stats { max-width: 100%; }
    .hero-stat { padding: 14px 0; }

    /* — Sections — */
    .section-header { padding: 60px var(--px) 0; }
    .cards { gap: 16px; padding: 36px var(--px) 60px; }

    /* — Login — */
    .login-left  { display: none; }
    .login-right { padding: 40px var(--px); }
    form.form-card { padding: 32px 28px; }
    .address-grid { grid-template-columns: 1fr; gap: 0; }
    .address-grid input, .address-grid select { margin-bottom: 14px; }

    /* — Settings — */
    .settings-page { padding: 90px var(--px) 60px; }
    .settings-grid, .fields-2col { grid-template-columns: 1fr; }
    .settings-actions { justify-content: stretch; }
    .settings-actions .btn { width: 100%; text-align: center; display: block; }

    /* — Footer — */
    footer { flex-direction: column; text-align: center; gap: 8px; }
}

/* ── Mobile ≤ 480px ──────────────────────── */
@media (max-width: 480px) {
    .logo { font-size: 18px; }

    /* — Hero — */
    .hero-content h1, .hero-content h2 { font-size: 36px; letter-spacing: -.8px; }
    .hero-content p { font-size: 15px; }
    .hero-badge { font-size: 10px; padding: 6px 14px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn, .hero-actions a.btn-ghost { text-align: center; display: block; width: 100%; }

    .hero-stats { border-radius: 12px; }
    .hero-stat strong { font-size: 17px; }
    .hero-stat span   { font-size: 11px; }

    /* — Cards — */
    .cards { grid-template-columns: 1fr; }

    /* — Forms — */
    form.form-card { padding: 26px 20px; border-radius: 18px; }
    form.form-card h2 { font-size: 22px; }

    /* — Settings — */
    .settings-intro h1 { font-size: 1.9rem; }
    .settings-card { padding: 24px 20px; }

    /* — Toast — */
    .toast { right: 12px; left: 12px; min-width: unset; max-width: unset; }
}
