:root {
    --primary-color: #6c63ff;
    --secondary-color: #4a42e8;
    --text-color: #e4e4e4;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --input-bg: #2a2a2a;
    --border-color: #333;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --success-color: #4caf50;
    --error-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 60px;
    --transition-speed: 0.3s;
}

body.light-mode {
    --primary-color: #6c63ff;
    --secondary-color: #4a42e8;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --input-bg: #f0f0f0;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Form styles */
.form-control,
input,
textarea,
select,
.form-select {
    color: #ffffff !important;
    background-color: var(--input-bg) !important;
    border-color: var(--border-color) !important;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus,
.form-select:focus {
    color: #ffffff !important;
    background-color: var(--input-bg) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(108, 99, 255, 0.25) !important;
}

/* Make form text white everywhere */
.form-text,
.card .form-text,
.modal .form-text,
.form-control,
form .form-text {
    color: #ffffff !important;
}

/* Fix for select option text color */
option {
    background-color: var(--input-bg);
    color: #ffffff;
}

/* Fix for placeholder text color */
::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Fix for form labels */
.form-label {
    color: #ffffff !important;
}

/* Table styles */
.table {
    color: var(--text-color) !important;
    background-color: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

.table > :not(caption) > * > * {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
    padding: 1rem;
}

.table thead th {
    background-color: rgba(13, 27, 55, 0.95) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(69, 98, 255, 0.1) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.2) !important;
}

.table-striped > tbody > tr:nth-of-type(odd):hover {
    background-color: rgba(69, 98, 255, 0.1) !important;
}

.table-bordered {
    border: 1px solid var(--border-color) !important;
}

.table-bordered td, 
.table-bordered th {
    border: 1px solid var(--border-color) !important;
}

/* Responsive tables */
.table-responsive {
    border-radius: var(--card-radius);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

/* Small tables */
.table-sm > :not(caption) > * > * {
    padding: 0.5rem;
}

/* Dark tables */
.table-dark {
    background-color: rgba(13, 27, 55, 0.95) !important;
    color: var(--text-color) !important;
}

/* Table sorting indicators */
.table .sort-indicator {
    display: inline-block;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.table .sort-asc .sort-indicator {
    transform: rotate(180deg);
}

/* Table actions */
.table .actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Table status badges */
.table .status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* User info styles */
.user-info {
    transition: all 0.3s ease;
    position: relative;
}

.user-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.user-info:hover::after {
    content: "Klicken zum Ändern";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

.user-info:hover .user-avatar {
    border-color: var(--primary-color);
}

input[type="file"] {
    padding: 0.75rem;
    border: 2px dashed #ccc;
    border-radius: 0.5rem;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

input[type="file"]:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

input[type="file"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.25);
}

/* Override default Bootstrap dark backgrounds (#212529) with a blue theme */
.bg-dark, 
.navbar-dark, 
.navbar-dark .navbar-brand,
.dropdown-menu-dark,
.text-bg-dark,
.list-group-item-dark,
.table-dark,
.table-dark > th,
.table-dark > td {
    background-color: #0c1b36 !important; /* Match the dark-bg variable from your theme */
}

/* Ensure any elements with inline style using #212529 are also updated */
[style*="#212529"], [style*="rgb(33, 37, 41)"] {
    background-color: #0c1b36 !important;
    border-color: #0c1b36 !important;
}

/* For any text that might be using this color */
.text-dark {
    color: #3b68c4 !important; /* Lighter blue for text */
}

/* Override gray Bootstrap borders (#6C757D) with lighter blue */
.border-secondary,
[class*="border-secondary"],
.btn-outline-secondary,
.text-secondary,
[style*="#6C757D"],
[style*="rgb(108, 117, 125)"] {
    border-color: #4562ff !important; /* Lighter blue border matching your theme */
    color: #6b83ff !important; /* For text using this color */
}

.bg-secondary,
.btn-secondary,
[class*="bg-secondary"] {
    background-color: #3048cc !important; /* Secondary blue from your theme */
    border-color: #4562ff !important;
}