:root {
    /* Color Palette - Light Mode Default */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-secondary-rgb: 255, 255, 255;
    --bg-sidebar: #ffffff;
    --sidebar-text: #475569;
    --sidebar-text-muted: #94a3b8;
    --sidebar-accent: #2F78C4;
    --sidebar-border: #e2e8f0;
    /* Bright Blue */

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --accent-teal: #2F78C4;


    --accent-teal-soft: rgba(47, 120, 196, 0.1);

    --accent-blue: #2F78C4;
    --accent-blue-soft: rgba(47, 120, 196, 0.1);

    --accent-red: #e11d48;
    --accent-red-soft: #fff1f2;

    --accent-amber: #d97706;
    --accent-amber-soft: #fffbeb;

    --border-color: #9ca3af;
    --sidebar-width: 240px;
    --sidebar-shrunk-width: 90px;
    --layout-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --card-shadow: none;
    --card-shadow-hover: none;
}

/* Global Reset for Horizontal Scroll */
html,
body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-secondary-rgb: 30, 41, 59;
    --bg-sidebar: #1e293b;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-teal: #60a5fa;
    --accent-teal-soft: rgba(96, 165, 250, 0.1);

    --accent-blue: #60a5fa;
    --accent-blue-soft: rgba(96, 165, 250, 0.1);

    --accent-red: #fb7185;
    --accent-red-soft: rgba(251, 113, 133, 0.1);

    --accent-amber: #fbbf24;
    --accent-amber-soft: rgba(251, 191, 36, 0.1);

    --border-color: #334155;
    --card-shadow: none;
    --card-shadow-hover: none;
}

* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Sidebar Styling */
#sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--sidebar-border);
    /* Very subtle border */
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    overflow: visible; /* Changed from hidden to allow toggle button to overflow */
    z-index: 100;
    transition: var(--layout-transition);
}

/* Scrollbar Styling for Navigation */
#sidebar nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(47, 120, 196, 0.4) transparent;
}

#sidebar nav::-webkit-scrollbar {
    width: 2px;
}

#sidebar nav::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar nav::-webkit-scrollbar-thumb {
    background-color: rgba(47, 120, 196, 0.3);
    border-radius: 20px;
}

/* Active Link Highlights */
/* Sidebar Navigation Item */
.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: var(--sidebar-text);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.sidebar-nav-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--sidebar-accent);
    transform: none;
    /* Removed movement */
    box-shadow: none !important;
}

/* Active State - Left Border Style */
.sidebar-nav-item.active {
    background-color: rgba(47, 120, 196, 0.1) !important;
    color: var(--sidebar-accent) !important;
    border-left: 4px solid var(--sidebar-accent) !important;
    border-radius: 0 0.75rem 0.75rem 0 !important;
    box-shadow: none !important;
    transform: none !important;
    font-weight: 600;
}

.sidebar-nav-item.active i {
    color: var(--sidebar-accent) !important;
}

/* Submenu Styling Removed as per request */

/* User Profile Card */
.user-profile-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    transition: all 0.2s ease;
    cursor: pointer;
}

.user-profile-card:hover {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: var(--sidebar-accent);
    box-shadow: none;
    /* Removed shadow */
}

.user-profile-img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    object-fit: cover;
    background-color: var(--accent-teal-soft);
}

.user-profile-info {
    flex: 1;
    min-width: 0;
}

.user-profile-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Shrunk Sidebar Adjustments */
body.sidebar-shrunk .user-profile-info,
body.sidebar-shrunk .user-profile-card .chevron-icon {
    display: none;
}

body.sidebar-shrunk .user-profile-card {
    justify-content: center;
    padding: 0.5rem;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .sidebar-nav-item.active {
    background-color: var(--sidebar-accent);
    box-shadow: none !important;
}


body.sidebar-shrunk #sidebar {
    width: var(--sidebar-shrunk-width);
}

#header-container {
    position: fixed;
    top: 0rem;
    right: 1.5rem;
    left: calc(var(--sidebar-width) + 1.5rem);
    z-index: 90;
    background-color: var(--bg-secondary);
    /* border: 1px solid var(--border-color); */
    border-radius: 0rem;
    padding: 0.75rem 1.5rem;
    transition: var(--layout-transition);
    color: var(--text-primary);
}

#header-container h1 {
    color: var(--text-primary) !important;
}

#header-container p {
    color: var(--text-muted);
}

#header-container .bg-bg-secondary {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

#header-container .bg-bg-secondary:hover {
    background-color: var(--bg-secondary) !important;
    color: var(--accent-blue) !important;
}

[data-theme="dark"] #header-container {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 5.5rem 2rem 4.5rem 2rem;
    /* Top and bottom padding adjusted for fixed header and footer */
    transition: var(--layout-transition);
    display: flex;
    flex-direction: column;
}

body.sidebar-shrunk #header-container {
    left: var(--sidebar-shrunk-width);
}

#footer-container {
    position: fixed;
    bottom: 0rem;
    right: 0rem;
    left: var(--sidebar-width);
    z-index: 90;
    background-color: var(--bg-secondary);
    /* border-top: 1px solid var(--border-color); */
    transition: var(--layout-transition);
}

body.sidebar-shrunk #footer-container {
    left: var(--sidebar-shrunk-width);
}


body.sidebar-shrunk #header-container {
    left: var(--sidebar-shrunk-width);
}

body.sidebar-shrunk .main-content {
    margin-left: var(--sidebar-shrunk-width);
}

/* Shrunk Sidebar Details */
/* Hide certain elements that don't fit the vertical stack */
body.sidebar-shrunk #sidebar p,
body.sidebar-shrunk #sidebar .chevron-icon,
body.sidebar-shrunk .logo-text {
    display: none !important;
}

body.sidebar-shrunk #sidebar .sidebar-header {
    flex-direction: column;
    padding: 1.5rem 0.5rem;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

body.sidebar-shrunk #sidebar .sidebar-header .flex.items-center.gap-3 {
    flex-direction: column !important;
    overflow: visible !important;
    width: 100% !important;
    justify-content: center !important;
}

body.sidebar-shrunk #sidebar .logo-wrapper {
    padding: 0.5rem;
    background: transparent !important;
    box-shadow: none !important;
}

body.sidebar-shrunk #sidebar .logo-wrapper img {
    height: 2rem;
    width: 2rem;
    object-fit: contain;
}

/* Sidebar Nav Item - Vertical Stack */
body.sidebar-shrunk .sidebar-nav-item {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.75rem 0.25rem !important;
    min-height: 60px;
}

body.sidebar-shrunk .sidebar-nav-item .flex.items-center.gap-3 {
    flex-direction: column !important;
    gap: 0.25rem !important;
}

body.sidebar-shrunk .sidebar-nav-item i {
    font-size: 1.3rem !important;
    width: auto !important;
    margin: 0 !important;
}

body.sidebar-shrunk .sidebar-nav-item span {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-size: 0.6rem !important;
    font-weight: 600;
    line-height: normal;
    text-align: center;
    width: 100% !important;
    white-space: nowrap;
}

/* Submenu in shrunk mode */
body.sidebar-shrunk .submenu {
    padding-left: 0 !important;
    margin-left: 0 !important;
    border-left: none !important;
    background-color: rgba(37, 99, 235, 0.05);
    /* Very light blue background */
}

body.sidebar-shrunk .submenu.open {
    display: flex !important;
    flex-direction: column !important;
    max-height: 500px !important;
    opacity: 1 !important;
}

body.sidebar-shrunk .submenu a {
    padding: 0.5rem 0.25rem !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 0.55rem !important;
    margin: 0 !important;
}

/* Hide separators when shrunk */
body.sidebar-shrunk #sidebar .px-3 p {
    display: none !important;
}

#sidebar-toggle {
    position: absolute;
    right: -12px; /* Hang half-way off the edge */
    top: 7%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    background-color: var(--bg-sidebar);
    border: 1px solid var(--sidebar-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 101; /* Above sidebar */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* box-shadow: 0 2px 8px rgba(0,0,0,0.1); */
    color: var(--sidebar-accent);
}

#sidebar-toggle:hover {
    background-color: var(--sidebar-accent);
    color: white;
    border-color: var(--sidebar-accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

#sidebar-toggle i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

/* Adjust padding */
body.sidebar-shrunk #sidebar .px-6,
body.sidebar-shrunk #sidebar .px-3 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

body.sidebar-shrunk #sidebar .mb-10 {
    margin-bottom: 1rem;
}

.sidebar-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--sidebar-border) !important;
}

#sidebar .logo-text {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .sidebar-header {
    background: transparent !important;
}

.logo-wrapper {
    transition: all 0.3s ease;
    background-color: transparent !important;
    box-shadow: none !important;
}

[data-theme="dark"] .logo-wrapper {
    background-color: transparent !important;
    box-shadow: none !important;
}

body.sidebar-shrunk #sidebar-toggle i {
    transform: rotate(180deg);
}

/* Card Styling */
.stats-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--sidebar-border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stats-card:hover {
    border-color: var(--sidebar-accent);
    background-color: var(--bg-primary);
}

.stats-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-primary);
    color: var(--sidebar-accent);
    transition: all 0.2s ease;
}

.stats-card:hover .stats-card-icon {
    background-color: var(--sidebar-accent);
    color: white;
}

/* Table Styling */
.modern-table-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    text-align: left;
    padding: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* Utility Classes */
.text-teal {
    color: var(--accent-teal);
}

.bg-teal-soft {
    background-color: var(--accent-teal-soft);
}

.text-blue {
    color: var(--accent-blue);
}

.bg-blue-soft {
    background-color: var(--accent-blue-soft);
}

.text-red {
    color: var(--accent-red);
}

.bg-red-soft {
    background-color: var(--accent-red-soft);
}

.text-amber {
    color: var(--accent-amber);
}

.bg-amber-soft {
    background-color: var(--accent-amber-soft);
}

/* Submenu Styling */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease;
    opacity: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-left: 1rem;
    /* Reduced from 3rem */
    border-left: 1px solid var(--border-color);
    margin-left: 1.25rem;
}

.submenu.open {
    max-height: 500px;
    /* Large enough to fit content */
    opacity: 1;
    margin-bottom: 0.5rem;
}

.chevron-icon {
    transition: transform 0.3s ease;
}

.chevron-rotate {
    transform: rotate(180deg);
}

/* Theme Color Utilities */
.bg-indigo-50 { background-color: #f5f3ff; }
.bg-indigo-900\/30 { background-color: rgba(30, 27, 75, 0.3); }
.text-indigo-600 { color: #4f46e5; }
.text-indigo-400 { color: #818cf8; }
.text-indigo-500\/80 { color: rgba(99, 102, 241, 0.8); }

.bg-amber-50 { background-color: #fffbeb; }
.bg-amber-50\/30 { background-color: rgba(255, 251, 235, 0.3); }
.bg-amber-100 { background-color: #fef3c7; }
.bg-amber-500 { background-color: #f59e0b; }
.text-amber-600 { color: #d97706; }
.text-amber-700 { color: #b45309; }
.text-amber-800 { color: #92400e; }
.text-amber-400 { color: #fbbf24; }
.border-amber-100 { border-color: #fef3c7; }
.border-amber-800 { border-color: #92400e; }

.shadow-indigo-sm { box-shadow: 0 1px 2px 0 rgba(79, 70, 229, 0.05); }

/* Custom Scrollbar for modern look */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
[data-theme="dark"] .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    #sidebar {
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000 !important;
        box-shadow: 15px 0 35px rgba(0, 0, 0, 0.3);
        height: 100vh;
        width: var(--sidebar-width) !important;
    }

    #sidebar-toggle {
        display: none;
    }

    #sidebar.open #sidebar-toggle {
        display: flex;
    }

    #sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 5rem 1.25rem 2rem 1.25rem !important;
        /* Balanced padding for mobile */
    }

    /* Mobile Backdrop */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(5px);
        z-index: 1500 !important;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Responsive Header & Footer Container */
    #header-container {
        position: fixed;
        top: 0;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 100 !important;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        padding: 0.75rem 1rem !important;
        margin: 0 !important;
        display: flex;
        align-items: center;
        box-shadow: none;
    }

    #footer-container {
        position: fixed;
        bottom: 0;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 100 !important;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
        border-radius: 0;
        padding: 0 !important;
        margin: 0 !important;
        display: flex;
        align-items: center;
    }

}

/* Table Responsiveness Improvements */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }

    .table-responsive-compact td,
    .table-responsive-compact th {
        padding: 0.75rem 0.5rem !important;
    }

    .mobile-stack {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.25rem !important;
    }

    .mobile-row-card {
        padding: 1rem !important;
    }
}

/* Scrollbar styling for narrow tables */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Selected Row Styles */
.selected-row {
    background-color: rgba(47, 120, 196, 0.03) !important;
    border-left: 4px solid #2F78C4 !important;
}

.selected-row-checkbox {
    background-color: #2F78C4 !important;
    border-color: #2F78C4 !important;
}

/* Drag and Drop Styles */
.bulk-action-btn:active {
    cursor: grabbing !important;
}

.dragging {
    opacity: 0.5;
    border: 2px dashed #2F78C4 !important;
}

.drop-target {
    background-color: rgba(47, 120, 196, 0.1) !important;
    border: 2px solid #2F78C4 !important;
}

/* Custom Text Utilities using CSS Variables */
.text-theme-primary {
    color: var(--text-primary) !important;
}

.text-theme-secondary {
    color: var(--text-secondary) !important;
}

.text-theme-muted {
    color: var(--text-muted) !important;
}

/* Custom Checkbox using Theme Variables */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    display: inline-block;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-checkbox:checked {
    background-color: var(--accent-teal);
    border-color: var(--accent-teal);
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.custom-checkbox:focus {
    box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--accent-teal-soft);
    outline: none;
}

/* Custom Background and Border Utilities */
.bg-theme-accent {
    background-color: var(--accent-teal) !important;
}

.bg-theme-accent:hover {
    background-color: var(--sidebar-accent) !important;
    /* Slightly darker or same, using sidebar-accent as hover fallback for now, though conceptually same */
    opacity: 0.9;
}

.border-theme-accent {
    border-color: var(--accent-teal) !important;
}

.text-theme-accent {
    color: var(--accent-teal) !important;
}

.bg-theme-accent-soft {
    background-color: var(--accent-teal-soft) !important;
}

.ring-theme-accent {
    --tw-ring-color: var(--accent-teal) !important;
}

/* Custom Tooltip Styles */
/* --- Modern Notification System --- */
.notification-toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.modern-toast {
    pointer-events: auto;
    width: 280px;
    padding: 0.75rem 1rem;
    background: rgba(var(--bg-secondary-rgb), 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: toast-slide-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

.modern-toast.success {
    border-left: 4px solid #10b981;
}

.modern-toast.error {
    border-left: 4px solid #ef4444;
}

.modern-toast.info {
    border-left: 4px solid var(--accent-blue);
}

.toast-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.success .toast-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.error .toast-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.info .toast-icon {
    background: var(--accent-blue-soft);
    color: var(--accent-blue);
}

.toast-content {
    flex-grow: 1;
    min-width: 0;
}

.toast-message {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.toast-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

@keyframes toast-slide-in {
    from {
        transform: translateX(110%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(110%);
        opacity: 0;
    }
}

/* --- Minimalist Compact Alert Card design for Dashboard --- */
.compact-alert-card {
    background: var(--bg-secondary);
    border: 1px solid var(--sidebar-border);
    padding: 0.85rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.compact-alert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--accent-blue-soft);
    transition: width 0.3s ease;
    z-index: 0;
}

.compact-alert-card:hover {
    transform: translateY(-1px);
    /* box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); */
}



.compact-alert-card.meeting,
.compact-alert-card.overdue {
    background: var(--bg-secondary);
}

.compact-alert-card:hover {
    background-color: var(--bg-primary);
    border-color: var(--sidebar-accent);
}



.compact-alert-info {
    flex-grow: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.compact-alert-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-alert-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.4rem;
}

.compact-alert-client {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.compact-alert-date {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
}

.compact-alert-badge {
    font-size: 0.45rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bg-red-badge {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
}

.bg-blue-badge {
    background: #eff6ff;
    color: var(--accent-blue);
    border: 1px solid #dbeafe;
}

/* Alert Tab Styles */
.alert-tab {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.alert-tab.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.alert-tab.inactive {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.alert-tab.inactive:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}


[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    padding: 8px 12px;
    background: #1e293b;
    color: white;
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    pointer-events: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    line-height: 1;
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    border-width: 5px 5px 0 5px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    pointer-events: none;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-3px);
}

/* Adjustments for buttons with icons and text */
.flex[data-tooltip]::before,
.flex[data-tooltip]::after {
    left: 50%;
}

/* Premium Modal Styles */
.premium-modal-backdrop {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.7); /* Darker backdrop for better differentiation */
    transition: all 0.3s ease;
}

.premium-modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset; /* Added inner highlight */
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: modalScaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

body.modal-open {
    overflow: hidden !important;
}

@keyframes modalScaleUp {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.premium-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.premium-card:hover {
    border-color: var(--accent-blue);
    box-shadow: var(--card-shadow-hover);
}

.glass-pill {
    background: rgba(var(--bg-secondary-rgb), 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.progress-bar-container {
    height: 8px;
    background: var(--bg-primary);
    border-radius: 9999px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), #3b82f6);
    border-radius: 9999px;
    transition: width 1s ease-in-out;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Status Colors */
.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-active { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.status-pending { background: #fef9c3; color: #854d0e; border: 1px solid #fef08a; }
.status-on-hold { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.status-completed { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }