.login-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.login-modal[aria-hidden="false"] {
    display: flex;
}

.login-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}

.login-modal__dialog {
    position: relative;
    background: #0f172a;
    color: #e2e8f0;
    width: min(460px, 92vw);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 40px 120px rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(148, 163, 184, 0.12);
    border: none;
    color: #e2e8f0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.login-modal__close:hover {
    background: rgba(56, 189, 248, 0.2);
}

.login-modal__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    color: #38bdf8;
}

.login-modal__header h2 {
    margin: 6px 0 12px;
    font-size: 1.8rem;
    color: #f8fafc;
}

.login-modal__header p {
    margin: 0;
    color: rgba(226, 232, 240, 0.75);
    line-height: 1.5;
    font-size: 0.98rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-form__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.95rem;
}

.login-form__field span {
    color: rgba(226, 232, 240, 0.85);
    font-weight: 500;
}

.login-form__field input {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    padding: 12px 14px;
    color: #f8fafc;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.login-form__field input:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.login-form__field--password {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: calc(50% + 6px);
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.password-toggle:hover {
    color: #38bdf8;
}

.password-toggle i {
    font-size: 1rem;
}

.login-form__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.75);
}

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

.remember-me input {
    accent-color: #38bdf8;
}

.login-form__actions a {
    color: #38bdf8;
    text-decoration: none;
}

.login-form__actions a:hover {
    color: #60a5fa;
}

.login-modal__footer {
    font-size: 0.9rem;
    color: rgba(226, 232, 240, 0.75);
    text-align: center;
}

.login-modal__footer a {
    color: #38bdf8;
    font-weight: 600;
    text-decoration: none;
}

.login-modal__footer a:hover {
    color: #60a5fa;
}

@media (max-width: 520px) {
    .login-modal__dialog {
        padding: 28px 24px;
        border-radius: 20px;
    }

    .login-form__actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
