/* Smart Edu CMS - Custom Auth Styling */
@import url('https://rsms.me/inter/inter.css');

:root {
    --edu-primary: #2563eb;
    --edu-primary-hover: #1d4ed8;
    --edu-primary-light: #eff6ff;
    --edu-dark: #0f172a;
    --edu-slate: #1e293b;
    --edu-accent: #06b6d4;
    --edu-emerald: #10b981;
    --edu-amber: #f59e0b;
    --edu-card-bg: rgba(255, 255, 255, 0.95);
    --edu-border-radius: 20px;
}

body.auth-page-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--edu-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.25) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.2) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(15, 23, 42, 0.95) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(30, 41, 59, 0.5) 0px, transparent 50%);
    background-attachment: fixed;
    color: #1e293b;
    overflow-x: hidden;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* Background floating decorative elements */
.auth-bg-decor {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
.auth-bg-decor-1 {
    width: 350px;
    height: 350px;
    background: rgba(37, 99, 235, 0.2);
    top: -50px;
    left: -50px;
}
.auth-bg-decor-2 {
    width: 400px;
    height: 400px;
    background: rgba(6, 182, 212, 0.15);
    bottom: -100px;
    right: -100px;
}

/* Main Split Grid */
.auth-split-grid {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 1200px;
    width: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

@media (min-width: 992px) {
    .auth-split-grid {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

/* Left Hero Section */
.auth-hero-section {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.85));
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 9999px;
    color: #60a5fa;
    font-size: 0.85rem;
    font-weight: 600;
    width: fit-content;
}

.auth-hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.25;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-hero-subtitle {
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.auth-hero-image-wrapper {
    position: relative;
    text-align: center;
    margin: 1rem 0;
}

.auth-hero-image {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.4));
    transition: transform 0.5s ease;
}

.auth-hero-image:hover {
    transform: scale(1.02);
}

/* Floating Edu Feature Badges */
.auth-features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.auth-feature-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(96, 165, 250, 0.3);
    transform: translateY(-2px);
}

.auth-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.auth-feature-icon.blue {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
}

.auth-feature-icon.emerald {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.auth-feature-icon.amber {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.auth-feature-text h4 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #f8fafc;
}

.auth-feature-text p {
    margin: 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Quote Box */
.auth-quote-box {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    border-left: 3px solid var(--edu-primary);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 12px 12px 0;
}

.auth-quote-text {
    font-size: 0.85rem;
    font-style: italic;
    color: #cbd5e1;
    margin: 0;
}

.auth-quote-author {
    font-size: 0.75rem;
    font-weight: 600;
    color: #60a5fa;
    margin-top: 0.35rem;
}

/* Right Form Section */
.auth-form-section {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    color: #0f172a;
}

.auth-form-header {
    margin-bottom: 2rem;
}

.auth-greeting-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--edu-primary);
    background: var(--edu-primary-light);
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}

.auth-form-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
    margin: 0 0 0.5rem 0;
}

.auth-form-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

.auth-logo-box {
    margin-bottom: 1.5rem;
}

.auth-logo-box img {
    max-height: 55px;
    object-fit: contain;
}

/* Input Fields Styling */
.auth-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.auth-input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allows error list to drop down to a new line */
}

.auth-input-icon {
    position: absolute;
    left: 1rem;
    top: 0.9rem; /* Pins icon vertically inside the input box */
    color: #94a3b8;
    font-size: 1.2rem;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
}

.auth-input-field {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem !important;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #0f172a !important;
    background-color: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.auth-input-field:focus {
    background-color: #ffffff !important;
    border-color: var(--edu-primary) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
    outline: none !important;
}

.auth-input-field:focus + .auth-input-icon,
.auth-input-wrapper:focus-within .auth-input-icon {
    color: var(--edu-primary);
}

/* Toggle Password Button */
.auth-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 0.55rem; /* Pins toggle button vertically inside the input box */
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease;
    z-index: 2;
}

.auth-password-toggle:hover {
    color: #0f172a;
    background-color: #f1f5f9;
}

/* Fix Parsley & Validation Errors Layout */
.auth-input-group .parsley-errors-list,
.auth-input-group .invalid-feedback,
.auth-input-group .text-danger {
    width: 100% !important;
    flex-basis: 100% !important;
    margin-top: 0.4rem !important;
    margin-bottom: 0 !important;
    padding-left: 0 !important;
    list-style: none !important;
    font-size: 0.825rem !important;
    font-weight: 500 !important;
    color: #dc2626 !important;
    display: block !important;
}

.auth-input-group .parsley-errors-list li {
    color: #dc2626 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    line-height: 1.4 !important;
}

.auth-input-group .parsley-errors-list li::before {
    content: "⚠️ ";
    font-size: 0.75rem;
}

/* Error state input styling */
.auth-input-field.parsley-error,
.auth-input-field.is-invalid {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    color: #991b1b !important;
}

.auth-input-field.parsley-error:focus,
.auth-input-field.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

/* Form Helper Row */
.auth-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.auth-remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.auth-remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid #cbd5e1;
    cursor: pointer;
    accent-color: var(--edu-primary);
}

.auth-forgot-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--edu-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-forgot-link:hover {
    color: var(--edu-primary-hover);
    text-decoration: underline;
}

/* Primary Button */
.auth-submit-btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.3s ease !important;
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4) !important;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 25px -5px rgba(37, 99, 235, 0.5) !important;
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
}

.auth-submit-btn:active {
    transform: translateY(0);
}

/* Footer Badge */
.auth-footer-badge {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #94a3b8;
}

.auth-ssl-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #10b981;
    font-weight: 600;
}

/* Responsiveness adjustments */
@media (max-width: 991px) {
    .auth-hero-section {
        display: none; /* Mobile view prioritizes form for clean UX */
    }
    .auth-form-section {
        padding: 2.5rem 1.75rem;
        border-radius: 28px;
    }
    .auth-split-grid {
        max-width: 480px;
    }
}
