/* ===== CSS VARIABLES - School Colors ===== */
:root {
    --primary-green: #1B5E20;
    --secondary-green: #2E7D32;
    --light-green: #4CAF50;
    --accent-green: #66BB6A;
    --primary-yellow: #FDD835;
    --secondary-yellow: #FFEB3B;
    --light-yellow: #FFF9C4;
    --dark: #1a1a2e;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-600: #6c757d;
    --error: #dc3545;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background-image: url('../images/bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(13, 59, 26, 0.88) 0%, 
        rgba(27, 94, 32, 0.82) 30%, 
        rgba(46, 125, 50, 0.78) 60%, 
        rgba(27, 94, 32, 0.88) 100%
    );
    z-index: 0;
}


/* ===== PARTICLES BACKGROUND ===== */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.2;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg) scale(1);
        opacity: 0;
    }
}

/* ===== MAIN CONTAINER ===== */
.container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 1100px;
    min-height: 600px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: slide-up 0.8s ease-out;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== BRANDING SIDE (LEFT) ===== */
.branding-side {
    flex: 1;
    background: linear-gradient(160deg, var(--primary-green) 0%, var(--secondary-green) 50%, #0d3b1a 100%);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.branding-side::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(253, 216, 53, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.branding-side::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.branding-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
}

/* Logo */
.logo-container {
    margin-bottom: 25px;
}

.logo-ring {
    width: 130px;
    height: 130px;
    border: 4px solid var(--primary-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    animation: pulse-ring 3s ease-in-out infinite;
}

.logo-ring::before {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px dashed rgba(253, 216, 53, 0.4);
    border-radius: 50%;
    animation: spin-slow 20s linear infinite;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 20px rgba(253, 216, 53, 0.3); }
    50% { box-shadow: 0 0 40px rgba(253, 216, 53, 0.6); }
}

.logo-inner {
    width: 100px;
    height: 100px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 5px;
}

.logo-inner img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.logo-stars {
    display: flex;
    gap: 3px;
    margin-top: 3px;
}

.logo-stars i {
    font-size: 7px;
    color: var(--primary-yellow);
}


/* School Name */
.school-name {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.school-name span {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-yellow);
}

.school-motto {
    font-size: 14px;
    font-style: italic;
    color: rgba(255,255,255,0.85);
    margin-bottom: 30px;
    padding: 0 20px;
}

/* School Info */
.school-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.info-item i {
    color: var(--primary-yellow);
    font-size: 14px;
}

/* Programs Preview */
.programs-preview {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.program-tag {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.program-tag:hover {
    background: var(--primary-yellow);
    color: var(--primary-green);
    transform: translateY(-2px);
}

.program-tag i {
    margin-right: 4px;
    font-size: 11px;
}

/* Decoration Circles */
.branding-decoration {
    position: absolute;
    z-index: 1;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(253, 216, 53, 0.15);
}

.deco-circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
}

.deco-circle:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
}

.deco-circle:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 50%;
    right: -30px;
}

/* ===== LOGIN SIDE (RIGHT) ===== */
.login-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--white);
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.mobile-logo {
    display: none;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    border-radius: 16px;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 8px 20px rgba(27, 94, 32, 0.3);
}

.mobile-logo i {
    font-size: 28px;
    color: var(--white);
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--gray-600);
    font-size: 15px;
}

/* Alert */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff5f5;
    border-left: 4px solid var(--error);
    color: var(--error);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
}

.alert-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* Form Inputs */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-group label i {
    color: var(--secondary-green);
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: var(--gray-100);
}

.input-group input:focus {
    outline: none;
    border-color: var(--secondary-green);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1);
}

.input-group input::placeholder {
    color: var(--gray-600);
    font-size: 14px;
}

.input-group.focused label i {
    color: var(--primary-green);
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: color 0.3s;
    width: auto;
}

.toggle-password:hover {
    color: var(--primary-green);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--gray-600);
    font-weight: 500;
}

.remember-me input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: var(--white);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.remember-me input:checked + .checkmark {
    background: var(--secondary-green);
    border-color: var(--secondary-green);
}

.remember-me input:checked + .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

.forgot-link {
    color: var(--secondary-green);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--primary-green);
    text-decoration: underline;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(27, 94, 32, 0.3);
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(27, 94, 32, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn i {
    transition: transform 0.3s ease;
}

.login-btn:hover i {
    transform: translateX(4px);
}

/* Login Footer */
.login-footer {
    margin-top: 30px;
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid var(--gray-200);
}

.login-footer p {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.contact-numbers {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-numbers a {
    color: var(--secondary-green);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s;
}

.contact-numbers a:hover {
    color: var(--primary-green);
}

.contact-numbers i {
    margin-right: 6px;
    font-size: 12px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
        max-width: 450px;
    }

    .branding-side {
        padding: 30px 25px;
        min-height: auto;
    }

    .school-name {
        font-size: 22px;
    }

    .school-name span {
        font-size: 16px;
    }

    .logo-ring {
        width: 100px;
        height: 100px;
    }

    .logo-inner {
        width: 75px;
        height: 75px;
    }

    .logo-inner i.fa-book-open {
        font-size: 28px;
    }

    .login-side {
        padding: 30px 25px;
    }

    .mobile-logo {
        display: flex;
    }

}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .login-wrapper {
        border-radius: var(--radius-md);
    }

    .branding-side {
        padding: 25px 20px;
    }

    .login-side {
        padding: 25px 20px;
    }

    .school-name {
        font-size: 20px;
    }

    .programs-preview {
        gap: 6px;
    }

    .program-tag {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* ===== LOADING ANIMATION ===== */
@keyframes spin {
    to { transform: rotate(360deg); }
}