/* ===== MODERN CSS RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f23;
    color: #e2e8f0;
    line-height: 1.6;
    min-height: 100vh;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== MODERN GRADIENT BACKGROUNDS ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    position: relative;
}

.container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(147, 51, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(16, 185, 129, 0.15) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* ===== MODERN HEADER ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 1.5rem 2rem;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 1rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(71, 85, 105, 0.3);
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #10b981);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

/* ===== USER MENU ===== */
nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 0.75rem;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.user-info {
    font-size: 0.875rem;
    color: #cbd5e1;
    font-weight: 500;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-logout:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.btn-logout:active {
    transform: translateY(0);
}

.btn-settings {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-settings:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #4f46e5, #4338ca);
}

/* ===== THEME SELECTOR ===== */
.theme-selector {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.theme-option {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.theme-option input[type="radio"] {
    display: none;
}

.theme-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid rgba(71, 85, 105, 0.3);
    border-radius: 0.75rem;
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-option input[type="radio"]:checked + .theme-preview {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.light-theme {
    border-color: #d1d5db !important;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0) !important;
    color: #374151 !important;
}

.theme-option input[type="radio"]:checked + .light-theme {
    border-color: #f59e0b !important;
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: white !important;
}

/* ===== LIGHT THEME STYLES ===== */
body.light-theme {
    background: #f8fafc;
    color: #374151;
}

.light-theme .container::before {
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(147, 51, 234, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
}

.light-theme header,
.light-theme .work-form,
.light-theme .admin-form,
.light-theme .modal-content {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(209, 213, 219, 0.5);
    color: #374151;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.light-theme .user-menu {
    background: rgba(243, 244, 246, 0.8);
    border-color: rgba(209, 213, 219, 0.5);
}

.light-theme .user-info {
    color: #6b7280;
}

.light-theme input,
.light-theme select,
.light-theme textarea {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(209, 213, 219, 0.7);
    color: #374151;
}

.light-theme input:focus,
.light-theme select:focus,
.light-theme textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===== FIELD HINTS ===== */
.field-hint {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
    font-style: italic;
}

.light-theme .field-hint {
    color: #6b7280;
}

/* ===== AUTO-FILLED FIELDS ===== */
input[readonly] {
    background: rgba(59, 130, 246, 0.1) !important;
    border: 2px solid rgba(59, 130, 246, 0.3) !important;
    cursor: not-allowed;
}

.light-theme input[readonly] {
    background: rgba(99, 102, 241, 0.08) !important;
    border: 2px solid rgba(99, 102, 241, 0.3) !important;
}

/* ===== DISABLED SECTIONS ===== */
.section.disabled {
    opacity: 0.4;
    pointer-events: none;
    filter: grayscale(50%);
    transition: all 0.3s ease;
}

.section.disabled h2 {
    color: #64748b;
}

.section.disabled input,
.section.disabled canvas,
.section.disabled button {
    cursor: not-allowed;
    opacity: 0.6;
}

.light-theme .section.disabled h2 {
    color: #9ca3af;
}

/* ===== MODERN CARDS ===== */
.work-form,
.admin-form {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
}

.work-form:hover,
.admin-form:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

/* ===== MODERN BUTTONS ===== */
.btn-primary,
.btn-secondary,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

.btn-secondary {
    background: rgba(71, 85, 105, 0.8);
    color: #e2e8f0;
    border: 1px solid rgba(71, 85, 105, 0.5);
}

.btn-secondary:hover {
    background: rgba(71, 85, 105, 1);
    border-color: rgba(148, 163, 184, 0.5);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* ===== TOUR CONTROL BUTTONS ===== */
.tour-controls {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn-tour {
    flex: 1;
    max-width: 280px;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-start {
    background: #22c55e;
    color: white;
    box-shadow: 0 8px 32px rgba(34, 197, 94, 0.3);
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 48px rgba(34, 197, 94, 0.4);
    background: #16a34a;
}

.btn-end {
    background: #ef4444;
    color: white;
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
}

.btn-end:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 48px rgba(239, 68, 68, 0.4);
    background: #dc2626;
}

/* Tour Button States */
.btn-tour:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 4px 16px rgba(71, 85, 105, 0.2) !important;
    background: rgba(71, 85, 105, 0.3) !important;
}

.btn-tour.active {
    position: relative;
    opacity: 0.8;
}

/* ===== MODERN INPUT FIELDS ===== */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #cbd5e1;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 0.75rem;
    color: #e2e8f0;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 16px rgba(59, 130, 246, 0.2);
    background: rgba(15, 23, 42, 0.9);
}

.input-group input::placeholder {
    color: #64748b;
}

/* ===== SUGGESTION DROPDOWN STYLES ===== */
.suggestions-portal {
    position: fixed;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 0.75rem;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    z-index: 999999;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    min-width: 250px;
}

.suggestion-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(71, 85, 105, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

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

.suggestion-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(4px);
}

.suggestion-item strong {
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.95rem;
}

.suggestion-item small {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 400;
}


/* Position relative für Input-Container */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    z-index: 1;
}

.input-group:focus-within {
    z-index: 100000;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.7);
    color: #f1f5f9;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(15, 23, 42, 0.9);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ===== STATUS STYLES ===== */
.status-active {
    color: #10b981;
    font-weight: 600;
}

.status-inactive {
    color: #ef4444;
    font-weight: 600;
}

/* ===== INACTIVE DRIVER CARDS ===== */
.driver-card.inactive {
    opacity: 0.6;
    border-left: 4px solid #ef4444;
}

.driver-card.inactive h3 {
    color: #94a3b8;
}

/* ===== SIGNATURE CANVAS ===== */
.signature-container {
    position: relative;
    margin: 1.5rem 0;
}

.signature-container canvas {
    border: 2px dashed rgba(71, 85, 105, 0.5);
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.5);
    transition: all 0.3s ease;
}

.signature-container canvas:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(15, 23, 42, 0.7);
}

.signature-clear {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.signature-clear:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.05);
}

/* ===== ADMIN SECTIONS ===== */
.admin-sections {
    display: grid;
    gap: 2rem;
}

.admin-section,
.section {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
}

.admin-section:hover,
.section:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

/* ===== TAB NAVIGATION ===== */
.tab-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 1rem;
    padding: 0.5rem;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tab-btn.active {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.tab-btn:hover:not(.active) {
    color: #cbd5e1;
    background: rgba(71, 85, 105, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== SEARCH SECTION ===== */
.search-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.per-page-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 0.75rem;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.per-page-selector label {
    font-weight: 600;
    color: #cbd5e1;
    margin: 0;
}

.per-page-selector select {
    padding: 0.5rem 1rem;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 0.5rem;
    color: #e2e8f0;
    font-size: 0.9rem;
    min-width: 80px;
}

/* ===== GRID LAYOUTS ===== */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.company-card,
.driver-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.company-card:hover,
.driver-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.company-card h3,
.driver-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.company-card p,
.driver-card p {
    margin: 0.5rem 0;
    color: #94a3b8;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.company-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
}

.btn-edit,
.btn-delete {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-edit {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    transform: translateY(-1px);
}

.btn-delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

/* ===== PAGINATION ===== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 1rem;
    border: 1px solid rgba(71, 85, 105, 0.3);
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(71, 85, 105, 0.5);
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5e1;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 44px;
    text-align: center;
}

.pagination-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.pagination-info {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0 1rem;
    text-align: center;
    font-weight: 500;
}

.pagination-dots {
    color: #64748b;
    padding: 0 0.5rem;
    font-weight: 600;
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 1.5rem;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 64px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: #e2e8f0;
    font-size: 1.5rem;
    font-weight: 700;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
}

/* ===== UTILITY CLASSES ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    font-size: 1.1rem;
    color: #64748b;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s linear infinite;
    margin-left: 1rem;
}

.error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.no-results {
    background: rgba(71, 85, 105, 0.1);
    color: #94a3b8;
    padding: 3rem;
    border-radius: 1rem;
    text-align: center;
    border: 2px dashed rgba(71, 85, 105, 0.3);
    font-size: 1.1rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    nav {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .user-menu {
        justify-content: center;
        width: 100%;
    }
    
    .user-info {
        display: none; /* Verstecke Username auf mobilen Geräten */
        padding: 1.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tour-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-tour {
        max-width: none;
    }
    
    .tab-nav {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .companies-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination-container {
        gap: 0.25rem;
        padding: 1rem;
    }
    
    .pagination-info {
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .per-page-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .company-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .work-form,
    .admin-form,
    .section {
        padding: 1.5rem;
        border-radius: 1rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .company-card,
    .driver-card {
        padding: 1rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* ===== LOGIN STYLES ===== */
.login-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-form {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 1.5rem;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 64px rgba(0, 0, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-form:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #94a3b8;
    font-size: 0.95rem;
    margin: 0;
}

.login-controls {
    margin-top: 2rem;
}

.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    border-radius: 0.75rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
    text-transform: none;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

.btn-login:active {
    transform: translateY(0);
}

.login-info {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
}

.login-info p {
    margin: 0;
    color: #64748b;
}

.header-subtitle {
    color: #94a3b8;
    font-size: 1rem;
    margin-top: 0.5rem;
    font-weight: 400;
}

/* ===== MESSAGE STYLES ===== */
.message {
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.75rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid;
    backdrop-filter: blur(10px);
    display: none;
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.message.info {
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.3);
}

/* ===== NOTIFICATIONS ===== */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    color: white;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.notification-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
}

.notification-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
}

.notification-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(29, 78, 216, 0.9));
}

@media (max-width: 768px) {
    .notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* ===== TOGGLE SWITCH (SCHIEBEREGLER) ===== */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-top: 0.5rem;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #374151, #4b5563);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.1);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(59, 130, 246, 0.3);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(59, 130, 246, 0.2);
}

.toggle-switch input:focus + .toggle-slider {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

.toggle-label {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-label .icon {
    font-size: 1.2rem;
}

.toggle-description {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-top: 0.5rem;
}

.toggle-container:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Admin Toggle spezieller Stil */
.admin-toggle .toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-color: rgba(220, 38, 38, 0.3);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(220, 38, 38, 0.3);
}

.admin-toggle .toggle-label {
    color: #fecaca;
}

.admin-toggle .toggle-switch input:checked + .toggle-slider:before {
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(220, 38, 38, 0.2);
}

/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.3));
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.status-inactive {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.2), rgba(75, 85, 99, 0.3));
    color: #9ca3af;
    border: 1px solid rgba(107, 114, 128, 0.4);
    text-shadow: 0 0 8px rgba(107, 114, 128, 0.3);
}

/* ===== AKTIVE TOUREN TAB STYLES (NEU) ===== */
.tours-container {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.tours-display {
    min-height: 300px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    border: 2px dashed rgba(71, 85, 105, 0.3);
}

.initial-state {
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
}

.tours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.stat-card {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.stat-card h3 {
    margin: 0 0 0.5rem 0;
    color: #60a5fa;
    font-size: 0.9rem;
}

.stat-card p {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: #e2e8f0;
}

.item-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.item-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.item-header h3 {
    margin: 0;
    color: #e2e8f0;
    font-size: 1.25rem;
    font-weight: 600;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.item-content {
    color: #cbd5e1;
}

.tour-card {
    border: 1px solid rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
}

.tour-card .item-header h3 {
    color: #60a5fa;
}

.tour-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-weight: 500;
    color: #94a3b8;
    min-width: 120px;
    flex-shrink: 0;
}

.detail-row .value {
    color: #e2e8f0;
    font-weight: 400;
    text-align: right;
}

.tour-duration {
    color: #10b981 !important;
    font-weight: 600;
}

.tour-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.tour-info p {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-info p:last-child {
    margin-bottom: 0;
}

.tour-info strong {
    color: #60a5fa;
    min-width: 120px;
}

.tour-info span {
    color: #e2e8f0;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #94a3b8;
}

.empty-state h3 {
    color: #10b981;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.empty-state p {
    font-size: 1rem;
    opacity: 0.8;
}
