@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600&family=Playfair+Display:wght@400;500&display=swap');

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

:root {
    --accent:        #1E90FF;
    --accent-dark:   #1570cc;
    --bg:            #f0f4f8;
    --bg-card:       #ffffff;
    --bg-input:      #f8f9fb;
    --border:        #e4e6ea;
    --border-focus:  #1E90FF;
    --text-primary:  #0f1117;
    --text-secondary:#5c6170;
    --text-muted:    #9ba3af;
    --error:         #e53e3e;
    --radius:        14px;
    --radius-sm:     9px;
}

html, body {
    height: 100%;
    background: var(--bg);
    font-family: 'Sora', sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* ── Layout ──────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ── Left Panel ──────────────────────────────────── */
.auth-panel-left {
    background: #0f1117;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-panel-left::before {
    content: '';
    position: absolute;
    top: -200px;
    left: -200px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30,144,255,0.12) 0%, transparent 65%);
    pointer-events: none;
}

.auth-panel-left::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30,144,255,0.06) 0%, transparent 65%);
    pointer-events: none;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1;
}

.auth-logo-mark {
    width: 42px;
    height: 42px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: #ffffff;
    font-weight: 500;
    flex-shrink: 0;
    overflow: hidden;
}

.auth-logo-mark img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
}

.auth-logo-name {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.auth-panel-hero {
    z-index: 1;
}

.auth-panel-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -1px;
    color: #ffffff;
    margin-bottom: 1.2rem;
}

.auth-panel-hero h1 em {
    font-style: italic;
    color: var(--accent);
}

.auth-panel-hero p {
    font-size: 15px;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
    max-width: 360px;
}

.auth-panel-footer {
    font-size: 12px;
    color: rgba(255,255,255,0.25);
    z-index: 1;
}

/* ── Right Panel ─────────────────────────────────── */
.auth-panel-right {
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 4rem;
}

.auth-form-wrap {
    width: 100%;
    max-width: 420px;
}

.auth-form-header {
    margin-bottom: 2.5rem;
}

.auth-form-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: .4rem;
}

.auth-form-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ── Alerts ──────────────────────────────────────── */
.auth-alert {
    background: rgba(30,144,255,0.08);
    border: 1px solid rgba(30,144,255,0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.auth-alert-error {
    background: rgba(229,62,62,0.06);
    border: 1px solid rgba(229,62,62,0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13px;
    color: var(--error);
    margin-bottom: 1.5rem;
}

/* ── Form Fields ─────────────────────────────────── */
.field {
    margin-bottom: 1.1rem;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 1.1rem;
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: .5rem;
}

.field input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: 'Sora', sans-serif;
    color: var(--text-primary);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.field input::placeholder {
    color: var(--text-muted);
}

.field input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(30,144,255,0.1);
    background: #ffffff;
}

.field-error {
    font-size: 12px;
    color: var(--error);
    margin-top: 5px;
}

/* ── Auth Options ────────────────────────────────── */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.8rem;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.auth-link {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color .2s;
}

.auth-link:hover { color: var(--accent); }

/* ── Buttons ─────────────────────────────────────── */
.btn-auth {
    width: 100%;
    padding: 13px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    transition: background .2s, transform .1s;
    letter-spacing: -0.2px;
}

.btn-auth:hover { background: var(--accent-dark); }
.btn-auth:active { transform: scale(0.99); }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.btn-auth-secondary {
    display: block;
    width: 100%;
    padding: 13px;
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    transition: border-color .2s, color .2s;
    text-align: center;
    text-decoration: none;
}

.btn-auth-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Terms ───────────────────────────────────────── */
.auth-terms {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1.2rem;
    line-height: 1.6;
}

.auth-terms a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-panel-left { display: none; }
    .auth-panel-right { padding: 2rem 1.5rem; min-height: 100vh; }
    .field-row { grid-template-columns: 1fr; }
}