@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   KUPPAM EDUCATIONAL SOCIETY — AUTHENTICATION & LOGIN THEME
   Fully Responsive for Desktop, Tablet, and Mobile (320px–1920px)
   - Primary Brand Blue:   #0066B3
   - Deep Navy Blue:       #073B63
   - Brand Red:            #E52B23
   - Brand Gold:           #F5B72C
   - White:                #FFFFFF
   - Light Background:     #F5F8FC
   - Dark Text:            #102A43
   - Border:               #D9E3EC
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #F5F8FC;
    color: #102A43;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Lucide Icon Base for Auth */
i.lucide-icon,
.lucide-icon,
[data-lucide],
svg.lucide {
    width: 1.15em;
    height: 1.15em;
    display: inline-block;
    vertical-align: -0.18em;
    stroke-width: 1.85px;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* Main Split Screen Container */
.login-split-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #F5F8FC;
}

/* Left Carousel Slider Area (60% width) - Deep Navy Institutional Branding */
.login-slider-section {
    position: relative;
    width: 60%;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: #073B63;
    overflow: hidden;
    flex-shrink: 0;
}

.slide-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, transform 1.2s ease-out;
    transform: scale(1.01);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: contrast(1.05) brightness(1.02);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.slide-item.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(7, 59, 99, 0.45) 0%, rgba(5, 45, 77, 0.85) 100%);
}

.slider-indicators {
    position: absolute;
    bottom: 24px;
    left: 30px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #F5B72C;
    width: 26px;
    border-radius: 6px;
    border-color: #F5B72C;
    box-shadow: 0 0 12px rgba(245, 183, 44, 0.85);
}

/* Right Login Form Container (40% width on desktop) - Crisp White Institutional Card */
.login-form-section {
    width: 40%;
    min-height: 100vh;
    min-height: 100dvh;
    background: #FFFFFF;
    border-left: 1px solid #D9E3EC;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2.75rem;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -4px 0 30px rgba(7, 59, 99, 0.05);
    position: relative;
    z-index: 2;
}

/* Brand Header */
.brand-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.brand-logo-img {
    height: 68px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 0.6rem;
    filter: drop-shadow(0 2px 8px rgba(0, 102, 179, 0.12));
}

.brand-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #102A43;
    letter-spacing: -0.02em;
    line-height: 1.25;
    word-break: break-word;
}

.brand-subtitle {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.75rem;
    color: #0066B3;
    margin-top: 0.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    word-break: break-word;
}

/* Role Selector */
.form-group-role {
    margin-bottom: 1.25rem;
}

.role-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.725rem;
    font-weight: 700;
    color: #102A43;
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.req-star {
    color: #E52B23;
    font-weight: 700;
    margin-right: 2px;
}

.role-options {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.role-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #102A43;
    cursor: pointer;
    transition: color 0.15s ease;
    touch-action: manipulation;
}

.role-option:hover {
    color: #0066B3;
}

.role-option input[type="radio"] {
    accent-color: #0066B3;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Form Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

.field-label,
.form-label {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #102A43;
    margin-bottom: 0.4rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #EAF4FB;
    color: #0066B3;
    border: 1px solid #BCD9F2;
    font-size: 10px;
    font-weight: 700;
    margin-left: 4px;
    cursor: help;
}

.form-input,
.form-control {
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 0.65rem 0.875rem;
    font-size: 1rem;
    border: 1.5px solid #D9E3EC;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    color: #102A43;
    background: #FFFFFF;
    box-sizing: border-box;
    box-shadow: inset 0 1px 2px rgba(16, 42, 67, 0.02);
}

.form-input:hover,
.form-control:hover {
    border-color: #0066B3;
}

.form-input:focus,
.form-control:focus {
    border-color: #0066B3;
    background: #FFFFFF;
    box-shadow: 0 0 0 3.5px rgba(0, 102, 179, 0.2), inset 0 1px 1px rgba(16, 42, 67, 0.02);
}

.form-input:-webkit-autofill,
.form-control:-webkit-autofill,
.form-input:-webkit-autofill:hover, 
.form-control:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-control:-webkit-autofill:focus,
.form-input:-webkit-autofill:active,
.form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px #FFFFFF inset !important;
    -webkit-text-fill-color: #102A43 !important;
    caret-color: #102A43 !important;
    transition: background-color 5000s ease-in-out 0s;
}

.show-password-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: #526777;
    cursor: pointer;
    touch-action: manipulation;
}

.show-password-wrapper input[type="checkbox"] {
    accent-color: #0066B3;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Password Toggle Button */
.toggle-password-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #526777;
    border-radius: 6px;
    touch-action: manipulation;
    padding: 0;
    transition: color 0.15s, background 0.15s;
}

.toggle-password-btn:hover {
    color: #0066B3;
    background: #EAF4FB;
}

/* Alerts */
.alert {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
    line-height: 1.45;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 2px rgba(16, 42, 67, 0.02);
    word-break: break-word;
}

.alert-danger {
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    color: #DC2626;
}

.alert-success {
    background-color: #EDF7ED;
    border: 1px solid #B7E4C7;
    color: #16A34A;
}

/* Action Buttons Row */
.action-buttons-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.btn-login {
    flex: 1;
    min-height: 48px;
    height: 48px;
    padding: 0 1.25rem;
    background: #0066B3;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    box-shadow: 0 4px 12px -2px rgba(0, 102, 179, 0.35);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
}

.btn-login:hover {
    background: #073B63;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 18px -2px rgba(7, 59, 99, 0.45);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px -1px rgba(7, 59, 99, 0.3);
}

.btn-forgot {
    flex: 1;
    min-height: 48px;
    height: 48px;
    padding: 0 1.25rem;
    background: #FFFFFF;
    color: #0066B3;
    border: 1.5px solid #0066B3;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: manipulation;
}

.btn-forgot:hover {
    background: #EAF4FB;
    border-color: #073B63;
    color: #073B63;
    transform: translateY(-1px);
}

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

/* Auxiliary Links */
.aux-links {
    text-align: center;
    margin-bottom: 1rem;
}

.passout-link {
    color: #0066B3;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    touch-action: manipulation;
}

.passout-link:hover {
    color: #073B63;
    text-decoration: underline;
}

.google-btn-container {
    margin: 1rem 0;
    text-align: center;
}

.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 46px;
    height: 46px;
    padding: 0 1rem;
    background: #FFFFFF;
    border: 1.5px solid #D9E3EC;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #102A43;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(16, 42, 67, 0.02);
    touch-action: manipulation;
}

.google-btn:hover {
    background: #EAF4FB;
    border-color: #0066B3;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 102, 179, 0.08);
}

.google-icon {
    width: 18px;
    height: 18px;
}

.browser-note {
    font-size: 0.75rem;
    color: #526777;
    text-align: center;
    margin-bottom: 1.25rem;
    font-style: italic;
}

/* App Download Footer */
.app-download-section {
    margin-top: auto;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #D9E3EC;
}

.app-download-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.725rem;
    font-weight: 700;
    color: #102A43;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.app-badges {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.app-badge-btn {
    display: inline-block;
    height: 38px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-badge-btn:hover {
    transform: translateY(-2px);
}

.app-badge-btn img, .app-badge-btn svg {
    height: 100%;
    width: auto;
}

/* ============================================================
   GENERIC AUTH CARDS (FORGOT / RESET PASSWORD VIEWS)
   ============================================================ */
.auth-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: #F5F8FC;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.auth-card {
    background: #FFFFFF;
    border: 1px solid #D9E3EC;
    border-radius: 16px;
    padding: 2.5rem 2.25rem;
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(7, 59, 99, 0.06);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-brand {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #102A43;
    letter-spacing: -0.02em;
    word-break: break-word;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: #526777;
    margin-top: 0.35rem;
    line-height: 1.45;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

.auth-footer a {
    color: #0066B3;
    font-weight: 600;
    text-decoration: none;
    padding: 0.4rem;
    display: inline-block;
}

.auth-footer a:hover {
    color: #073B63;
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    min-height: 48px;
    height: 48px;
    padding: 0 1.25rem;
    background: #0066B3;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 102, 179, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background: #073B63;
    box-shadow: 0 6px 18px rgba(7, 59, 99, 0.4);
}

/* ============================================================
   AUTH RESPONSIVE MEDIA QUERIES (320px to 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .login-slider-section {
        width: 52%;
    }
    .login-form-section {
        width: 48%;
        padding: 2rem 1.75rem;
    }
}

/* Tablet Portrait & Mobile Breakpoint */
@media (max-width: 899px) {
    .login-split-container {
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        min-height: 100vh;
        min-height: 100dvh;
        padding: 1.75rem 1rem 3rem 1rem;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Hide heavy desktop slider on mobile so the form is immediately accessible */
    .login-slider-section {
        display: none !important;
    }

    .login-form-section {
        width: 100%;
        max-width: 440px;
        height: auto;
        min-height: auto;
        background: #FFFFFF;
        border: 1px solid #D9E3EC;
        border-radius: 16px;
        box-shadow: 0 4px 24px rgba(7, 59, 99, 0.08);
        padding: 2rem 1.5rem;
        margin: auto;
        flex: none;
    }

    .brand-header {
        margin-bottom: 1.35rem;
    }

    .brand-logo-img {
        height: 60px;
        max-width: 100%;
    }

    .brand-title {
        font-size: 1.25rem;
    }

    .brand-subtitle {
        font-size: 0.75rem;
    }

    .action-buttons-row {
        flex-direction: column;
        gap: 0.625rem;
    }

    .btn-login,
    .btn-forgot {
        width: 100%;
    }
}

/* Medium & Small Mobile */
@media (max-width: 480px) {
    .login-split-container {
        padding: 1rem 0.75rem 2.5rem 0.75rem;
    }

    .login-form-section {
        max-width: 100%;
        padding: 1.5rem 1.15rem;
        border-radius: 14px;
    }

    .brand-logo-img {
        height: 52px;
    }

    .brand-title {
        font-size: 1.125rem;
    }

    .role-options {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
    }

    .role-option {
        font-size: 0.8125rem;
        justify-content: center;
        background: #F5F8FC;
        border: 1px solid #D9E3EC;
        padding: 0.5rem 0.25rem;
        border-radius: 8px;
        min-height: 42px;
    }

    .form-input {
        font-size: 16px !important; /* iOS zoom prevention */
        height: 48px;
        min-height: 48px;
    }

    .google-btn {
        min-height: 46px;
        font-size: 0.85rem;
    }

    .auth-wrapper {
        padding: 1rem 0.75rem;
    }

    .auth-card {
        padding: 1.5rem 1.15rem;
        border-radius: 14px;
    }

    .auth-brand {
        font-size: 1.2rem;
    }
}

/* Extra Small Mobile (320px–360px) */
@media (max-width: 360px) {
    .login-split-container {
        padding: 0.75rem 0.5rem 2rem 0.5rem;
    }

    .login-form-section {
        padding: 1.25rem 0.85rem;
        border-radius: 12px;
    }

    .brand-header {
        margin-bottom: 1rem;
    }

    .brand-logo-img {
        height: 46px;
    }

    .brand-title {
        font-size: 1rem;
    }

    .role-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.35rem;
    }

    .form-input {
        padding: 0.6rem 0.75rem;
        min-height: 44px;
        height: 44px;
        font-size: 15px !important;
    }

    .btn-login {
        min-height: 46px;
        height: 46px;
        font-size: 0.9rem;
    }

    .btn-forgot {
        min-height: 44px;
        height: 44px;
        font-size: 0.825rem;
    }

    .auth-wrapper {
        padding: 0.75rem 0.5rem;
    }

    .auth-card {
        padding: 1.25rem 0.85rem;
        border-radius: 12px;
    }

    .auth-brand {
        font-size: 1.1rem;
    }
}
