/* ======================================
   AISHOP — Login/Register Premium UI
   Split Panel + Material Design Layers
   ====================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Primary Navy Blue Palette */
    --primary: #6582AA;
    --primary-light: #83A2CD;
    --primary-dark: #4B6387;
    --primary-glow: rgba(101, 130, 170, 0.35);

    /* Accent tones */
    --accent-steel: #A3C5F1;
    --accent-sky: #83A2CD;
    --accent-slate: #334663;
    --accent-deep: #1E2B40;

    /* Neutrals */
    --bg-white: #ffffff;
    --bg-light: #f4f7fb;
    --text-dark: #0C121D;
    --text-body: #334663;
    --text-muted: #6582AA;
    --border-light: rgba(101, 130, 170, 0.15);

    /* Feedback */
    --danger: #e74c5e;
    --success: #28b573;
}

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

html, body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow: hidden;
    background: var(--bg-white);
}

/* ======================================
   WRAPPER — Split Layout
   ====================================== */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Back to Home Button */
.back-home-btn {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.back-home-btn i {
    font-size: 1.2rem;
}

.back-home-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ======================================
   LEFT PANEL — Decorative
   ====================================== */
.auth-panel-left {
    position: relative;
    width: 42%;
    min-height: 100vh;
    background: linear-gradient(160deg, var(--accent-deep) 0%, var(--primary-dark) 40%, var(--primary) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

/* Geometric Material Layers */
.geo-layer {
    position: absolute;
    border-radius: 0;
    pointer-events: none;
}

.geo-1 {
    width: 120%;
    height: 60%;
    bottom: -10%;
    left: -30%;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(163, 197, 241, 0.6) 100%);
    transform: rotate(-12deg) skewY(-5deg);
    z-index: 1;
}

.geo-2 {
    width: 100%;
    height: 50%;
    bottom: -5%;
    left: -20%;
    background: linear-gradient(135deg, var(--primary) 0%, rgba(131, 162, 205, 0.5) 100%);
    transform: rotate(-8deg) skewY(-3deg);
    z-index: 2;
}

.geo-3 {
    width: 80%;
    height: 40%;
    bottom: 0;
    left: -10%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    transform: rotate(-5deg) skewY(-2deg);
    z-index: 3;
}

/* Floating Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.15;
}

.orb-1 {
    width: 200px;
    height: 200px;
    top: 8%;
    right: -40px;
    background: radial-gradient(circle, var(--accent-steel), transparent 70%);
    animation: orbFloat 12s ease-in-out infinite;
}

.orb-2 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: -30px;
    background: radial-gradient(circle, var(--primary-light), transparent 70%);
    animation: orbFloat 15s ease-in-out infinite reverse;
}

.orb-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    right: 15%;
    background: radial-gradient(circle, #fff, transparent 70%);
    animation: orbFloat 10s ease-in-out infinite 3s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(15px, -20px) scale(1.15); }
    66% { transform: translate(-10px, 15px) scale(0.9); }
}

/* Panel Content */
.panel-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    padding: 0 40px;
}

.panel-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: iconPulse 3s ease-in-out infinite alternate;
}

.panel-icon i {
    font-size: 2.8rem;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

@keyframes iconPulse {
    from { transform: scale(1); box-shadow: 0 8px 32px rgba(0,0,0,0.1); }
    to { transform: scale(1.05); box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
}

.panel-content h1 {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 8px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.panel-tagline {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.85;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Panel Tabs */
.panel-tabs {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.panel-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.panel-tab.active {
    background: rgba(255, 255, 255, 0.22);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Panel Footer */
.panel-footer {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    z-index: 10;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.panel-footer i {
    font-size: 0.9rem;
}

/* ======================================
   RIGHT PANEL — Forms
   ====================================== */
.auth-panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    padding: 40px;
    position: relative;
    overflow-y: auto;
}

/* Mobile Logo (hidden on desktop) */
.mobile-logo {
    display: none;
}

/* ======================================
   AUTH CARD
   ====================================== */
.auth-card {
    width: 100%;
    max-width: 420px;
    animation: cardFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Avatar Circle */
.card-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary), var(--accent-steel));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px var(--primary-glow);
    position: relative;
    animation: avatarBreath 4s ease-in-out infinite alternate;
}

.avatar-circle i {
    font-size: 2.2rem;
    color: white;
}

.register-avatar {
    background: linear-gradient(145deg, var(--primary-light), var(--primary));
}

@keyframes avatarBreath {
    from { box-shadow: 0 8px 30px var(--primary-glow); }
    to { box-shadow: 0 12px 40px rgba(101, 130, 170, 0.5); }
}

/* Card Headings */
.auth-card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.card-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 32px;
    font-weight: 400;
}

/* ======================================
   FORM FIELDS — Underline Style
   ====================================== */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-field {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 0;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.3s ease;
    pointer-events: none;
}

.form-field input {
    width: 100%;
    border: none;
    border-bottom: 2px solid var(--border-light);
    padding: 12px 40px 12px 36px;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    background: transparent;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-field input::placeholder {
    color: var(--text-muted);
    font-weight: 300;
}

.field-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-dark), var(--accent-steel));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-field input:focus ~ .field-line {
    width: 100%;
}

.form-field input:focus {
    border-bottom-color: transparent;
}

.form-field:has(input:focus) .field-icon {
    color: var(--primary);
}

.toggle-pwd {
    position: absolute;
    right: 4px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.15rem;
    transition: color 0.2s;
    z-index: 2;
}

.toggle-pwd:hover {
    color: var(--primary);
}

/* ======================================
   ERROR / SUCCESS MESSAGES
   ====================================== */
.error-msg {
    color: var(--danger);
    font-size: 0.82rem;
    text-align: center;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
    font-weight: 500;
}

.success-msg {
    color: var(--success);
    font-size: 0.82rem;
    text-align: center;
    min-height: 20px;
    margin-bottom: 8px;
    font-weight: 500;
}

/* ======================================
   AUTH BUTTON
   ====================================== */
.form-actions {
    margin-top: 8px;
}

.auth-btn {
    width: 100%;
    padding: 15px 24px;
    border: none;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 2px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 24px var(--primary-glow);
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(101, 130, 170, 0.5);
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 20px var(--primary-glow);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.register-btn {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

/* Spinner */
.auth-btn .spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ======================================
   AUTH FOOTER
   ====================================== */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    font-size: 0.88rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: all 0.2s;
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ======================================
   RESPONSIVE
   ====================================== */

/* Tablet */
@media (max-width: 900px) {
    .auth-panel-left {
        width: 35%;
    }

    .panel-content h1 {
        font-size: 1.8rem;
    }

    .panel-tagline {
        font-size: 0.88rem;
    }

    .panel-tabs {
        flex-direction: column;
    }
}

/* Mobile */
@media (max-width: 680px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-panel-left {
        display: none;
    }

    .auth-panel-right {
        padding: 30px 24px;
        min-height: 100vh;
        background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 30%);
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .back-home-btn {
        color: var(--primary);
        background: rgba(101, 130, 170, 0.08);
        border-color: rgba(101, 130, 170, 0.15);
        top: 20px;
        left: 20px;
        backdrop-filter: none;
    }

    .back-home-btn:hover {
        color: var(--primary-dark);
        background: rgba(101, 130, 170, 0.15);
        transform: translateY(-2px);
    }

    .mobile-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-bottom: 16px;
        gap: 6px;
        width: 100%;
        text-align: center;
    }

    .mobile-logo i {
        font-size: 2.2rem;
        color: var(--primary);
        animation: iconPulse 3s ease-in-out infinite alternate;
    }

    .mobile-logo h1 {
        font-size: 1.4rem;
        font-weight: 800;
        color: var(--primary);
        letter-spacing: 3px;
    }

    .auth-card {
        max-width: 100%;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .avatar-circle {
        width: 64px;
        height: 64px;
    }

    .avatar-circle i {
        font-size: 1.8rem;
    }

    .auth-card h2 {
        font-size: 1.35rem;
    }
}

/* Small Mobile */
@media (max-width: 380px) {
    .auth-panel-right {
        padding: 20px 16px;
    }

    .form-field input {
        font-size: 0.88rem;
        padding: 10px 36px 10px 32px;
    }

    .auth-btn {
        padding: 13px 20px;
        font-size: 0.88rem;
    }
}
