/* ==========================================================================
   MAHIR SMKN 3 SINGARAJA — AUTH PAGE DESIGN SYSTEM
   Theme: Vibrant Dynamic Aurora Background + Ultra Glassmorphic Light Card
   ========================================================================== */

:root {
    --auth-bg-gradient: linear-gradient(-45deg, #4f46e5, #7c3aed, #c026d3, #0284c7, #4f46e5);
    --primary-purple: #7c3aed;
    --primary-indigo: #4f46e5;
    --primary-gradient: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    --primary-hover-gradient: linear-gradient(135deg, #6d28d9 0%, #4338ca 100%);
    --accent-emerald: #10b981;
}

/* Page Setup */
body {
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1e293b;
    background-color: #0f172a;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Animated Aurora Background */
.auth-page {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    box-sizing: border-box;
    background: var(--auth-bg-gradient);
    background-size: 400% 400%;
    animation: auroraFlow 18s ease infinite;
    overflow: hidden;
}

@keyframes auroraFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Background Glowing Orbs */
.aurora-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
    animation: orbFloat 12s ease-in-out infinite alternate;
}

.aurora-orb-1 {
    width: 480px;
    height: 480px;
    top: -10%;
    left: -5%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.7), rgba(99, 102, 241, 0));
}

.aurora-orb-2 {
    width: 500px;
    height: 500px;
    bottom: -12%;
    right: -5%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.65), rgba(56, 189, 248, 0));
    animation-delay: -4s;
}

.aurora-orb-3 {
    width: 350px;
    height: 350px;
    top: 40%;
    right: 20%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.55), rgba(168, 85, 247, 0));
    animation-delay: -8s;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -20px) scale(1.06);
    }

    100% {
        transform: translate(-20px, 30px) scale(0.96);
    }
}

/* Main Card Container */
.auth-card-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
}

/* Ultra Glassmorphic Light Card */
.auth-card {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 28px;
    padding: 2.75rem 2.25rem 2.25rem;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.35), 0 0 40px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.9);
    overflow: hidden;
    animation: cardEntrance 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7c3aed, #ec4899, #0284c7, #10b981);
    background-size: 300% 100%;
    animation: gradientBar 5s linear infinite;
}

@keyframes gradientBar {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 0%;
    }
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Brand Header Section */
.auth-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-brand-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 0.85rem;
}

.auth-brand-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 1.9rem;
    box-shadow: 0 10px 22px -3px rgba(124, 58, 237, 0.45);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-card:hover .auth-brand-icon {
    transform: scale(1.05) rotate(2deg);
}

.school-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    background: #f3e8ff;
    border: 1px solid #e9d5ff;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.65rem;
}

/* Brand Logo Typography */
.auth-brand-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0 0 0.35rem 0;
}

.brand-name-enlighten {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.6px;
    line-height: 1;
}

.brand-name-edu-badge {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #059669);
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    line-height: 1;
}

.auth-brand-tagline {
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 500;
    margin: 0;
}

/* Custom Alert Notification */
.auth-alert-custom {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.1rem;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.4;
    animation: alertSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes alertSlide {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-alert-error i {
    font-size: 1.1rem;
    color: #ef4444;
    flex-shrink: 0;
}

/* Form Groups */
.form-group-custom {
    margin-bottom: 1.35rem;
}

.form-label-custom {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1px;
}

.form-label-custom i {
    color: #7c3aed;
    margin-right: 0.45rem;
    font-size: 0.9rem;
}

/* Custom Input Field with Prefix Icon */
.input-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix-icon {
    position: absolute;
    left: 1.1rem;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.25s ease;
}

.form-input-custom {
    width: 100%;
    padding: 0.9rem 1.1rem;
    padding-left: 2.9rem;
    padding-right: 2.9rem;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 14px;
    font-size: 0.92rem;
    color: #0f172a;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-input-custom::placeholder {
    color: #94a3b8;
}

.form-input-custom:focus {
    outline: none;
    background: #ffffff;
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
}

.form-input-custom:focus~.input-prefix-icon {
    color: #7c3aed;
}

/* Password Eye Toggle */
.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.45rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.password-toggle-btn:hover {
    color: #7c3aed;
    background: #f1f5f9;
}

/* Auth Options (Remember Me & Forgot Link) */
.auth-options-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.2rem;
    margin-bottom: 1.6rem;
}

/* Custom Checkbox */
.custom-checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-box {
    width: 19px;
    height: 19px;
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s ease;
    flex-shrink: 0;
}

.checkbox-box i {
    font-size: 0.72rem;
    color: white;
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-checkbox-wrapper input:checked~.checkbox-box {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    border-color: #7c3aed;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.3);
}

.custom-checkbox-wrapper input:checked~.checkbox-box i {
    transform: scale(1);
}

.checkbox-label-text {
    font-size: 0.84rem;
    color: #475569;
    font-weight: 500;
}

.custom-forgot-link {
    font-size: 0.84rem;
    color: #7c3aed;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.custom-forgot-link:hover {
    color: #6d28d9;
    text-decoration: underline;
}

/* Premium Submit Button */
.btn-auth-submit {
    position: relative;
    width: 100%;
    height: 50px;
    padding: 0 1.5rem;
    background: var(--primary-gradient);
    color: white;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 10px 22px -4px rgba(124, 58, 237, 0.45);
    overflow: hidden;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-auth-submit i {
    font-size: 1.05rem;
    transition: transform 0.25s ease;
}

.btn-auth-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-20deg);
}

.btn-auth-submit:hover {
    background: var(--primary-hover-gradient);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -4px rgba(124, 58, 237, 0.6);
}

.btn-auth-submit:hover i {
    transform: translateX(3px);
}

.btn-auth-submit:hover::after {
    left: 150%;
    transition: all 0.75s ease;
}

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

.btn-auth-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* Footer Branding */
.auth-footer-branding {
    text-align: center;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.dev-credit {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
    margin: 0 0 0.3rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.heart-icon {
    color: #ef4444;
    font-size: 0.85rem;
    animation: heartPulse 1.8s ease-in-out infinite;
}

@keyframes heartPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.dev-name-gradient {
    font-weight: 700;
    background: linear-gradient(135deg, #7c3aed 0%, #ec4899 60%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.3px;
}

.school-copyright {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
}

/* Custom Modal Dialog System */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.custom-modal-box {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 1.75rem;
    transform: scale(0.92) translateY(15px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: #1e293b;
}

.custom-modal-overlay.active .custom-modal-box {
    transform: scale(1) translateY(0);
}

.custom-modal-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.1rem;
}

.custom-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f3e8ff;
    color: #7c3aed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.custom-modal-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.custom-modal-body {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 1.5rem;
}

.custom-modal-body p {
    margin: 0 0 0.65rem;
}

.custom-modal-body p:last-child {
    margin-bottom: 0;
}

.custom-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.custom-modal-btn {
    padding: 0.65rem 1.3rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-modal-btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.35);
}

.custom-modal-btn-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 2.2rem 1.35rem 1.75rem;
        border-radius: 20px;
    }

    .brand-name-enlighten {
        font-size: 1.8rem;
    }
}