/* ============================================================
   SchoolBook Login Page Styles (New_login.css)
   ============================================================ */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* ---------- Full-screen school background ---------- */
.loginBg {
    background: url('/img/school_bg.jpg') no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    background-color: #1a1a2e;
    min-height: 100%;
    overflow: hidden;
}

/* Dark overlay for readability */
.loginBg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.25) 100%);
    z-index: 0;
}

/* ---------- Page layout ---------- */
.login-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

/* ---------- Logo ---------- */
.login-logo {
    max-width: 120px;
    width: 100%;
    height: auto;
    background: #ffffff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.45);
    display: inline-block;
    margin-bottom: 18px;
}

/* ---------- Login card ---------- */
.login-container {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    text-align: left;
    backdrop-filter: blur(4px);
}

.login-container .login-header {
    background: linear-gradient(135deg, #cc0001 0%, #8f0000 100%);
    padding: 18px 20px;
    text-align: center;
}

.login-container .login-header h4 {
    color: #ffffff;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.login-wrapper {
    padding: 25px 28px 22px;
}

/* ---------- Form elements ---------- */
.login-container .form-group {
    margin-bottom: 18px;
    position: relative;
}

.login-container .form-group label {
    color: #333;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
}

.login-container .form-control {
    height: 44px;
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 8px 40px 8px 14px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-container .form-control:focus {
    border-color: #cc0001;
    box-shadow: 0 0 0 3px rgba(204, 0, 1, 0.15);
    outline: none;
}

.login-container .form-control-feedback {
    position: absolute;
    right: 12px;
    top: 38px;
    color: #999;
    font-size: 16px;
}

/* Remember me row */
.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #444;
    font-size: 13px;
    font-weight: normal;
}

.login-remember input[type="checkbox"] {
    margin: 0 2px 0 10px;
}

.login-remember input[type="checkbox"]:first-of-type {
    margin-left: 0;
}

/* ---------- Login button ---------- */
.btn-login {
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, #cc0001 0%, #8f0000 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin-top: 5px;
}

.btn-login:hover,
.btn-login:focus {
    box-shadow: 0 6px 18px rgba(204, 0, 1, 0.4);
    transform: translateY(-1px);
    color: #ffffff;
}

/* ---------- Forgot password link ---------- */
.login-forgot {
    display: block;
    text-align: center;
    margin-top: 14px;
    color: #cc0001;
    font-size: 13px;
    text-decoration: none;
}

.login-forgot:hover {
    text-decoration: underline;
    color: #8f0000;
}

/* Error text */
.login-error {
    font-weight: bold;
    color: #cc0001;
    text-align: center;
    margin-bottom: 10px;
}

/* ============================================================
   Responsive - Tablet / iPad (<= 991px)
   ============================================================ */
@media screen and (max-width: 991px) {
    .login-box {
        max-width: 460px;
    }
    .loginBg {
        overflow: auto;
    }
}

/* ============================================================
   Responsive - Mobile (<= 767px)
   ============================================================ */
@media screen and (max-width: 767px) {
    .login-page {
        align-items: flex-start;
        padding: 30px 12px;
    }
    .login-logo {
        max-width: 95px;
        margin-bottom: 14px;
    }
    .login-wrapper {
        padding: 20px 18px 18px;
    }
    .login-header h4 {
        font-size: 18px;
    }
    .login-container .form-control {
        height: 42px;
        font-size: 16px; /* prevents iOS zoom on focus */
    }
    .btn-login {
        height: 44px;
    }
}

/* ============================================================
   Responsive - Small mobile (<= 480px)
   ============================================================ */
@media screen and (max-width: 480px) {
    .login-box {
        max-width: 100%;
    }
    .login-logo {
        max-width: 80px;
    }
}
