:root {
    /* Light Mode (Standard) */
    --bg-body: #f4f6f9;
    --bg-card: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --primary: #e65100;
    --primary-hover: #ff7043;
    --nav-bg: rgba(33, 37, 41, 0.9);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --primary: #ff9800;
    --primary-hover: #ffb74d;
    --nav-bg: rgba(15, 23, 42, 0.85);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.6);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-body);
    color: var(--text-main);
    transition: background-color 0.3s, color 0.3s;
}

/* Navigation */
nav {
    background: var(--nav-bg);
    padding: 0 30px;
    height: 70px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 99999;
    /* Ensure navigation is always in the foreground */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav a,
.dropbtn {
    color: #cbd5e1;
    text-decoration: none;
    margin-right: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 8px 14px;
    border-radius: 6px;
    display: flex;
    align-items: center;
}

nav a:hover,
.dropdown:hover .dropbtn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.brand {
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 30px;
}

/* Dropdowns */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-card);
    min-width: 240px;
    z-index: 100000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 8px 0;
    top: 100%;
    border: 1px solid var(--border);
    animation: fadeInDown 0.3s ease forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 12px 20px;
    display: block;
    margin: 0;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 400;
    transition: background 0.2s, color 0.2s, padding-left 0.2s;
}

.dropdown-content a:hover {
    background-color: rgba(230, 81, 0, 0.08);
    color: var(--primary);
    transform: none;
    padding-left: 25px;
    /* Slight indent on hover */
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

/* Inputs & Tables in Dark Mode anpassen */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    background-color: var(--bg-body);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* Checkbox & Radio Alignment */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid var(--border);
}

td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

/* Buttons */
.btn {
    padding: 8px 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-small {
    padding: 4px 8px;
    font-size: 0.85rem;
}

/* Toggle Switch für Dark Mode */
.theme-switch {
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 15px;

    /* Print Utilities */
    @media print {
        .no-print {
            display: none !important;
        }
    }