:root {
    /* Gopal Info Theme Colors - Light Mode */
    --primary: #e03a3c; /* Vibrant premium red */
    --primary-hover: #c92a2a;
    --primary-light: #fde8e8;
    --primary-rgb: 224, 58, 60;
    
    --secondary: #0f172a; /* Slate 900 */
    --secondary-light: #334155; /* Slate 700 */
    
    --bg-main: #f8fafc; /* Cool Slate 50 */
    --bg-card: #ffffff;
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #64748b; /* Slate 500 */
    --border-color: #e2e8f0; /* Slate 200 */
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Theme-specific shadows & UI elements */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    
    --sidebar-bg: #ffffff; /* Crisp premium white background */
    --sidebar-text: #475569; /* Slate 600 - crisp, premium text color */
    --sidebar-hover-bg: rgba(15, 23, 42, 0.04); /* Soft slate hover overlay */
    --sidebar-active-bg: rgba(224, 58, 60, 0.05); /* Beautiful soft crimson tint active state! */
    --header-bg: #ffffff;
    --header-border: #e2e8f0;
    
    /* Scrollbars */
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-thumb-hover: #94a3b8;

    /* Spacing & Borders */
    --radius-sm: 0.375rem;
    --radius-md: 0.625rem;
    --radius-lg: 0.875rem;
    --radius-xl: 1.25rem;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body, header, .sidebar, .card, table, tr, td, th, input, select, textarea, button, a, .nav-item {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font: inherit;
}

/* Custom Premium Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Auth Page Styles */
.auth-wrapper {
    height: 100vh;
    display: flex;
    align-items: flex-start; /* This prevents the top/bottom clipping bug in flexbox */
    justify-content: center;
    background: radial-gradient(circle at 15% 20%, rgba(var(--primary-rgb), 0.05) 0%, transparent 40%),
                radial-gradient(circle at 85% 80%, rgba(var(--primary-rgb), 0.03) 0%, transparent 40%),
                var(--bg-main);
    padding: 3rem 1.5rem;
    position: relative;
    overflow-y: auto;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 500px;
    margin-top: 4vh; /* Push down to appear centered on large screens */
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    z-index: 1;
    backdrop-filter: blur(16px);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.auth-header h1::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
    margin: 0.5rem auto 0;
    border-radius: 999px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Premium Buttons Redesign */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white !important;
    padding: 0.875rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.35);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.2);
}

.btn-primary:hover .import-icon {
    transform: scale(1.1) rotate(360deg) !important;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
    stroke: #ffffff;
}

.add-icon {
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    display: inline-block !important;
}

.btn-primary:hover .add-icon {
    transform: scale(1.2) rotate(180deg) !important;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
    stroke: #ffffff;
}


.btn-primary:disabled {
    background: var(--border-color) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    opacity: 0.6 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Dashboard Layout Structure */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-main);
}

.sidebar {
    width: 220px;
    height: 100vh;
    position: sticky;
    top: 0;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.03);
    z-index: 100;
}

.sidebar-brand {
    padding: 1.75rem 1.5rem 1.75rem calc(1.5rem + 4px);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    white-space: nowrap;
    overflow: hidden;
}

.brand-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    width: 100%;
}

.sidebar.collapsed .brand-link {
    justify-content: center;
}

.sidebar-brand .brand-full {
    max-height: 40px;
    max-width: 190px;
    object-fit: contain;
    transition: var(--transition);
}

.sidebar-brand .brand-short {
    display: none;
    max-height: 38px;
    max-width: 44px;
    object-fit: contain;
    transition: var(--transition);
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
}

/* Sidebar Navigation Items Redesign */
.nav-item {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    color: var(--sidebar-text) !important;
    font-weight: 500;
    font-size: 0.95rem;
    gap: 0.75rem;
    position: relative;
    border-left: 4px solid transparent;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    overflow: hidden;
}

.nav-item .nav-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s;
    color: inherit;
}

.nav-item:hover {
    color: var(--primary) !important;
    background-color: var(--sidebar-hover-bg);
    padding-left: calc(1.5rem + 4px);
}

.nav-item:hover .nav-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px var(--primary-light));
}

.nav-item.active {
    color: var(--primary) !important;
    background-color: var(--sidebar-active-bg);
    border-left-color: var(--primary);
    padding-left: calc(1.5rem - 4px);
    font-weight: 600;
}

.nav-item.active .nav-icon {
    transform: scale(1.05);
}

/* Collapsed Sidebar overrides */
.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .sidebar-brand {
    padding: 1.5rem 0.5rem;
}

.sidebar.collapsed .sidebar-brand .brand-full {
    display: none;
}

.sidebar.collapsed .sidebar-brand .brand-short {
    display: inline-block;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.85rem 0;
    border-left: 4px solid transparent;
}

.sidebar.collapsed .nav-item:hover,
.sidebar.collapsed .nav-item.active {
    padding-left: 0;
    border-left-color: var(--primary);
}

.sidebar.collapsed .nav-item span {
    display: none !important;
}

.sidebar.collapsed .nav-item .nav-icon {
    margin-right: 0 !important;
}

.sidebar.collapsed .sidebar-footer {
    padding: 1rem 0 !important;
}

/* Sign-Out Button Styling */
.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.sidebar .logout-btn {
    border-radius: var(--radius-md);
    margin: 0.5rem 0.25rem 0;
    padding: 0.8rem 1rem;
    width: calc(100% - 0.5rem) !important;
}

.sidebar .logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    border-left-color: transparent !important;
    padding-left: 1.25rem !important;
}

/* Collapsed Logout button styling */
.sidebar.collapsed .logout-btn {
    width: calc(100% - 1rem) !important;
    margin: 0.5rem;
    padding: 0.8rem 0;
}

.sidebar.collapsed .logout-btn:hover {
    padding-left: 0 !important;
}

/* Main Content Layout */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

/* Top Header Redesign */
.header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    height: 60px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.content-body {
    padding: 1.5rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 0;
    animation: fadeIn 0.5s ease-out;
}

/* Sun/Moon Theme Toggle Switcher */
.theme-toggle-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-toggle-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
    background-color: var(--bg-card);
}

.theme-toggle-btn .sun-icon {
    position: absolute;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
    width: 18px;
    height: 18px;
}

.theme-toggle-btn .moon-icon {
    position: absolute;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
    width: 18px;
    height: 18px;
}

/* Light Theme Switcher values */
:root .theme-toggle-btn .sun-icon {
    opacity: 0;
    transform: translateY(30px) rotate(45deg);
}

:root .theme-toggle-btn .moon-icon {
    opacity: 1;
    transform: translateY(0) rotate(0);
}


/* Cards & Grid Styling */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

/* Table Style Polish */
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background-color: var(--bg-main) !important;
    color: var(--text-muted) !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 1.15rem 1.5rem !important;
    border-bottom: 2px solid var(--border-color) !important;
    position: sticky;
    top: 0;
    z-index: 10;
}

td {
    padding: 1.15rem 1.5rem !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    font-size: 0.875rem !important;
}

tbody tr {
    background-color: transparent !important;
    transition: var(--transition) !important;
}

tbody tr:hover {
    background-color: rgba(var(--primary-rgb), 0.02) !important;
}

/* Prevent cell click border outline and make cards holding tables round perfectly */
.card[style*="padding: 0"] {
    border-radius: var(--radius-lg);
    overflow: hidden !important;
    flex: 0 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Horizontal scroll only — vertical scroll on .content-body avoids overlapping sticky actions */
.table-container {
    flex: 0 0 auto;
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* Form inputs & controls custom styling */
.form-control, input[type="text"], input[type="date"], input[type="number"], select:not(.status-badge-select), textarea {
    background-color: var(--bg-main) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.75rem 1rem !important;
    box-shadow: var(--shadow-sm) !important;
    transition: var(--transition) !important;
}

.form-control:focus, input[type="text"]:focus, input[type="date"]:focus, input[type="number"]:focus, select:not(.status-badge-select):focus, textarea:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    background-color: var(--bg-card) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
}

.form-control:focus::placeholder, 
input:focus::placeholder, 
textarea:focus::placeholder {
    color: transparent !important;
}

.form-control:disabled, 
input:disabled, 
textarea:disabled, 
select:disabled,
.ts-wrapper.disabled .ts-control {
    cursor: not-allowed !important;
    background-color: var(--scrollbar-track) !important;
    opacity: 0.8 !important;
    color: var(--text-muted) !important;
}

/* Hide native password reveal icon in Edge */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* Premium TomSelect Customization */
.ts-control {
    background-color: var(--bg-main) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    padding: 0.75rem 1rem !important;
    box-shadow: var(--shadow-sm) !important;
    transition: var(--transition) !important;
    font-size: 1rem !important;
    min-height: auto !important;
    display: flex;
    align-items: center;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
}
.ts-control.focus {
    border-color: var(--primary) !important;
    background-color: var(--bg-card) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
}
.ts-control > input {
    font-size: 1rem !important;
}
.ts-control > .item {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100% - 24px) !important;
}
.ts-wrapper.single .ts-control::after {
    border: none !important;
    content: "" !important;
    width: 16px !important;
    height: 16px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    position: absolute !important;
    top: 50% !important;
    right: 1rem !important;
    margin-top: -8px !important;
    transition: transform 0.2s ease !important;
}
.ts-wrapper.single.dropdown-active .ts-control::after {
    transform: rotate(180deg) !important;
}
.ts-dropdown {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    margin-top: 4px !important;
    padding: 0.25rem !important;
    font-size: 0.95rem !important;
    z-index: 1050 !important;
}
.ts-dropdown .ts-dropdown-content {
    padding: 0 !important;
}
.ts-dropdown .option {
    padding: 0.6rem 1rem !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-main) !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}
.ts-dropdown .option:hover,
.ts-dropdown .option.active {
    background-color: var(--primary-light) !important;
    color: var(--primary) !important;
}
.ts-dropdown .option.selected {
    font-weight: 600 !important;
    background-color: rgba(var(--primary-rgb), 0.05) !important;
    color: var(--primary) !important;
}

/* Pagination container styling */
.pagination-container {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-card);
}

.pagination-container nav select {
    background-color: var(--bg-main) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

.pagination-container nav a {
    background-color: var(--bg-main) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-sm) !important;
}

.pagination-container nav a:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background-color: var(--bg-card) !important;
}

/* Animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}





















/* Premium Secondary & Menu Toggle Button Polish */
.btn-secondary,
button[style*="background-color: #f8fafc"],
button[style*="background-color: rgb(248, 250, 252)"],
a[style*="background-color: #f8fafc"] {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    box-shadow: var(--shadow-sm) !important;
    transition: var(--transition) !important;
    width: auto !important;
}

.btn-secondary:hover,
button[style*="background-color: #f8fafc"]:hover,
a[style*="background-color: #f8fafc"]:hover {
    background: var(--bg-main) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    transform: translateY(-1px) !important;
}

.btn-secondary:active,
button[style*="background-color: #f8fafc"]:active {
    transform: translateY(0) !important;
}

.menu-toggle-btn {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    transition: var(--transition) !important;
}

.menu-toggle-btn:hover {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    background-color: var(--bg-main) !important;
    transform: scale(1.05) !important;
}

/* Responsive styles */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -220px;
        height: 100%;
        z-index: 1000;
    }
    .sidebar.open {
        left: 0;
    }
    .main-content {
        width: 100%;
    }
    .header {
        padding: 0.85rem 1rem;
    }
}










/* Premium Invoices Count Button styling */
.btn-invoice-count {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border: none !important;
    padding: 0.4rem 0.75rem !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    font-size: 0.85rem !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: none !important;
}

.btn-invoice-count:hover {
    background-color: #bae6fd !important;
    color: #0369a1 !important;
    transform: translateY(-1px) !important;
}


/* Premium Animated Import Icon */
.import-icon {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    display: inline-block !important;
}

/* Rotate on hover for button or parent card */
.btn-primary:hover .import-icon,
.import-dropzone:hover .import-icon,
.import-header:hover .import-icon {
    transform: rotate(360deg) !important;
}

/* Continuous 360 degree spin animation for loading view */
.import-spinner {
    animation: spin 1.2s linear infinite !important;
    color: var(--primary) !important;
}

/* Global SweetAlert2 modal stack override */
.swal2-container {
    z-index: 999999 !important;
}

/* ==========================================
   Premium Animated PDF Modal Action Buttons
   ========================================== */

/* Base class for PDF actions */
.btn-pdf-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.55rem 1.25rem !important;
    font-weight: 700 !important;
    font-size: 0.875rem !important;
    border-radius: var(--radius-md) !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: var(--shadow-sm) !important;
    color: #ffffff !important;
    outline: none !important;
}

.btn-pdf-action svg {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.btn-pdf-action:hover {
    transform: translateY(-2px) scale(1.025) !important;
}

.btn-pdf-action:active {
    transform: translateY(0) scale(0.975) !important;
}

/* Individual Button Variations - Light Theme */
.btn-pdf-print {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25) !important;
}
.btn-pdf-print:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4) !important;
}

.btn-pdf-edit {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.25) !important;
}
.btn-pdf-edit:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4) !important;
}

.btn-pdf-email {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25) !important;
}
.btn-pdf-email:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
}

.btn-pdf-download {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.25) !important;
}
.btn-pdf-download:hover {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%) !important;
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4) !important;
}

/* Close button style */
.btn-pdf-close {
    background: #f1f5f9 !important;
    border: none !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    font-size: 1.25rem !important;
    cursor: pointer !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}
.btn-pdf-close:hover {
    transform: rotate(90deg) !important;
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}










/* Micro-Animations for Icons on Hover */
@keyframes printBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.btn-pdf-print:hover svg {
    animation: printBounce 0.6s ease-in-out infinite !important;
}

@keyframes editWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}
.btn-pdf-edit:hover svg {
    animation: editWiggle 0.5s ease-in-out infinite !important;
}

@keyframes emailTilt {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(3px, -2px) rotate(5deg); }
}
.btn-pdf-email:hover svg {
    animation: emailTilt 0.8s ease-in-out infinite !important;
}

@keyframes downloadArrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}
.btn-pdf-download:hover svg {
    animation: downloadArrowBounce 0.6s ease-in-out infinite !important;
}

/* Sticky Table Columns */
.table-container {
    width: 100%;
}

.table-container table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100%;
    table-layout: fixed;
}

/* Truncate only when content overflows — do not use max-width:0 (collapses columns) */
.table-container table td.table-cell-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Invoices: expand columns, no wrap — scroll horizontally when needed */
.table-container table.table-expand-content {
    width: max-content !important;
    min-width: 100%;
    table-layout: auto;
}

.table-container table.table-expand-content th,
.table-container table.table-expand-content td {
    white-space: nowrap;
    max-width: none;
}

/* Fill container on large screens; enable horizontal scroll on smaller viewports */
.table-min-width-1200 {
    min-width: 100%;
    width: 100%;
}
.table-min-width-1000 {
    min-width: 100%;
    width: 100%;
}
.table-min-width-800 {
    min-width: 100%;
    width: 100%;
}

@media (max-width: 1199px) {
    .table-min-width-1200 {
        min-width: 1200px !important;
    }
}

@media (max-width: 999px) {
    .table-min-width-1000 {
        min-width: 1000px !important;
    }
}

@media (max-width: 799px) {
    .table-min-width-800 {
        min-width: 800px !important;
    }
}

@media (max-width: 768px) {
    .content-body {
        padding: 1rem;
    }

    .table-container table th,
    .table-container table td {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem;
    }

    .sticky-col-actions {
        width: max-content !important;
        min-width: max-content !important;
        max-width: none !important;
    }

    .clients-table .col-invoices {
        width: 110px;
        min-width: 110px;
    }

    .clients-table .btn-invoice-count {
        padding: 0.35rem 0.5rem !important;
        font-size: 0.75rem !important;
        gap: 0.25rem !important;
    }

    .clients-table .btn-invoice-count svg {
        width: 12px;
        height: 12px;
    }
}

.sticky-col-checkbox {
    position: sticky !important;
    left: 0 !important;
    z-index: 20 !important;
    background-color: var(--bg-card) !important;
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    text-align: center !important;
}
th.sticky-col-checkbox {
    background-color: var(--bg-main) !important;
    z-index: 30 !important;
}

.sticky-col-index {
    position: sticky !important;
    left: 52px !important; /* Offset by checkbox width */
    z-index: 20 !important;
    background-color: var(--bg-card) !important;
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    border-right: 1px solid var(--border-color) !important;
}
th.sticky-col-index {
    background-color: var(--bg-main) !important;
    z-index: 30 !important;
}

.sticky-col-checkbox.no-index {
    border-right: 1px solid var(--border-color) !important;
}

.sticky-col-actions {
    position: sticky !important;
    right: 0 !important;
    z-index: 99 !important;
    background-color: var(--bg-card) !important;
    border-left: 1px solid var(--border-color) !important;
    box-sizing: border-box !important;
    padding-right: 1rem !important;
}
@media (min-width: 769px) {
    .sticky-col-actions {
        width: 140px !important;
        min-width: 140px !important;
        max-width: 140px !important;
    }
}
@media (max-width: 768px) {
    .sticky-col-actions {
        width: 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
    }
}
th.sticky-col-actions {
    background-color: var(--bg-main) !important;
    z-index: 100 !important;
}

/* Clients table — readable columns, fills width on desktop, scrolls on small screens */
.clients-table {
    table-layout: fixed;
    width: 100%;
}

.clients-table .col-checkbox { width: 52px; }
.clients-table .col-index { width: 56px; }
.clients-table .col-client-name { width: 12%; }
.clients-table .col-company { width: 16%; }
.clients-table .col-city { width: 9%; }
.clients-table .col-contact { width: 11%; }
.clients-table .col-email { width: 20%; }
.clients-table .col-invoices { width: 120px; }
.clients-table .col-actions { width: 160px; }

.clients-table td.table-cell-ellipsis,
.clients-table th:not(.sticky-col-checkbox):not(.sticky-col-index):not(.sticky-col-actions) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clients-table .table-cell-email {
    white-space: normal;
    overflow: hidden;
}

.clients-table .table-cell-email .email-primary {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clients-table .table-cell-email .email-alt-line {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.clients-table .table-cell-email .email-alt-line span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.clients-table .invoices-cell {
    white-space: nowrap;
    overflow: visible;
    text-align: left;
    vertical-align: middle;
}

.clients-table .invoices-cell .btn-invoice-count {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    white-space: nowrap;
}

.clients-table .actions-cell > div {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

/* Below desktop: horizontal scroll with sensible minimum table width */
@media (max-width: 1199px) {
    .clients-table {
        table-layout: auto;
        min-width: 1100px;
    }

    .clients-table .col-client-name { min-width: 140px; }
    .clients-table .col-company { min-width: 160px; }
    .clients-table .col-city { min-width: 100px; }
    .clients-table .col-contact { min-width: 120px; }
    .clients-table .col-email { min-width: 200px; }
}

/* Hover backgrounds for rows and sticky columns */
tbody tr:hover {
    background-color: #f8fafc !important;
}
tbody tr:hover .sticky-col-checkbox,
tbody tr:hover .sticky-col-index,
tbody tr:hover .sticky-col-actions {
    background-color: #f8fafc !important;
}


/* Premium iOS Style Toggle Switch */
.switch-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.switch-input {
    display: none;
}

.switch-slider {
    width: 44px;
    height: 24px;
    background-color: #cbd5e1;
    border-radius: 9999px;
    position: relative;
    transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-input:checked + .switch-slider {
    background-color: #10b981; /* Premium Green */
}

.switch-input:checked + .switch-slider::before {
    transform: translateX(20px);
}

.switch-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    min-width: 52px;
}

/* Premium Status Badge Select Dropdown */
.status-badge-container {
    position: relative;
    display: inline-block;
}

.status-badge-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    border-radius: 9999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.status-badge-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--border-color);
}

/* Reset option styles so they don't inherit the badge's background color */
.status-badge-select option {
    background-color: var(--bg-card);
    color: var(--text-main);
    font-weight: 500;
}

/* Draft */
.status-badge-draft {
    background-color: #f1f5f9;
    color: #475569;
}

/* Pending */
.status-badge-pending {
    background-color: #fef3c7;
    color: #d97706;
}

/* Sent */
.status-badge-sent {
    background-color: #dcfce7;
    color: #16a34a;
}

/* Follow-up Draft */
.status-badge-follow-up-draft {
    background-color: #e0f2fe;
    color: #0284c7;
}

/* Follow-up */
.status-badge-follow-up {
    background-color: #fce7f3;
    color: #db2777;
}

/* 1st Follow-up */
.status-badge-1st-follow-up {
    background-color: #f3e8ff;
    color: #7c3aed;
}

/* 2nd Follow-up */
.status-badge-2nd-follow-up {
    background-color: #ffedd5;
    color: #ea580c;
}

/* 3rd Follow-up */
.status-badge-3rd-follow-up {
    background-color: #e0e7ff;
    color: #4f46e5;
}

/* Payment Badge Paid */
.payment-badge-paid {
    background-color: #dcfce7;
    color: #16a34a;
}

/* Payment Badge Unpaid */
.payment-badge-unpaid {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Custom Chevron overlay for the select */
.status-badge-container::after {
    content: "▼";
    font-size: 8px;
    position: absolute;
    right: 12px;
    top: 52%;
    transform: translateY(-50%);
    pointer-events: none;
    color: currentColor;
    opacity: 0.75;
}

/* PDF invoice preview modal — loaded in <head> to prevent flash on invoices page */
#pdfModal.pdf-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

#pdfModal.pdf-modal-overlay.is-open {
    display: flex;
}

.pdf-modal-card {
    width: 94vw;
    max-width: 1100px;
    height: 92vh;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s ease-out;
}

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.pdf-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pdf-modal-title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 10px;
}

.pdf-modal-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pdf-frame-container {
    flex: 1;
    min-height: 0;
    position: relative;
    background: #f1f5f9;
    overflow: hidden;
}

.pdf-frame-container iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

.pdf-loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(241, 245, 249, 0.95);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.pdf-loading-text {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

@media (max-width: 768px) {
    .pdf-modal-card {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    .pdf-modal-header {
        padding: 1rem;
    }
}

/* ==========================================
   Admin Settings & Profile Page Styles
   ========================================== */

.settings-card, .profile-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-card:hover, .profile-card:hover {
    box-shadow: var(--shadow-lg);
}

.tabs-bar {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    gap: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .form-group-row {
        grid-template-columns: 1fr 1fr;
    }
    .tabs-bar {
        gap: 1.5rem;
    }
}

/* File upload design */
.upload-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    background-color: var(--bg-main);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
}

.preview-box {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: white;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.upload-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upload-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    color: var(--text-main);
}

.upload-btn:hover {
    background-color: var(--border-color);
    color: var(--primary);
}

/* Gmail-style Email Chips (settings page) */
.settings-chips-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    min-height: 44px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md, 8px);
    cursor: text;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.settings-chips-container:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.settings-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 3px 4px 3px 3px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #1e293b;
    max-width: 100%;
    animation: settingsChipIn 0.2s ease-out;
    transition: background 0.15s, border-color 0.15s;
}
.settings-chip:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}
.settings-chip-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
}
.settings-chip-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    line-height: 1.3;
}
.settings-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.15s;
}
.settings-chip-remove:hover {
    background: #fee2e2;
    color: #ef4444;
}
.settings-chip-input {
    flex: 1;
    min-width: 160px;
    border: none;
    outline: none;
    font-size: 0.875rem;
    color: #1e293b;
    background: transparent;
    padding: 4px 2px;
}
.settings-chip-input::placeholder {
    color: #94a3b8;
}
.settings-chip.invalid {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}
@keyframes settingsChipIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Circular Cropper Style Overrides */
.cropper-view-box,
.cropper-face {
    border-radius: 50% !important;
}
.cropper-view-box {
    outline: 2px solid var(--primary) !important;
    box-shadow: 0 0 0 4000px rgba(9, 13, 22, 0.85) !important;
}
.cropper-line, .cropper-point {
    display: none !important;
}
.cropper-container {
    background-color: #020617 !important;
}
.cropper-bg {
    background-image: none !important;
    background-color: #020617 !important;
}

/* Zoom slider styles */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    accent-color: var(--primary);
}
input[type="range"]:focus {
    outline: none;
}
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #334155;
    border-radius: 999px;
}
input[type="range"]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -5px;
    transition: transform 0.1s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}



































/* Global Table Responsive Layout & Sticky Elements */
.table-container {
    max-height: calc(100vh - 270px);
    overflow-y: auto !important;
    overflow-x: auto !important;
}

/* Base style for sticky headers to prevent overlapping issues */
.table-container table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8fafc; /* Light theme default */
}

/* Ensure actions column doesn't get messed up if it is sticky on x axis too */
.table-container table th.sticky-col-actions,
.table-container table th.sticky-col-checkbox,
.table-container table th.sticky-col-index {
    z-index: 12 !important; /* Higher than regular headers */
}

/* Pagination container */
.pagination-container {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background-color: var(--bg-card);
}

/* Enforce rigid 100vh layout for the entire dashboard */
html, body {
    height: 100vh !important;
    overflow: hidden !important;
    margin: 0;
    padding: 0;
}

.dashboard-container {
    height: 100vh !important;
    min-height: 100vh !important;
    overflow: hidden !important;
}

.main-content {
    height: 100vh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.content-body {
    flex: 1 !important;
    overflow-y: auto !important; /* Allow normal pages like settings to scroll */
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Ensure the card takes up all remaining space */
.content-body .card:not(.stat-card) {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important; /* Crucial for flex child scrolling */
    margin-bottom: 0 !important;
}

.table-container {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    max-height: none !important; /* Remove previous max-height constraint */
}

/* Base style for sticky headers to prevent overlapping issues */
.table-container table th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background-color: #f8fafc !important; /* Light theme default */
}

/* For sticky columns on x-axis (like actions, checkbox) */
.table-container table th.sticky-col-actions,
.table-container table th.sticky-col-checkbox,
.table-container table th.sticky-col-index {
    z-index: 30 !important; /* Must be higher than regular th and td */
}

.table-container table td.sticky-col-actions,
.table-container table td.sticky-col-checkbox,
.table-container table td.sticky-col-index {
    z-index: 20 !important; /* Must be higher than regular td, but lower than th */
}

/* Pagination container */
.pagination-container {
    flex-shrink: 0 !important; /* Ensure pagination doesn't shrink */
    position: relative !important; /* No longer needs sticky since the table above it scrolls */
    bottom: auto !important;
    background-color: var(--bg-card) !important;
}


                / *   S i d e b a r   A d m i n   S e c t i o n   S t y l i n g   * / 
 
                 . s i d e b a r - d i v i d e r   { 
 
                         m a r g i n :   0 . 7 5 r e m   1 . 5 r e m ; 
 
                         b o r d e r - t o p :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         t r a n s i t i o n :   v a r ( - - t r a n s i t i o n ) ; 
 
                 } 
 
                 . s i d e b a r . c o l l a p s e d   . s i d e b a r - d i v i d e r   { 
 
                         m a r g i n :   0 . 7 5 r e m   0 . 5 r e m ; 
 
                 } 
 
                 . s i d e b a r - s e c t i o n - h e a d e r   { 
 
                         p a d d i n g :   0 . 7 5 r e m   1 . 5 r e m   0 . 2 5 r e m ; 
 
                         f o n t - s i z e :   0 . 7 r e m ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         t e x t - t r a n s f o r m :   u p p e r c a s e ; 
 
                         c o l o r :   # 6 4 7 4 8 b ; 
 
                         l e t t e r - s p a c i n g :   0 . 0 5 e m ; 
 
                         t r a n s i t i o n :   v a r ( - - t r a n s i t i o n ) ; 
 
                 } 
 
                 . s i d e b a r . c o l l a p s e d   . s i d e b a r - s e c t i o n - h e a d e r   { 
 
                         d i s p l a y :   n o n e   ! i m p o r t a n t ; 
 
                 } 
 
 
 
                 / *   P r e m i u m   G l a s s m o r p h i c   L o g o u t   M o d a l   * / 
 
                 . l o g o u t - m o d a l - b a c k d r o p   { 
 
                         p o s i t i o n :   f i x e d ; 
 
                         t o p :   0 ; 
 
                         l e f t :   0 ; 
 
                         w i d t h :   1 0 0 % ; 
 
                         h e i g h t :   1 0 0 % ; 
 
                         b a c k g r o u n d :   r g b a ( 1 5 ,   2 3 ,   4 2 ,   0 . 3 ) ; 
 
                         b a c k d r o p - f i l t e r :   b l u r ( 8 p x ) ; 
 
                         - w e b k i t - b a c k d r o p - f i l t e r :   b l u r ( 8 p x ) ; 
 
                         z - i n d e x :   9 9 9 9 9 ; 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         o p a c i t y :   0 ; 
 
                         p o i n t e r - e v e n t s :   n o n e ; 
 
                         t r a n s i t i o n :   o p a c i t y   0 . 3 s   c u b i c - b e z i e r ( 0 . 4 ,   0 ,   0 . 2 ,   1 ) ; 
 
                 } 
 
                 
 
                 . l o g o u t - m o d a l - b a c k d r o p . s h o w   { 
 
                         o p a c i t y :   1 ; 
 
                         p o i n t e r - e v e n t s :   a u t o ; 
 
                 } 
 
                 
 
                 . l o g o u t - m o d a l - c o n t e n t   { 
 
                         b a c k g r o u n d :   w h i t e ; 
 
                         b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         b o r d e r - r a d i u s :   v a r ( - - r a d i u s - l g ) ; 
 
                         w i d t h :   9 0 % ; 
 
                         m a x - w i d t h :   4 0 0 p x ; 
 
                         p a d d i n g :   2 r e m ; 
 
                         b o x - s h a d o w :   v a r ( - - s h a d o w - l g ) ; 
 
                         t r a n s f o r m :   s c a l e ( 0 . 9 )   t r a n s l a t e Y ( 2 0 p x ) ; 
 
                         t r a n s i t i o n :   t r a n s f o r m   0 . 3 s   c u b i c - b e z i e r ( 0 . 3 4 ,   1 . 5 6 ,   0 . 6 4 ,   1 ) ; 
 
                         t e x t - a l i g n :   c e n t e r ; 
 
                 } 
 
                 
 
                 . l o g o u t - m o d a l - b a c k d r o p . s h o w   . l o g o u t - m o d a l - c o n t e n t   { 
 
                         t r a n s f o r m :   s c a l e ( 1 )   t r a n s l a t e Y ( 0 ) ; 
 
                 } 
 
                 
 
                 . l o g o u t - i c o n - c o n t a i n e r   { 
 
                         w i d t h :   5 6 p x ; 
 
                         h e i g h t :   5 6 p x ; 
 
                         b a c k g r o u n d - c o l o r :   r g b a ( 2 3 9 ,   6 8 ,   6 8 ,   0 . 1 ) ; 
 
                         c o l o r :   # e f 4 4 4 4 ; 
 
                         b o r d e r - r a d i u s :   5 0 % ; 
 
                         d i s p l a y :   f l e x ; 
 
                         a l i g n - i t e m s :   c e n t e r ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                         m a r g i n :   0   a u t o   1 . 2 5 r e m ; 
 
                         t r a n s i t i o n :   t r a n s f o r m   0 . 3 s   e a s e ; 
 
                 } 
 
                 
 
                 . l o g o u t - m o d a l - b a c k d r o p . s h o w   . l o g o u t - i c o n - c o n t a i n e r   { 
 
                         t r a n s f o r m :   s c a l e ( 1 )   r o t a t e ( 0 d e g ) ; 
 
                         a n i m a t i o n :   p u l s e D a n g e r   2 s   i n f i n i t e ; 
 
                 } 
 
                 
 
                 @ k e y f r a m e s   p u l s e D a n g e r   { 
 
                         0 %   { 
 
                                 b o x - s h a d o w :   0   0   0   0   r g b a ( 2 3 9 ,   6 8 ,   6 8 ,   0 . 4 ) ; 
 
                         } 
 
                         7 0 %   { 
 
                                 b o x - s h a d o w :   0   0   0   1 0 p x   r g b a ( 2 3 9 ,   6 8 ,   6 8 ,   0 ) ; 
 
                         } 
 
                         1 0 0 %   { 
 
                                 b o x - s h a d o w :   0   0   0   0   r g b a ( 2 3 9 ,   6 8 ,   6 8 ,   0 ) ; 
 
                         } 
 
                 } 
 
                 
 
                 . l o g o u t - m o d a l - i c o n   { 
 
                         w i d t h :   2 8 p x ; 
 
                         h e i g h t :   2 8 p x ; 
 
                 } 
 
                 
 
                 . l o g o u t - m o d a l - c o n t e n t   h 3   { 
 
                         f o n t - s i z e :   1 . 2 5 r e m ; 
 
                         f o n t - w e i g h t :   7 0 0 ; 
 
                         c o l o r :   # 0 f 1 7 2 a ; 
 
                         m a r g i n - b o t t o m :   0 . 5 r e m ; 
 
                 } 
 
                 
 
                 . l o g o u t - m o d a l - c o n t e n t   p   { 
 
                         c o l o r :   # 6 4 7 4 8 b ; 
 
                         f o n t - s i z e :   0 . 9 5 r e m ; 
 
                         l i n e - h e i g h t :   1 . 5 ; 
 
                         m a r g i n - b o t t o m :   1 . 7 5 r e m ; 
 
                 } 
 
                 
 
                 . l o g o u t - m o d a l - a c t i o n s   { 
 
                         d i s p l a y :   f l e x ; 
 
                         g a p :   1 r e m ; 
 
                         j u s t i f y - c o n t e n t :   c e n t e r ; 
 
                 } 
 
                 
 
                 . l o g o u t - b t n - s e c o n d a r y   { 
 
                         f l e x :   1 ; 
 
                         b a c k g r o u n d - c o l o r :   # f 8 f a f c ; 
 
                         c o l o r :   # 0 f 1 7 2 a ; 
 
                         b o r d e r :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 
                         p a d d i n g :   0 . 7 5 r e m   1 . 2 5 r e m ; 
 
                         b o r d e r - r a d i u s :   v a r ( - - r a d i u s - m d ) ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         t r a n s i t i o n :   v a r ( - - t r a n s i t i o n ) ; 
 
                         f o n t - s i z e :   0 . 9 5 r e m ; 
 
                 } 
 
                 
 
                 . l o g o u t - b t n - s e c o n d a r y : h o v e r   { 
 
                         b a c k g r o u n d - c o l o r :   # e 2 e 8 f 0 ; 
 
                 } 
 
                 
 
                 . l o g o u t - b t n - p r i m a r y   { 
 
                         m i n - w i d t h :   1 5 0 p x ; 
 
                         b a c k g r o u n d - c o l o r :   # e f 4 4 4 4 ; 
 
                         c o l o r :   w h i t e ; 
 
                         b o r d e r :   n o n e ; 
 
                         p a d d i n g :   0 . 7 5 r e m   1 . 2 5 r e m ; 
 
                         b o r d e r - r a d i u s :   v a r ( - - r a d i u s - m d ) ; 
 
                         f o n t - w e i g h t :   6 0 0 ; 
 
                         c u r s o r :   p o i n t e r ; 
 
                         t r a n s i t i o n :   v a r ( - - t r a n s i t i o n ) ; 
 
                         b o x - s h a d o w :   0   4 p x   1 2 p x   r g b a ( 2 3 9 ,   6 8 ,   6 8 ,   0 . 2 ) ; 
 
                         f o n t - s i z e :   0 . 9 5 r e m ; 
 
                 } 
 
                 
 
                 . l o g o u t - b t n - p r i m a r y : h o v e r   { 
 
                         b a c k g r o u n d - c o l o r :   # d c 2 6 2 6 ; 
 
                         b o x - s h a d o w :   0   6 p x   1 6 p x   r g b a ( 2 3 9 ,   6 8 ,   6 8 ,   0 . 3 ) ; 
 
                         t r a n s f o r m :   t r a n s l a t e Y ( - 1 p x ) ; 
 
                 } 
 
                 
 
                 . l o g o u t - b t n - p r i m a r y : a c t i v e   { 
 
                         t r a n s f o r m :   t r a n s l a t e Y ( 0 ) ; 
 
                 } 
 
                 
 
                 / *   D a r k   M o d e   G l a s s m o r p h i c   s p e c i f i c   s t y l e   o v e r r i d e s   * / 
 
                 . d a r k - t h e m e   . l o g o u t - m o d a l - b a c k d r o p   { 
 
                         b a c k g r o u n d :   r g b a ( 0 ,   0 ,   0 ,   0 . 6 ) ; 
 
                 } 
 
                 
 
                 . d a r k - t h e m e   . l o g o u t - m o d a l - c o n t e n t   { 
 
                         b a c k g r o u n d :   r g b a ( 1 7 ,   2 4 ,   3 9 ,   0 . 8 5 ) ; 
 
                         b a c k d r o p - f i l t e r :   b l u r ( 2 0 p x ) ; 
 
                         - w e b k i t - b a c k d r o p - f i l t e r :   b l u r ( 2 0 p x ) ; 
 
                         b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 8 ) ; 
 
                         b o x - s h a d o w :   0   2 0 p x   5 0 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 5 ) ; 
 
                 } 
 
                 
 
                 . d a r k - t h e m e   . l o g o u t - i c o n - c o n t a i n e r   { 
 
                         b a c k g r o u n d - c o l o r :   r g b a ( 2 3 9 ,   6 8 ,   6 8 ,   0 . 2 ) ; 
 
                 } 
 
                 
 
                 . d a r k - t h e m e   . l o g o u t - b t n - s e c o n d a r y   { 
 
                         b a c k g r o u n d - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 5 ) ; 
 
                         b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 0 8 ) ; 
 
                 } 
 
                 
 
                 . d a r k - t h e m e   . l o g o u t - b t n - s e c o n d a r y : h o v e r   { 
 
                         b a c k g r o u n d - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 ) ; 
 
                         b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 5 ) ; 
 
                 } 
 
 
 
                 / *   D i s a b l e d   g r e y   b u t t o n   s t a t e   f o r   m o d a l   f o r m s   * / 
 
                 . b t n - d i s a b l e d - g r e y   { 
 
                         b a c k g r o u n d :   # 9 4 a 3 b 8   ! i m p o r t a n t ; 
 
                         b a c k g r o u n d - i m a g e :   n o n e   ! i m p o r t a n t ; 
 
                         c o l o r :   # f 1 f 5 f 9   ! i m p o r t a n t ; 
 
                         c u r s o r :   n o t - a l l o w e d   ! i m p o r t a n t ; 
 
                         b o x - s h a d o w :   n o n e   ! i m p o r t a n t ; 
 
                         t r a n s f o r m :   n o n e   ! i m p o r t a n t ; 
 
                         p o i n t e r - e v e n t s :   n o n e   ! i m p o r t a n t ; 
 
                 } 
 
 
