/* =============================================
   FarCash — Register Page Stylesheet
   Synced with Dashboard color palette
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    /* ── Dashboard-matched palette ── */
    --sidebar-bg:    #0a1f44;
    --accent:        #60a5fa;
    --accent-2:      #3b82f6;
    --accent-dim:    rgba(59,130,246,0.1);
    --accent-glow:   rgba(59,130,246,0.2);
    --income:        #34d399;
    --expense:       #f87171;
    --surface:       #ffffff;
    --border:        #dbeafe;
    --border-strong: #bfdbfe;
    --text-primary:  #0a1f44;
    --text-secondary:#3b82f6;
    --text-muted:    #94a3b8;
    --bg:            #f0f6ff;
    --bg-2:          #e4efff;
    --shadow-sm:     0 1px 3px rgba(59,130,246,0.06), 0 1px 2px rgba(59,130,246,0.04);
    --shadow-md:     0 4px 16px rgba(59,130,246,0.1), 0 2px 6px rgba(59,130,246,0.06);
    --shadow-lg:     0 20px 60px rgba(10,31,68,0.12), 0 8px 20px rgba(59,130,246,0.06);
    --radius:        16px;
    --radius-sm:     12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 1000px 700px at 80% -10%, rgba(59,130,246,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 700px 500px at -5% 80%, rgba(147,197,253,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 500px 400px at 50% 50%, rgba(96,165,250,0.04) 0%, transparent 60%);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: stretch;
    position: relative;
    overflow-x: hidden;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(18px, 28px) scale(1.04); }
    66% { transform: translate(-12px, -8px) scale(0.96); }
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseBlue {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(96,165,250,0.7); }
    50% { opacity: 0.4; box-shadow: 0 0 2px rgba(96,165,250,0.3); }
}

/* ─── SPLIT LAYOUT ─────────────────────────────── */
.register-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Left panel – branding (matches sidebar style) */
.register-left {
    width: 420px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 52px;
    position: relative;
    overflow: hidden;
}

.register-left::before {
    content: '';
    position: absolute;
    top: -120px; left: -80px;
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 65%);
    animation: floatOrb 10s ease-in-out infinite;
    pointer-events: none;
}

.register-left::after {
    content: '';
    position: absolute;
    bottom: 80px; right: -100px;
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(96,165,250,0.08) 0%, transparent 65%);
    animation: floatOrb 16s ease-in-out infinite reverse;
    pointer-events: none;
}

.brand-logo {
    display: flex;
    align-items: center;
    margin-bottom: 56px;
    position: relative;
    z-index: 1;
    animation: fadeSlideUp 0.5s ease 0.05s both;
}

.brand-logo-img {
    height: 140px;
    width: 220px;
    object-fit: contain;
    object-position: left center;
}

.brand-tagline {
    position: relative;
    z-index: 1;
    animation: fadeSlideUp 0.5s ease 0.1s both;
}

.brand-tagline h1 {
    font-family: 'Instrument Serif', serif;
    font-size: 40px;
    font-weight: 400;
    font-style: italic;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.8px;
    margin-bottom: 18px;
}

.brand-tagline h1 span {
    color: var(--accent);
    text-shadow: 0 0 30px rgba(96,165,250,0.3);
}

.brand-tagline p {
    font-size: 14px;
    color: rgba(255,255,255,0.45);
    line-height: 1.65;
    font-weight: 400;
    max-width: 280px;
}

.brand-features {
    list-style: none;
    margin-top: 40px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeSlideUp 0.5s ease 0.15s both;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
}

.brand-features li::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--income);
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(52,211,153,0.7);
    animation: pulseBlue 2.5s infinite;
}

/* Right panel – form */
.register-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 60px;
    background: transparent;
    overflow-y: auto;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ─── CARD ──────────────────────────────────────── */
.register-card {
    width: 100%;
    max-width: 440px;
    animation: fadeSlideUp 0.55s cubic-bezier(0.16,1,0.3,1) 0.08s both;
}

.card-header { margin-bottom: 36px; }

.card-header .badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-dim);
    border: 1px solid rgba(59,130,246,0.2);
    color: var(--accent-2);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    padding: 5px 12px;
    border-radius: 30px;
    margin-bottom: 16px;
}

.card-header .badge::before {
    content: '';
    width: 5px; height: 5px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(96,165,250,0.7);
    animation: pulseBlue 2.5s infinite;
}

.card-header h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 32px;
    font-weight: 400;
    font-style: italic;
    color: var(--text-primary);
    letter-spacing: -0.6px;
    line-height: 1.1;
    margin-bottom: 8px;
}

.card-header p {
    font-size: 13.5px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ─── ALERTS ─────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeSlideUp 0.3s ease both;
}

.alert-error {
    background: rgba(248,113,113,0.07);
    border: 1px solid rgba(248,113,113,0.2);
    color: #dc2626;
}

.alert-success {
    background: rgba(52,211,153,0.08);
    border: 1px solid rgba(52,211,153,0.25);
    color: #059669;
}

.alert-icon { font-size: 15px; flex-shrink: 0; }

/* ─── FORM ───────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.form-group { margin-bottom: 18px; }
.form-group.full { grid-column: 1 / -1; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.input-wrap { position: relative; }

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.45;
}

.form-group input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 16px; /* Prevent iOS zoom */
    font-weight: 400;
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form-group input:focus {
    border-color: rgba(59,130,246,0.5);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1), var(--shadow-sm);
    background: #f0f6ff;
}

/* ─── DIVIDER ─────────────────────────────────────── */
.form-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 20px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.form-divider span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ─── SUBMIT BUTTON ──────────────────────────────── */
.btn-register {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    border: none;
    color: #ffffff;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(59,130,246,0.4);
    min-height: 50px;
    -webkit-tap-highlight-color: transparent;
}

.btn-register::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59,130,246,0.5);
}

.btn-register:hover::before { opacity: 1; }
.btn-register:active { transform: translateY(0); }

.btn-register span {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ─── FOOTER LINK ─────────────────────────────────── */
.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--accent-2);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.form-footer a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — TABLET
   ══════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .register-left { display: none; }

    body {
        background: var(--sidebar-bg);
        background-image:
            radial-gradient(ellipse 600px 400px at 80% -10%, rgba(59,130,246,0.15) 0%, transparent 60%),
            radial-gradient(ellipse 400px 300px at -5% 80%, rgba(96,165,250,0.1) 0%, transparent 60%);
        align-items: flex-start;
    }

    .register-wrapper {
        background: transparent;
        min-height: 100dvh;
    }

    .register-right {
        background: transparent;
        padding: 40px 24px;
        min-height: 100dvh;
    }

    .register-card {
        background: var(--surface);
        border-radius: 24px;
        padding: 36px 32px;
        box-shadow:
            0 0 0 1px rgba(59,130,246,0.05) inset,
            0 20px 60px rgba(10,31,68,0.3),
            0 0 80px rgba(59,130,246,0.08);
    }

    .card-header h2 { font-size: 28px; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 500px)
   ══════════════════════════════════════════════════ */
@media (max-width: 500px) {
    body {
        align-items: flex-start;
    }

    .register-right {
        padding: 20px 16px;
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
        align-items: flex-start;
    }

    .register-card {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .card-header {
        margin-bottom: 24px;
    }

    .card-header h2 { font-size: 26px; }

    .card-header p { font-size: 13px; }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full {
        grid-column: 1;
    }

    .form-group input {
        font-size: 16px; /* Critical: prevent iOS zoom */
        padding: 13px 14px 13px 42px;
    }

    .btn-register {
        padding: 16px 20px;
        font-size: 15px;
    }

    .form-footer {
        font-size: 13px;
        margin-top: 16px;
    }
}

/* ══════════════════════════════════════════════════
   VERY SMALL (≤ 360px)
   ══════════════════════════════════════════════════ */
@media (max-width: 360px) {
    .register-right {
        padding: 16px 12px;
    }

    .register-card {
        padding: 24px 16px;
    }

    .card-header h2 { font-size: 22px; }
}