﻿/* ============================================================
   LOGIN PAGE — FULLY RESPONSIVE
   Desktop / Windows / Laptop / Tablet / Mobile
   ============================================================ */

/* ============================================================
   RESET
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    width: 100%;
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: #f5f6f8;
    color: #222;
    font-family: Arial, Helvetica, sans-serif;
    /* Better font rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ============================================================
   PAGE
   ============================================================ */

.login-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    /* Allows scrolling instead of clipping on short screens */
    overflow-x: hidden;
}


/* ============================================================
   CONTAINER
   ============================================================ */

.login-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}


/* ============================================================
   BRAND
   ============================================================ */

.login-brand {
    width: 100%;
    margin: 0 auto 22px;
    text-align: center;
}

.brand-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #151515;
    color: #fff;
    font-size: 27px;
    font-weight: 700;
    user-select: none;
}

.brand-name {
    margin: 0;
    color: #222;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
}

.brand-subtitle {
    margin: 6px 0 0;
    color: #888;
    font-size: 13px;
    line-height: 1.4;
}


/* ============================================================
   LOGIN CARD
   ============================================================ */

.login-card {
    width: 100%;
    padding: 30px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}


/* ============================================================
   LOGIN TITLE
   ============================================================ */

.login-title {
    margin: 0;
    color: #222;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.login-description {
    margin: 7px 0 25px;
    color: #888;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}


/* ============================================================
   FIELD
   ============================================================ */

.login-field {
    width: 100%;
    margin: 0 0 17px;
}

    .login-field label {
        display: block;
        margin: 0 0 7px;
        color: #333;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.3;
    }


/* ============================================================
   INPUT
   ============================================================ */

.login-input {
    display: block;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 13px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #222;
    font-family: inherit;
    font-size: 16px;
    line-height: normal;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

    .login-input::placeholder {
        color: #aaa;
        opacity: 1;
    }

    .login-input:hover {
        border-color: #cfcfcf;
    }

    .login-input:focus {
        border-color: #555;
        box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
    }


/* ============================================================
   PASSWORD
   ============================================================ */

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-input {
    padding-right: 70px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-width: 48px;
    height: 36px;
    transform: translateY(-50%);
    padding: 0 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #555;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .password-toggle:hover {
        background: #f2f2f2;
        color: #111;
    }

    .password-toggle:focus-visible {
        outline: 2px solid #555;
        outline-offset: 2px;
    }


/* ============================================================
   REMEMBER OPTION
   ============================================================ */

.remember-option {
    display: flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    margin: 1px 0 20px;
    color: #555;
    font-size: 13px;
    line-height: 1.3;
    cursor: pointer;
    user-select: none;
}

    .remember-option input {
        flex: 0 0 auto;
        width: 16px;
        height: 16px;
        min-width: 16px;
        min-height: 16px;
        margin: 0;
        cursor: pointer;
        accent-color: #151515;
    }


/* ============================================================
   LOGIN BUTTON
   ============================================================ */

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 10px 15px;
    border: 0;
    border-radius: 8px;
    background: #151515;
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

    .login-button:hover {
        background: #333;
    }

    .login-button:focus-visible {
        outline: 2px solid #555;
        outline-offset: 3px;
    }

    .login-button:active {
        transform: translateY(1px);
    }


/* ============================================================
   ERRORS
   ============================================================ */

.login-error {
    width: 100%;
    margin: 0 0 15px;
    padding: 10px 11px;
    border-radius: 7px;
    background: #fff0f0;
    color: #c33;
    font-size: 13px;
    line-height: 1.4;
}

.field-error {
    display: block;
    margin: 5px 0 0;
    color: #c33;
    font-size: 12px;
    line-height: 1.35;
}


/* ============================================================
   FOOTER
   ============================================================ */

.login-footer {
    margin: 18px 0 0;
    color: #999;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}


/* ============================================================
   LARGE DESKTOP / WINDOWS MONITORS
   ============================================================ */

@media (min-width: 1200px) {

    .login-page {
        padding: 40px 30px;
    }

    .login-container {
        max-width: 430px;
    }

    .login-card {
        padding: 32px;
    }
}


/* ============================================================
   DESKTOP / LAPTOP
   769px — 1199px
   ============================================================ */

@media (min-width: 769px) and (max-width: 1199px) {

    .login-page {
        padding: 30px 24px;
    }

    .login-container {
        max-width: 420px;
    }
}


/* ============================================================
   TABLET
   481px — 768px
   ============================================================ */

@media (min-width: 481px) and (max-width: 768px) {

    .login-page {
        padding: 28px 20px;
    }

    .login-container {
        max-width: 420px;
    }

    .login-brand {
        margin-bottom: 20px;
    }

    .login-card {
        padding: 27px;
        border-radius: 13px;
    }
}


/* ============================================================
   MOBILE
   480px AND BELOW
   ============================================================ */

@media (max-width: 480px) {

    .login-page {
        min-height: 100svh;
        padding: 20px 14px;
        align-items: center;
    }

    .login-container {
        width: 100%;
        max-width: 420px;
    }


    /* --------------------------------------------------------
       BRAND
       -------------------------------------------------------- */

    .login-brand {
        margin-bottom: 16px;
    }

    .brand-icon {
        width: 52px;
        height: 52px;
        margin-bottom: 8px;
        border-radius: 13px;
        font-size: 24px;
    }

    .brand-name {
        font-size: 23px;
    }

    .brand-subtitle {
        margin-top: 4px;
        font-size: 12px;
    }


    /* --------------------------------------------------------
       CARD
       -------------------------------------------------------- */

    .login-card {
        padding: 23px 18px;
        border-radius: 12px;
    }


    /* --------------------------------------------------------
       TITLE
       -------------------------------------------------------- */

    .login-title {
        font-size: 20px;
    }

    .login-description {
        margin-top: 5px;
        margin-bottom: 21px;
        font-size: 12px;
    }


    /* --------------------------------------------------------
       FIELD
       -------------------------------------------------------- */

    .login-field {
        margin-bottom: 16px;
    }

        .login-field label {
            margin-bottom: 6px;
            font-size: 13px;
        }


    /* --------------------------------------------------------
       INPUT
       -------------------------------------------------------- */

    .login-input {
        height: 50px;
        padding: 0 13px;
        font-size: 16px;
        border-radius: 8px;
    }


    /* --------------------------------------------------------
       PASSWORD
       -------------------------------------------------------- */

    .password-input {
        padding-right: 68px;
    }

    .password-toggle {
        right: 7px;
        min-width: 46px;
        height: 36px;
    }


    /* --------------------------------------------------------
       REMEMBER
       -------------------------------------------------------- */

    .remember-option {
        margin-bottom: 18px;
        font-size: 12px;
    }


    /* --------------------------------------------------------
       BUTTON
       -------------------------------------------------------- */

    .login-button {
        min-height: 52px;
        font-size: 15px;
        border-radius: 8px;
    }


    /* --------------------------------------------------------
       FOOTER
       -------------------------------------------------------- */

    .login-footer {
        margin-top: 16px;
        font-size: 10px;
    }
}


/* ============================================================
   VERY SMALL PHONES
   360px AND BELOW
   ============================================================ */

@media (max-width: 360px) {

    .login-page {
        padding: 14px 10px;
    }

    .login-brand {
        margin-bottom: 12px;
    }

    .brand-icon {
        width: 46px;
        height: 46px;
        margin-bottom: 6px;
        border-radius: 11px;
        font-size: 21px;
    }

    .brand-name {
        font-size: 21px;
    }

    .brand-subtitle {
        font-size: 11px;
    }

    .login-card {
        padding: 20px 15px;
        border-radius: 11px;
    }

    .login-title {
        font-size: 19px;
    }

    .login-description {
        margin-top: 5px;
        margin-bottom: 18px;
        font-size: 11px;
    }

    .login-field {
        margin-bottom: 14px;
    }

        .login-field label {
            font-size: 12px;
        }

    .login-input {
        height: 48px;
        font-size: 16px;
    }

    .login-button {
        min-height: 50px;
        font-size: 14px;
    }

    .remember-option {
        margin-bottom: 16px;
        font-size: 11px;
    }

    .login-footer {
        margin-top: 14px;
        font-size: 9px;
    }
}


/* ============================================================
   SHORT WINDOWS LAPTOP / SHORT MOBILE SCREEN
   Prevent vertical clipping
   ============================================================ */

@media (max-height: 700px) {

    .login-page {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }
}


/* ============================================================
   VERY SHORT SCREENS
   ============================================================ */

@media (max-height: 600px) {

    .login-page {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .login-brand {
        margin-bottom: 10px;
    }

    .brand-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 5px;
        font-size: 20px;
    }

    .brand-name {
        font-size: 20px;
    }

    .brand-subtitle {
        font-size: 10px;
    }

    .login-card {
        padding-top: 17px;
        padding-bottom: 17px;
    }

    .login-description {
        margin-bottom: 16px;
    }

    .login-field {
        margin-bottom: 12px;
    }

    .login-button {
        min-height: 48px;
    }

    .remember-option {
        margin-bottom: 14px;
    }

    .login-footer {
        margin-top: 10px;
    }
}


/* ============================================================
   TOUCH DEVICES
   Make controls easier to tap
   ============================================================ */

@media (hover: none) and (pointer: coarse) {

    .password-toggle {
        min-width: 48px;
        min-height: 40px;
    }

    .login-button {
        min-height: 52px;
    }
}


/* ============================================================
   WINDOWS HIGH CONTRAST / FORCED COLORS
   ============================================================ */

@media (forced-colors: active) {

    .login-card {
        border: 1px solid CanvasText;
    }

    .login-input {
        border: 1px solid CanvasText;
    }

    .login-button {
        border: 1px solid ButtonText;
    }

        .password-toggle:focus-visible,
        .login-button:focus-visible,
        .login-input:focus {
            outline: 2px solid Highlight;
        }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .login-input,
    .password-toggle,
    .login-button {
        transition: none;
    }
}
