* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #37474f;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Navbar ── */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    background-color: #263238;
    height: 64px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.nav-left .logo {
    height: 48px;
}

/* ── Main Content ── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px;
    width: 100%;
}

/* ── Login Header (desktop: 50% column, like the original) ── */
.login-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    width: 50%;
    justify-content: flex-start;
}

.login-header h1 {
    font-size: 3.56rem;
    font-weight: 400;
    color: #ffffff;
}

.login-icon {
    font-size: 3.56rem;
    color: #ffffff;
}

/* ── Login Card (desktop: 50%, like the original) ── */
.login-card {
    background-color: rgb(67, 87, 96);
    padding: 40px 25px;
    width: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.login-subtitle {
    font-size: 15px;
    color: #ffffff;
    margin-bottom: 35px;
}

/* ── Alert Messages ── */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background-color: rgba(244, 67, 54, 0.15);
    color: #ef9a9a;
    border-left: 3px solid #f44336;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.15);
    color: #a5d6a7;
    border-left: 3px solid #4caf50;
}

.alert-warning {
    background-color: rgba(255, 152, 0, 0.15);
    color: #ffcc80;
    border-left: 3px solid #ff9800;
}

/* ── Input Fields ── */
.field-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.input-field {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #546e7a;
    padding-bottom: 8px;
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.input-icon {
    color: #ffffff;
    font-size: 30px;
    flex-shrink: 0;
}

.input-field input {
    /* --- Safari fixes --- */
    width: 100%;
    min-width: 0;
    -webkit-appearance: none;
    border-radius: 0;

    /* --- Existing styles --- */
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    padding: 10px 0;
}

.input-field input::placeholder {
    color: #6a767b;
}

.password-toggle {
    color: #6a767b;
    cursor: pointer;
    font-size: 24px;
    flex-shrink: 0;
}

.password-toggle:hover {
    color: #b0bec5;
}

/* ── Login Options ── */
.login-options {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b0bec5;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #009fe3;
    cursor: pointer;
}

.separator {
    margin: 0 8px;
    color: #6a767b;
}

.forgot-password {
    color: #009fe3;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* ── Login Button (desktop: 55%, like the original) ── */
.login-button {
    background-color: #009fe3;
    color: #ffffff;
    border: none;
    padding: 14px;
    width: 55%;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.login-button:hover {
    background-color: #0088c6;
}

.login-button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* ── Register Link (desktop: 50%, like the original) ── */
.register-link {
    display: flex;
    text-align: left;
    margin-top: 20px;
    font-size: 15px;
    color: #ffffff;
    justify-content: flex-end;
    gap: 6px;
    width: 50%;
}

.register-link a {
    color: #009fe3;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

/* ── Footer ── */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    background-color: #37454d;
    font-size: 15px;
    color: #ffffff;
}

.footer a {
    color: #009fe3;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Hide browser's native password toggle */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* Hide auto-fill icon but keep the textfield intact for Safari */
input::-webkit-credentials-auto-fill-button {
    display: none !important;
}

/* ──────────────────────────────────────────────────────────
   Mobile / small screens (<=768px): full-width card, the
   image-2 look. Desktop (>768px) keeps the original layout
   defined above untouched.
   ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 16px;
        height: 56px;
    }

    .nav-left .logo {
        height: 40px;
    }

    .main-content {
        padding: 20px 16px;
    }

    .login-header,
    .login-card,
    .register-link {
        width: 100%;
        max-width: 460px;
    }

    .login-header {
        gap: 10px;
        margin-bottom: 16px;
    }

    .login-header h1,
    .login-icon {
        font-size: 1.75rem;
    }

    .login-card {
        padding: 24px 20px;
        border: 1px solid #50676f;
    }

    .login-subtitle {
        margin-bottom: 28px;
    }

    .field-row {
        gap: 12px;
        margin-bottom: 24px;
    }

    .input-icon {
        font-size: 26px;
    }

    .login-options {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .login-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-header h1,
    .login-icon {
        font-size: 1.5rem;
    }
}