/* ROOT VARIABLES */
:root {
    --primary-color: #4caf50;
    --primary-dark: #388e3c;
    --primary-light: #e8f5e9;
    --text-primary: #1e3a8a;
    --text-secondary: #6b7280;
    --bg-page: #f0f4f7;
    --card-bg: #ffffff;
    --input-border: #d1d5db;
    --input-focus: rgba(76, 175, 80, 0.15);
    --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
    --border-radius: 18px;
    --input-radius: 10px;
    --error-color: #dc2626;
    --success-color: #059669;
}

/* BASE RESET & TYPOGRAPHY */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 30px;
    line-height: 1.5;
}

/* LOGIN LAYOUT (DUAL COLUMN) */
.login-wrapper {
    display: flex;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
    width: 100%;
    max-width: 1050px;
    min-height: 600px;
}

/* IMAGE/ACCENT SECTION (LEFT SIDE) */
.login-image-section {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 50px;
    background: #000;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

/* Overlay Hitam Transparan */
.login-image-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(31, 36, 26, 0.7);
    z-index: 2;
}

.login-image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: block;
    filter: blur(8px) brightness(1.0);
    opacity: 1;
    transform: scale(1.1);
}

.login-image-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    background: transparent;
    padding: 25px;
    border-radius: var(--input-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* LOGO STYLING (Minimalis) */
.school-logo {
    margin-bottom: 25px;
}

.school-logo img {
    width: 120px;
    height: auto;
    position: relative;
    z-index: 10;
    opacity: 1;
    filter: brightness(1.3);
    transform: none;
    -webkit-filter: brightness(1.3);
}

.login-image-content .school-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-image-content h2 {
    font-size: 30px;
    margin-bottom: 20px;
    font-weight: 900;
    line-height: 1.1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.login-image-content p {
    font-size: 17px;
    font-weight: 400;
    margin-bottom: 30px;
    opacity: 0.95;
}

.login-image-content .action-button-white {
    padding: 12px 30px;
    background-color: var(--card-bg);
    color: var(--primary-dark);
    border: none;
    border-radius: var(--input-radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.login-image-content .action-button-white:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

/* FORM SECTION (RIGHT SIDE) */
.login-form-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    background-color: var(--card-bg);
}

.login-form-content {
    width: 100%;
    max-width: 400px;
}

/* FORM HEADER */
.form-header {
    text-align: left;
    margin-bottom: 40px;
}

.form-header .school-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.form-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.form-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* FORM ELEMENTS */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 15px 18px;
    font-size: 16px;
    border: 1px solid var(--input-border);
    border-radius: var(--input-radius);
    font-family: "Inter", sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-page);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 3px var(--input-focus);
}

/* FORM OPTIONS */
.form-options {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 30px;
    font-size: 15px;
}

.form-options a,
.form-footer-link a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-options a:hover,
.form-footer-link a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* BUTTON */
.login-button {
    width: 100%;
    padding: 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--input-radius);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
}

.login-button:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.5);
}

.login-button:active {
    transform: scale(0.99);
}

/* BACK TO HOME LINK */
.back-to-home-link {
    text-align: center;
    margin-top: 30px;
}

.back-to-home-link a {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-to-home-link a:hover {
    color: var(--primary-color);
}

/* ERROR & STATUS MESSAGES */
.form-error {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 5px;
    font-weight: 500;
}

.form-status {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    padding: 15px;
    border-radius: var(--input-radius);
    margin-bottom: 25px;
    font-size: 16px;
    text-align: center;
    border: 1px solid var(--primary-color);
}

/* SIMPLE FORM WRAPPER (FORGOT/RESET PASSWORD) */
.simple-form-wrapper {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    padding: 50px;
}

.form-footer-link {
    text-align: center;
    margin-top: 25px;
    font-size: 15px;
}

/* MEDIA QUERIES (RESPONSIVENESS) */
@media (max-width: 992px) {
    .login-wrapper {
        max-width: 800px;
        min-height: unset;
    }
}

@media (max-width: 767px) {
    /* MOBILE - SINGLE COLUMN */
    .login-wrapper {
        flex-direction: column;
        max-width: 450px;
        box-shadow: none;
        min-height: unset;
        border-radius: 0;
    }

    /* Tampilkan Image Section */
    .login-image-section {
        flex: unset;
        display: flex;
        height: 150px;
        padding: 0; 
        border-radius: 0;
    }
    
    /* Overlay lebih tipis di mobile */
    .login-image-section::before {
        background: rgba(0, 0, 0, 0.4); 
    }

    .login-image-section img {
        filter: brightness(1.0);
}

    /* SEMBUNYIKAN SEMUA KONTEN DI DALAM IMAGE SECTION */
    .login-image-content {
        display: none;
    }
    
    .login-form-section {
        padding: 40px 30px;
    }

    .simple-form-wrapper {
        max-width: 450px;
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    /* SMALL MOBILE */
    body {
        padding: 0;
    }

    .login-wrapper, .simple-form-wrapper {
        border-radius: 0;
        min-height: 100vh;
        box-shadow: none;
    }

    .login-image-section {
        height: 150px;
    }

    .login-form-section {
        padding: 30px 20px;
    }
}