/* =========================
   Theme Variables
   ========================= */
:root {
    --brand: #007bff;
    --brand-dark: #0056b3;
    --brand-soft: #cce5ff;
    --bg: #f8f9fa;
    --text: #212529;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 0.75rem 1.5rem rgba(0,0,0,0.15);
    --focus-ring: 0 0 0 0.1rem #fff, 0 0 0 0.25rem #258cfb;
}

/* =========================
   Global Base
   ========================= */
html {
    font-size: 14px;
    scroll-behavior: smooth;
    height: 100%;
    overflow-x: hidden; /* prevent ghost scrollbars */
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* prevent horizontal scroll */
}

/* Make height calculations predictable */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    overflow-x: hidden;
    background: #fff; /* force white */
}


/* Make main content grow */
main.flex-fill {
    flex: 1 0 auto;
}

/* =========================
   Buttons & Form Focus
   ========================= */
.btn,
.btn-link {
    transition: all 0.25s ease;
    cursor: pointer;
}

    .btn:focus,
    .btn:active:focus,
    .btn-link.nav-link:focus,
    .form-control:focus,
    .form-check-input:focus {
        box-shadow: var(--focus-ring);
        outline: none;
    }

/* =========================
   Page Animation (opacity only)
   ========================= */
.page-fade {
    animation: fadeInOpacity 0.4s ease-out;
}

@keyframes fadeInOpacity {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =========================
   Navbar
   ========================= */
.navbar {
    background-color: var(--brand) !important;
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

    .navbar .navbar-brand {
        font-weight: 700;
        color: #fff;
        display: flex;
        align-items: center;
        transition: color 0.3s ease, transform 0.2s ease, text-shadow 0.2s ease;
    }

        .navbar .navbar-brand i {
            margin-right: 0.5rem;
            font-size: 1.2rem;
            transition: transform 0.3s ease;
        }

        .navbar .navbar-brand:hover {
            color: var(--brand-soft);
            transform: translateY(-2px);
            text-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

/* Navbar links */
.navbar-nav .nav-link {
    color: #fff;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease, transform 0.2s ease, text-shadow 0.2s ease;
}

    .navbar-nav .nav-link i {
        margin-right: 0.4rem;
        transition: transform 0.3s ease, color 0.3s ease;
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        color: var(--brand-soft);
        transform: translateY(-2px);
        text-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

        .navbar-nav .nav-link:hover i {
            transform: translateY(-2px) scale(1.1);
            color: #fff;
        }

/* =========================
   Dropdown (Bootstrap-friendly)
   IMPORTANT: We do NOT override display/position logic.
   Bootstrap + Popper will handle show/hide and placement.
   ========================= */

/* Visual styling only */
.navbar .dropdown-menu {
    border-radius: 0.75rem;
    background-color: #fff;
    box-shadow: var(--shadow-lg);
    border: 0;
    padding: 0.5rem;
}

    /* Smooth appearance when Bootstrap adds .show */
    .navbar .dropdown-menu.show {
        animation: dropIn 0.15s ease-out;
    }

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown items */
.navbar .dropdown-item {
    color: var(--text);
    display: flex;
    align-items: center;
    border-radius: 0.6rem;
    padding: 0.55rem 0.7rem;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

    .navbar .dropdown-item i {
        margin-right: 0.5rem;
        transition: transform 0.2s ease;
    }

    .navbar .dropdown-item:hover {
        background-color: #e6f4ff;
        color: var(--brand);
        transform: translateX(2px);
    }

        .navbar .dropdown-item:hover i {
            transform: translateX(2px) scale(1.08);
        }

/* Keep caret aligned */
.navbar-nav .dropdown-toggle::after {
    margin-top: 0;
}

/* =========================
   Navbar Badges
   ========================= */
.navbar-nav .badge {
    font-size: 0.65rem;
    transition: transform 0.3s ease, background-color 0.25s ease;
}

    .navbar-nav .badge.animate__animated {
        display: inline-block;
    }

    .navbar-nav .badge:hover {
        transform: scale(1.2);
        background-color: var(--brand-dark);
        color: #fff;
    }

/* =========================
   Navbar Buttons
   ========================= */
.navbar .btn-primary:hover {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.navbar .btn-outline-primary:hover {
    background-color: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

/* =========================
   Footer
   ========================= */
footer.footer {
    width: 100%;
    min-height: 50px;
    background-color: var(--brand);
    color: #fff;
    font-size: 0.875rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

    footer.footer .container {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    footer.footer p {
        margin: 0;
        padding: 0;
    }

/* =========================
   Reduced motion
   ========================= */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================
   LoginPartial Scoped Styles (NO COLLISION with Layout dropdown)
   ========================================================== */

/* Add this class on the LoginPartial UL:
   <ul class="navbar-nav ... loginpartial-nav">
*/
.loginpartial-nav .loginpartial-menu {
    width: 280px; /* fixed width */
    max-width: 90vw; /* mobile safe */
    border-radius: 14px;
    padding: 0.5rem;
}

    /* IMPORTANT: enables ellipsis inside flex items */
    .loginpartial-nav .loginpartial-menu * {
        min-width: 0;
    }

/* Truncate name beside avatar (navbar trigger) */
.loginpartial-nav .lp-name {
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

@media (min-width: 992px) {
    .loginpartial-nav .lp-name {
        max-width: 220px;
    }
}

/* Truncate email/username inside dropdown */
.loginpartial-nav .lp-ellipsis {
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Make dropdown trigger stable */
.loginpartial-nav .loginpartial-dd {
    line-height: 1;
    white-space: nowrap;
    border-radius: 999px;
    padding: 0.35rem 0.6rem;
}

    .loginpartial-nav .loginpartial-dd:hover {
        background: rgba(255,255,255,0.12);
    }

/* Logged-in avatar (initial) */
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffc107; /* ✅ Yellow (Bootstrap warning) */
    color: #212529; /* Dark text so it's readable */
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1;
    flex: 0 0 auto;
    /* optional: nice depth */
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.35);
}




    /* Keep icons centered */
    .user-avatar i,
    .user-avatar svg {
        display: block;
        line-height: 1;
    }



    /* Center icon perfectly */
    .user-avatar i,
    .user-avatar svg {
        display: block;
        line-height: 1;
    }

        /* If icon still looks slightly high/low */
        .user-avatar i.bi {
            font-size: 1.2rem;
            transform: translateY(1px);
        }


    /* Optional: Remove icon margin inside avatar only (since navbar icons have margin-right) */
    .user-avatar i {
        margin-right: 0 !important;
    }

/* =========================
   OPTIONAL: Hover-open dropdown (NOT recommended with Bootstrap JS)
   If you REALLY want hover-open, tell me and I'll give you a safe JS version.
   ========================= */
/*
.loginpartial-nav .dropdown:hover .dropdown-menu {
    display: block;
}
*/

/* =========================
   Corporate Login Page
   ========================= */

.auth-page {
    /* use dynamic viewport height to avoid mobile "vh" issues */
    min-height: calc(100dvh - 72px);
    display: grid;
    place-items: start center;
    padding: 3rem 1rem;
    /* IMPORTANT: keep padding inside the min-height */
    box-sizing: border-box;
    background: #fff; /* make sure it's white */
}


.auth-shell {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0,0,0,0.08);
    animation: authFadeIn .35s ease-out;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   Header
   ========================= */
.auth-card__header {
    background: #0056b3; /* corporate solid blue */
    padding: 1.5rem 1.25rem;
    color: #fff;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-brand__mark {
    width: 46px;
    height: 46px;
    background: rgba(255,255,255,0.18);
    border-radius: 12px;
    display: grid;
    place-items: center;
}

    .auth-brand__mark i {
        font-size: 1.3rem;
    }

.auth-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    /* subtle highlight / glow */
    text-shadow: 0 0 4px rgba(255,255,255,0.45);
}

.auth-subtitle {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.85;
}

/* =========================
   Body
   ========================= */
.auth-card__body {
    padding: 1.5rem 1.25rem;
}

.auth-validation {
    margin-bottom: .75rem;
}

/* =========================
   Fields
   ========================= */
.auth-field {
    margin-bottom: 1rem;
}

.auth-label {
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .35rem;
}

/* Input area */
.auth-inputwrap {
    position: relative;
}

.auth-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Input */
.auth-input {
    padding-left: 42px;
    padding-right: 42px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #ced4da;
    transition: border-color .2s ease, box-shadow .2s ease;
}

    .auth-input::placeholder {
        color: rgba(0,0,0,0.45);
    }

    .auth-input:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 0.18rem rgba(0,123,255,0.25);
    }

/* Show/Hide Eye */
.auth-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #6c757d;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
}

    .auth-eye:hover {
        background: rgba(0,0,0,0.05);
    }

/* =========================
   Options Row
   ========================= */
.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
}

.auth-link {
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    color: #0056b3;
}

    .auth-link:hover {
        text-decoration: underline;
    }

/* =========================
   Button
   ========================= */
.auth-btn {
    height: 46px;
    background: #0056b3;
    border: none;
    color: #ffffff;
    font-weight: 800; /* MORE BOLD */
    font-size: 1.05rem; /* SLIGHTLY LARGER */
    letter-spacing: 0.4px; /* SUBTLE EMPHASIS */
    border-radius: 10px;
    transition: all .22s ease;
}


    /* NEW hover color (clean corporate hover) */
    .auth-btn:hover {
        background: #0066cc; /* hover color */
        box-shadow: 0 6px 18px rgba(0,102,204,0.25);
        transform: translateY(-1px);
        color: #ffffff;
    }


    .auth-btn:active {
        transform: translateY(0);
        box-shadow: 0 4px 12px rgba(0,102,204,0.25);
    }


    .auth-btn i,
    .auth-btn {
        text-shadow: 0 0 3px rgba(255,255,255,0.25);
    }


/* =========================
   Footer
   ========================= */
.auth-card__footer {
    padding: 1rem 1.25rem;
    background: #fafafa;
    border-top: 1px solid rgba(0,0,0,0.06);
    text-align: center;
}

/* =========================
   Shake Effect
   ========================= */
.auth-shake {
    animation: authShake .55s ease;
}

@keyframes authShake {
    0%, 100% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-6px);
    }

    30% {
        transform: translateX(6px);
    }

    45% {
        transform: translateX(-4px);
    }

    60% {
        transform: translateX(4px);
    }

    75% {
        transform: translateX(-2px);
    }

    90% {
        transform: translateX(2px);
    }
}

/* =========================
   Mobile Tweaks
   ========================= */
@media (max-width: 420px) {
    .auth-card {
        border-radius: 14px;
    }
}

/* ==========================================================
   FIX: No-scroll login page + force white background
   Paste this at the very bottom of your CSS
   ========================================================== */

/* 1) Make background purely white everywhere */
:root {
    --bg: #fff; /* override your gray */
}

/* 2) Clean base: avoid conflicting height rules */
html {
    height: auto; /* <- don't force 100% */
    overflow-x: hidden;
}

body {
    min-height: 100dvh; /* dynamic viewport */
    background: #fff !important;
    overflow-x: hidden;
}

/* 3) Make the overall page layout stable (navbar/main/footer) */
body {
    display: grid; /* replace flex column */
    grid-template-rows: auto 1fr auto; /* navbar, main, footer */
}

/* If you still use <main class="flex-fill"> keep it compatible */
main.flex-fill {
    min-height: 0; /* IMPORTANT: prevents grid overflow */
}

/* 4) Login container should fill available main height, not viewport math */
.auth-page {
    min-height: 100%; /* fills the main area */
    padding: 3rem 1rem;
    display: grid;
    place-items: start center;
    box-sizing: border-box;
    background: #fff;
    /* Avoid 1px overscroll due to rounding on some browsers */
    overflow-y: auto; /* allows inner scroll only if content truly exceeds */
}

/* 5) If you want *strictly* no scroll in normal cases (and you know it fits),
      you can swap overflow-y:auto -> hidden */
@media (min-height: 650px) {
    .auth-page {
        overflow-y: hidden;
    }
}

``