@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:          #f3f4f6;
    --surface:     #ffffff;
    --surface2:    #f9fafb;
    --border:      #e5e7eb;
    --blue:        #2563eb;
    --blue-light:  #3b82f6;
    --blue-tint:   rgba(37,99,235,0.06);
    --blue-border: rgba(37,99,235,0.3);
    --text:        #111827;
    --text-dim:    #9ca3af;
    --text-mid:    #6b7280;
    --red:         #dc2626;
    --green:       #16a34a;
    --radius:      4px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 400;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════════ */

.container { display: flex; width: 100%; min-height: 100vh; }

/* Left panel */
.left {
    flex: 3;
    background: #1e3a5f;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.left-placeholder {
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.left-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
    display: block;
    opacity: 0.85;
}

.left-placeholder::after {
    content: 'VELOCE';
    position: absolute;
    bottom: 24px;
    left: 28px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: rgba(255,255,255,0.6);
    pointer-events: none;
}

/* Right panel */
.right {
    flex: 1;
    min-width: 400px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 48px;
}

.login-box {
    width: 100%;
    max-width: 320px;
}

.logo-container { text-align: center; margin-bottom: 32px; }

.login-logo { max-width: 120px; height: auto; display: inline-block; }

.login-box h1,
.register-card h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.login-box > p,
.register-card > p {
    font-size: 13px;
    color: var(--text-mid);
    text-align: center;
    margin-bottom: 28px;
}

/* ─── Form Elements ──────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mid);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    font-family: 'Inter', system-ui, sans-serif;
    transition: border-color 0.15s, background 0.15s;
    -webkit-appearance: none;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--blue); background: #fff; }

.form-group input::placeholder { color: var(--text-dim); }
.form-group input:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Login Button ───────────────────────────────────────── */
.login-btn {
    width: 100%;
    padding: 11px;
    background: var(--blue);
    border: 1px solid var(--blue);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    margin-top: 4px;
}

.login-btn:hover { background: var(--blue-light); border-color: var(--blue-light); }

/* ─── Extra Links ────────────────────────────────────────── */
.extra-links { margin-top: 20px; text-align: center; font-size: 13px; color: var(--text-mid); }
.extra-links a { color: var(--blue); text-decoration: none; font-weight: 500; }
.extra-links a:hover { text-decoration: underline; }

/* ─── Responsive: login ──────────────────────────────────── */
@media (max-width: 900px) {
    .left { display: none; }
    .right { min-width: 0; flex: 1; padding: 48px 28px; border-left: none; }
}

@media (max-width: 480px) {
    .right { padding: 40px 20px; }
}


/* ═══════════════════════════════════════════════════════════
   REGISTER PAGE
═══════════════════════════════════════════════════════════ */

.register-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 24px;
    background: var(--bg);
}

.register-background {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    overflow: hidden;
}

.register-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.25) saturate(0.3);
    transform: scale(1.02);
}

.register-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(243,244,246,0.65);
}

.register-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 860px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ─── Register Card ──────────────────────────────────────── */
.register-card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 40px 48px 48px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

/* ─── Sections ───────────────────────────────────────────── */
.reg-section { margin-bottom: 24px; }
.reg-section:last-of-type { margin-bottom: 0; }

.reg-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--blue);
    padding-bottom: 8px;
    margin-bottom: 16px;
    display: block;
    border-bottom: 1px solid var(--border);
}

/* ─── Row helpers ────────────────────────────────────────── */
.form-row { display: flex; gap: 16px; }
.form-row-three { gap: 14px; }
.form-group-half  { flex: 1; margin-bottom: 16px; }
.form-group-third { flex: 1; margin-bottom: 16px; }

/* ─── Referral field ─────────────────────────────────────── */
.referral-field .form-group input {
    border-color: var(--blue-border);
    background: var(--blue-tint);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.referral-field .form-group input:focus { border-color: var(--blue); background: #fff; }

/* ─── Responsive: register ───────────────────────────────── */
@media (max-width: 768px) {
    .register-page { padding: 20px 14px; }
    .register-card { padding: 28px 20px 36px; }
    .register-card h1 { font-size: 18px; }
    .form-row, .form-row-three { flex-direction: column; gap: 0; }
    .form-group-half, .form-group-third { width: 100%; }
}

@media (max-width: 480px) {
    .register-page { padding: 12px; }
    .register-card { padding: 22px 16px 28px; }
}

/* ─── Toast ──────────────────────────────────────────────── */
#toast-notice {
    position: fixed;
    top: 20px; right: 20px;
    z-index: 9999;
    min-width: 260px; max-width: 400px;
    padding: 12px 16px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--radius);
    border-left: 3px solid transparent;
    opacity: 0;
    transform: translateX(calc(100% + 32px));
    transition: opacity 0.25s, transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

#toast-notice.show { opacity: 1; transform: translateX(0); pointer-events: auto; }

#toast-notice.success {
    background: var(--surface);
    border-left-color: var(--green);
    color: var(--text);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1), 0 0 0 1px var(--border);
}

#toast-notice.error {
    background: var(--surface);
    border-left-color: var(--red);
    color: var(--text);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1), 0 0 0 1px var(--border);
}