/* ==========================================================================
   LOGIN PAGE STYLES
   APM IT Manager Dashboard
   ========================================================================== */

/* Scoped to .login-page rather than :root — this stylesheet now shares a
   page with dashboard.css, which defines its own :root custom properties
   under the same names (--color-blue-accent, --radius-md, etc.) for the
   light dashboard theme. Custom properties on :root would collide (last
   loaded wins for every use of that name on the whole page); scoping them
   to .login-page keeps the dark login theme isolated to its own subtree. */
.login-page {
    --color-navy-900: #061428;
    --color-navy-800: #0a1e3d;
    --color-navy-700: #0f2c54;
    --color-blue-accent: #2f6fed;
    --color-blue-accent-light: #5b8def;
    --color-white: #ffffff;
    --color-light-gray: #f4f6f9;
    --color-text-muted: #8a9bb5;
    --color-danger: #e5484d;

    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-card: 0 25px 60px rgba(3, 12, 28, 0.45);
}

.login-page,
.login-page * {
    box-sizing: border-box;
}

/* Full-screen dark blue gradient background */
.login-page {
    margin: 0;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: radial-gradient(circle at 20% 20%, var(--color-navy-700), transparent 55%),
                radial-gradient(circle at 80% 80%, var(--color-blue-accent-light), transparent 45%),
                linear-gradient(135deg, var(--color-navy-900) 0%, var(--color-navy-800) 55%, var(--color-navy-700) 100%);
    background-attachment: fixed;
}

/* Center login card with glassmorphism */
.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 36px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow-card);
    animation: fadeSlideUp 0.5s ease;
}

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

.login-brand {
    text-align: center;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-logo-img {
    max-width: 200px;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.35));
}

.brand-subtitle {
    margin-top: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

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

/* A class selector like .login-form beats the UA [hidden] rule's specificity,
   so without this the sign-up form would stay visible even while hidden. */
.login-form[hidden] {
    display: none;
}

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-white);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i.fa-envelope,
.input-wrapper i.fa-lock {
    position: absolute;
    left: 14px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-white);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.input-wrapper input:focus {
    border-color: var(--color-blue-accent);
    background: rgba(255, 255, 255, 0.12);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
}

.toggle-password:hover {
    color: var(--color-white);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    cursor: pointer;
    user-select: none;
}

.remember-me input {
    accent-color: var(--color-blue-accent);
}

.forgot-password {
    color: var(--color-blue-accent-light);
    text-decoration: none;
    font-weight: 500;
}

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

.auth-notice {
    font-size: 0.85rem;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    margin-top: 20px;
}

.auth-notice.notice-error {
    background: rgba(229, 72, 77, 0.12);
    border: 1px solid rgba(229, 72, 77, 0.4);
    color: #ffb3b5;
}

.auth-notice.notice-success {
    background: rgba(23, 166, 115, 0.12);
    border: 1px solid rgba(23, 166, 115, 0.4);
    color: #7ee6c4;
}

.auth-toggle {
    margin-top: 18px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.auth-toggle a {
    color: var(--color-blue-accent-light);
    font-weight: 600;
    cursor: pointer;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-blue-accent), var(--color-blue-accent-light));
    color: var(--color-white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 10px 25px rgba(47, 111, 237, 0.35);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(47, 111, 237, 0.45);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.login-footer strong {
    color: var(--color-white);
}

/* Responsive tweaks */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
    }

    .brand-logo-img {
        max-width: 160px;
    }
}
