/* ==========================================================================
   EduSmart ERP - Admin Login Stylesheet
   Avoids inline CSS and provides responsive, modern authentication UI styling
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.admin-login-body {
    background-color: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.main-container {
    display: flex;
    width: 1000px;
    max-width: 100%;
    height: 600px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
}

/* --------------------------------------------------------------------------
   Left Panel: Branding & Welcome Message
   -------------------------------------------------------------------------- */
.left-panel {
    width: 45%;
    padding: 50px 60px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.logo-area {
    position: absolute;
    top: 40px;
    left: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2.2rem;
    color: #1e293b;
}

.logo-text {
    color: #3b82f6;
    font-weight: 600;
    line-height: 1.2;
    font-size: 1.1rem;
}

.welcome-area {
    text-align: center;
    width: 100%;
}

.welcome-title {
    color: #3b82f6;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.welcome-subtitle {
    color: #64748b;
    font-size: 1.25rem;
    line-height: 1.45;
    font-weight: 300;
}

/* --------------------------------------------------------------------------
   Right Panel: Form & Decorative Graphics
   -------------------------------------------------------------------------- */
.right-panel {
    width: 55%;
    background: linear-gradient(180deg, #2a52b8 0%, #3e88e8 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #ffffff;
}

.wave-separator {
    position: absolute;
    left: -50px;
    top: 0;
    height: 100%;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

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

/* Decorative Background Icons */
.bg-icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.08);
    z-index: 1;
    pointer-events: none;
    transition: transform 0.5s ease;
}

.bg-icon-key {
    top: 10%;
    left: 20%;
    font-size: 3rem;
    transform: rotate(45deg);
}

.bg-icon-envelope {
    top: 25%;
    right: 15%;
    font-size: 2.5rem;
}

.bg-icon-lock {
    bottom: 30%;
    left: 15%;
    font-size: 4rem;
}

.bg-icon-shield {
    bottom: 15%;
    right: 25%;
    font-size: 3.5rem;
}

.bg-icon-mobile {
    top: 50%;
    left: 80%;
    font-size: 2.5rem;
    transform: rotate(-15deg);
}

.bg-icon-idcard {
    top: 60%;
    left: 25%;
    font-size: 2rem;
}

/* --------------------------------------------------------------------------
   Login Form Components
   -------------------------------------------------------------------------- */
.login-form-container {
    z-index: 3;
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.login-heading {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.login-subheading {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.9;
}

.input-group-custom {
    margin-bottom: 18px;
    position: relative;
    width: 100%;
}

.input-group-custom .input-icon-left {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #475569;
    font-size: 1rem;
    z-index: 4;
    pointer-events: none;
}

.input-group-custom .password-toggle-btn {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    color: #64748b;
    font-size: 1rem;
    z-index: 4;
    padding: 0;
    transition: color 0.2s ease;
}

.input-group-custom .password-toggle-btn:hover {
    color: #1e293b;
}

.form-control-custom {
    width: 100%;
    padding: 14px 45px 14px 45px;
    border: 2px solid transparent;
    border-radius: 25px;
    font-size: 0.9rem;
    outline: none;
    color: #1e293b;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease-in-out;
}

.form-control-custom:focus {
    border-color: #93c5fd;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12), 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Submit Button */
.btn-login {
    width: 100%;
    padding: 14px;
    background-color: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
    margin-top: 6px;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.4);
}

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

.btn-login:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

.forgot-link {
    display: inline-block;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: underline;
    font-size: 0.88rem;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #ffffff;
}

.copyright {
    position: absolute;
    bottom: 25px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    width: 100%;
    left: 0;
    z-index: 3;
}

.copyright-brand {
    color: #ffffff;
}

/* Error Alerts */
.alert-error {
    background: rgba(239, 68, 68, 0.95);
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInSlide 0.3s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------------------------------
   Responsive Design (Mobile & Tablets)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        height: auto;
        min-height: 580px;
        border-radius: 10px;
    }

    .left-panel,
    .right-panel {
        width: 100%;
    }

    .wave-separator {
        display: none;
    }

    .left-panel {
        padding: 35px 25px;
        height: auto;
    }

    .logo-area {
        position: static;
        margin-bottom: 25px;
        justify-content: center;
    }

    .welcome-area {
        margin: 10px 0 20px 0;
    }

    .right-panel {
        padding: 45px 20px;
        min-height: 400px;
    }

    .copyright {
        bottom: 15px;
    }
}
