/* ==============================================
   Auth Pages Styles
   Redesign based on Stitch concept
   ============================================== */

:root {
    /* Colors */
    --auth-primary: #F4C412;
    /* Vibrant yellow */
    --auth-primary-hover: #D9AE10;
    --auth-bg-light: #FFFFFF;
    --auth-bg-dark: #0f172a;
    --auth-surface-light: #F9FAFB;
    --auth-surface-dark: #1e293b;
    --auth-brand-purple: #56307c;
    /* Brand Dominant Purple updated */

    /* Text */
    --text-main: #111827;
    /* Gray 900 */
    --text-secondary: #4b5563;
    /* Gray 600 */
    --text-muted: #6b7280;
    /* Gray 500 */
    --text-light: #f3f4f6;
    /* Gray 100 */

    /* Typography */
    /* Typography - Matched to Main Site */
    --font-sans: 'Alan Sans', 'Inter', sans-serif;
    --font-serif: 'Libre Baskerville', serif;

    /* Spacing & Borders */
    --radius-lg: 0.75rem;
    /* 12px */
    --radius-xl: 1rem;
    /* 16px */
}

/* Base Setup */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background-color: var(--auth-bg-light);
    color: var(--text-main);
}

.d-none {
    display: none !important;
}

@media (min-width: 768px) {
    .d-md-flex {
        display: flex !important;
    }
}

.auth-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    .auth-layout {
        flex-direction: row;
        height: 100vh;
        overflow: hidden;
    }
}

/* ----- Left Panel (Visual) ----- */
.auth-visual-side {
    display: none;
    position: relative;
    background-color: var(--auth-brand-purple);
    flex-direction: column;
    justify-content: center;
    padding: 3rem 4rem;
    overflow: hidden;
}

@media (min-width: 768px) {
    .auth-visual-side {
        display: flex;
        width: 50%;
    }
}

@media (min-width: 1024px) {
    .auth-visual-side {
        width: 41.666667%;
        /* 5/12 */
    }
}

/* Background Mesh Animation (Matches Main Site) */
.auth-bg-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(at 0% 0%, rgba(0, 154, 218, 0.3) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(247, 190, 9, 0.2) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(86, 48, 124, 0.4) 0px, transparent 50%),
        radial-gradient(at 80% 50%, rgba(0, 154, 218, 0.15) 0px, transparent 50%);
    filter: blur(60px);
    z-index: 0;
}

.auth-bg-logo {
    position: absolute;
    width: 80%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    opacity: 0.04;
    pointer-events: none;
    z-index: 1;
}

.auth-visual-content {
    position: relative;
    z-index: 10;
    color: white;
}

.brand-heading {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .brand-heading {
        font-size: 3.75rem;
    }
}

.brand-highlight {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--auth-primary);
}

.brand-subtext {
    font-size: 1.125rem;
    font-weight: 300;
    color: #e5e7eb;
    /* Gray 200 */
    max-width: 28rem;
    line-height: 1.625;
}

.feature-list {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.feature-icon-box {
    width: 3rem;
    height: 3rem;
    background: rgba(244, 196, 18, 0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-primary);
    border: 1px solid rgba(244, 196, 18, 0.2);
    flex-shrink: 0;
}

.feature-text h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.feature-text p {
    margin: 0;
    font-size: 0.875rem;
    color: #d1d5db;
    /* Gray 300 */
}

/* ----- Right Panel (Form) ----- */
.auth-form-side {
    width: 100%;
    min-height: 100vh;
    /* Ensure full height on mobile */
    background-color: var(--auth-bg-light);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Was center, causing clipping on small laptops */
    align-items: center;
    padding: 1.5rem 1rem;
    /* Reduced padding for mobile */
    position: relative;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .auth-form-side {
        width: 50%;
        height: 100vh;
        min-height: auto;
        padding: 3rem;
    }
}

@media (min-width: 1024px) {
    .auth-form-side {
        width: 58.333333%;
        /* 7/12 */
    }
}

.auth-form-container {
    width: 100%;
    max-width: 28rem;
    /* 448px */
    margin: auto 0;
    padding: 1rem 0;
}



.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-wrapper {
    height: 3rem;
    margin: 0 auto 1.5rem;
    display: flex;
    justify-content: center;
    color: #111827;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.025em;
    margin: 0;
}

@media (min-width: 768px) {
    .form-title {
        font-size: 1.875rem;
    }
}

.form-subtitle {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
    margin-left: 0.25rem;
}

.input-wrapper {
    position: relative;
}

.form-input {
    display: block;
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid #e5e7eb;
    /* Gray 200 */
    background-color: var(--auth-surface-light);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-main);
    transition: all 0.2s;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.form-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(244, 196, 18, 0.2);
    /* Primary transparent */
    background-color: #fff;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    transform: translateY(-50%);
    color: #9ca3af;
    /* Gray 400 */
    pointer-events: none;
    display: flex;
    align-items: center;
}

.form-input.has-icon {
    padding-left: 2.5rem;
}

.btn-submit {
    display: flex;
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-lg);
    background-color: var(--auth-primary);
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
    margin-top: 1rem;
}

.btn-submit:hover {
    background-color: var(--auth-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-submit:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.link-primary {
    font-weight: 600;
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.link-primary:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

.link-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.link-back:hover {
    color: var(--text-main);
}

.link-back i {
    font-size: 1rem;
    transition: transform 0.2s;
}

.link-back:hover i {
    transform: translateX(-4px);
}

/* Validation Styles */
.form-input.is-invalid {
    border-color: #ef4444;
    /* Red 500 */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ef4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5zM6 8.2a.6.6 0 110-1.2.6.6 0 010 1.2z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-input.is-valid {
    border-color: #10b981;
    /* Green 500 */
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #ef4444;
}

.form-input.is-invalid~.invalid-feedback {
    display: block;
}

.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    text-align: center;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
}