/* Copied from ELPortal HomeApp/templates/app/layout.html and HomeApp/static/app/content/site.css on 2026-11-19. Keep in sync by re-copying, not by editing here. */

/* === From HomeApp/templates/app/layout.html (<style> lines 48-893) === */
[x-cloak] {
    display: none !important;
}

html,
body {
    font-size: 14px;
}

* {
    font-size: inherit;
}

body {
    font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
    background-color: #f4f7f9;
}

/* Full-screen container with a flexbox for main layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Vertical Navigation Bar */
.navbar-vertical {
    background-color: #2161a0;
    padding: 20px;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-x: hidden;
}

.navbar-vertical.collapsed {
    width: 70px;
    padding: 20px 10px;
}

.navbar-vertical.collapsed .logo-text,
.navbar-vertical.collapsed .menu-item span,
.navbar-vertical.collapsed .nav-item-dropdown>.menu-item::after {
    display: none;
}

.navbar-vertical.collapsed .logo {
    justify-content: center;
    padding: 0;
    margin-bottom: 1.5rem;
}

.navbar-vertical.collapsed .menu-item {
    justify-content: center !important;
    padding: 12px 0 !important;
    border-radius: 8px !important;
    margin: 4px 5px !important;
    width: calc(100% - 10px) !important;
}

.navbar-vertical.collapsed .menu-item i {
    font-size: 20px;
}

.navbar-vertical .logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    margin-bottom: 1.5rem;
    padding: 0 4px;
}

.navbar-vertical:not(.collapsed) .logo .collapse-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
}

.navbar-vertical .logo .logo-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-vertical .logo .logo-mark {
    height: 28px;
    width: auto;
}

.navbar-vertical .collapse-btn i {
    transition: transform 0.3s ease;
}

.navbar-vertical.collapsed .collapse-btn i {
    transform: rotate(180deg);
}

/* Reset default nav/link styles that might conflict */
.navbar-vertical .nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
}

.navbar-vertical .nav>li {
    width: 100%;
    margin-bottom: 8px;
    /* Breathing room between top-level categories */
}

.navbar-vertical .menu-item {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 16px;
    text-decoration: none !important;
    border-radius: 8px;
    margin: 4px 12px;
    transition: all 0.2s ease;
    gap: 12px;
    background-color: transparent !important;
    font-weight: 500;
}

/* Top-level Category Header Typography Hierarchy */
.navbar-vertical .nav>li>a.menu-item {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Top-level hover and open highlights */
.navbar-vertical .nav>li>a.menu-item:hover,
.navbar-vertical .nav>li.nav-item-dropdown.open>a.menu-item {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

/* Top-level Active state */
.navbar-vertical .nav>li>a.menu-item.active {
    background-color: rgba(96, 165, 250, 0.15) !important;
    /* Soft pill blue highlight */
    color: #fff !important;
    box-shadow: inset 3px 0 0 0 #60a5fa;
    /* Vertical accent line inside the pill */
}

.navbar-vertical .menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.navbar-vertical .menu-item:hover i,
.navbar-vertical .menu-item.active i {
    opacity: 1;
}

/* Collapsible menu styles */
.nav-item-dropdown {
    position: relative;
}

.nav-item-dropdown>.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.nav-item-dropdown>.menu-item::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.8em;
    display: inline-block;
    line-height: 1;
    transform: translateY(1.5px);
    /* Nudge down slightly for perfect vertical alignment */
    transition: transform 0.3s ease;
}

.nav-item-dropdown.open>.menu-item::after {
    transform: rotate(180deg) translateY(-1.5px);
}

/* Sub-navigation Menu Items */
.navbar-vertical .sub-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 0;
    /* Align sub-nav inside sidebar width */
    list-style: none;
}

.navbar-vertical .sub-nav a.menu-item {
    padding: 8px 16px 8px 36px;
    /* Indent sub-links neatly under icons */
    font-size: 0.9em;
    width: calc(100% - 32px);
    margin: 2px 16px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-vertical .sub-nav a.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
}

.navbar-vertical .sub-nav a.menu-item.active {
    background-color: rgba(96, 165, 250, 0.12) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: inset 3px 0 0 0 #60a5fa;
}

.nav-item-dropdown.open .sub-nav {
    max-height: 500px;
}

/* Category label inside a sub-nav, e.g. the AP heading under Accounting */
.navbar-vertical .sub-nav-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 16px 4px 36px;
    padding: 0 0 6px;
    border-bottom: 1px solid rgba(255, 255, 255, .2);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .9);
    cursor: default;
    user-select: none;
    pointer-events: none;
}

.navbar-vertical .sub-nav-heading i {
    color: #60a5fa;
    font-size: 0.8rem;
}

/* Pages under a category sit one step further in */
.navbar-vertical .sub-nav-heading~li a.menu-item {
    padding-left: 52px;
}

.navbar-vertical.collapsed .sub-nav-heading {
    margin: 6px 14px 4px;
}

.navbar-vertical.collapsed .sub-nav-heading~li a.menu-item {
    padding-left: 28px !important;
}

/* Remove parent active pill highlight when sidebar is expanded and parent dropdown is open/has an active child */
.navbar-vertical:not(.collapsed) .nav>li.nav-item-dropdown:has(.sub-nav .active)>a.menu-item:not(:hover),
.navbar-vertical:not(.collapsed) .nav>li.nav-item-dropdown.open>a.menu-item:not(:hover) {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Custom scrollbar styling for vertical navbar */
.navbar-vertical {
    overflow-y: auto;
}

.navbar-vertical::-webkit-scrollbar {
    width: 5px;
}

.navbar-vertical::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.navbar-vertical::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.navbar-vertical::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Collapsed State Overrides for Flyouts and Centering */
.navbar-vertical.collapsed {
    overflow: visible !important;
}

.navbar-vertical.collapsed .nav-header {
    display: none !important;
}

.navbar-vertical.collapsed form {
    display: block !important;
    width: 100%;
}

/* Collapsed Sidebar flyout submenu styling */
.navbar-vertical.collapsed .sub-nav,
.navbar-vertical.collapsed .nav-item-dropdown.open .sub-nav {
    position: absolute;
    left: 60px;
    /* Aligns exactly with the right edge of the 70px sidebar (10px padding + 60px = 70px) */
    top: 0;
    background-color: #1a4d80;
    /* Premium slightly darker blue for contrast */
    border-radius: 0 8px 8px 0;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.15);
    width: 220px;
    max-height: 0;
    padding: 8px 0;
    z-index: 1010;
    border-left: 2px solid #60a5fa;
    /* Left-side highlight accent */

    /* Transition styles */
    visibility: hidden;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s;
}

/* Show flyout on hover */
.navbar-vertical.collapsed .nav-item-dropdown:hover .sub-nav {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    max-height: none;
}

/* Sub-nav menu items within the flyout */
.navbar-vertical.collapsed .sub-nav a.menu-item {
    padding: 8px 16px !important;
    margin: 2px 10px !important;
    width: calc(100% - 20px) !important;
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.navbar-vertical.collapsed .sub-nav a.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

.navbar-vertical.collapsed .sub-nav a.menu-item.active {
    background-color: rgba(96, 165, 250, 0.2) !important;
    color: #fff !important;
    box-shadow: inset 3px 0 0 0 #60a5fa !important;
}

.navbar-vertical-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
}

/* Main Content Area */
.main-content {
    margin-left: 250px;
    /* Offset for the vertical navbar */
    padding: 0 20px 20px 20px;
    flex-grow: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.sidebar-collapsed {
    margin-left: 70px;
}

/* Logged out (login page): no sidebar, so no offset */
.main-content.no-sidebar {
    margin-left: 0;
    padding: 0;
}

/* Common Styles */
.card {
    background-color: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {

    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    font-weight: 600;
    font-size: 1.25rem;
    color: #2161a0;
    border-bottom: 2px solid #2161a0;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.list-group-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background-color: #f4f8ff;
    border-color: #2161a0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-vertical {
        width: 0;
        overflow: hidden;
        padding: 0;
    }

    .main-content {
        margin-left: 0;
        padding-top: 60px;
    }

    .navbar-vertical.open {
        width: 250px;
        padding: 20px;
    }

    .main-content.pushed {
        margin-left: 250px;
    }

    .navbar-vertical-toggle {
        display: block;
    }

    .dashboard-grid-lower {
        grid-template-columns: 1fr;
    }
}

/* User Profile Block Styles */
.user-profile-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin: 4px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    background-color: transparent;
    color: #ffffff;
    text-decoration: none !important;
    user-select: none;
}

.user-profile-block:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.user-profile-block .avatar-icon {
    font-size: 20px;
    color: #ffffff;
    opacity: 0.9;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.user-profile-block .user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    overflow: hidden;
    flex-grow: 1;
}

.user-profile-block .user-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-block .user-subtext {
    font-size: 11px;
    opacity: 0.7;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-block .chevron-icon {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.user-profile-block:hover .chevron-icon {
    color: #ffffff;
    transform: translateX(2px);
}

/* Collapsed Sidebar Overrides for User Profile Block */
.navbar-vertical.collapsed .user-profile-block {
    justify-content: center !important;
    padding: 12px 0 !important;
    border-radius: 8px !important;
    margin: 4px 5px !important;
    width: calc(100% - 10px) !important;
}

.navbar-vertical.collapsed .user-profile-block .user-details,
.navbar-vertical.collapsed .user-profile-block .chevron-icon {
    display: none !important;
}

/* === From HomeApp/static/app/content/site.css (lines 1-12, 38-95) === */
body {
    font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
    color: #1e293b;
    padding-bottom: 20px;
    background-color: #f8fafc;
}

/* Set padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Global Table Refinements */
.table-sm td, .table-sm th {
    padding: 0.4rem 0.6rem !important;
    vertical-align: middle;
}

thead.sticky-header th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f1f5f9;
    border-bottom: 2px solid #cbd5e1;
}

/* Typography & Contrast */
.text-primary-blue {
    color: #2563eb !important;
    font-weight: 700;
}

.text-slate-secondary {
    color: #475569 !important;
}

/* Modern Tab Design (Underline Style) */
.nav-tabs-underline {
    border-bottom: 1px solid #e2e8f0 !important;
}

.nav-tabs-underline .nav-link {
    border: none !important;
    border-bottom: 3px solid transparent !important;
    color: #64748b;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
}

.nav-tabs-underline .nav-link:hover {
    color: #2563eb;
    background-color: rgba(37, 99, 235, 0.05);
}

.nav-tabs-underline .nav-link.active {
    color: #2563eb !important;
    background-color: transparent !important;
    border-bottom-color: #2563eb !important;
}

/* Custom Scroll Container */
.scroll-container-bh {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
}
