:root {
    --auth-bg: linear-gradient(135deg, #0f172a 0%, #111827 55%, #1f2937 100%);
    --auth-card: rgba(255, 255, 255, 0.97);
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-border: #dbe2ea;
    --auth-primary: #4f46e5;
    --auth-primary-2: #7c3aed;
    --auth-primary-shadow: rgba(79, 70, 229, 0.35);
}

* { box-sizing: border-box; }

.public-auth-body {
    background: var(--auth-bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 24px;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    color: var(--auth-text);
}

.auth-container {
    width: 100%;
    max-width: 560px;
    padding: 32px;
    background: var(--auth-card);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

.auth-container.login { max-width: 430px; }

.auth-header { text-align: center; margin-bottom: 22px; }
.auth-header-brand-link {
    display: inline-block;
    margin-bottom: 10px;
    text-decoration: none;
}
.auth-header-brand-text {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #312e81;
}
.auth-title { margin: 10px 0 4px; font-size: 24px; letter-spacing: -0.2px; }
.auth-subtitle { color: var(--auth-muted); margin: 6px 0 0; font-size: 14px; }

.field { margin-bottom: 15px; }
.field label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
.field input {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #ffffff;
    color: #4338ca;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.password-toggle svg { width: 16px; height: 16px; }

.muted-help { color: var(--auth-muted); font-size: 12px; margin-top: 6px; display: block; }
.card-box {
    margin-bottom: 16px;
    background: #f8fafc;
    border: 1px solid #e5eaf0;
    border-radius: 10px;
    padding: 13px;
    font-size: 13px;
    color: #334155;
}

.package-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.package-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
}
.package-item:hover { background: #eef2ff; }

.submit-btn {
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-2) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 30px var(--auth-primary-shadow);
    transition: transform .2s ease, filter .2s ease;
}
.submit-btn:hover { transform: translateY(-1px); filter: brightness(1.03); }

.feedback {
    margin-top: 12px;
    text-align: center;
    display: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
}
.auth-error { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; }
.auth-success { color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; }

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
    color: var(--auth-muted);
    font-size: 14px;
}
.auth-footer a { color: var(--auth-primary); text-decoration: none; font-weight: 700; }

.terms-link { color: #667eea; text-decoration: underline; }
.terms-check-wrap {
    margin-top: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #333;
}

.terms-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.terms-modal {
    background: #fff;
    color: #222;
    max-width: 720px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}
.terms-modal-title { margin-top: 0; margin-bottom: 12px; color: #2c3e50; }
.terms-modal-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
}
.terms-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}
.terms-modal-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
    margin-right: auto;
}
.btn-secondary-light {
    padding: 10px 14px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
}
.btn-primary-solid {
    padding: 10px 14px;
    border: none;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* Landing */
.landing-body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    background: linear-gradient(165deg, #0b1020 0%, #131a2b 45%, #1f2a44 100%);
    color: #e2e8f0;
}
.landing-wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 64px; }
.landing-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    gap: 10px;
}
.landing-brand { display: flex; align-items: center; color: #fff; font-weight: 700; }
.landing-brand-name { font-size: 1.35rem; letter-spacing: -0.02em; }
.landing-top-actions a {
    color: #c7d2fe;
    text-decoration: none;
    font-weight: 600;
    margin-left: 14px;
}
.landing-hero {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 24px;
    align-items: center;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
}
.landing-tag {
    display: inline-block;
    font-size: 12px;
    color: #c7d2fe;
    border: 1px solid rgba(199, 210, 254, .35);
    border-radius: 999px;
    padding: 6px 12px;
    margin-bottom: 12px;
}
.landing-h1 { margin: 0; font-size: 42px; line-height: 1.1; color: #fff; }
.landing-lead { margin: 14px 0 18px; color: #cbd5e1; font-size: 17px; line-height: 1.6; }
.landing-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.landing-btn {
    display: inline-block;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    transition: .2s ease;
}
.landing-btn-primary { background: #4f46e5; color: #fff; }
.landing-btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.landing-btn-ghost { border: 1px solid rgba(255, 255, 255, .24); color: #e2e8f0; }
.landing-hero-card {
    background: rgba(15, 23, 42, .7);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    padding: 18px;
}
.landing-hero-card h3 { margin: 0 0 10px; color: #fff; font-size: 18px; }
.landing-hero-card ul { margin: 0; padding-left: 16px; color: #cbd5e1; line-height: 1.7; }
.landing-section { margin-top: 28px; }
.landing-section h2 { margin: 0 0 12px; color: #fff; font-size: 25px; }
.landing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.landing-box {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    padding: 16px;
}
.landing-box h3 { margin: 0 0 8px; color: #fff; font-size: 17px; }
.landing-box p { margin: 0; color: #cbd5e1; line-height: 1.55; }
.landing-box a { color: #c7d2fe; text-decoration: none; }
.landing-foot { margin-top: 36px; text-align: center; font-size: 13px; color: #94a3b8; }
.landing-foot a { color: #c7d2fe; text-decoration: none; }

@media (max-width: 960px) {
    .landing-hero { grid-template-columns: 1fr; }
    .landing-grid { grid-template-columns: 1fr 1fr; }
    .landing-h1 { font-size: 34px; }
}
@media (max-width: 640px) {
    .landing-grid { grid-template-columns: 1fr; }
    .landing-topbar { flex-direction: column; align-items: flex-start; }
    .package-grid { grid-template-columns: 1fr; }
}
