/* ═══════════════════════════════════════════════════════════════
   COR WaaS — Auth Pages v2
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Outfit', sans-serif;
    background: #06080f;
    color: #94a3b8;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ── Left Panel — Brand ───────────────────────────────────── */
.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    background: #0a0e1a;
    border-right: 1px solid rgba(255,255,255,0.04);
}

.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(59,130,246,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.015) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 70%);
}

body.auth-register .auth-brand::before {
    background:
        linear-gradient(rgba(139,92,246,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139,92,246,0.015) 1px, transparent 1px);
    background-size: 48px 48px;
}

.auth-brand::after {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,0.06) 0%, transparent 60%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: breathe 8s ease-in-out infinite;
}

body.auth-register .auth-brand::after {
    background: radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 60%);
}

@keyframes breathe {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.08); }
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.auth-brand-logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Urbanist', sans-serif;
    font-weight: 900;
    font-size: 1.125rem;
    color: #fff;
    margin: 0 auto 1.25rem;
    letter-spacing: -0.03em;
}

body.auth-register .auth-brand-logo {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
}

.auth-brand h1 {
    font-family: 'Urbanist', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: #f1f5f9;
    letter-spacing: -0.04em;
}

.auth-brand h1 span {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.auth-register .auth-brand h1 span {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-brand-tagline {
    margin-top: 6px;
    font-size: 0.875rem;
    color: #475569;
}

/* Feature list (login) */
.auth-features {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    max-width: 260px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    color: #64748b;
}

.auth-feature i {
    font-size: 1rem;
    color: #3b82f6;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

/* Steps (register) */
.auth-steps {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
    max-width: 280px;
}

.auth-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.auth-step-num {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    flex-shrink: 0;
    background: rgba(139,92,246,0.1);
    color: #8b5cf6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Urbanist', sans-serif;
    font-weight: 800;
    font-size: 0.6875rem;
}

.auth-step-text strong {
    display: block;
    font-size: 0.8125rem;
    color: #f1f5f9;
    font-weight: 600;
}

.auth-step-text span {
    font-size: 0.6875rem;
    color: #475569;
}

/* ── Right Panel — Form ───────────────────────────────────── */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    overflow-y: auto;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
}

body.auth-login .auth-form-wrapper {
    max-width: 360px;
}

.auth-form-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

.auth-form-subtitle {
    font-size: 0.8125rem;
    color: #475569;
    margin-bottom: 1.75rem;
}

/* Forms */
.form-group { margin-bottom: 14px; }

.label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.input {
    width: 100%;
    padding: 10px 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8125rem;
    color: #f1f5f9;
    background: #0e1225;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.input::placeholder { color: #334155; }

/* Buttons */
.btn-gradient {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59,130,246,0.25);
}

body.auth-register .btn-gradient {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
}

body.auth-register .btn-gradient:hover {
    box-shadow: 0 4px 16px rgba(139,92,246,0.25);
}

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

.alert-success {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.15);
    color: #10b981;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.8125rem;
    margin-bottom: 16px;
}

.mep-warning {
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.15);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.6875rem;
    color: #f59e0b;
    line-height: 1.5;
    margin-top: 6px;
}

.api-key-block {
    background: #0e1225;
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 6px;
    padding: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.625rem;
    color: #3b82f6;
    word-break: break-all;
    cursor: pointer;
    user-select: all;
}

/* Footer */
.auth-footer-text {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.8125rem;
    color: #475569;
}

.auth-footer-text a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer-text a:hover { text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    body { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-form-panel { padding: 2rem 1.25rem; }
}
