:root {
    --primary-color: #186573;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    color-scheme: light only;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--gray-900);
    background-color: var(--gray-50);
    margin-bottom: 45px;
}

.login-body {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    margin-bottom: 0;
}

.login-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}

.login-header {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-header .logo-icon img {
    height: 45px;
}

.login-header .logo {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.login-header .subtitle {
    opacity: 0.9;
    font-size: 0.875rem;
}

.login-form {
    padding: 2rem;
}

.login-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-btn:hover {
    background: var(--primary-dark);
}

.login-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.login-footer {
    background: var(--gray-50);
    padding: 1rem 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.login-error {
    background: #fee2e2;
    border: 1px solid var(--error-color);
    color: #991b1b;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin: 0 2rem 1rem 2rem;
    font-size: 0.875rem;
}

#loginLoading {
    padding: 2rem;
    text-align: center;
}

.main-content, .nav-tabs {
    display: none;
}

.auth-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
    background: var(--gray-50);
}

.header {
    background: #186573;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.imglogo {
    height: 45px;
    margin-right: 10px;
    margin-bottom: 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gray-50);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: 500;
    color: var(--gray-50);
}

.logout-btn {
    padding: 0.5rem 1rem;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background: #dc2626;
}

.nav-tabs {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    min-width: max-content;
}

.nav-tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-tab:hover {
    color: var(--gray-900);
}

.nav-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - 200px);
}

.content-section {
    display: none;
    min-height: 60vh;
}

.content-section.active {
    display: block;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-input, .form-select, .form-textarea {
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 101, 115, 0.1);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    margin-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    margin: 0 0.125rem;
}

.card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    min-height: calc(100vh - 280px);
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.table-container {
    overflow-x: auto;
    overflow-y: auto;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
    max-height: calc(100vh - 350px);
    position: relative;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--gray-50);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-table thead th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    position: sticky;
    top: 0;
    z-index: 11;
    border-bottom: 2px solid var(--gray-300);
}

.data-table tr:hover {
    background: var(--gray-50);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.table-row-current {
    background-color: rgba(249, 250, 251, 0.8);
    border-left: 4px solid var(--warning-color);
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-active, .status-available { 
    background-color: #d1fae5;
    color: #065f46;
}

.status-inactive, .status-außer-betrieb { 
    background-color: #fee2e2;
    color: #991b1b;
}

.status-warning, .status-werkstatt { 
    background-color: #fef3c7;
    color: #92400e;
}

.ability-badge {
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 500;
    margin: 0.1rem;
    display: inline-block;
}

.ability-hl { background-color: #dbeafe; color: #1e40af; }
.ability-sl { background-color: #dcfce7; color: #166534; }
.ability-kran { background-color: #fef3c7; color: #92400e; }
.ability-kma { background-color: #fce7f3; color: #be185d; }
.ability-3\,5to { background-color: #e0e7ff; color: #4338ca; }
.ability-12to { background-color: #fed7d7; color: #c53030; }

.reason-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.reason-urlaub { background-color: #d1fae5; color: #065f46; }
.reason-krankheit { background-color: #fee2e2; color: #991b1b; }
.reason-fortbildung { background-color: #dbeafe; color: #1e40af; }
.reason-sonstiges { background-color: #f3f4f6; color: #374151; }

.role-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.role-administrator { background-color: #ddd6fe; color: #5b21b6; }
.role-manager { background-color: #bfdbfe; color: #1d4ed8; }
.role-disponent { background-color: #d1fae5; color: #065f46; }
.role-verkehrsleiter { background-color: #dddfff; color: #542854; }
.role-personal { background-color: #f3f4f6; color: #374151; }

.type-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.type-driver { background-color: #bfdbfe; color: #1d4ed8; }
.type-loader { background-color: #fed7d7; color: #c53030; }

.fraction-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.fraction-lvp { background-color: #fef3c7; color: #92400e; }
.fraction-hm { background-color: #f3f4f6; color: #374151; }
.fraction-bio { background-color: #d1fae5; color: #065f46; }
.fraction-ppk { background-color: #dbeafe; color: #1e40af; }
.fraction-sperrmüll { background-color: #e0e7ff; color: #4338ca; }
.fraction-e-schrott { background-color: #fce7f3; color: #be185d; }
.fraction-glas { background-color: #ecfdf5; color: #047857; }
.fraction-empty { background-color: #f3f4f6; color: #6b7280; border: 1px dashed #d1d5db; }

.badge-info { background-color: #dbeafe; color: #1e40af; }

.planning-grid-container { margin-top: 1rem; }

.planning-title {
    margin: 0 0 1rem 0;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
}

.planning-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    padding: 0.5rem;
}

.tour-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tour-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(24, 101, 115, 0.15);
    transform: translateY(-1px);
}

.tour-card.assigned {
    background-color: #f0f9ff;
    border-color: var(--success-color);
}

.tour-card.unassigned {
    background-color: #fefefe;
    border-color: var(--gray-300);
    border-style: dashed;
}

.tour-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.tour-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-900);
    line-height: 1.2;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tour-time {
    font-size: 0.75rem;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    font-weight: 500;
}

.tour-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.assignment-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
}

.assignment-row .icon {
    width: 16px;
    font-size: 0.75rem;
    text-align: center;
    flex-shrink: 0;
}

.assignment-row .value {
    color: var(--gray-700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.tour-card.unassigned .assignment-row .value {
    color: var(--gray-500);
    font-style: italic;
}

.tour-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-100);
}

.route-number {
    font-size: 0.75rem;
    color: var(--gray-600);
    font-weight: 500;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.complete { background-color: var(--success-color); }
.status-indicator.incomplete { background-color: var(--gray-300); }

.tour-card-fraction-lvp .tour-name { background-color: #fef3c7 !important; color: #92400e !important; padding: 0.25rem 0.5rem; border-radius: 0.25rem; font-weight: 600; }
.tour-card-fraction-hm .tour-name { background-color: #f3f4f6 !important; color: #374151 !important; padding: 0.25rem 0.5rem; border-radius: 0.25rem; font-weight: 600; }
.tour-card-fraction-bio .tour-name { background-color: #d1fae5 !important; color: #065f46 !important; padding: 0.25rem 0.5rem; border-radius: 0.25rem; font-weight: 600; }
.tour-card-fraction-ppk .tour-name { background-color: #dbeafe !important; color: #1e40af !important; padding: 0.25rem 0.5rem; border-radius: 0.25rem; font-weight: 600; }
.tour-card-fraction-glas .tour-name { background-color: #fed7d7 !important; color: #c53030 !important; padding: 0.25rem 0.5rem; border-radius: 0.25rem; font-weight: 600; }
.tour-card-fraction-sperrmüll .tour-name { background-color: #e0e7ff !important; color: #4338ca !important; padding: 0.25rem 0.5rem; border-radius: 0.25rem; font-weight: 600; }
.tour-card-fraction-e-schrott .tour-name { background-color: #fce7f3 !important; color: #be185d !important; padding: 0.25rem 0.5rem; border-radius: 0.25rem; font-weight: 600; }
.tour-card-fraction-other .tour-name { background-color: #fed7af !important; color: #c2410c !important; padding: 0.25rem 0.5rem; border-radius: 0.25rem; font-weight: 600; }

.export-button-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 280px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.export-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--gray-100);
}

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

.export-dropdown-item:hover {
    background-color: var(--gray-50);
}

.export-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.export-title {
    font-weight: 500;
    font-size: 14px;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.export-subtitle {
    font-size: 12px;
    color: var(--gray-600);
}

.dropdown-divider {
    margin: 8px 0;
    border: none;
    border-top: 1px solid var(--gray-200);
}

.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 1rem;
    width: 100%;
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--gray-600);
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

#alertContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    border: 1px solid;
    min-width: 300px;
}

.alert-success { background: #d1fae5; border-color: #10b981; color: #065f46; }
.alert-error { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
.alert-info { background: #dbeafe; border-color: #3b82f6; color: #1e40af; }
.alert-warning { background: #fef3c7; border-color: #f59e0b; color: #92400e; }

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 0.5rem;
}

.admin-tab-btn {
    padding: 0.75rem 1.5rem;
    background: var(--gray-100);
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.2s;
}

.admin-tab-btn:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.admin-tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.system-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.system-action-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
}

.system-action-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(24, 101, 115, 0.1);
}

.system-action-card h4 {
    margin: 0 0 0.75rem 0;
    color: var(--gray-900);
    font-size: 1.125rem;
}

.system-action-card p {
    margin: 0 0 1rem 0;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.backup-management, .system-info {
    margin-top: 2rem;
    border-top: 2px solid var(--gray-200);
    padding-top: 2rem;
}

.backup-controls, .system-info-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -1px 3px 0 rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: height 0.3s ease-in-out;
    overflow: hidden;
    height: 45px;
}

.footer.expanded {
    height: auto;
    max-height: 300px;
}

.footer-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-200);
}

.footer-toggle:hover {
    background: var(--gray-50);
}

.footer-toggle-icon {
    font-size: 1.2rem;
    color: var(--gray-600);
    transition: transform 0.3s ease-in-out;
}

.footer.expanded .footer-toggle-icon {
    transform: rotate(180deg);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.footer.expanded .footer-content {
    opacity: 1;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-logo img {
    height: 135px; 
}

.text-danger {
    color: var(--error-color) !important;
}

.resource-available {
    color: var(--gray-900);
    background-color: transparent;
}

.resource-busy {
    color: var(--warning-color);
    background-color: rgba(245, 158, 11, 0.1);
    font-style: italic;
}

.resource-absent {
    color: var(--error-color);
    background-color: rgba(239, 68, 68, 0.1);
    text-decoration: line-through;
    opacity: 0.7;
}

select option.resource-busy {
    background-color: #fef3c7;
    color: #92400e;
    font-style: italic;
}

select option.resource-absent {
    background-color: #fee2e2;
    color: #991b1b;
    text-decoration: line-through;
}

.loader-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    padding: 1rem;
    border-radius: 0.375rem;
    background: var(--gray-50);
}

.loader-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.loader-checkbox-label:hover {
    background-color: white;
}

.loader-checkbox-label.resource-busy {
    background-color: #fef3c7;
    color: #92400e;
}

.loader-checkbox-label.resource-absent {
    background-color: #fee2e2;
    color: #991b1b;
    opacity: 0.8;
}

.loader-checkbox-label input[type="checkbox"] {
    accent-color: var(--primary-color);
}

.resource-legend {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color.resource-available {
    background-color: white;
    border: 1px solid var(--gray-400);
}
.legend-color.resource-busy {
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
}
.legend-color.resource-absent {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
}

.conflict-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 0.5rem;
}

.conflict-header-icon {
    font-size: 2rem;
}

.conflict-header-text h3 {
    margin: 0 0 0.5rem 0;
    color: var(--warning-color);
}

.conflict-list { margin-bottom: 1.5rem; }

.conflict-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
    border-left: 4px solid var(--warning-color);
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.conflict-icon { font-size: 1.5rem; }
.conflict-name { font-weight: 600; }
.conflict-message { font-size: 0.875rem; color: var(--gray-600); }

.conflict-type-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.conflict-type-vehicle { background: #dbeafe; color: #1e40af; }
.conflict-type-driver { background: #d1fae5; color: #065f46; }
.conflict-type-loader { background: #fce7f3; color: #be185d; }

.conflict-actions {
    border-top: 1px solid var(--gray-200);
    padding-top: 1.5rem;
}

.conflict-question { text-align: center; margin-bottom: 1.5rem; }

.conflict-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.loader-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--gray-100);
    border-radius: 0.375rem;
    cursor: pointer;
}

.checkbox-option input[type="checkbox"]:checked + span {
    color: var(--primary-color);
}

.resource-driver-as-loader {
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
}

.legend-color.resource-driver-as-loader {
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
}

.conflict-type-driver-as-loader {
    background: #e0f2fe;
    color: #0c4a6e;
}

.conflict-type-dual-assignment {
    background: #fce7f3;
    color: #9d174d;
}

@media (max-width: 1200px) {
    .planning-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .header-content, .card-header, .form-actions, .search-container {
        flex-direction: column;
        align-items: stretch;
    }
    .nav-tab { padding: 1rem; font-size: 0.8rem; }
    .form-grid { grid-template-columns: 1fr; }
    .planning-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .planning-grid { grid-template-columns: 1fr; }
    .footer { display: none; }
}

@media print {
    .nav-tabs, .btn, .form-actions, .modal, .footer {
        display: none !important;
    }
}