.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 32px 20px;
    background:
        radial-gradient(circle at top left, rgba(255, 106, 43, 0.2), transparent 34%),
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.12), transparent 26%),
        linear-gradient(145deg, #0b0e12 0%, #151b23 45%, #202a34 100%);
}

.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 12, 18, 0.24), rgba(8, 12, 18, 0.36));
    pointer-events: none;
}

.login-theme-has-hero .login-page {
    background: transparent;
}

.login-theme-has-hero .login-page::before {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(8, 12, 18, 0.16), rgba(8, 12, 18, 0.42));
}

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    padding: 36px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 250, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    animation: loginCardIn 0.45s ease-out;
    overflow: hidden;
}

html[data-theme="dark"] .login-card {
    background: linear-gradient(180deg, rgba(22, 24, 28, 0.96), rgba(15, 17, 20, 0.94));
    border-color: rgba(255, 255, 255, 0.08);
}

.login-theme-hero {
    margin: -36px -36px 26px;
    min-height: 132px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 18px 18px 16px;
    background-color: rgba(15, 17, 20, 0.92);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.login-theme-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 14, 20, 0.08), rgba(10, 14, 20, 0.48));
    pointer-events: none;
}

.login-theme-logo {
    position: relative;
    z-index: 1;
    max-width: min(220px, 80%);
    max-height: 82px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.login-brand-mark {
    min-width: 72px;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-align: center;
    box-shadow: 0 10px 24px rgba(255, 106, 43, 0.28);
}

.login-brand-kicker {
    color: var(--text-secondary, #7b8794);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-header h1 {
    margin: 0 0 8px;
    color: var(--text-primary);
    font-size: 30px;
    line-height: 1.1;
}

.login-card .subtitle {
    margin: 0;
    color: var(--text-secondary, #7b8794);
    font-size: 14px;
}

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

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

.login-form label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d9e0e8;
    border-radius: 10px;
    background: #fff;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 106, 43, 0.12);
    transform: translateY(-1px);
}

.login-form input::placeholder {
    color: #9aa6b2;
}

.login-form button[type="submit"] {
    margin-top: 6px;
    padding: 13px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-form button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(255, 106, 43, 0.32);
}

.login-links {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e8edf3;
    text-align: center;
}

.login-links p {
    margin: 0;
}

.login-links p + p {
    margin-top: 10px;
}

.login-links a {
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.login-links a:hover {
    text-decoration: underline;
}

.login-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}

.login-footer-links a {
    font-size: 12px;
    color: var(--text-secondary, #7b8794);
}

.login-footer-links a:hover {
    color: var(--primary-dark);
}

.separator {
    color: #d9e0e8;
}

.login-meta {
    color: var(--text-secondary, #8a97a6);
    font-size: 12px;
}

html[data-theme="dark"] .login-form input[type="text"],
html[data-theme="dark"] .login-form input[type="email"],
html[data-theme="dark"] .login-form input[type="password"] {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

html[data-theme="dark"] .login-form input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

html[data-theme="dark"] .login-links {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.login-message {
    margin-bottom: 20px;
    padding: 13px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

.login-message.error {
    background: #fff1f0;
    border: 1px solid #ffc9c3;
    color: #b42318;
}

.login-message.success {
    background: #eefbf3;
    border: 1px solid #b7e4c7;
    color: #166534;
}

.login-message.warning {
    background: #fff8eb;
    border: 1px solid #ffd8a8;
    color: #b45309;
}

@keyframes loginCardIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 680px) {
    .login-page {
        padding: 20px 14px;
    }

    .login-card {
        padding: 24px 20px;
        border-radius: 18px;
    }

    .login-theme-hero {
        margin: -24px -20px 22px;
        min-height: 112px;
    }

    .login-header h1 {
        font-size: 26px;
    }
}
@media (max-width: 768px) {
    .login-page {
        padding: 15px;
    }

    .login-card {
        padding: 30px;
        max-width: 100%;
    }

    .login-theme-hero {
        margin: -30px -30px 22px;
    }

    .login-card h1 {
        font-size: 24px;
    }

    .login-card .subtitle {
        font-size: 13px;
        margin-bottom: 25px;
    }

    .login-form {
        gap: 18px;
    }

    .login-form input[type="text"],
    .login-form input[type="email"],
    .login-form input[type="password"] {
        padding: 11px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Mobile: < 480px */
@media (max-width: 480px) {
    .login-page {
        padding: 10px;
        background: transparent;
    }

    .login-card {
        padding: 25px 20px;
        box-shadow: var(--shadow-sm);
        border-radius: var(--radius);
    }

    .login-theme-hero {
        margin: -25px -20px 20px;
        min-height: 96px;
    }

    .login-theme-logo {
        max-height: 64px;
        max-width: 74%;
    }

    .login-card h1 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .login-card .subtitle {
        font-size: 12px;
        margin-bottom: 20px;
    }

    .login-form {
        gap: 16px;
    }

    .form-group {
        gap: 6px;
    }

    .login-form label {
        font-size: 13px;
    }

    .login-form input[type="text"],
    .login-form input[type="email"],
    .login-form input[type="password"] {
        padding: 11px 12px;
        font-size: 16px;
        border-radius: var(--radius);
    }

    .password-toggle {
        right: 10px;
        font-size: 16px;
        padding: 4px 6px;
    }

    .remember-me {
        gap: 6px;
        font-size: 13px;
    }

    .remember-me input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }

    .login-form button[type="submit"] {
        padding: 11px 14px;
        font-size: 15px;
        margin-top: 8px;
    }

    .login-links {
        margin-top: 18px;
        padding-top: 18px;
        gap: 9px;
    }

    .login-links a {
        font-size: 13px;
    }

    .login-message {
        padding: 10px 12px;
        font-size: 13px;
        margin-bottom: 18px;
    }
}
