/* modern-auth.css - Cloud/Sky Educational Theme */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
    --primary-color: #005e84;
    /* System Primary */
    --primary-hover: #004a69;
    --sky-top: #B8E4F8;
    --sky-bottom: #EFFCFE;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #666666;
    --input-bg: #f8f9fa;
    --input-border: #dfe1e5;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    font-family: 'Nunito', sans-serif;
    /* Removed flex to prevent modal conflicts */
}

.auth-layout-wrapper {
    background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 100%);
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    padding: 0 2rem;
}

/* Left floating section - outside card (LearnHub style) */
.auth-left-floating {
    position: relative;
    z-index: 5;
    flex: 0 0 38%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 0;
}


.auth-brand-block {
    margin-bottom: 7.5rem;
    padding-left: 2%;
}

.auth-brand-icon-wrap {
    width: 64px;
    height: 64px;
    border: 3px solid var(--primary-color);
    border-radius: 12px;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-grad-cap-wrap {
    border-color: transparent;
    background: #0077a8;
}

.auth-grad-cap {
    font-size: 2.2rem;
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.auth-brand-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-brand-title {
    font-size: 3rem;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.8px;
    font-weight: 800;
    line-height: 1.15;
    color: #1e293b;
}

.auth-brand-highlight {
    background: #0077a8;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-brand-tagline {
    font-size: 1rem;
    color: #475569;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
}

.auth-illustration-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 50%;
}

.auth-school-illustration {
    max-width: 300px;
    width: 100%;
    height: auto;
    animation: auth-float 4s ease-in-out infinite;
    object-fit: cover;
}

.auth-illustration-text {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.4;
    display: flex;
    align-items: center;

}

.auth-badge-icon {
    color: #FFD700;
    font-size: 1rem;
    flex-shrink: 0;
}

@keyframes auth-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Cloud Animation */
.clouds {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.cloud {
    width: 200px;
    height: 60px;
    background: #fff;
    border-radius: 200px;
    position: absolute;
    opacity: 0.8;
}

.cloud:before,
.cloud:after {
    content: '';
    position: absolute;
    background: #fff;
    width: 100px;
    height: 80px;
    position: absolute;
    top: -15px;
    left: 10px;
    border-radius: 100px;
    transform: rotate(30deg);
}

.cloud:after {
    width: 120px;
    height: 120px;
    top: -55px;
    left: auto;
    right: 15px;
}

/* Base Cloud Positions */
.x1 {
    top: 5%;
    /* Was 10% */
    left: -200px;
    transform: scale(0.8);
    opacity: 0.7;
    animation: moveclouds 25s linear infinite;
}

.x2 {
    top: 15%;
    /* Was 25% */
    left: -200px;
    transform: scale(0.6);
    opacity: 0.5;
    animation: moveclouds 35s linear infinite;
}

.x3 {
    top: 30%;
    /* Was 50% */
    left: -200px;
    transform: scale(0.9);
    opacity: 0.8;
    animation: moveclouds 28s linear infinite;
}

.x4 {
    top: 45%;
    /* Was 70% */
    left: -200px;
    transform: scale(0.5);
    opacity: 0.6;
    animation: moveclouds 42s linear infinite;
}

.x5 {
    top: 8%;
    /* Was 15% */
    left: -200px;
    transform: scale(0.7);
    opacity: 0.5;
    animation: moveclouds 30s linear infinite;
}

@keyframes moveclouds {
    0% {
        margin-left: 110%;
    }

    100% {
        margin-left: -110%;
    }
}

/* Water waves - full viewport width at bottom */
.auth-waves {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 25vh;
    min-height: 140px;
    z-index: 1;
    pointer-events: none;
}

.auth-wave-svg {
    display: block;
    width: 100%;
    height: 100%;
}

.auth-wave-layer {
    animation: auth-wave-swell 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.auth-wave-2 {
    animation-direction: alternate-reverse;
    animation-duration: 10s;
    animation-delay: 0.5s;
}

.auth-wave-3 {
    animation-duration: 12s;
    animation-delay: 1s;
}

@keyframes auth-wave-swell {

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

    50% {
        transform: translateY(-12px) scaleY(1.05);
    }
}

/* Main Card Layout - Reversal */
.login-card-container {
    position: relative;
    z-index: 10;
    border-radius: 12px;
    width: 750px;
    height: 700px;
    display: flex;
    overflow: hidden;
    flex-shrink: 0;

    /* Whiteboard Styling */
    border: 12px solid #d4d4d4;
    /* Aluminum Frame */
    border-bottom: 24px solid #b0b0b0;
    /* Marker Tray */
    background: #ffffff;
    /* Whiteboard Surface */

    /* Realistic Wall Mount Shadow */
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.15),
        0 4px 10px rgba(0, 0, 0, 0.1),
        inset 0 0 20px rgba(0, 0, 0, 0.05);
    /* Inner Depth */
}

.login-section {
    flex: 1;
    max-width: 400px;
    padding: 2rem 1.5rem;
    /* Reduced padding to fit content better */
    /* Increased vertical padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: white;
    overflow: hidden;
    order: 2;
}

#st-login-form {
    width: 100%;
    max-width: 310px;
    /* Precise width to ensure symmetry on 375px card */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0 auto;
    /* Ensure form itself is centered */
}

.welcome-section {
    flex: 1;
    max-width: 375px;
    /* Mesh Gradient for Premium Feel */
    background: radial-gradient(at 0% 0%, #e3f2fd 0%, transparent 50%),
        radial-gradient(at 100% 0%, #bbdefb 0%, transparent 50%),
        radial-gradient(at 50% 100%, #e1f5fe 0%, transparent 50%),
        rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    order: 1;
    /* Subtle blur separator */
    box-shadow: inset -10px 0 20px -10px rgba(0, 0, 0, 0.05);
}

/* Trust Badges Styles - Refined for Marketing */
.auth-trust-badges {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: -4rem;
    /* Pull higher */
    margin-bottom: 2rem;
    align-items: center;
    /* Reverted to center for card placement */
    width: 100%;
}

.auth-trust-badge {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 16px;
    width: 290px;
    /* Glassmorphism Core */
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);

    /* Glossy Shadow & Transition */
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

/* Glossy Surface Reflection */
.auth-trust-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

.auth-trust-badge:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
}

.auth-trust-badge i {
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.auth-trust-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    z-index: 2;
}

.auth-trust-number {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2px;
}

.auth-trust-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.badge-blue {
    color: #005e84;
    border-left: 5px solid #005e84;
}

.badge-blue i {
    color: #005e84;
}

.badge-green {
    color: #27ae60;
    border-left: 5px solid #27ae60;
}

.badge-green i {
    color: #27ae60;
}

.badge-gold {
    color: #f39c12;
    border-left: 5px solid #f39c12;
}

.badge-gold i {
    color: #f39c12;
}
/**/
.welcome-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
    /* Reduced from 1.5rem */
}

.welcome-section h5 {
    margin-top: 0;
    font-weight: 600;
    color: var(--text-muted);
}

p {
    color: var(--text-muted);
    font-size: 1.15rem;
    font-weight: 400;
    /* Normal weight */
    line-height: 1.5;
    text-align: center;
}

/* Form Elements */
.form-group {
    margin-bottom: 0.75rem;
    position: relative;
    width: 100% !important;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    /* Truly normal weight */
    font-size: 1rem;
}

.form-control {
    width: 100% !important;
    box-sizing: border-box;
    /* Ensure padding doesn't affect width */
    padding: 12px 14px;
    border-radius: 8px;
    border: 2px solid var(--input-border);
    background: var(--input-bg);
    font-size: 0.9rem;
    font-weight: 500;
    /* Normal weight for input text */
    color: var(--text-color);
    transition: all 0.3s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 94, 132, 0.08), 0 4px 12px rgba(0, 94, 132, 0.1);
    transform: translateY(-1px);
}

/* Buttons */
.btn-primary-system {
    width: 100%;
    max-width: 100%;
    /* Vibrant Gradient */
    background: linear-gradient(135deg, var(--primary-color) 0%, #0077a8 100%) !important;
    color: white;
    font-weight: 800;
    padding: 16px;
    border-radius: 8px;
    /* Matched to inputs (straight look) */
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 94, 132, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary-system:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 94, 132, 0.4);
    filter: brightness(1.1);
}

.btn-secondary-system {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.premium-signup {
    display: inline-block;
    /* Fix for anchor tag */
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
    color: white !important;
    border: none;
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.3), 0 0 10px rgba(46, 204, 113, 0.4);
    font-weight: 800;
    padding: 16px 42px;
    margin-top: 10px;
    /* Reduced from 20px */
    /* Added little margin */
    border-radius: 8px;
    /* Matched to inputs (straight look) */
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.premium-signup:hover {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
    color: white !important;
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 15px 35px rgba(39, 174, 96, 0.4), 0 0 20px rgba(46, 204, 113, 0.6);
    filter: brightness(1.1);
}

.btn-youtube {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #FF0000;
    color: white !important;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-top: 1.5rem;
    border: 2px solid #FF0000;
}

.btn-youtube:hover {
    background: white;
    color: #FF0000 !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.4);
}

/* Password Toggle */
.toggle-password {
    position: absolute;
    right: 14px;
    top: 42px;
    /* Adjusted for smaller inputs */
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
}

/* SSO Buttons */
.sso-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 100%;
    justify-content: center;
}

.sso-grid {
    display: flex;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.sso-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    border: 1.5px solid #00658e;
    background: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

.sso-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.sso-btn svg,
.sso-btn span {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.sso-btn:hover svg,
.sso-btn:hover span {
    transform: scale(1.1);
}

/* Custom Checkbox */
.custom-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-control-label {
    font-weight: 500;
    /* Normal weight */
    font-size: 0.95rem;
    color: var(--text-color);
    cursor: pointer;
}

.login-helpers {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100%;
    margin-bottom: 1rem;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none !important;
    font-weight: 600;
    /* Subtle weight for the link */
    font-size: 0.95rem;
}

/* Responsive Breakpoints */

/* Extra Large Screens (Large Monitors/LEDs - 1920px and above) */
@media (min-width: 1920px) {
    .login-card-container {
        width: 750px;
        height: 650px;
        margin-left: auto !important;
        margin-right: 100px !important;
    }
}

/* Large Desktops (1440px - 1919px) */
@media (min-width: 1440px) and (max-width: 1919px) {
    .login-card-container {
        width: 750px;
        height: 650px;
        margin-left: auto !important;
        margin-right: 80px !important;
    }
}

/* Standard Laptops (1024px - 1439px) */
@media (max-width: 1023px) {
    .auth-left-floating {
        display: none;
    }

    .auth-layout-wrapper {
        justify-content: center;
        padding: 0 1rem;
    }
}

@media (min-width: 1024px) and (max-width: 1439px) {
    .login-card-container {
        width: 750px;
        height: 650px;
        margin-left: auto !important;
        margin-right: 60px !important;
    }
}

/* Tablets (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .login-card-container {
        width: 750px;
        height: 650px;
        margin-left: auto !important;
        margin-right: 40px !important;
    }

    .login-section,
    .welcome-section {
        padding: 2rem;
    }
}

/* Mobile Devices (below 768px) */
@media (max-width: 767px) {
    .auth-layout-wrapper {
        padding: 1rem 0.75rem;
        align-items: flex-start;
        min-height: 100vh;
    }

    .login-card-container {
        flex-direction: column;
        width: min(95vw, 500px);
        height: auto;
        min-height: auto;
        max-height: none;
        margin: 0 auto;
        overflow: visible;
        flex-shrink: 0;
    }

    .welcome-section {
        padding: 1rem 1rem;
        order: 2;
        border-right: none;
        border-top: 1px solid #e5e7eb;
        border-bottom: none;
        flex: 0 0 auto;
        min-height: 0;
        box-shadow: none;
    }

    .auth-trust-badges {
        margin-top: 0;
        margin-bottom: 1rem;
    }

    .auth-trust-badge {
        width: 100%;
        max-width: 260px;
        padding: 10px 16px;
    }

    .welcome-section h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .welcome-section h6 {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }

    .login-section {
        padding: 1.25rem 1rem;
        order: 1;
        overflow-y: visible;
        flex: 1 1 auto;
        min-height: 0;
    }

    .floating-item {
        display: none;
    }

    .sso-grid {
        gap: 10px;
    }
}

/* Small Mobile Devices (below 480px) */
@media (max-width: 480px) {
    .auth-layout-wrapper {
        padding: 0.5rem 0.5rem 2rem;
    }

    .login-card-container {
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
        margin: 0;
        border-width: 8px;
        border-bottom-width: 16px;
    }

    .welcome-section {
        padding: 0.75rem 1rem;
    }

    .welcome-section h3 {
        font-size: 0.95rem;
    }

    .welcome-section h6 {
        font-size: 0.75rem;
    }

    .auth-trust-badge {
        width: 100%;
        max-width: none;
        padding: 8px 12px;
    }

    .auth-trust-number {
        font-size: 1.1rem;
    }

    .auth-trust-label {
        font-size: 0.7rem;
    }

    .login-section {
        padding: 1rem;
    }

    .login-section .text-center.mt-4.mb-2 img {
        width: 140px;
    }

    #st-login-form {
        max-width: 100%;
    }

    .premium-signup {
        padding: 12px 28px;
        font-size: 1rem;
    }

    h1 {
        font-size: 1.4rem !important;
    }

    .form-group {
        margin-bottom: 1rem;
    }
}