/* ============================================================
   RAISEVIA SCHOOL MANAGEMENT SYSTEM
   RESPONSIVE LOGIN
   MOBILE-FIRST DESIGN
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


:root {
    --primary: #087f5b;
    --primary-dark: #066548;
    --primary-soft: #e9f7f2;

    --background: #f4f7f9;
    --surface: #ffffff;

    --text: #1f2933;
    --muted: #6b7280;

    --border: #d9e0e5;

    --danger: #c92a2a;
    --success: #087f5b;

    --shadow:
        0 12px 35px rgba(15, 23, 42, 0.08);
}


html {
    min-height: 100%;
}


body {
    margin: 0;
    padding: 0;

    min-height: 100vh;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: var(--background);
    color: var(--text);

    overflow-x: hidden;
}


/* ============================================================
   PAGE
   ============================================================ */

.login-page {
    width: 100%;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
}


/* ============================================================
   CARD
   ============================================================ */

.login-card {
    width: 100%;
    max-width: 440px;

    background: var(--surface);

    padding: 40px;

    border-radius: 18px;

    box-shadow: var(--shadow);

    border: 1px solid rgba(0, 0, 0, 0.03);
}


/* ============================================================
   BRAND
   ============================================================ */

.brand {
    display: flex;
    align-items: center;
    gap: 13px;

    margin-bottom: 34px;
}


.brand-icon {
    flex: 0 0 auto;

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: var(--primary);
    color: white;

    font-size: 22px;
    font-weight: 800;
}


.brand-text {
    min-width: 0;
}


.brand h1 {
    margin: 0;

    font-size: 22px;
    line-height: 1.2;
}


.brand p {
    margin: 4px 0 0;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.3;
}


/* ============================================================
   WELCOME
   ============================================================ */

.welcome {
    margin-bottom: 27px;
}


.welcome h2 {
    margin: 0 0 8px;

    font-size: 28px;
    line-height: 1.2;
}


.welcome p {
    margin: 0;

    color: var(--muted);

    line-height: 1.55;

    font-size: 14px;
}


/* ============================================================
   FORM
   ============================================================ */

.form-group {
    margin-bottom: 19px;
}


label {
    display: block;

    margin-bottom: 7px;

    font-size: 14px;
    font-weight: 650;

    color: #334155;
}


input {
    width: 100%;

    min-height: 48px;

    padding: 12px 14px;

    border: 1px solid var(--border);

    border-radius: 9px;

    background: #fff;

    color: var(--text);

    font-size: 16px;

    outline: none;

    -webkit-appearance: none;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}


input::placeholder {
    color: #9ca3af;
}


input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(8, 127, 91, 0.12);
}


/* ============================================================
   HIDDEN ACCESSIBILITY FIELD
   ============================================================ */

.hidden-field {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    padding: 0 !important;
    margin: -1px !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;

    white-space: nowrap !important;

    border: 0 !important;
}


/* ============================================================
   PASSWORD FIELD
   ============================================================ */

.password-field {
    position: relative;
}


.password-field input {
    padding-right: 70px;
}


.password-toggle {
    position: absolute;

    right: 7px;
    top: 50%;

    transform: translateY(-50%);

    width: auto;
    min-width: 52px;

    min-height: 36px;

    padding: 6px 8px;

    border: none;

    background: transparent;

    color: var(--primary);

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}


.password-toggle:hover {
    background: var(--primary-soft);

    border-radius: 6px;
}


/* ============================================================
   FORGOT PASSWORD
   ============================================================ */

.forgot-password {
    text-align: right;

    margin-top: -5px;
    margin-bottom: 18px;
}


.forgot-password a {
    color: var(--primary);

    text-decoration: none;

    font-size: 13px;

    font-weight: 650;
}


.forgot-password a:hover {
    text-decoration: underline;
}


/* ============================================================
   MAIN BUTTON
   ============================================================ */

.main-button {
    width: 100%;

    min-height: 50px;

    padding: 13px 16px;

    border: none;

    border-radius: 9px;

    background: var(--primary);

    color: white;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s,
        transform 0.1s,
        opacity 0.2s;
}


.main-button:hover {
    background: var(--primary-dark);
}


.main-button:active {
    transform: translateY(1px);
}


.main-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}


/* ============================================================
   SECONDARY BUTTON
   ============================================================ */

.secondary-button {
    width: 100%;

    min-height: 46px;

    margin-top: 10px;

    padding: 11px 16px;

    border: 1px solid var(--border);

    border-radius: 9px;

    background: white;

    color: #475569;

    font-size: 14px;
    font-weight: 650;

    cursor: pointer;
}


.secondary-button:hover {
    background: #f8fafc;
}


/* ============================================================
   MESSAGE
   ============================================================ */

.login-message {
    min-height: 0;

    margin-bottom: 15px;

    color: var(--danger);

    font-size: 14px;

    line-height: 1.5;
}


.login-message.success {
    color: var(--success);
}


/* ============================================================
   PASSWORD REQUIREMENTS
   ============================================================ */

.password-requirements {
    display: flex;
    flex-direction: column;
    gap: 4px;

    margin-top: 8px;

    color: var(--muted);

    font-size: 11px;

    line-height: 1.35;
}


.password-requirements span.valid {
    color: var(--success);
    font-weight: 650;
}


/* ============================================================
   FIRST LOGIN ICON
   ============================================================ */

.security-icon {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 17px;

    border-radius: 50%;

    background: var(--primary-soft);

    font-size: 25px;
}


/* ============================================================
   SUCCESS
   ============================================================ */

.success-icon {
    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 5px auto 20px;

    border-radius: 50%;

    background: var(--primary);

    color: white;

    font-size: 31px;
    font-weight: 800;
}


.success-content {
    text-align: center;
}


/* ============================================================
   VIEW CONTROL
   ============================================================ */

.hidden-view {
    display: none;
}


/* ============================================================
   FOOTER
   ============================================================ */

.login-footer {
    margin-top: 27px;

    text-align: center;

    color: var(--muted);

    font-size: 13px;
}


.login-footer p {
    margin: 0;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 768px) {

    .login-page {
        padding: 20px;
    }


    .login-card {
        max-width: 430px;

        padding: 32px;
    }

}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 480px) {

    .login-page {
        min-height: 100svh;

        align-items: flex-start;

        padding: 16px;

        padding-top: 28px;
        padding-bottom: 28px;
    }


    .login-card {
        width: 100%;

        padding: 27px 20px;

        border-radius: 15px;

        box-shadow:
            0 6px 24px rgba(15, 23, 42, 0.07);
    }


    .brand {
        margin-bottom: 28px;

        gap: 11px;
    }


    .brand-icon {
        width: 44px;
        height: 44px;

        border-radius: 11px;

        font-size: 20px;
    }


    .brand h1 {
        font-size: 20px;
    }


    .brand p {
        font-size: 12px;
    }


    .welcome {
        margin-bottom: 24px;
    }


    .welcome h2 {
        font-size: 24px;
    }


    .welcome p {
        font-size: 14px;
    }


    .form-group {
        margin-bottom: 17px;
    }


    label {
        font-size: 13px;
    }


    input {
        min-height: 49px;

        font-size: 16px;
    }


    .main-button {
        min-height: 50px;

        font-size: 15px;
    }


    .forgot-password {
        margin-bottom: 17px;
    }


    .security-icon {
        width: 54px;
        height: 54px;

        font-size: 23px;
    }


    .success-icon {
        width: 60px;
        height: 60px;

        font-size: 28px;
    }

}


/* ============================================================
   SMALL PHONES
   ============================================================ */

@media (max-width: 360px) {

    .login-page {
        padding: 10px;

        padding-top: 20px;
        padding-bottom: 20px;
    }


    .login-card {
        padding: 23px 16px;

        border-radius: 13px;
    }


    .brand {
        margin-bottom: 25px;
    }


    .welcome h2 {
        font-size: 22px;
    }


    .welcome p {
        font-size: 13px;
    }


    .login-footer {
        margin-top: 23px;
    }

}


/* ============================================================
   REDUCE MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    * {
        transition: none !important;
    }

}

/* =========================================================
   RAISEVIA LOGIN BUTTON - FINAL
========================================================= */

#loginButton {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-height: 56px !important;

    margin-top: 10px !important;
    padding: 15px 20px !important;

    border: none !important;
    border-radius: 10px !important;

    background: #07895f !important;
    color: #ffffff !important;

    font-family: inherit !important;
    font-size: 17px !important;
    font-weight: 700 !important;

    line-height: 1.2 !important;
    text-align: center !important;

    cursor: pointer !important;

    appearance: none !important;
    -webkit-appearance: none !important;

    box-sizing: border-box !important;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease !important;
}

#loginButton:hover {
    background: #06754f !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(7, 137, 95, 0.20);
}

#loginButton:active {
    transform: translateY(0);
}

#loginButton:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

#loginButtonText {
    display: block;
    width: 100%;
    text-align: center;
}