/* Add elegant shadow to all form inputs globally */
.form-control, .form-select {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    transition: box-shadow 0.3s ease-in-out;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25) !important;
}

/* Elegant shadow for all buttons */
.btn {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.btn:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px);
}

.btn:active {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(0);
}

/* Bootstrap Dark Mode Overrides */
[data-bs-theme="dark"] {
    --bs-body-bg: #1a2234;
    --bs-body-color: #e2e8f0;
}

[data-bs-theme="dark"] .table-light {
    --bs-table-color: #e2e8f0 !important;
    --bs-table-bg: #2d3748 !important;
    --bs-table-border-color: #444 !important;
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

/* Ensure table header cells also get the dark background */
[data-bs-theme="dark"] .table-light th,
[data-bs-theme="dark"] .table-light td {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .text-dark {
    /* In dark mode, text-dark should be a high-contrast light color for general use,
       but we must ensure it doesn't blend with light backgrounds.
       However, if we fix backgrounds to be dark, this is fine. */
    color: #ffffff !important;
}

[data-bs-theme="dark"] .card-subtitle, 
[data-bs-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .card {
    background-color: #242b3d;
    border: 1px solid #334155;
}

[data-bs-theme="dark"] .table > :not(caption) > * > * {
    color: #e2e8f0;
    border-color: #334155;
}

/* Fix light utility backgrounds in dark mode */
[data-bs-theme="dark"] .bg-light-primary { background-color: rgba(93, 135, 255, 0.15) !important; color: #5d87ff !important; }
[data-bs-theme="dark"] .bg-light-secondary { background-color: rgba(113, 127, 147, 0.15) !important; color: #717f93 !important; }
[data-bs-theme="dark"] .bg-light-success { background-color: rgba(23, 187, 85, 0.15) !important; color: #17bb55 !important; }
[data-bs-theme="dark"] .bg-light-danger { background-color: rgba(250, 137, 107, 0.15) !important; color: #fa896b !important; }
[data-bs-theme="dark"] .bg-light-warning { background-color: rgba(255, 174, 31, 0.15) !important; color: #ffae1f !important; }
[data-bs-theme="dark"] .bg-light-info { background-color: rgba(83, 187, 240, 0.15) !important; color: #53bbf0 !important; }
[data-bs-theme="dark"] .bg-light-subtle { background-color: rgba(255, 255, 255, 0.05) !important; }

/* Dashboard specific fixes */
[data-bs-theme="dark"] .table-responsive {
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-light {
    background-color: #242b3d !important;
}

[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-top {
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: transparent !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

