/* CARRYVALA Premium Auth Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #DE3B40;
    --primary-gradient: #DE3B40;
    --dark: #111827;
    --text-muted: #6B7280;
    --glass-bg: #FFFFFF;
    --glass-border: #F3F4F6;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 50px rgba(222, 59, 64, 0.2);
    --input-bg: #F9FAFB;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    background: #F9FAFB;
    /* Light background per new design */
    color: var(--dark);
    display: flex;
    flex-direction: column;
}

/* --- Layout Structure --- */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #F9FAFB;
    padding: 1rem;
}

.top-bar {
    padding: 1.5rem 0 2rem;
    display: flex;
    align-items: center;
    position: relative;
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
}

.top-bar-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 700;
    font-size: 1.2rem;
    color: #111827;
    /* Dark text for light bg */
}

.back-btn {
    color: #111827;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 0;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    /* Force center horizontally inside flex column */
}

.auth-container.wide {
    max-width: 650px;
    /* Wider for register forms to look professional on desktop */
}

.auth-header {
    text-align: center;
    margin: 1.5rem 0 2rem 0;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: #FFEDED;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.logo-circle i {
    font-size: 2.5rem;
    color: var(--primary);
}

.auth-header h2 {
    font-size: 2rem;
    color: #111827;
    /* Dark text for light bg */
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-header p {
    color: #6B7280;
    /* Text muted */
    font-size: 1.05rem;
    font-weight: 400;
}

.glass-card {
    background: #FFFFFF;
    border: none;
    border-radius: 32px;
    padding: 2.5rem 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    animation: fadeUp 0.6s ease-out forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Content Styling --- */
.logo-brand {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    display: inline-block;
}

/* --- Form Fields --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #374151;
    /* Dark gray */
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i.leading-icon {
    position: absolute;
    left: 1.2rem;
    font-size: 1.3rem;
    color: #9CA3AF;
    z-index: 5;
}

.form-control {
    width: 100%;
    padding: 1.1rem 1.25rem 1.1rem 3.2rem;
    border-radius: 50px;
    border: 1px solid #F3F4F6;
    background: #F9FAFB;
    /* Very light gray */
    font-size: 1rem;
    color: var(--dark);
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 500;
}

.form-control::placeholder {
    color: #9CA3AF;
}

.form-control:focus {
    outline: none;
    border-color: rgba(222, 59, 64, 0.4);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(222, 59, 64, 0.05);
}

.form-control:focus+i.leading-icon,
.input-wrapper:focus-within i.leading-icon {
    color: var(--primary);
}

textarea.form-control {
    border-radius: 20px;
    resize: none;
}

/* --- Password Toggle --- */
.password-group {
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 1.2rem;
    font-size: 1.3rem;
    color: #9CA3AF;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 5;
}

.password-toggle:hover {
    color: var(--dark);
}

.forgot-link {
    display: block;
    text-align: right;
    margin-top: 0.8rem;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* --- Buttons --- */
.btn-primary {
    width: 100%;
    padding: 1.2rem;
    border-radius: 50px;
    background: var(--primary);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(222, 59, 64, 0.2);
    transition: all 0.2s ease;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(222, 59, 64, 0.3);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-outline {
    width: 100%;
    padding: 1.2rem;
    border-radius: 50px;
    background: #FFFFFF;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    border: 2px solid #FCA5A5;
    /* Soft red border */
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-outline:hover {
    background: #FFF5F5;
    border-color: var(--primary);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.8rem 0;
    color: #9CA3AF;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid #F3F4F6;
}

.divider:not(:empty)::before {
    margin-right: 1rem;
}

.divider:not(:empty)::after {
    margin-left: 1rem;
}

/* --- Footer Links --- */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    margin-left: 0.3rem;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .auth-page {
        padding: 1.5rem 1rem;
        justify-content: center;
        /* Keep centered on mobile */
    }

    .top-bar {
        margin-bottom: 1rem;
        padding: 0;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .glass-card {
        padding: 2rem 1.5rem;
        border-radius: 24px;
    }

    .auth-header h2 {
        font-size: 1.75rem;
    }
}