/* Dashboard Header with Controls */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.dashboard-controls {
    display: flex;
    gap: 10px;
}

/* Customisation Panel */
.customisation-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
}

[data-theme="dark"] .customisation-panel {
    background-color: var(--form-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    color: var(--text-color);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

[data-theme="dark"] .panel-header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--form-border);
}

.panel-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #2c3e50;
}

[data-theme="dark"] .panel-header h3 {
    color: var(--text-color);
}

.panel-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.panel-content p {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
}

[data-theme="dark"] .panel-content p {
    color: var(--text-color);
}

/* Widget Toggles */
.widget-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.toggle-item {
    display: flex;
    align-items: center;
}

.toggle-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 1rem;
    color: #333;
}

[data-theme="dark"] .toggle-item label {
    color: var(--text-color);
}

.toggle-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    display: inline-block;
}

.panel-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

[data-theme="dark"] .panel-actions {
    border-top: 1px solid var(--form-border);
}

/* Widget Styling */
.dashboard-widget {
    position: relative;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-widget:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .dashboard-widget:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Fixed Widget Styling */
.fixed-widget {
    position: relative;
    z-index: 1;
    /* Ensure it's above other widgets */
    pointer-events: auto;
    /* Enable pointer events for the widget itself */
}

/* Disable drag handle for fixed widgets */
.fixed-widget .btn-drag {
    display: none;
}

/* Ensure the summary widget is properly styled */
#widget-summary {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

/* Prevent widgets from being moved above header during drag */
.dashboard-header {
    position: relative;
    top: 0;
    background-color: #fff;
    z-index: 1001;
    /* Higher than dragged widgets */
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
    pointer-events: none;
    /* Make the header not interact with drag events */
}

.dashboard-header h1,
.dashboard-header .dashboard-controls,
.dashboard-header button {
    pointer-events: auto;
    /* Re-enable pointer events for interactive elements */
}

[data-theme="dark"] .dashboard-header {
    background-color: var(--body-bg);
    border-bottom: 1px solid var(--form-border);
}

/* Add a barrier after the header to prevent widgets from being moved above it */
.dashboard-header::after {
    content: '';
    display: block;
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
    z-index: 1000;
}


.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

[data-theme="dark"] .widget-header {
    border-bottom: 1px solid var(--form-border);
}

.widget-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #4e73df;
}

[data-theme="dark"] .widget-header h2 {
    color: var(--link-color);
}

.widget-actions {
    display: flex;
    gap: 5px;
}

.btn-drag {
    background: none;
    border: none;
    color: #6c757d;
    cursor: grab;
    padding: 5px;
    font-size: 1rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.btn-drag:hover {
    opacity: 1;
}

[data-theme="dark"] .btn-drag {
    color: var(--text-color);
}

.dashboard-widget.sortable-ghost {
    opacity: 0.5;
    background-color: #f8f9fa;
    border: 2px dashed #4e73df;
    position: relative;
    z-index: 1000;
    cursor: grabbing;
}

[data-theme="dark"] .dashboard-widget.sortable-ghost {
    background-color: var(--form-bg);
    border: 2px dashed var(--link-color);
}

.dashboard-widget.sortable-chosen {
    background-color: #f8f9fa;
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    cursor: grabbing;
}

[data-theme="dark"] .dashboard-widget.sortable-chosen {
    background-color: var(--form-bg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.dashboard-widget.sortable-drag {
    opacity: 0.8;
    background-color: #f8f9fa;
    border: 2px solid #4e73df;
    z-index: 1002;
    cursor: grabbing;
}

[data-theme="dark"] .dashboard-widget.sortable-drag {
    background-color: var(--form-bg);
    border: 2px solid var(--link-color);
}

/* Dashboard Layout Containers */
.dashboard-container {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Summary Cards Container */
#widget-summary {
    /* display: grid; */
    /* grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); */
    /* gap: 15px; */
    /* margin-bottom: 20px; */
    /* width: 100%; */
}

/* Charts and Activity Containers */
.dashboard-charts-container,
.dashboard-activity-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    min-height: 50px;
    /* Ensure containers have a minimum height for dragging */
    padding: 10px 0;
    /* Add some padding to make dragging easier */
}

/* Ensure each widget takes up the full width of its grid cell */
.dashboard-charts-container>.dashboard-widget,
.dashboard-activity-container>.dashboard-widget {
    width: 100%;
    margin: 0;
}

/* Ensure proper order of elements */
.dashboard-header {
    order: 1;
}

#widget-summary {
    order: 2;
}

.dashboard-charts-container {
    order: 3;
}

.dashboard-activity-container {
    order: 4;
    grid-template-columns: repeat(4, 1fr);
}

/* Notification Styling */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.success {
    background-color: #27ae60;
}

.notification.error {
    background-color: #e74c3c;
}

.notification.info {
    background-color: #3498db;
}

/* Tickets List Styling */
.tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tickets-header .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Filter Styling - Improved for Dark Mode */
.filter-container {
    background-color: var(--filter-container-bg);
    border: 1px solid var(--filter-container-border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.filter-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

/* Dark mode styles for filter header */
[data-theme="dark"] .filter-header h3 {
    color: var(--text-color);
    font-weight: 600;
}

#toggle-filters {
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#toggle-filters:hover {
    background-color: #5a6268;
}

#filter-icon {
    transition: transform 0.3s ease;
    display: inline-block;
    width: 14px;
    text-align: center;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

.filter-group {
    flex: 1 1 200px;
    margin-bottom: 10px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

/* Dark mode styles for filter group labels */
[data-theme="dark"] .filter-group label {
    color: var(--text-color);
    font-weight: 600;
}

.filter-group select,
.filter-group input[type="date"],
.filter-group input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: var(--input-bg);
    color: var(--input-text);
    border-color: var(--input-border);
}

/* Dark mode styles for checkbox items */
[data-theme="dark"] .checkbox-item label {
    color: var(--text-color);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
}

/* Form Styling */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
    margin-bottom: 15px;
}

.form-row>.form-group {
    padding-right: 15px;
    padding-left: 15px;
    margin-bottom: 15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* Error List */
.error-list {
    margin-top: 10px;
    padding-left: 20px;
}

/* Notes */
.notes-container {
    margin: 15px 0;
}

.note {
    font-size: 0.9em;
    color: #666;
    padding: 5px 0;
    border-left: 3px solid #007bff;
    padding-left: 10px;
    background-color: #f8f9fa;
    margin: 10px 0;
}


[data-theme="dark"] .note.important,
.note.important {
    border-left: 3px solid #ff8600;
}

.note strong {
    font-weight: 600;
}

[data-theme="dark"] .note {
    color: #ccc;
    background-color: #2d3748;
    border-left-color: #4299e1;
}

/* Button Styles */
.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
    min-width: 100px;
}

[data-theme="dark"] .btn-outline-primary {
    color: #4299e1;
    border-color: #4299e1;
}

[data-theme="dark"] .btn-outline-primary:hover {
    color: #1a202c;
    background-color: #4299e1;
    border-color: #4299e1;
}

/* CSV Example Styling */
.csv-example-container {
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.csv-example-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.csv-example-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.csv-example {
    margin: 0;
    padding: 15px;
    background-color: #fff;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 0.9rem;
    line-height: 1.5;
}

[data-theme="dark"] .csv-example-container {
    border-color: #4a5568;
}

[data-theme="dark"] .csv-example-header {
    background-color: #2d3748;
    border-bottom-color: #4a5568;
}

[data-theme="dark"] .csv-example {
    background-color: #1a202c;
    color: #e2e8f0;
}

/* Setup Page Styling */
.container h1 {
    margin-bottom: 1.5rem;
    color: #333;
}

.container .card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.container .card-body {
    padding: 2rem;
}

.container .card-body p {
    margin-bottom: 10px;
}

.container .card-body ul li {
    margin: 5px 15px 5px
}

.container .form-group {
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .container h1 {
    color: #e2e8f0;
}

[data-theme="dark"] .container .card {
    background-color: #2d3748;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}


/* Select Element Styling */
select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--input-border, #ccc);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--input-text, #333);
    background-color: var(--input-bg, #ffffff);
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="dark"] select {
    background-color: var(--input-bg, #2d2d2d);
    color: var(--input-text, #e0e0e0);
    border-color: var(--input-border, #444444);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23e0e0e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.dataTables_wrapper .dataTables_length select {
    margin: 10px 0;
}

select:focus {
    border-color: var(--input-focus, #2980b9);
    outline: none;
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.1);
}

select:hover {
    border-color: var(--input-focus, #2980b9);
}

select option {
    padding: 10px;
    background-color: var(--input-bg, #ffffff);
    color: var(--input-text, #333);
}

[data-theme="dark"] select option {
    background-color: var(--input-bg, #2d2d2d);
    color: var(--input-text, #e0e0e0);
}

/* Disabled select styling */
select:disabled {
    background-color: var(--table-row-even, #f8f9fa);
    cursor: not-allowed;
    opacity: 0.7;
}

[data-theme="dark"] select:disabled {
    background-color: var(--table-row-even, #1e1e1e);
}


/* Notifications */
.notifications-icon {
    position: relative;
    /* margin-right: 15px; */
}

.notifications-icon>a {
    color: #333;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #d7d7d7;
    transition: background-color 0.3s;
}

.notifications-icon>a:hover {
    background-color: #e0e0e0;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notifications-dropdown {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    width: 300px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.notifications-header {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.notifications-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.notifications-content {
    max-height: 300px;
    overflow-y: auto;
}

.notifications-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-item {
    border-bottom: 1px solid #eee;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item a {
    display: flex;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s;
    align-items: center;
    justify-content: space-between;
}

.notification-item a:hover {
    background-color: #f9f9f9;
}

.notification-sender {
    margin-bottom: 3px;
    font-size: 0.9rem;
}

.notification-subject {
    font-size: 0.9rem;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-date {
    font-size: 0.8rem;
    color: #777;
}

.notifications-footer {
    padding: 10px 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

.notifications-footer a {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
}

.notifications-footer a:hover {
    text-decoration: underline;
}

.loading,
.no-notifications,
.error {
    padding: 15px;
    text-align: center;
    color: #777;
}

.error {
    color: #ff4444;
}

/* Password Reset */
.password-reset-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.reset-link-container {
    display: flex;
    margin: 10px 0;
}

.reset-link-container input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

.reset-link-container button {
    border-radius: 0 4px 4px 0;
}

/* Message Styles */
.message-container {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.message-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
}

.message-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.message-field {
    margin-bottom: 5px;
}

.field-label {
    font-weight: bold;
    margin-right: 5px;
}

.message-body {
    padding: 20px;
    line-height: 1.6;
}

.message-actions {
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
}

.password-reset-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-badge.read {
    background-color: #e0e0e0;
    color: #555;
}

.status-badge.unread {
    background-color: #007bff;
    color: white;
}

/* Table Styles for Messages */
tr.unread {
    font-weight: bold;
    background-color: #f0f7ff !important;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .notifications-icon a {
    background-color: #575757;
    color: #fff;
}

[data-theme="dark"] .notifications-icon a:hover {
    background-color: #444;
}

[data-theme="dark"] .notifications-dropdown {
    background-color: #222;
    border-color: #444;
}

[data-theme="dark"] .notifications-header,
[data-theme="dark"] .notifications-footer {
    border-color: #333;
}

[data-theme="dark"] .notifications-header h3 {
    color: #fff;
}

[data-theme="dark"] .notification-item {
    border-color: #333;
}

[data-theme="dark"] .notification-item a {
    color: #eee;
}

[data-theme="dark"] .notification-item a:hover {
    background-color: #333;
}

[data-theme="dark"] .notification-date {
    color: #aaa;
}

[data-theme="dark"] .message-container {
    background-color: #222;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .message-header,
[data-theme="dark"] .message-actions {
    background-color: #333;
    border-color: #444;
}

[data-theme="dark"] .field-label {
    color: #ddd;
}

[data-theme="dark"] .status-badge.read {
    background-color: #444;
    color: #ddd;
}

[data-theme="dark"] .password-reset-actions {
    border-color: #444;
}

[data-theme="dark"] tr.unread {
    background-color: #2a3b4d !important;
}

/* Accessibility Helper */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    background-color: var(--nav-hover);
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--header-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 15px;
    z-index: 100;
    min-width: 50px;
    min-height: 50px;
    position: relative;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
    background-color: var(--btn-primary-bg);
    color: #fff;
    border-color: var(--btn-primary-hover);
    outline: none;
}

.mobile-menu-toggle i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 1000;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
    display: block;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--form-border);
}

.mobile-menu-header h2 {
    margin: 0;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-menu-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-menu-nav a:hover {
    background-color: var(--nav-hover);
    text-decoration: none;
}

.mobile-menu-user {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--form-border);
}

.mobile-menu-user a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 10px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    margin-bottom: 10px;
}

.mobile-menu-user a:hover {
    background-color: var(--nav-hover);
    text-decoration: none;
}

.mobile-menu-user .dark-mode-toggle {
    display: flex;
}

.mobile-menu-user .dark-mode-toggle label {
    margin-left: 10px;
    cursor: pointer;
    flex-grow: 1;
    font-weight: bold;
}

.mobile-menu-user .user-greeting {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 5px 15px;
    color: var(--text-color);
}

body.menu-open {
    overflow: hidden;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 10% auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 5px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.modal-body {
    padding: 15px;
}

.modal-footer {
    padding: 15px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

/* Dark Mode Modal Styles */
[data-theme="dark"] .modal-content {
    background-color: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: #4a5568;
}

[data-theme="dark"] .modal-header h2 {
    color: #e2e8f0;
}

[data-theme="dark"] .close {
    color: #cbd5e0;
}

[data-theme="dark"] .close:hover,
[data-theme="dark"] .close:focus {
    color: #fff;
}


/* Responsive Adjustments */
@media (max-width: 1200px) {

    .dashboard-charts-container,
    .dashboard-activity-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .dashboard-charts-container,
    .dashboard-activity-container {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .dashboard-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .customisation-panel {
        width: 95%;
        max-height: 90vh;
    }

    .mobile-menu-toggle {
        display: block;
    }

    nav {
        display: none;
    }

    .navigation .user-menu {
        display: none;
    }

    .navigation {
        justify-content: space-between;
    }

    .navigation h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }

    .table-container {
        max-width: 100%;
        overflow: auto;
    }
}