﻿/* =========================================================
   BASE
   ========================================================= */
html, body {
    height: 100%;
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f5f7fb;
}

    body.login-page {
        min-height: 100vh;
    }



/* =========================================================
   PAGE BACKGROUND + FADE
   ========================================================= */
.login-page {
    background-color: #f4f6f9;
    animation: bgFade 600ms ease-out forwards;
}

body.login-page {
    min-height: 100vh;
    margin: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

/*.login-shell {
    margin-top: auto;
    margin-bottom: auto;
}*/

.login-shell {
    align-self: center;
    justify-self: center;
}

@keyframes bgFade {
    from {
        background-color: #ffffff;
    }

    to {
        background-color: #f4f6f9;
    }
}

/* =========================================================
   CENTERING WRAPPER  ✅ FIXED
   ========================================================= */
.login-shell {
    width: 100%;
    max-width: 1100px;
    padding: 28px;
    opacity: 0;
    animation: fadeOnly 1.6s ease forwards;
}

@keyframes fadeOnly {
    to {
        opacity: 1;
    }
}

/* =========================================================
   LOGIN CARD GRID
   ========================================================= */
.login-surface {
    width: 100%;
    height: 460px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 55px rgba(0,0,0,0.10);
    overflow: hidden;
    display: grid;
    grid-template-columns: 45% 55%;
    align-items: stretch;
}

/* =========================================================
   LEFT PANEL (LOGO)
   ========================================================= */
.login-left {
    height: 100%;
}

.login-left-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    display: block;
}

/* =========================================================
   RIGHT PANEL (FORM)
   ========================================================= */
.login-right {
    height: 100%;
}

.login-right-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.login-card {
    width: min(420px, 100%);
    padding: 32px 40px;
    text-align: center;
}

.login-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 22px;
    color: #111827;

}

.login-logo {
    transform: scale(0.9);
}

/* =========================================================
   INPUTS WITH ICONS
   ========================================================= */
.input-with-icon {
    position: relative;
    width: 100%;
    margin-bottom: 14px;
}

    .input-with-icon input {
        width: 100%;
        height: 52px;
        padding: 0 48px 0 18px;
        border-radius: 999px;
        border: 1px solid #c2c7cf;
        background: #f3f4f6;
        font-size: 15px;
        box-sizing: border-box;
    }

        .input-with-icon input:focus {
            outline: none;
            background: #ffffff;
            border-color: #2f6fb2;
            box-shadow: 0 0 0 3px rgba(79,131,173,0.18);
        }

    .input-with-icon .input-icon {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 18px;
        height: 18px;
        opacity: 0.6;
        pointer-events: none;
    }

/* =========================================================
   LINKS / DELEGATE
   ========================================================= */
.forgot {
    text-align: right;
    margin: 6px 0 18px;
    font-size: 13px;
}

.pf-link {
    color: #2f6fb2;
    text-decoration: none;
    font-weight: 500;
}

    .pf-link:hover {
        text-decoration: underline;
    }

.delegate-token {
    margin-top: 10px;
}

.hidden {
    display: none;
}

/* =========================================================
   LOGIN BUTTON
   ========================================================= */
.pf-login-btn {
    width: 100%;
    height: 52px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #5f8fb4, #3f6f97);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 16px rgba(63,111,151,0.35);
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

    .pf-login-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    }

/* =========================================================
   HEADER / FOOTER (FIXED)
   ========================================================= */
/*.login-tagline {
    position: fixed;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 25px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #3f6f97;
    white-space: nowrap;
}*/

.login-tagline {
    margin-top: 35px;
    text-align: center;
}

/*.login-footer {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #6b7280;
    opacity: 0.85;
}*/

.login-footer {
    align-self: end; /* 👈 stick to bottom of grid */
    padding-bottom: 16px;
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    opacity: 0.85;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    .login-surface {
        grid-template-columns: 1fr;
        height: auto;
    }

    .login-right-inner,
    .login-left-inner {
        padding: 34px 22px;
    }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    .login-shell {
        animation: none;
        opacity: 1;
    }
}

.login-subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.95rem;
    color: #5f6b7a;
    margin-bottom: 12px;
}

.lock-icon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
}

.delegate-toggle {
    margin: 8px 0;
    text-align: center;
}

.delegate-toggle a {
    font-size: 13px;
    color: #3f6f97;
    text-decoration: none;
}

.delegate-toggle a:hover {
    color: #5f6b7a; /* slightly darker on hover */
    text-decoration: underline;
}

.delegate-toggle:focus-visible {
    outline: 2px solid #6b8fb3;
    outline-offset: 2px;
    border-radius: 4px;
}

.login-delegated {
    font-size: 0.85rem;
    color: #8a97a8; /* lighter gray-blue */
    text-decoration: none;
    transition: color 0.15s ease;
}

    .login-delegated:hover {
        color: #5f6b7a; /* slightly darker on hover */
        text-decoration: underline;
    }

.login-error-banner {
    background: #fdecea;
    border-left: 4px solid #d93025;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 6px;
}

    .login-error-banner .error-id {
        font-size: 12px;
        opacity: 0.75;
        margin-top: 6px;
    }

/* =========================================================
   GLOBAL ERROR STRIP (API / SYSTEM ERRORS)
   ========================================================= */

.error-strip {
    position: fixed;
    top: 12px; /* space from top */
    top: 0;
    left: 50%;
    right: 0;
    z-index: 10000;
    display: none;
    pointer-events: none;
    width: calc(100% - 32px); /* responsive on small screens */
}

.error-strip {
    position: fixed;
    top: 12px; /* space from top */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: none; /* hidden by default */
    max-width: 900px;
    width: calc(100% - 32px); /* responsive on small screens */
}

    .error-strip.show {
        display: block;
        pointer-events: auto;
    }

/* --- container --- */
.error-strip-content {
    margin: 0;
    max-width: 960px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: linear-gradient( 135deg, #fdecea, #fff5f4 );
    border-left: 5px solid #d93025;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
    animation: errorSlideDown 260ms ease-out;
    transform: translateY(12px); /* visual spacing without scroll */
}

/* =========================================================
   TEXT
   ========================================================= */

.error-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.error-title {
    font-size: 15px;
    font-weight: 600;
    color: #7a1b1b;
}

.error-detail {
    font-size: 14px;
    color: #5f1d1d;
}

.error-meta {
    font-size: 12px;
    color: #8a4a4a;
    opacity: 0.85;
}

/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.error-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: #7a1b1b;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background-color 120ms ease, color 120ms ease;
}

    .error-close:hover {
        background-color: rgba(217,48,37,0.12);
        color: #b42318;
    }

    .error-close:focus-visible {
        outline: 2px solid #d93025;
        outline-offset: 2px;
    }

/* =========================================================
   ANIMATION
   ========================================================= */

@keyframes errorSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
    .error-strip-content {
        margin: 8px 12px 0;
        border-radius: 8px;
    }
}







.login-divider {
    margin: 20px 0;
    text-align: center;
    position: relative;
}

    .login-divider span {
        background: #f4f6f9;
        padding: 0 12px;
        color: #6b7280;
        font-size: 14px;
    }

    .login-divider:before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: #d1d5db;
        z-index: -1;
    }

.btn-sso {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    border-radius: 40px;
    border: 1px solid #4f7fa6;
    background: white;
    color: #4f7fa6;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
}

    .btn-sso:hover {
        background: #4f7fa6;
        color: white;
    }

.login-shell {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 12px 16px;
}
