﻿
    /* --- Dark Mode Styles --- */

    /* Primary theme color for dark mode */
    .bg-primary-dark { background-color: #0d6efd; } /* A slightly darker blue */
    .text-primary-dark { color: #0d6efd; }

    /* Secondary theme color for dark mode */
    .bg-secondary-dark { background-color: #6c757d; } /* A slightly darker gray */
    .text-secondary-dark { color: #6c757d; }

    /* Success theme color for dark mode */
    .bg-success-dark { background-color: #198754; } /* A slightly darker green */
    .text-success-dark { color: #198754; }

    /* Warning theme color for dark mode */
    .bg-warning-dark { background-color: #ffc107; } /* Yellow, might need adjustment for contrast */
    .text-warning-dark { color: #ffc107; }

    /* Danger theme color for dark mode */
    .bg-danger-dark { background-color: #dc3545; } /* A slightly darker red */
    .text-danger-dark { color: #dc3545; }


    /* General dark mode body and card styles */
    body.dark-mode {
        background-color: #121212; /* Very dark background */
        color: #e0e0e0; /* Light gray text */
    }

    body.dark-mode .card {
        background-color: #1e1e1e; /* Darker card background */
        border-color: #333; /* Darker border */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Darker shadow */
    }

    body.dark-mode .card-header {
        background-color: #2a2a2a; /* Slightly lighter header for distinction */
        border-color: #333;
        color: #fff; /* White text for header */
    }
    
    /* Dark mode for specific card headers (adjust colors as needed) */
    body.dark-mode .card-header.bg-primary { background-color: #0b5ed7 !important; }
    body.dark-mode .card-header.bg-secondary { background-color: #5c636a !important; }
    body.dark-mode .card-header.bg-success { background-color: #157347 !important; }
    body.dark-mode .card-header.bg-warning { background-color: #ad8500 !important; } /* Adjusted for better contrast */
    body.dark-mode .card-header.bg-danger { background-color: #b02a37 !important; }


    /* Form elements in dark mode */
    body.dark-mode .form-control,
    body.dark-mode .form-select {
        background-color: #2a2a2a; /* Dark background for inputs */
        border-color: #444; /* Darker border for inputs */
        color: #e0e0e0; /* Light text in inputs */
    }

    body.dark-mode .form-control::placeholder,
    body.dark-mode .form-select::placeholder {
        color: #aaa; /* Lighter placeholder text */
    }

    body.dark-mode .form-label {
        color: #ccc; /* Slightly dimmer labels */
    }

    /* Dark mode for buttons */
    body.dark-mode .btn-success { background-color: #198754; border-color: #198754; }
    body.dark-mode .btn-warning { background-color: #ffc107; border-color: #ffc107; color: #000; } /* Needs black text for contrast */
    body.dark-mode .btn-danger { background-color: #dc3545; border-color: #dc3545; }
    body.dark-mode .btn-primary { background-color: #0d6efd; border-color: #0d6efd; }
    body.dark-mode .btn-secondary { background-color: #6c757d; border-color: #6c757d; }

    body.dark-mode .btn:hover {
        opacity: 0.9; /* Slight fade on hover */
    }

    /* GridView specific dark mode styles */
    body.dark-mode .table {
        --bs-table-color-type: #e0e0e0;
        --bs-table-bg-type: #1e1e1e;
        --bs-table-border-color: #333;
        --bs-table-accent-bg: #2a2a2a; /* Striped rows */
        --bs-table-hover-bg: #333; /* Hover row */
    }
    body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
         --bs-table-accent-bg: #252525; /* Slightly darker for odd rows */
    }
    
    body.dark-mode .table-hover > tbody > tr:hover > * {
        --bs-table-hover-bg: #3a3a3a; /* Even darker hover */
    }

    body.dark-mode .pagination .page-link {
        background-color: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    body.dark-mode .pagination .page-link:hover {
        background-color: #333;
        border-color: #555;
    }
    body.dark-mode .pagination .page-item.active .page-link {
        background-color: #0d6efd;
        border-color: #0d6efd;
    }

    /* Styles for the theme switch */
    .form-check-input[type="checkbox"] {
      cursor: pointer;
    }

    /* Make the label next to the switch clickable too */
    .form-check-text {
      cursor: pointer;
      user-select: none; /* Prevent text selection on click */
    }

