/*
 * Login Page — diagonal split (navy brand / white form), optimized.
 */

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background:
        radial-gradient(1000px 520px at 85% -10%, rgba(37, 99, 235, 0.10), transparent 60%),
        linear-gradient(135deg, #eef2f7 0%, #f8fafc 50%, #eaf1fb 100%);
}

/* Position the panel with a 2:3 top:bottom ratio (closer to the top) */
.login-page::before { content: ""; flex: 2 1 0; }
.login-page::after  { content: ""; flex: 3 1 0; }

.login-container {
    width: 100%;
    max-width: 50rem;
}

.login-alert {
    margin-bottom: 1rem;
    padding: 0.8rem 1.1rem;
    border-radius: 0.65rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.875rem;
    text-align: center;
}

/* ============================================
   WRAPPER + DIAGONAL PANELS
   ============================================ */
.login-form-wrapper {
    position: relative;
    height: 360px;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 30px 60px -18px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.login-brand-section {
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg, #172554 0%, #1e3a8a 55%, #1d4ed8 100%);
    clip-path: polygon(0 0, 58% 0, 42% 100%, 0 100%);
    display: flex;
    align-items: center;
}

.login-brand-inner {
    margin-left: 9%;
    max-width: 58%;
}

.login-brand-lockup {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.login-brand-logo {
    width: 72px;
    height: 72px;
    display: block;
    flex: none;
}

.login-brand-title {
    font-size: 2.15rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0;
}

.login-brand-tagline {
    color: rgba(219, 234, 254, 0.85);
    font-size: 0.95rem;
    margin: 0.35rem 0 0;
    letter-spacing: 0.01em;
}

.login-form-section {
    position: absolute;
    inset: 0;
    background: #ffffff;
    clip-path: polygon(58% 0, 100% 0, 100% 100%, 42% 100%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.login-form {
    width: 100%;
    max-width: 19rem;
    padding: 0 2rem;
    margin-right: 7%;
}

/* ============================================
   FORM FIELDS
   ============================================ */
.login-fields {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.login-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.02em;
}

.login-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.6rem;
    font-family: 'SFMono-Regular', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    color: #0f172a;
    background: #ffffff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.login-input::placeholder {
    color: #94a3b8;
}

.login-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

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

.login-input-password {
    padding-right: 2.5rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.35rem;
    display: flex;
    transition: color 0.15s ease, background 0.15s ease;
}

.password-toggle-btn:hover {
    color: #475569;
    background: #f1f5f9;
}

.password-toggle-icon {
    width: 1.15rem;
    height: 1.15rem;
}

.login-submit-btn {
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.6rem;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.login-submit-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.36);
}

.login-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

/* ============================================
   RESPONSIVE: stack panels, drop the diagonal
   ============================================ */
@media (max-width: 640px) {
    .login-form-wrapper {
        height: auto;
    }
    .login-brand-section,
    .login-form-section {
        position: relative;
        inset: auto;
        clip-path: none;
    }
    .login-brand-section {
        padding: 2.25rem 1.75rem;
    }
    .login-brand-inner {
        margin: 0;
        max-width: 100%;
    }
    .login-form-section {
        justify-content: center;
    }
    .login-form {
        margin: 0;
        max-width: 22rem;
        padding: 2rem 1.75rem;
    }
}
