body {
    background-color: skyblue;
}

/* Litepicker calendar dropdown - ensure it appears above all other elements */
.litepicker {
    z-index: 2147483647 !important; /* Max z-index value */
}

/* Litepicker inside dialog modals - position correctly */
dialog .litepicker {
    position: absolute !important;
    z-index: 9999 !important;
}

/* Allow modal-box to have overflow control (for scrolling long content) */
/* Removed: dialog .modal-box { overflow: visible !important; } */

/* Fix DaisyUI drawer stacking context issues */
.drawer-content {
    z-index: auto !important;
    transform: none !important;
    isolation: auto !important;
}

.drawer-side {
    z-index: 1 !important;
}

/* Disable card hover transform to prevent stacking context issues with dropdowns */
.card:has([data-controller="period-bar"]):hover {
    transform: none !important;
}

/* Table cells padding */
.table tbody td {
    padding: 14px 10px;
}

/* Timeline and pie view toggle buttons */
.timeline-view-btn,
.pie-view-btn {
    font-weight: normal;
}

/* Comparison row in tables - compact padding */
.table tbody .comparison-row td {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    line-height: 1.2;
}

.table tbody .comparison-row td:first-child {
    padding-left: 2rem;
}

/* Project detail rows in customer tables */
.table-zebra tbody tr.project-detail-row,
.table-zebra tbody tr.project-detail-row:nth-child(2n) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table tbody .project-detail-row td {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.table tbody .project-detail-row td:first-child {
    padding-left: 2rem;
}

.table tbody .project-detail-row .project-detail-content {
    border-left: 2px solid #d1d5db;
    padding-left: 0.75rem;
}

/* Sidebar navigation styling */

/* First level items: semi-bold */
.menu > li > a,
.menu > li > details > summary {
    font-weight: 600;
}

/* Second level items: smaller font + reduced padding */
.menu > li > details > ul > li > a {
    font-size: 12px;
    padding: 5px 20px 5px 47px !important;
}

/* Collapse arrows: lighter */
.menu details > summary::after {
    opacity: 0.4;
}

.menu details[open] > summary::after {
    opacity: 0.5;
}

.menu details > summary:hover::after {
    opacity: 0.7;
}

/* =============================================
   Sidebar Navigation - Collapsible
   ============================================= */

/* Base sidebar - collapsed state (70px), expands on hover */
.sidebar-nav {
    width: 70px !important;
    transition: width 0.3s ease-out !important;
    overflow: hidden;
}

/* Expanded state on hover (256px) */
.sidebar-nav:hover {
    width: 256px !important;
}

/* --- Logo --- */
.sidebar-logo {
    padding: 0.75rem;
}

.sidebar-logo .logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.sidebar-logo .logo-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.sidebar-logo .logo-icon svg {
    width: 100%;
    height: 100%;
}

.sidebar-logo .logo-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-logo .logo-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #4299e1;
    line-height: 1.2;
}

.sidebar-logo .logo-subtitle {
    font-size: 0.7rem;
    color: #718096;
    white-space: nowrap;
}

/* Collapsed: hide logo text */
.sidebar-nav.collapsed .logo-text {
    display: none;
}

/* --- Menu --- */
.nav-menu {
    list-style: none;
    padding: 1rem 0.75rem;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.25rem;
}

/* --- Nav links (first level) --- */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.375rem;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
    cursor: pointer;
    list-style: none;
}

.nav-link:hover {
    background-color: var(--bg-hover, rgba(0,0,0,0.05));
    color: var(--text-primary, #1e293b);
}

.nav-link.active {
    background-color: var(--primary-light, rgba(66, 153, 225, 0.1));
    color: var(--primary, #4299e1);
}

/* --- Icons --- */
.nav-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
}

/* --- Text --- */
.nav-link > .nav-text {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
}

/* --- Details/Summary arrow --- */
.nav-item details > summary {
    position: relative;
}

.nav-item details > summary::after {
    content: '';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    padding: 3px;
    transform: translateY(-50%) rotate(-45deg);
    opacity: 0.4;
    transition: transform 0.2s ease;
}

.nav-item details[open] > summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.nav-item details > summary::-webkit-details-marker {
    display: none;
}

/* --- Submenus --- */
.nav-submenu {
    list-style: none;
    padding: 0.25rem 0 0.25rem 0;
    margin: 0;
}

.nav-submenu li {
    margin: 0;
}

.nav-submenu a {
    display: block;
    padding: 0.375rem 0.75rem 0.375rem 1.5rem;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
    font-size: 0.8rem;
    border-radius: 0.25rem;
}

.nav-submenu a:hover {
    background-color: var(--bg-hover, rgba(0,0,0,0.03));
    color: var(--text-primary, #1e293b);
}

.nav-submenu a.active {
    color: var(--primary, #4299e1);
}

/* Parent icon blue when a submenu item is active */
.nav-item:has(.nav-submenu a.active) > details > summary .nav-icon {
    color: var(--primary, #4299e1);
}

/* --- Divider --- */
.nav-divider {
    height: 1px;
    background-color: var(--border, #e2e8f0);
    margin: 0.75rem 0;
}

/* =============================================
   Collapsed state (default)
   ============================================= */

/* Hide logo text when collapsed */
.sidebar-nav .logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.15s ease;
}

.sidebar-nav:hover .logo-text {
    opacity: 1;
    width: auto;
}

/* Hide nav text when collapsed (keep height with visibility) */
.sidebar-nav .nav-text {
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

.sidebar-nav:hover .nav-text {
    opacity: 1;
}

/* Hide arrow when collapsed */
.sidebar-nav .nav-item details > summary::after {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.sidebar-nav:hover .nav-item details > summary::after {
    opacity: 0.4;
}

/* Icons always aligned left */
.sidebar-nav .nav-link {
    justify-content: flex-start;
}

/* Submenus: vertical line indicator */
.sidebar-nav .nav-submenu {
    margin-left: 1.5rem;
    border-left: 1px solid #d1d5db;
}

/* Divider stays visible in both collapsed and expanded states */
.sidebar-nav .nav-divider {
    height: 1px;
    margin: 0.75rem 0.5rem;
    background-color: var(--border, #e2e8f0);
    transition: margin 0.2s ease;
}

.sidebar-nav:hover .nav-divider {
    margin: 0.75rem 0;
}

/* =============================================
   All-time button (∞) for period bar
   ============================================= */

.all-time-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border, #e2e8f0);
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 600;
}

/* Inactive state: light background, dark text */
.all-time-btn-inactive {
    background-color: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
}

.all-time-btn-inactive:hover {
    background-color: #e2e8f0;
    color: #475569;
}

/* Active state: dark background, light text */
.all-time-btn-active {
    background-color: #334155;
    color: #f8fafc;
    border-color: #334155;
}

.all-time-btn-active:hover {
    background-color: #1e293b;
    border-color: #1e293b;
}

