/* =========================================================
   REGISTER.CSS
   Student Performance Analytics Portal
   Registration Page
   ========================================================= */


/* ==================== REGISTER FOUNDATION ==================== */

#registerSection.auth-section {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px 20px;

    background:
        radial-gradient(circle at 12% 15%,
            rgba(79, 70, 229, 0.08),
            transparent 35%),
        radial-gradient(circle at 88% 85%,
            rgba(99, 102, 241, 0.07),
            transparent 35%),
        #f8fafc;
}


/* ==================== REGISTER CARD ==================== */

#registerCard.auth-card {
    width: min(100%, 520px);

    padding: 34px;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 20px;

    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.10);

    position: relative;

    overflow: hidden;
}


#registerCard.auth-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 4px;

    background: linear-gradient(90deg,
            #312e81,
            #4f46e5,
            #6366f1);
}


/* ==================== BRAND ==================== */

#registerLogo.auth-logo {
    text-align: center;

    margin-bottom: 28px;

    padding-top: 4px;
}


#registerLogo h1 {
    margin: 0;

    color: #111827;

    font-size: 2rem;

    font-weight: 700;

    line-height: 1.2;

    letter-spacing: -0.5px;
}


#registerLogo p {
    margin: 8px 0 18px;

    color: #64748b;

    font-size: 0.84rem;

    line-height: 1.6;
}


/* ==================== THEME BUTTON ==================== */

#registerLogo .theme-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 38px;

    padding: 8px 15px;

    border: 1px solid #dbe2ea;

    border-radius: 9px;

    background: #f8fafc;

    color: #334155;

    font-family: inherit;

    font-size: 0.76rem;

    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}


#registerLogo .theme-btn:hover {
    background: #eef2ff;

    border-color: #c7d2fe;

    color: #312e81;
}


/* ==================== FORM ==================== */

#registerForm.auth-form {
    width: 100%;
}


#registerForm .auth-group {
    margin-bottom: 17px;
}


#registerForm .auth-group>label {
    display: block;

    margin-bottom: 7px;

    color: #1e293b;

    font-size: 0.82rem;

    font-weight: 600;
}


/* ==================== TEXT / EMAIL / PHONE INPUTS ==================== */

#registerForm input[type="text"],
#registerForm input[type="email"],
#registerForm input[type="tel"],
#registerForm select {
    width: 100%;

    min-height: 46px;

    padding: 10px 13px;

    border: 1px solid #d7dee8;

    border-radius: 10px;

    background: #ffffff;

    color: #0f172a;

    font-family: inherit;

    font-size: 0.82rem;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


#registerForm input::placeholder {
    color: #94a3b8;
}


#registerForm input:hover,
#registerForm select:hover {
    border-color: #a5b4fc;
}


#registerForm input:focus,
#registerForm select:focus {
    border-color: #4f46e5;

    box-shadow:
        0 0 0 3px rgba(79, 70, 229, 0.09);
}


/* ==================== SELECT ==================== */

#registerForm select {
    appearance: auto;

    cursor: pointer;
}


#registerForm select option {
    color: #0f172a;

    background: #ffffff;
}


/* ==================== PASSWORD ==================== */

#registerForm .password-group {
    width: 100%;

    position: relative;
}


#registerForm .password-group input {
    width: 100%;

    padding-right: 50px !important;
}


#registerForm .password-toggle {
    position: absolute;

    top: 50%;
    right: 6px;

    width: 38px;
    height: 38px;

    transform: translateY(-50%);

    display: flex;

    align-items: center;
    justify-content: center;

    border: 0;

    border-radius: 8px;

    background: transparent;

    color: #64748b;

    font-size: 0.95rem;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


#registerForm .password-toggle:hover {
    background: #eef2ff;

    color: #312e81;
}


#registerForm .password-toggle:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.18);

    outline-offset: 1px;
}


/* ==================== PASSWORD STRENGTH ==================== */

#passwordStrengthGroup {
    margin-top: 2px;
}


.password-strength {
    width: 100%;

    height: 7px;

    overflow: hidden;

    background: #e2e8f0;

    border-radius: 999px;
}


.strength-fill {
    width: 20%;

    height: 100%;

    border-radius: inherit;

    background: #ef4444;

    transition:
        width 0.25s ease,
        background-color 0.25s ease;
}


.strength-text {
    margin: 6px 0 0;

    color: #ef4444;

    font-size: 0.68rem;

    font-weight: 600;
}


/* ==================== REGISTRATION INFORMATION ==================== */

#registerInfo.auth-info {
    margin-top: 4px;

    margin-bottom: 19px;

    padding: 11px 13px;

    background: #f8faff;

    border: 1px solid #dbeafe;

    border-left: 3px solid #4f46e5;

    border-radius: 9px;
}


#registerInfo p {
    margin: 3px 0;

    color: #64748b;

    font-size: 0.68rem;

    line-height: 1.6;
}


/* ==================== REGISTER BUTTON ==================== */

#registerForm .auth-btn {
    width: 100%;

    min-height: 48px;

    border: 0;

    border-radius: 10px;

    background: linear-gradient(135deg,
            #312e81,
            #4f46e5);

    color: #ffffff;

    font-family: inherit;

    font-size: 0.84rem;

    font-weight: 600;

    cursor: pointer;

    box-shadow:
        0 7px 16px rgba(49, 46, 129, 0.18);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}


#registerForm .auth-btn:hover {
    transform: translateY(-1px);

    box-shadow:
        0 10px 22px rgba(49, 46, 129, 0.23);

    filter: brightness(1.03);
}


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


#registerForm .auth-btn:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.22);

    outline-offset: 3px;
}


/* ==================== REGISTER LINKS ==================== */

#registerLinks.auth-links {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 8px 18px;

    margin-top: 17px;
}


#registerLinks a {
    color: #4f46e5;

    font-size: 0.73rem;

    font-weight: 600;

    text-decoration: none;

    transition: color 0.2s ease;
}


#registerLinks a:hover {
    color: #312e81;

    text-decoration: underline;
}


#registerLinks a:focus-visible {
    outline: 2px solid #6366f1;

    outline-offset: 3px;
}


/* ==================== DIVIDER ==================== */

#registerDivider.auth-divider {
    display: flex;

    align-items: center;

    gap: 12px;

    margin: 25px 0 0;

    color: #94a3b8;

    font-size: 0.62rem;

    text-align: center;
}


#registerDivider::before,
#registerDivider::after {
    content: "";

    flex: 1;

    height: 1px;

    background: #e2e8f0;
}


#registerDivider span {
    white-space: nowrap;
}


/* ==================== FOOTER ==================== */

#registerCard .site-footer {
    margin-top: 28px;

    padding-top: 22px;

    background: transparent;

    border-top: 1px solid #e5e7eb;
}


#registerCard .footer-container {
    display: grid;

    grid-template-columns: 1fr;

    gap: 18px;

    padding: 0;
}


#registerCard .footer-brand {
    text-align: center;
}


#registerCard .footer-logo {
    display: inline-block;

    margin-bottom: 6px;

    color: #312e81;

    font-size: 0.92rem;

    font-weight: 700;

    text-decoration: none;
}


#registerCard .footer-description {
    max-width: 330px;

    margin: 0 auto;

    color: #64748b;

    font-size: 0.65rem;

    line-height: 1.6;
}


#registerCard .footer-navigation {
    text-align: center;
}


#registerCard .footer-navigation h3 {
    margin: 0 0 8px;

    color: #334155;

    font-size: 0.72rem;

    font-weight: 650;
}


#registerCard .footer-links {
    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 8px 15px;
}


#registerCard .footer-links a {
    color: #64748b;

    font-size: 0.65rem;

    text-decoration: none;
}


#registerCard .footer-links a:hover {
    color: #4f46e5;
}


#registerCard .footer-bottom {
    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 5px;

    margin-top: 18px;

    padding-top: 13px;

    border-top: 1px solid #eef2f7;

    text-align: center;
}


#registerCard .footer-status,
#registerCard .footer-copyright,
#registerCard .footer-developer {
    margin: 0;

    color: #64748b;

    font-size: 0.61rem;
}


/* ==================== LOADING OVERLAY ==================== */

#loadingOverlay.loading-overlay {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-direction: column;

    gap: 12px;

    background: rgba(15, 23, 42, 0.60);

    backdrop-filter: blur(5px);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}


#loadingOverlay.active,
#loadingOverlay[aria-hidden="false"] {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


#loadingOverlay p {
    margin: 0;

    color: #ffffff;

    font-size: 0.82rem;

    font-weight: 600;
}


#loadingOverlay .loader-circle {
    width: 40px;
    height: 40px;

    border: 4px solid rgba(255, 255, 255, 0.25);

    border-top-color: #ffffff;

    border-radius: 50%;

    animation: registerLoaderSpin 0.8s linear infinite;
}


@keyframes registerLoaderSpin {

    to {
        transform: rotate(360deg);
    }

}


/* ==================== TOAST ==================== */

#toast.toast {
    position: fixed;

    left: 50%;
    bottom: 22px;

    z-index: 10000;

    max-width: min(90%, 420px);

    padding: 11px 17px;

    transform: translate(-50%, 20px);

    background: #1e293b;

    color: #ffffff;

    border-radius: 9px;

    font-size: 0.73rem;

    text-align: center;

    box-shadow:
        0 10px 25px rgba(15, 23, 42, 0.20);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}


#toast.show,
#toast.active {
    opacity: 1;

    visibility: visible;

    transform: translate(-50%, 0);
}


/* ==================== DARK THEME ==================== */

.dark-theme #registerSection.auth-section {
    background:
        radial-gradient(circle at 12% 15%,
            rgba(79, 70, 229, 0.15),
            transparent 35%),
        radial-gradient(circle at 88% 85%,
            rgba(99, 102, 241, 0.10),
            transparent 35%),
        #0f172a;
}


.dark-theme #registerCard.auth-card {
    background: #111827;

    border-color: #334155;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.30);
}


.dark-theme #registerLogo h1 {
    color: #f8fafc;
}


.dark-theme #registerLogo p {
    color: #94a3b8;
}


.dark-theme #registerLogo .theme-btn {
    background: #1e293b;

    border-color: #334155;

    color: #cbd5e1;
}


.dark-theme #registerLogo .theme-btn:hover {
    background: #312e81;

    border-color: #4338ca;

    color: #ffffff;
}


.dark-theme #registerForm .auth-group>label {
    color: #e2e8f0;
}


.dark-theme #registerForm input[type="text"],
.dark-theme #registerForm input[type="email"],
.dark-theme #registerForm input[type="tel"],
.dark-theme #registerForm input[type="password"],
.dark-theme #registerForm select {
    background: #1e293b;

    border-color: #334155;

    color: #f8fafc;
}


.dark-theme #registerForm input::placeholder {
    color: #64748b;
}


.dark-theme #registerForm select option {
    background: #1e293b;

    color: #f8fafc;
}


.dark-theme #registerForm .password-toggle {
    color: #94a3b8;
}


.dark-theme #registerForm .password-toggle:hover {
    background: #312e81;

    color: #ffffff;
}


.dark-theme .password-strength {
    background: #334155;
}


.dark-theme #registerInfo.auth-info {
    background: #172033;

    border-color: #334155;

    border-left-color: #6366f1;
}


.dark-theme #registerInfo p {
    color: #94a3b8;
}


.dark-theme #registerDivider {
    color: #64748b;
}


.dark-theme #registerDivider::before,
.dark-theme #registerDivider::after {
    background: #334155;
}


.dark-theme #registerCard .site-footer {
    border-top-color: #334155;
}


.dark-theme #registerCard .footer-logo {
    color: #818cf8;
}


.dark-theme #registerCard .footer-description,
.dark-theme #registerCard .footer-status,
.dark-theme #registerCard .footer-copyright,
.dark-theme #registerCard .footer-developer {
    color: #94a3b8;
}


.dark-theme #registerCard .footer-navigation h3 {
    color: #e2e8f0;
}


.dark-theme #registerCard .footer-links a {
    color: #94a3b8;
}


.dark-theme #registerCard .footer-links a:hover {
    color: #a5b4fc;
}


.dark-theme #registerCard .footer-bottom {
    border-top-color: #334155;
}


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

@media (max-width: 600px) {

    #registerSection.auth-section {
        padding: 24px 14px;
    }


    #registerCard.auth-card {
        padding: 28px 20px;

        border-radius: 18px;
    }


    #registerLogo h1 {
        font-size: 1.75rem;
    }


    #registerLogo p {
        font-size: 0.78rem;
    }


    #registerLinks.auth-links {
        gap: 8px 14px;
    }


    #registerDivider {
        overflow: hidden;
    }

}


@media (max-width: 380px) {

    #registerSection.auth-section {
        padding: 18px 10px;
    }


    #registerCard.auth-card {
        padding: 24px 16px;
    }


    #registerLogo h1 {
        font-size: 1.6rem;
    }


    #registerForm input[type="text"],
    #registerForm input[type="email"],
    #registerForm input[type="tel"],
    #registerForm select {
        min-height: 45px;
    }


    #registerForm .auth-btn {
        min-height: 47px;
    }


    #registerDivider span {
        font-size: 0.56rem;
    }

}


/* ==================== REDUCED MOTION ==================== */

@media (prefers-reduced-motion: reduce) {

    #registerForm .auth-btn,
    #registerForm .password-toggle,
    #registerLogo .theme-btn,
    #loadingOverlay,
    #toast,
    .strength-fill {
        transition: none;
    }


    #loadingOverlay .loader-circle {
        animation: none;
    }

}


/* =========================================================
   END OF REGISTER.CSS
   ========================================================= */