/* Custom styles for sidebar and components */
html, body {
    overflow-x: hidden;
}

/* Sidebar styles - ensure proper positioning */
.sidebar {
    width: 250px;
    height: 100vh;
    background-color: #ffffff;
    transition: width 0.3s ease;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 40;
    overflow-y: auto;
    border-right: 1px solid #e5e7eb;
}

.dark .sidebar {
    background-color: #15132B;
    border-right: 1px solid #2a2541;
}

.sidebar.collapsed {
    width: 90px;
}

.sidebar .logo-container {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-container {
    padding: 0 1rem 1rem 1rem;
    display: flex;
    justify-content: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar.collapsed .sidebar-toggle img {
    transform: rotate(180deg);
}

.sidebar-toggle:hover {
    background-color: #f3f4f6;
}

.sidebar-toggle img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.sidebar-toggle:hover img {
    opacity: 1;
}

.dark .sidebar-toggle:hover {
    background-color: #2a2541;
}

.dark .sidebar-toggle img {
    filter: brightness(0) invert(1);
}

.sidebar .logo-full {
    display: block;
    max-width: 100%;
    height: 40px;
}

.sidebar .logo-small {
    display: none;
    height: 36px;
}

.sidebar.collapsed .logo-full {
    display: none;
}

.sidebar.collapsed .logo-small {
    display: block;
}

.sidebar-nav {
    margin-top: 0.4rem;
    padding: 0 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 0.5rem;
    margin: 0.125rem 0;
    transition: all 0.2s;
    gap: 0.75rem;
    width: 100%;
}

    .sidebar-link:hover {
        background-color: #f3f4f6;
        color: #374151;
    }

    .sidebar-link.active {
        background-color: var(--primary-color, #1D0C67);
        color: white;
    }

.dark .sidebar-link {
    color: #a1a1aa;
}

    .dark .sidebar-link:hover {
        background-color: #2a2541;
        color: #f4f4f5;
    }

/* Dropdown styles */
.sidebar-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    justify-content: flex-start;
    gap: 0.75rem;
}

    .sidebar-dropdown .dropdown-toggle img {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
        opacity: 0.7;
        transition: opacity 0.2s;
        object-fit: contain;
    }

    .sidebar-dropdown .dropdown-toggle:hover {
        background-color: #f3f4f6;
        color: #374151;
    }

        .sidebar-dropdown .dropdown-toggle:hover img,
        .sidebar-dropdown .dropdown-toggle.open img {
            opacity: 1;
        }

    .sidebar-dropdown .dropdown-toggle.open {
        background-color: #f3f4f6;
        color: #374151;
    }

.sidebar-submenu {
    background-color: #f9fafb;
    margin-left: 1rem;
    margin-right: 0.5rem;
    border-radius: 0.375rem;
    padding: 0.25rem 0;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 0.25rem;
    margin: 0.125rem 0.5rem;
    transition: all 0.2s;
    font-size: 0.875rem;
}

    .sidebar-sublink:hover {
        background-color: #e5e7eb;
        color: #374151;
    }

    .sidebar-sublink.active {
        background-color: var(--primary-color, #1D0C67);
        color: white;
    }

/* Dark mode dropdown styles */
.dark .sidebar-dropdown .dropdown-toggle {
    color: #a1a1aa;
}

    .dark .sidebar-dropdown .dropdown-toggle img {
        filter: brightness(0) invert(1);
    }

    .dark .sidebar-dropdown .dropdown-toggle:hover {
        background-color: #2a2541;
        color: #f4f4f5;
    }

    .dark .sidebar-dropdown .dropdown-toggle.open {
        background-color: #2a2541;
        color: #f4f4f5;
    }

.dark .sidebar-submenu {
    background-color: #1a1829;
}

.dark .sidebar-sublink {
    color: #a1a1aa;
}

    .dark .sidebar-sublink:hover {
        background-color: #2a2541;
        color: #f4f4f5;
    }

.sidebar-link img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
    object-fit: contain;
}

.sidebar-link:hover img,
.sidebar-link.active img {
    opacity: 1;
}

.dark .sidebar-link img {
    filter: brightness(0) invert(1);
}

.sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 0.75rem;
    margin: 0.125rem 0.5rem;
    min-height: 48px;
    min-width: 48px;
}

.sidebar.collapsed .nav-text {
    display: none;
    opacity: 0;
}

.sidebar.collapsed .sidebar-link img {
    margin-right: 0;
    width: 24px !important;
    height: 24px !important;
}

.sidebar.collapsed .sidebar-dropdown .dropdown-toggle {
    justify-content: center;
    padding: 0.5rem 0.25rem;
    margin: 0.125rem 0.5rem;
    min-height: 48px;
    min-width: 48px;
    gap: 0.25rem;
}

    .sidebar.collapsed .sidebar-dropdown .dropdown-toggle img {
        width: 24px !important;
        height: 24px !important;
    }

/* Main content wrapper */
.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s, width 0.3s;
    box-sizing: border-box;
}

    /* When sidebar is collapsed: width must also shrink */
    .main-content.sidebar-collapsed {
        margin-left: 90px;
        width: calc(100% - 90px);
    }


/* User dropdown */
.dropdown-container {
    position: relative;
}

.dropdown-menu {
    width: 350px;
    display: block;
    z-index: 50;
}
/* Styling for the Slider Thumb (Handle) */
.client-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease;
}

    .client-slider::-webkit-slider-thumb:hover {
        transform: scale(1.1);
    }

/* Firefox Support */
.client-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
/* Data Table Pagination and Page Size Selector */
.page-size-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.page-size-label {
    font-size: 0.875rem;
    color: #6b7280;
    white-space: nowrap;
}

.page-size-dropdown {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: white;
    font-size: 0.875rem;
    min-width: 60px;
    cursor: pointer;
}

    .page-size-dropdown:focus {
        outline: none;
        border-color: var(--primary-color, #1D0C67);
        box-shadow: 0 0 0 3px rgba(29, 12, 103, 0.1);
    }

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-icon.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #9ca3af;
}

    .btn-icon.disabled:hover {
        background-color: transparent;
    }

/* Dark mode support */
.dark .page-size-dropdown {
    background-color: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.dark .page-size-label {
    color: #9ca3af;
}

/* Standard Form Button Styles */
.primary-background-color{
    background-color: var(--primary-color, #1D0C67);
    color: white;
}
.primary-color {
    color: var(--primary-color, #1D0C67);
}
.border-primary{
    border-color: var(--primary-color, #1D0C67) !important;
}
.btn-primary-form {
    background-color: var(--primary-color, #1D0C67);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .btn-primary-form:hover:not(:disabled) {
        background-color: var(--primary-color-dark, #150A55);
        transform: translateY(-1px);
        box-shadow: 0 4px 6px rgba(29, 12, 103, 0.15);
    }

    .btn-primary-form:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.btn-secondary-form {
    background-color: white;
    color: #374151;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .btn-secondary-form:hover:not(:disabled) {
        background-color: #f9fafb;
        border-color: #9ca3af;
    }

.dark .btn-secondary-form {
    background-color: #374151;
    color: white;
    border-color: #4b5563;
}

    .dark .btn-secondary-form:hover:not(:disabled) {
        background-color: #4b5563;
        border-color: #6b7280;
    }

/* Action Buttons Section */
.action-buttons-section {
    padding: 1rem 0 0.5rem 0;
    margin-bottom: 1.2rem;
}

.action-buttons-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.action-buttons-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-buttons-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Table Header Spacing */
.table-header {
    padding-bottom: 15px;
}

.table-title {
    color: var(--Black, #202020);
    font-family: Inter;
    font-size: 26px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

.dark .table-title {
    color: #f3f4f6;
}

/* Toolbar Layout Improvements */

.primary-action-btn {
    background-color: var(--primary-color, #1D0C67);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

    .primary-action-btn:hover {
        background-color: var(--primary-color-dark, #150A55);
    }

    .primary-action-btn i {
        font-size: 0.875rem;
    }

/* Clean toolbar layout */
.table-toolbar {
    padding: 0.75rem 0;
    margin-bottom: 1rem;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Search container improvements */
.search-container {
    flex: 1;
    max-width: 400px;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

    .search-input:focus {
        outline: none;
        border-color: var(--primary-color, #1D0C67);
        box-shadow: 0 0 0 3px rgba(29, 12, 103, 0.1);
    }

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Dark mode search */
.dark .search-input {
    background-color: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

    .dark .search-input:focus {
        border-color: var(--primary-color, #1D0C67);
    }

/* Toolbar icons */
.toolbar-icons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.75rem;
}

    .toolbar-icons .btn-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 0.25rem;
        border: 1px solid #e5e7eb;
        background: white;
        transition: all 0.2s ease;
        cursor: pointer;
        padding: 0.25rem;
    }

        .toolbar-icons .btn-icon:hover {
            background: #f9fafb;
            border-color: #d1d5db;
        }

        .toolbar-icons .btn-icon img {
            width: 16px;
            height: 16px;
            opacity: 0.6;
            transition: opacity 0.2s ease;
        }

        .toolbar-icons .btn-icon:hover img {
            opacity: 0.8;
        }

/* Dark mode toolbar icons */
.dark .toolbar-icons .btn-icon {
    background-color: #374151;
    border-color: #4b5563;
}

    .dark .toolbar-icons .btn-icon:hover {
        background-color: #4b5563;
        border-color: #6b7280;
    }

/* Settings button styling */
.settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
}

    .settings-btn:hover {
        background-color: #f9fafb;
        border-color: #d1d5db;
    }

    .settings-btn img {
        width: 16px;
        height: 16px;
        opacity: 0.6;
        transition: opacity 0.2s ease;
    }

    .settings-btn:hover img {
        opacity: 0.8;
    }

.dark .settings-btn {
    background-color: #374151;
    border-color: #4b5563;
}

    .dark .settings-btn:hover {
        background-color: #4b5563;
        border-color: #6b7280;
    }

/* Filter button styling to match Figma */
.filter-btn {
    background-color: white;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

    .filter-btn:hover {
        background-color: #f9fafb;
        border-color: #9ca3af;
    }

    .filter-btn i {
        font-size: 0.875rem;
    }

/* Dark mode filter button */
.dark .filter-btn {
    background-color: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

    .dark .filter-btn:hover {
        background-color: #4b5563;
        border-color: #6b7280;
    }

/* Dark mode action buttons section */
.dark .action-buttons-section {
    border-bottom-color: #374151;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

        .sidebar.show {
            transform: translateX(0);
        }

    .main-content,
    .main-content.sidebar-collapsed {
        margin-left: 0;
    }
}
