
/* ===== SIDEBAR WRAPPER ===== */
.sidebar {
    width: 230px;
    background: #f8fafc; /* light slate */
    border-right: 1px solid #e2e8f0;
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    padding: 12px 8px;
    font-family: Inter, Arial, sans-serif;
}

/* Scrollbar (subtle) */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
}

/* ===== PROFILE DROPDOWN ===== */
.sidebar-user-profile .profile {
    transition: all 0.25s ease;
}
.sidebar-user-profile .profile:hover {
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

/* Profile image */
.staff-profile-image-small {
    border-radius: 9999px;
    border: 2px solid #e2e8f0;
}

/* ===== MAIN MENU ===== */
#side-menu {
    margin-top: 60px;
}

#side-menu > li {
    margin-bottom: 4px;
}

/* Main menu links */
#side-menu > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #334155;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Icons */
#side-menu > li > a .menu-icon {
    font-size: 16px;
    color: #64748b;
    min-width: 18px;
}

/* Hover */
#side-menu > li > a:hover {
    background: #eaf2ff;
    color: #1d4ed8;
}
#side-menu > li > a:hover .menu-icon {
    color: #1d4ed8;
}

/* Active item */
#side-menu > li.active > a,
#side-menu > li > a[aria-expanded="true"] {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}
#side-menu > li.active > a .menu-icon,
#side-menu > li > a[aria-expanded="true"] .menu-icon {
    color: #ffffff;
}

/* Arrow */
#side-menu .arrow {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.8;
}

/* Badges */
#side-menu .badge {
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 999px;
}

/* ===== SUBMENU ===== */
.nav-second-level {
    margin-top: 6px;
    padding-left: 14px;
    border-left: 2px dashed #e2e8f0;
}

.nav-second-level > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin: 4px 0;
    font-size: 13px;
    border-radius: 8px;
    color: #475569;
    transition: all 0.2s ease;
}

.nav-second-level > li > a:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* Active submenu */
.nav-second-level > li.active > a {
    background: #e0e7ff;
    color: #1d4ed8;
    font-weight: 600;
}

/* Submenu icons */
.nav-second-level .menu-icon {
    font-size: 13px;
    color: #64748b;
}

/* ===== SETUP / SETTINGS ITEM ===== */
#setup-menu-item > a {
    margin-top: 10px;
    background: #f1f5f9;
    border-radius: 10px;
}
#setup-menu-item > a:hover {
    background: #e2e8f0;
}

/* ===== DROPDOWN MENU ===== */
.sidebar .dropdown-menu {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.sidebar .dropdown-menu > li > a {
    padding: 10px 14px;
    font-size: 13px;
    color: #334155;
}
.sidebar .dropdown-menu > li > a:hover {
    background: #f1f5f9;
    color: #1d4ed8;
}

.profile>a {
    padding-top: 10px !important;
}

/* Widget Container Refinement */
.top_stats_wrapper, .panel_s {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.04) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top_stats_wrapper:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

/* Typography & Icons */
.top_stats_wrapper span.tw-truncate {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563; /* Slate 600 */
}

.top_stats_wrapper svg {
    color: #6366f1 !important; /* Indigo primary */
    opacity: 0.8;
}

/* Progress Bars - Modern Slim Look */
.progress.progress-bar-mini {
    height: 6px !important;
    background-color: #f3f4f6 !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: none !important;
}

.progress-bar {
    box-shadow: none !important;
    border-radius: 10px !important;
}

.progress-bar-danger { background: #ef4444 !important; }
.progress-bar-success { background: #10b981 !important; }
.progress-bar-warning { background: #f59e0b !important; }
.progress-bar-info { background: #0ea5e9 !important; }

/* Finance Overview - Summary Links */
.text-stats-wrapper {
    margin-bottom: 8px !important;
}

.text-stats-wrapper a {
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    transition: color 0.2s;
}

.text-stats-wrapper a ._total {
    background: #f8fafc;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid #f1f5f9;
}

/* Invoice Total Cards (Bottom Section) */
#invoices_total .tw-border-neutral-300\/80 {
    border: 1px solid #f1f5f9 !important;
    background: #fafafa !important;
}

#invoices_total dt {
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 600;
}

/* Dragger Handle - Make it subtle */
.widget-dragger {
    background: radial-gradient(circle, #d1d5db 1.5px, transparent 1.5px) !important;
    background-size: 4px 4px !important;
    width: 20px !important;
    height: 10px !important;
    opacity: 0.3;
    margin: 0 auto 10px auto !important;
}

/* Screen Options Container */
.screen-options-area {
    background-color: #f8fafc !important; /* Very light slate */
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 24px !important;
    margin-bottom: 20px;
    border-radius: 0 0 12px 12px;
}

/* Header Section */
#dashboard-options .tw-flex {
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}

#dashboard-options h4 {
    color: #1e293b !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em;
}

#dashboard-options a {
    color: #6366f1 !important;
    font-weight: 500;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

#dashboard-options a:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Checkbox Grid System */
#dashboard-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

/* Header needs to span full width in the grid */
#dashboard-options > .tw-flex {
    grid-column: 1 / -1;
}

/* Modernizing the Checkbox Items */
#dashboard-options .checkbox {
    margin: 0 !important;
    padding: 10px 14px !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

#dashboard-options .checkbox:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

#dashboard-options .checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #6366f1; /* Modern Indigo Checkbox */
    margin-top: 0 !important;
}

#dashboard-options .checkbox label {
    cursor: pointer;
    padding-left: 10px;
    font-weight: 500 !important;
    color: #475569 !important;
    font-size: 13px;
    margin-bottom: 0 !important;
    user-select: none;
}

/* Highlight active/checked state */
#dashboard-options .checkbox:has(input:checked) {
    background: #f5f3ff;
    border-color: #c4b5fd;
}

.screen-options-btn {
    position: fixed;       /* Stick to viewport */
    bottom: 20px;          /* Distance from bottom */
    right: 20px;           /* Distance from right */
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
}

/* Hover effect (optional) */
.screen-options-btn:hover {
    background-color: #f0f0f0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Make the SVG spin continuously */
.screen-options-btn svg {
    width: 24px;
    height: 24px;
    animation: spin 1.5s linear infinite;
}

/* Keyframes for rotation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
