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

:root {
    /* Farben */
    --primary-color: #06b2ed;
    --primary-hover: #0599c7;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --input-border: #e2e8f0;
    /* Layout / Hintergrund */
    --bg-gradient-start: #06b2ed;
    --bg-gradient-end: #0484b8;
    --sidebar-bg: rgba(255, 255, 255, 0.1);
    --sidebar-bg-collapsed: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-light: rgba(255, 255, 255, 0.6);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --sidebar-width: 280px;
    --sidebar-width-collapsed: 80px;
    --floating-bg: rgba(6, 178, 237, 0.25);
    --floating-border: rgba(6, 178, 237, 0.35);
    --floating-text: rgba(30, 41, 59, 0.95);
    /* AbstÃ¤nde (fÃ¼r neue/refaktorierte Komponenten nutzen) */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 0.875rem;
}

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

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

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

.btn-secondary:hover {
    background-color: #475569;
}

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

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    background: white;
    box-shadow: var(--shadow);
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.section {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table thead {
    background-color: #f8fafc;
}

.data-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid #e2e8f0;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Tag dynamische Farbe (nur Variable inline, Rest in CSS) */
.tag-mini.tag-dynamic,
.tag-badge-view.tag-dynamic {
    background-color: color-mix(in srgb, var(--tag-farbe) 12%, transparent);
    color: var(--tag-farbe);
    border-color: var(--tag-farbe);
}

.tag-dynamic-color-icon { color: var(--tag-farbe); }
.tag-dynamic-color-box { background-color: var(--tag-farbe); }
.tag-icon-mr { margin-right: 0.5rem; }

.table-container-inaktive { margin-top: 2rem; }
.section-subtitle { margin: 0 0 1.5rem 0; font-size: 1.25rem; color: #64748b; }
.stat-card-link { text-decoration: none; color: inherit; cursor: pointer; }

.status-badge, .priority-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-neu {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-in_arbeit {
    background-color: #fef3c7;
    color: #92400e;
}

.status-wartend {
    background-color: #fef3c7;
    color: #92400e;
}

.status-fertig {
    background-color: #d1fae5;
    color: #065f46;
}

.status-abgerechnet {
    background-color: #e0e7ff;
    color: #3730a3;
}

.priority-niedrig {
    background-color: #f1f5f9;
    color: #475569;
}

.priority-mittel {
    background-color: #fef3c7;
    color: #92400e;
}

.priority-hoch {
    background-color: #fed7aa;
    color: #9a3412;
}

.priority-dringend {
    background-color: #fee2e2;
    color: #991b1b;
}

.detail-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-row {
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 1rem;
}

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

.detail-row strong {
    min-width: 150px;
    color: var(--text-secondary);
}

.detail-row p {
    margin-top: 0.5rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

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

.form-errors {
    list-style: none;
    margin-top: 0.5rem;
    padding: 0;
}

.form-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-group input:invalid,
.form-group select:invalid,
.form-group textarea:invalid {
    border-color: var(--error-color);
}

.required {
    color: var(--error-color);
    margin-left: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Custom Multi-Select fÃ¼r Tags und Material */
.custom-multiselect {
    position: relative;
    width: 100%;
}

.multiselect-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background-color: #f1f5f9;
    min-height: 44px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.75rem;
}

.multiselect-display:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 178, 237, 0.1);
}

.custom-multiselect.open .multiselect-display {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 178, 237, 0.1);
}

.multiselect-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
    min-height: 24px;
    align-items: center;
}

.multiselect-placeholder {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 400;
}

.multiselect-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.6rem;
    background: #60a5fa;
    color: #ffffff;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: none;
    transition: all 0.2s ease;
}

.multiselect-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.multiselect-badge.tag-badge {
    /* Wird per JavaScript gesetzt basierend auf Tag-Farbe */
}

.multiselect-badge .badge-remove {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #ffffff;
    opacity: 0.85;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.multiselect-badge .badge-remove:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.2);
}

.multiselect-badge .badge-remove i {
    font-size: 0.625rem;
}

.multiselect-chevron {
    color: #64748b;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.custom-multiselect.open .multiselect-chevron {
    transform: rotate(180deg);
}

.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    max-height: 320px;
    display: none;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

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

.custom-multiselect.open .multiselect-dropdown {
    display: flex;
    flex-direction: column;
}

.multiselect-options {
    max-height: 240px;
    overflow-y: auto;
    padding: 0.5rem;
}

.multiselect-options::-webkit-scrollbar {
    width: 6px;
}

.multiselect-options::-webkit-scrollbar-track {
    background: #f8fafc;
}

.multiselect-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.multiselect-options::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.multiselect-option {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.multiselect-option:hover {
    background-color: #f8fafc;
}

.multiselect-option input[type="checkbox"] {
    margin-right: 0.75rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.multiselect-option .option-label {
    font-size: 0.875rem;
    color: #334155;
    transition: color 0.2s;
}

.multiselect-option input[type="checkbox"]:checked ~ .option-content .option-label,
.multiselect-option input[type="checkbox"]:checked ~ .option-label {
    font-weight: 600;
    color: var(--primary-color);
}

.multiselect-option.hidden {
    display: none;
}

/* Suchfeld im Dropdown */
.multiselect-search {
    position: relative;
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
}

.multiselect-search i {
    position: absolute;
    left: 1.25rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

.multiselect-search input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.multiselect-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 178, 237, 0.1);
}

/* Footer mit "Neues Tag"-Button */
.multiselect-footer {
    padding: 0.75rem;
    border-top: 1px solid #e2e8f0;
}

.btn-add-new-tag {
    width: 100%;
    padding: 0.625rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-new-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(6, 178, 237, 0.3);
}

/* Create Tag Form */
.multiselect-create {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.create-tag-form {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 0.75rem;
    align-items: center;
}

.new-tag-name {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    width: 100%;
    background: white;
}

.new-tag-name:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 178, 237, 0.1);
}

.new-tag-color {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    height: 45px !important;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    background: white;
    padding: 0;
}

.new-tag-color:hover {
    border-color: var(--primary-color);
}

.btn-create-tag,
.btn-cancel-tag {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-create-tag {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
}

.btn-create-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 178, 237, 0.4);
}

.btn-cancel-tag {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
}

.btn-cancel-tag:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.multiselect-create-hidden {
    display: none;
}

.btn-create-material-block {
    margin-top: 0.5rem;
    display: block;
}

.money-widget-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-widget-wrapper {
    position: relative;
}

.color-widget-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.color-widget-display {
    position: relative;
    padding: 0.625rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background-color: white;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.color-widget-preview {
    width: 100%;
    height: 24px;
    background-color: var(--color-value, #06b2ed);
    border-radius: 4px;
    margin-right: 0.75rem;
}

.color-widget-text {
    flex: 1;
    border: none;
    background: transparent;
    font-family: monospace;
    color: #64748b;
    pointer-events: none;
}

/* Verstecktes Select-Element komplett ausblenden */
.hidden-select {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Material Collection */
.material-collection {
    margin-bottom: 1.5rem;
}

.material-collection > label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
    font-size: 0.9375rem;
}

#material-items {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.material-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    position: relative;
    transition: all 0.2s;
}

.material-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.material-item .form-group {
    margin-bottom: 1rem;
}

.material-item .form-group:last-child {
    margin-bottom: 0;
}

.material-item label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #334155;
    margin-bottom: 0.5rem;
}

.material-item select,
.material-item input[type="number"],
.material-item textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.9375rem;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.material-item select:focus,
.material-item input[type="number"]:focus,
.material-item textarea:focus {
    outline: none;
    border-color: #06b2ed;
    box-shadow: 0 0 0 3px rgba(6, 178, 237, 0.1);
}

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

.material-item .material-select-field-wrapper {
    margin-bottom: 1rem;
}

.material-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.material-item-header .material-item-label {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.875rem;
}

.btn-remove-material {
    padding: 0.5rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.btn-remove-material:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.material-select-field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.material-select-field-wrapper > label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #334155;
    margin-bottom: 0.5rem;
}

.material-select-field-wrapper .select-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.material-select-field-wrapper .select-wrapper select {
    flex: 1;
}

.material-select-field-wrapper .btn-create-material {
    margin-top: 0;
    flex-shrink: 0;
    align-self: flex-start;
    padding: 0.625rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.material-select-field-wrapper .btn-create-material:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(6, 178, 237, 0.3);
}

.material-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-create-material-global {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-create-material-global:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 178, 237, 0.3);
}

.btn-add-material {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(6, 178, 237, 0.2);
}

.btn-add-material:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 178, 237, 0.4);
}

/* Material Select Wrapper */
.material-select-wrapper {
    position: relative;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.material-select-wrapper select {
    flex: 1;
}

.btn-create-material {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    visibility: visible !important;
    opacity: 1 !important;
}

.btn-create-material:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(6, 178, 237, 0.3);
}

/* Modal-Stile â†’ modals.css */

/* Bearbeiter Inline Edit */
.bearbeiter-cell {
    padding: 0.5rem;
    min-width: 180px;
}

.bearbeiter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.bearbeiter-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
}

.bearbeiter-select {
    width: 100%;
    min-width: 150px;
    padding: 0.375rem 0.625rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background: white;
    font-size: 0.8125rem;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s;
}

.bearbeiter-select:hover {
    border-color: #06b2ed;
    box-shadow: 0 0 0 3px rgba(6, 178, 237, 0.1);
}

.bearbeiter-select:focus {
    outline: none;
    border-color: #06b2ed;
    box-shadow: 0 0 0 3px rgba(6, 178, 237, 0.1);
}

.bearbeiter-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modern Toggle Switches */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 60px;
    height: 32px;
    background: #e2e8f0;
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    border: 2px solid transparent;
    flex-shrink: 0;
}

input[type="checkbox"]:before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(255, 255, 255, 0.5);
}

input[type="checkbox"]:checked {
    background: #06b2ed;
    border-color: #06b2ed;
}

input[type="checkbox"]:checked:before {
    left: 32px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(255, 255, 255, 0.8);
}

input[type="checkbox"]:hover:not(:disabled) {
    box-shadow: 0 0 0 4px rgba(6, 178, 237, 0.1);
}

input[type="checkbox"]:hover:checked:not(:disabled) {
    background: #0599c7;
    box-shadow: 0 0 0 4px rgba(6, 178, 237, 0.15);
}

input[type="checkbox"]:focus {
    box-shadow: 0 0 0 4px rgba(6, 178, 237, 0.2);
}

input[type="checkbox"]:focus:checked {
    box-shadow: 0 0 0 4px rgba(6, 178, 237, 0.25);
}

input[type="checkbox"]:active:before {
    transform: scale(0.95);
}

input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Checkbox Container Layout */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.checkbox-wrapper:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.checkbox-wrapper label {
    margin: 0;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    user-select: none;
    flex: 1;
}

.checkbox-wrapper input[type="checkbox"] {
    margin: 0;
}

/* Auftrag Detail View */
.auftrag-detail {
    max-width: 1400px;
    margin: 0 auto;
}

.detail-header {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.header-left {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.btn-back {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 0.5rem;
    color: #64748b;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-back:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-3px);
}

.detail-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.detail-meta {
    display: flex;
    gap: 1.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.detail-meta i {
    margin-right: 0.375rem;
}

.header-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.priority-badge {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.priority-niedrig {
    background: #f0fdf4;
    color: #16a34a;
}

.priority-mittel {
    background: #fef3c7;
    color: #d97706;
}

.priority-hoch {
    background: #fee2e2;
    color: #dc2626;
}

.priority-dringend {
    background: #fce7f3;
    color: #be123c;
    animation: pulse 2s infinite;
}

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

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.header-actions .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.header-actions .btn i {
    flex-shrink: 0;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 178, 237, 0.4);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.detail-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.card-header i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.card-content p {
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.info-label i {
    font-size: 0.875rem;
}

.info-value {
    font-size: 0.9375rem;
    color: #1e293b;
    font-weight: 500;
}

/* Material List */
.material-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.material-item-view {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.material-item-view:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(6, 178, 237, 0.1);
}

.material-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
    border-radius: 0.75rem;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.material-details {
    flex: 1;
}

.material-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.komponente-badge {
    padding: 0.25rem 0.625rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.material-info {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: #64748b;
}

.material-quantity,
.material-note {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.material-quantity i {
    color: var(--primary-color);
}

/* Notes Section */
.note-section {
    padding: 1rem;
    background: #fef9c3;
    border-left: 4px solid #eab308;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.note-section:last-child {
    margin-bottom: 0;
}

.note-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #713f12;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.note-section p {
    color: #854d0e;
    margin: 0;
}

/* Contact Items */
.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.contact-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.contact-item:first-child {
    padding-top: 0;
}

.contact-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-value {
    font-size: 0.9375rem;
    color: #1e293b;
    font-weight: 500;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.contact-link:hover {
    color: #0891b2;
}

/* Detail Items */
.detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
}

.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-item:first-child {
    padding-top: 0;
}

.detail-item i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.detail-item.amount {
    font-size: 1.125rem;
    font-weight: 600;
    color: #16a34a;
}

/* Team Members */
.team-member {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.team-member:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.team-member:first-child {
    padding-top: 0;
}

.member-avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 50%;
    font-size: 1.25rem;
}

.member-avatar.assigned {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.member-role {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.member-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
}

/* Tags Display */
.tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-badge-view {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1.5px solid;
    transition: all 0.2s;
}

.tag-badge-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-sidebar {
        order: 2;
    }
}

/* Page Wrapper & Header */
.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-content h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-content h1 i {
    color: var(--primary-color);
}

.header-subtitle-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.header-subtitle-wrap .header-subtitle {
    margin: 0;
}

.header-subtitle {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0.25rem 0 0 0;
}

/* Data Table */
.table-container {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem 1.25rem 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow-x: hidden;
}

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

.data-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.data-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8125rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

/* Column sizing (use explicit column classes instead of nth-child) */
.data-table .col-id { width: 130px; min-width: 110px; }
.data-table .col-title { min-width: 220px; }
.data-table .col-status { width: 130px; min-width: 120px; }
.data-table .col-priority { width: 110px; min-width: 100px; }
.data-table .col-assignee { min-width: 180px; width: 200px; }
.data-table .col-location { min-width: 210px; width: 220px; }
.data-table .col-due { width: 130px; min-width: 110px; }
.data-table .col-actions { width: 90px; text-align: center; }

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.table-location {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.table-location-main {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #334155;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-location-main i {
    color: #64748b;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.table-location-sub {
    color: #64748b;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table tbody tr {
    transition: all 0.2s;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.table-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #64748b;
    font-size: 0.8125rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.storniert-icon-inline,
.overdue-icon-inline {
    font-size: 0.875rem;
    color: #ef4444;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.35rem;
}

.table-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.table-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s, text-decoration-color 0.2s;
}
.table-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.table-title .table-link {
    color: #1e293b;
}
.table-title .table-link:hover {
    color: var(--primary-color);
}

.table-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.tag-mini {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-mini i {
    font-size: 0.625rem;
}

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

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    background: #f1f5f9;
    color: #64748b;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.875rem;
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-icon-help {
    margin-left: 0.5rem;
}

.kunde-neu-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Editierbares Kosten-Feld */
.kosten-editable {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.kosten-display {
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    user-select: none;
}

.kosten-display:hover {
    background-color: #f1f5f9;
}

.kosten-input {
    display: none;
    width: 120px;
    padding: 0.375rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text-primary);
    background-color: white;
}

.kosten-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 178, 237, 0.1);
}

.btn-kosten-save,
.btn-kosten-cancel {
    display: none;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 0.375rem;
    background-color: transparent;
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-kosten-save {
    color: var(--success-color);
}

.btn-kosten-save:hover {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.btn-kosten-cancel {
    color: var(--error-color);
}

.btn-kosten-cancel:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.table-empty {
    text-align: center;
    padding: 4rem 2rem !important;
    color: #94a3b8;
}

.table-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.table-empty p {
    margin: 0;
    font-size: 1.125rem;
}

/* Form Styling */
.form-modern {
    max-width: 1200px;
}

.form-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.section-header i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

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

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

.form-actions {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-secondary {
    background: #f1f5f9;
    color: #64748b;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Responsive Forms */
@media (max-width: 768px) {
    .form-grid-2,
    .form-grid-street,
    .form-grid-plz {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .table-container {
        overflow-x: scroll;
    }
}

/* Form Labels & Inputs - Fix white text issue */
label {
    display: block;
    font-weight: 500;
    color: #334155 !important;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="color"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    color: #1e293b;
    background: white;
    transition: all 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 178, 237, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.form-help {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.375rem;
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.375rem;
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.25rem;
}

/* Color Preview */
.color-preview-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.color-preview-box {
    width: 40px;
    height: 24px;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
}

.color-code {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #64748b;
}

/* Inactive Row */
.row-inactive {
    opacity: 0.6;
}

/* Delete Form Inline */
.form-delete-inline {
    display: inline-block;
}

.btn-danger-inline {
    background: #ef4444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger-inline:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    border-left: 3px solid;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-neu {
    border-left-color: #3b82f6;
}

.stat-in-arbeit {
    border-left-color: #f59e0b;
}

.stat-wartend {
    border-left-color: #8b5cf6;
}

.stat-fertig {
    border-left-color: #10b981;
}

.stat-abgerechnet {
    border-left-color: #06b6d4;
}

.stat-total {
    border-left-color: var(--primary-color);
}

.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-neu .stat-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.stat-in-arbeit .stat-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.stat-wartend .stat-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.stat-fertig .stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.stat-abgerechnet .stat-icon {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.stat-total .stat-icon {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.125rem;
    line-height: 1.2;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}

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

.dashboard-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dashboard-card .card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.dashboard-card .card-header i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.dashboard-card .card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    transition: all 0.2s;
    text-decoration: none;
    border: 2px solid transparent;
}

.quick-action:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(6, 178, 237, 0.2);
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
    border-radius: 0.75rem;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.quick-action-text {
    width: 100%;
}

.quick-action-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.quick-action-desc {
    font-size: 0.75rem;
    color: #64748b;
}

.status-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.status-item:hover {
    background: #f1f5f9;
}

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

.status-neu-bg {
    background: #3b82f6;
}

.status-in-arbeit-bg {
    background: #f59e0b;
}

.status-wartend-bg {
    background: #8b5cf6;
}

.status-fertig-bg {
    background: #10b981;
}

.status-abgerechnet-bg {
    background: #06b6d4;
}

.status-info {
    flex: 1;
}

.status-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.125rem;
}

.status-count {
    font-size: 0.875rem;
    color: #64748b;
}

.status-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--primary-color);
    border-radius: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
}

.status-link:hover {
    background: var(--primary-color);
    color: white;
}


/* Finance Grid */
.finance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.finance-card {
    background: white;
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s;
    border-left: 4px solid;
}

.finance-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.finance-total {
    border-left-color: #8b5cf6;
}

.finance-billed {
    border-left-color: #10b981;
}

.finance-open {
    border-left-color: #f59e0b;
}

.finance-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    font-size: 1.75rem;
}

.finance-total .finance-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.finance-billed .finance-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.finance-open .finance-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.finance-content {
    flex: 1;
}

.finance-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.finance-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
}

/* Statistics Grid */
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* Chart Bars */
.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.chart-bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chart-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #64748b;
}

.chart-bar-label strong {
    color: #1e293b;
    font-weight: 600;
}

.chart-bar-bg {
    height: 32px;
    background: #f1f5f9;
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
}

.chart-bar-fill {
    width: var(--bar-width, 0);
    height: 100%;
    border-radius: 0.5rem;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.75rem;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}
.chart-bar-fill-dringend { background: #dc2626; }
.chart-bar-fill-hoch { background: #f59e0b; }
.chart-bar-fill-mittel { background: #3b82f6; }
.chart-bar-fill-niedrig { background: #10b981; }
.chart-bar-fill-wartung { background: var(--primary-color); }
.chart-bar-fill-reparatur { background: #ef4444; }
.chart-bar-fill-installation { background: #8b5cf6; }
.chart-bar-fill-inspektion { background: #10b981; }
.chart-bar-fill-sonstiges { background: #64748b; }
/* Statistiken Status-Zeilen */
.stats-status-indicator-overdue { background: #ef4444; }
.stats-status-badge-overdue { background: #fee2e2; color: #dc2626; }
.stats-status-indicator-faellig-heute { background: #f59e0b; }
.stats-status-badge-faellig-heute { background: #fef3c7; color: #d97706; }
.stats-status-indicator-diese-woche { background: #3b82f6; }
.stats-status-badge-diese-woche { background: #dbeafe; color: #2563eb; }
.stats-status-indicator-dieser-monat { background: var(--primary-color); }
.stats-status-badge-dieser-monat { background: #e0f2fe; color: #0891b2; }
.stats-status-indicator-dauer { background: #8b5cf6; }
.stats-status-badge-dauer { background: #ede9fe; color: #7c3aed; }

/* Icons in Zeitlicher Übersicht zentrieren (components.css .status-badge überschreibt sonst mit inline-block) */
.status-list .status-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    padding: 0;
}
.status-list .status-badge i {
    display: block;
    line-height: 1;
}

/* Ranking List */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.ranking-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.ranking-position {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.ranking-info {
    flex: 1;
}

.ranking-name {
    font-weight: 600;
    color: #1e293b;
}

.ranking-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: color-mix(in srgb, var(--tag-color) 10%, white);
    color: var(--tag-color);
    border: 2px solid color-mix(in srgb, var(--tag-color) 30%, white);
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.2s;
}

.tag-cloud-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tag-count {
    padding: 0.125rem 0.5rem;
    background: white;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-badge {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 1.125rem;
}

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

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
}

/* Comments Section */
.comments-section {
    margin-top: 2rem;
}

.comment-form-wrapper {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border-left: 3px solid var(--primary-color);
}

.comment-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

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

.comment-author {
    font-weight: 600;
    color: #1e293b;
}

.comment-date {
    font-size: 0.875rem;
    color: #64748b;
}

.comment-text {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.comment-reply {
    margin-left: 2rem;
    border-left-color: #cbd5e1;
    background: #ffffff;
}

.comment-replies {
    margin-top: 1rem;
    padding-left: 0;
    border-left: 2px solid #e2e8f0;
}

/* Alle Antworten auf gleicher Ebene - keine weitere Verschachtelung */
.comment-replies .comment-reply {
    margin-left: 2rem;
}

.comment-replies .comment-reply .comment-replies {
    display: none; /* Verhindere weitere Verschachtelung */
}

.btn-reply {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-reply:hover {
    background: #f1f5f9;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.reply-form-hidden {
    display: none;
}

.form-group-reply-checkbox {
    margin-top: 0.5rem;
}

.label-checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.label-required {
    color: var(--error-color);
}

.reply-form-wrapper {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.reply-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 80px;
}

.reply-form .form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Public Comment Replies */
.public-comment-reply {
    margin-left: 2rem;
    background: #ffffff;
    border-left: 2px solid #e2e8f0;
}

.public-comment-replies {
    margin-top: 0.75rem;
    padding-left: 0;
    border-left: 2px solid #e2e8f0;
}

/* Alle Antworten auf gleicher Ebene - keine weitere Verschachtelung */
.public-comment-replies .public-comment-reply {
    margin-left: 2rem;
}

.public-comment-replies .public-comment-reply .public-comment-replies {
    display: none; /* Verhindere weitere Verschachtelung */
}

.btn-reply-public {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.btn-reply-public:hover {
    background: #f1f5f9;
    border-color: #06b2ed;
    color: #06b2ed;
}

.empty-comments i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Photos Section */
.photos-section {
    margin-top: 2rem;
}

.photo-upload-wrapper {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.photo-item {
    position: relative;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.photo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.photo-link {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.photo-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.photo-item:hover .photo-link img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay i {
    color: white;
    font-size: 2rem;
}

.photo-description {
    padding: 0.75rem;
    font-size: 0.875rem;
    color: #475569;
}

.photo-meta {
    padding: 0.5rem 0.75rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #64748b;
    border-top: 1px solid #f1f5f9;
}

.photo-delete-form {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.btn-icon-small {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-small:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Time Tracking */
.time-tracking-section {
    margin-top: 2rem;
}

.timer-controls {
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.timer-display {
    margin-bottom: 1.5rem;
}

.timer-time {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

.timer-status {
    font-size: 1rem;
    color: #64748b;
    font-weight: 500;
}

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

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.time-entries {
    margin-top: 2rem;
}

.time-entries h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

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

.time-table th,
.time-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.time-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timer-description {
    margin-top: 1rem;
}

.timer-description textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
}

/* Calendar */
.calendar-controls {
    display: flex;
    gap: 0.5rem;
}

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

.calendar-container {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.calendar-week {
    display: flex;
    flex-direction: column;
}

.week-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.week-day-header {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    font-weight: 600;
    color: #475569;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.week-day {
    min-height: 400px;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 2px dashed transparent;
}

.week-day.drag-over {
    border-color: var(--primary-color);
    background: #e0f2fe;
}

.calendar-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    cursor: move;
    transition: all 0.2s;
    border-left: 4px solid;
}

.calendar-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calendar-item.status-neu { background: #dbeafe; border-color: #3b82f6; }
.calendar-item.status-in_arbeit { background: #fef3c7; border-color: #f59e0b; }
.calendar-item.status-wartend { background: #ede9fe; border-color: #8b5cf6; }
.calendar-item.status-fertig { background: #d1fae5; border-color: #10b981; }
.calendar-item.status-abgerechnet { background: #e0f2fe; border-color: #06b6d4; }

.calendar-month {
    display: flex;
    flex-direction: column;
}

.month-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.month-day-header {
    text-align: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #475569;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.month-day {
    min-height: 120px;
    padding: 0.5rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    position: relative;
    transition: all 0.2s;
}

.month-day.drag-over {
    border-color: var(--primary-color);
    background: #e0f2fe;
    border-width: 2px;
}

.month-day.empty {
    background: #f8fafc;
    border: none;
}

.day-number {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.calendar-item-small {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 0.25rem;
    border-left: 3px solid;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: move;
    transition: all 0.2s;
}

.calendar-item-small:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.more-items {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
    margin-top: 0.25rem;
}

.calendar-day-view h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.day-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.calendar-item-large {
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.item-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

/* Calendar Toolbar */
.calendar-toolbar {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.toolbar-left,
.toolbar-center,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.current-date-display {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-left: 1rem;
    min-width: 200px;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

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

.calendar-filters {
    display: flex;
    gap: 0.75rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    color: #1e293b;
    font-size: 0.875rem;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 178, 237, 0.1);
}

/* Calendar Enhancements */
.week-day-header.today {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
}

.week-day-header.today .day-number {
    background: white;
    color: var(--primary-color);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
}

.week-day.today {
    border: 2px solid var(--primary-color);
    background: #e0f2fe;
}

.month-day.today {
    background: #e0f2fe;
    border: 2px solid var(--primary-color);
}

.month-day.today .day-number {
    background: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
}

.day-add-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 178, 237, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
}

.week-day:hover .day-add-btn,
.month-day:hover .day-add-btn {
    opacity: 1;
}

.day-add-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.calendar-item {
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.item-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.item-meta {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.calendar-item.priority-dringend {
    border-left-width: 6px;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0%, 100% { border-left-color: #dc2626; }
    50% { border-left-color: #ef4444; }
}

.calendar-item-small.priority-dringend {
    font-weight: 700;
    border-left: 3px solid #dc2626;
}

.day-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.empty-day i {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.item-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Calendar Overlay */
.calendar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calendar-overlay.active {
    display: flex;
    opacity: 1;
}

.overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
}

.overlay-panel {
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    max-width: 600px;
    height: 100%;
    background: #f8fafc;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
}

.calendar-overlay.active .overlay-panel {
    transform: translateX(0);
}

.overlay-header {
    padding: 1.5rem 2rem;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
    position: relative;
    min-height: 80px;
}

.overlay-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    position: relative;
    z-index: 1;
    line-height: 1.4;
}

.overlay-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    z-index: 1;
    font-size: 1rem;
}

.overlay-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.overlay-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: #f8fafc;
    position: relative;
}

.overlay-content::-webkit-scrollbar {
    width: 8px;
}

.overlay-content::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.overlay-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.overlay-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.loading-spinner i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.loading-spinner p {
    font-size: 0.9375rem;
    margin: 0;
}

.error-message {
    padding: 3rem 2rem;
    text-align: center;
    color: #dc2626;
    background: #fef2f2;
    margin: 2rem;
    border-radius: 0.75rem;
    border: 1px solid #fecaca;
}

.overlay-details {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.detail-section {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
}

.detail-section:first-of-type {
    padding-top: 2rem;
    background: #f8fafc;
}

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

.detail-section h3 {
    margin: 0 0 1rem 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-section h3 i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.detail-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0;
    padding-bottom: 1.5rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.detail-item label i {
    color: var(--primary-color);
    width: 16px;
    font-size: 0.875rem;
}

.detail-item p {
    margin: 0;
    color: #1e293b;
    font-size: 0.9375rem;
    line-height: 1.5;
    font-weight: 500;
}

.detail-item p:empty::before {
    content: 'â€”';
    color: #94a3b8;
    font-style: italic;
}

.overlay-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    position: sticky;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.overlay-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.overlay-actions .btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.overlay-actions .btn-primary:hover {
    background: #0891b2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 178, 237, 0.3);
}

.overlay-actions .btn-secondary {
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.overlay-actions .btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Calendar Tooltip */
.calendar-tooltip {
    position: fixed;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 0;
    z-index: 10000;
    max-width: 320px;
    display: none;
    pointer-events: none;
    border: 1px solid #e2e8f0;
}

.tooltip-header {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
    border-radius: 0.75rem 0.75rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.tooltip-header strong {
    font-size: 0.9375rem;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tooltip-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #1e293b;
}

.tooltip-content > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tooltip-content i {
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

.tooltip-footer {
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 0.75rem 0.75rem;
    text-align: center;
    color: #64748b;
    font-size: 0.75rem;
}

/* ÃœberfÃ¤llige AuftrÃ¤ge Styles */
.overdue {
    border-left: 4px solid #dc2626 !important;
    background: #fef2f2 !important;
    animation: pulse-overdue 2s infinite;
}

@keyframes pulse-overdue {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 4px rgba(220, 38, 38, 0);
    }
}

.overdue-icon {
    color: #dc2626;
    margin-left: 0.5rem;
}

.overdue-icon-small {
    color: #dc2626;
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

.overdue-badge {
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.overdue-badge-large {
    background: #dc2626;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-item.overdue,
.calendar-item-small.overdue,
.calendar-item-large.overdue {
    border-left-color: #dc2626 !important;
    background: #fef2f2 !important;
}

/* Dashboard Overdue Alert */
.overdue-alert {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #dc2626;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-icon {
    font-size: 1.25rem;
    color: #dc2626;
}

.alert-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.alert-text strong {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #dc2626;
}

.alert-text span {
    opacity: 0.8;
    font-size: 0.8125rem;
    color: #991b1b;
}

.overdue-alert .btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    white-space: nowrap;
}

/* Höhere Spezifität, damit components.css .stat-card (background: white) nicht überschreibt */
.stat-card.stat-overdue {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: white;
}

.stat-card.stat-overdue .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
}

.stat-card.stat-overdue .stat-label,
.stat-card.stat-overdue .stat-value {
    color: white;
}

/* Overdue List */
.overdue-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.overdue-item {
    display: block;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    color: #1e293b;
}

.overdue-item:hover {
    background: #fee2e2;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

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

.overdue-item-header strong {
    color: #1e293b;
}

.overdue-days {
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 600;
}

.overdue-item-details {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.overdue-date {
    color: #64748b;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Table Overdue Styles */
.row-overdue {
    background: #fef2f2 !important;
    border-left: 4px solid #dc2626;
}

.row-overdue:hover {
    background: #fee2e2 !important;
}

.overdue-icon-inline {
    color: #dc2626;
    margin-left: 0.5rem;
    font-size: 0.875rem;
}

.overdue-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #fee2e2;
    color: #dc2626;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.overdue-date-cell {
    color: #dc2626;
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.875rem;
}

.overdue-days-badge {
    color: #dc2626;
    font-size: 0.6875rem;
    font-weight: 600;
    margin-left: 0.375rem;
    white-space: nowrap;
}

/* Stornierte AuftrÃ¤ge */
.row-storniert {
    background: #f3f4f6 !important;
    opacity: 0.7;
    border-left: 4px solid #6b7280;
}

.row-storniert:hover {
    background: #e5e7eb !important;
}

.storniert-icon-inline {
    color: #6b7280;
    margin-left: 0.5rem;
    font-size: 0.875rem;
}

.storniert-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    margin-left: 0.5rem;
    margin-left: 0.5rem;
}

.storniert-badge-large {
    background: #6b7280;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stornierungs-Modal / generische Modal-Klassen â†’ modals.css */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.9375rem;
    resize: vertical;
    min-height: 100px;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 178, 237, 0.1);
}

.required {
    color: #dc2626;
}

.btn-warning {
    background: #f59e0b;
    color: white;
    border: none;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-info {
    background: #06b6d4;
    color: white;
    border: none;
}

.btn-info:hover {
    background: #0891b2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* Stornierungs-Info Card */
.storniert-info-card {
    background: #f3f4f6;
    border: 2px solid #6b7280;
    border-left: 6px solid #6b7280;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.info-header i {
    color: #6b7280;
    font-size: 1.5rem;
}

.info-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 1.125rem;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    gap: 1rem;
}

.info-item.full-width {
    flex-direction: column;
}

.info-item label {
    font-weight: 600;
    color: #64748b;
    min-width: 120px;
}

.info-item span,
.info-item p {
    color: #1e293b;
    margin: 0;
}

.info-item p {
    line-height: 1.6;
}

/* Auftragsansicht - Übersichtliches Design */
.auftrag-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.auftrag-badges .priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    flex-shrink: 0;
}
.auftrag-badges .priority-badge i {
    flex-shrink: 0;
}

.auftrag-content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .auftrag-content-grid {
        grid-template-columns: 1fr;
    }
}

.content-main,
.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.content-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-title {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title i {
    color: var(--primary-color);
    font-size: 1.125rem;
}

.card-title h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.card-body {
    padding: 1.5rem;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    font-weight: 600;
    color: #64748b;
    font-size: 0.875rem;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-label i {
    color: var(--primary-color);
    width: 16px;
}

.info-value {
    flex: 1;
    color: #1e293b;
    font-size: 0.9375rem;
    text-align: right;
    margin-left: auto;
}

.info-link {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
}

.info-link:hover {
    text-decoration: underline;
}

.amount-value {
    font-weight: 700;
    color: #10b981;
    font-size: 1rem;
}

.text-success {
    color: #10b981;
}

.material-list-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.material-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border-left: 3px solid var(--primary-color);
}

.material-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #1e293b;
}

.material-name i {
    color: var(--primary-color);
}

.material-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.material-quantity {
    font-weight: 600;
    color: var(--primary-color);
}

.material-note {
    font-style: italic;
}

.komponente-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: #e0f2fe;
    color: #0891b2;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.note-block {
    margin-bottom: 1.5rem;
}

.note-block:last-child {
    margin-bottom: 0;
}

.note-block label {
    display: block;
    font-weight: 600;
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.note-block label i {
    color: var(--primary-color);
}

.note-block p {
    margin: 0;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    color: #1e293b;
    line-height: 1.6;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: #1e293b;
    text-decoration: none;
    transition: all 0.2s;
    margin-right: 1rem;
}

.btn-back:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(-2px);
}

/* Batch Operations */
.batch-actions-bar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(6, 178, 237, 0.3);
}

.batch-info {
    font-weight: 600;
    font-size: 1rem;
}

.batch-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.batch-select {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    background: white;
    color: #1e293b;
    font-size: 0.875rem;
    cursor: pointer;
}

.batch-select:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
}

.data-table tbody tr.selected {
    background: #e0f2fe;
}

/* Dashboard Widgets */
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.widget-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.widget-header i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.widget-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.chart-pie {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pie-segment {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pie-segment::before {
    content: '';
    width: 16px;
    height: 16px;
    background: var(--color);
    border-radius: 4px;
}

.pie-label {
    font-size: 0.875rem;
    color: #475569;
}

.performance-metrics {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.metric-item {
    text-align: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.75rem;
}

.metric-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
}

.activity-item i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.activity-item strong {
    color: #1e293b;
}

/* Filter Card */
.filter-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-item label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-item label i {
    color: var(--primary-color);
}

.filter-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

.login-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

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

.login-form .btn {
    width: 100%;
    margin-top: 1rem;
}

.calendar-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calendar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.calendar-title h1 {
    margin-bottom: 0.25rem;
}

.calendar-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.calendar-view-toggle {
    display: inline-flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 9999px;
    padding: 0.25rem;
    box-shadow: var(--shadow-lg);
}

.calendar-view-toggle .btn {
    border-radius: 9999px;
}

.calendar-view-toggle .btn.is-active {
    background: var(--primary-color);
    color: #fff;
}

.calendar-filters {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.calendar-filters .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-status {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calendar-section {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.calendar-section.is-collapsed .calendar-row {
    display: none;
}

.calendar-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.calendar-section-header h3 {
    margin: 0;
    font-size: 1rem;
}

.section-toggle {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary);
    cursor: pointer;
}

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

.calendar-day {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 1rem;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.day-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.day-week {
    font-weight: 600;
}

.day-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.day-body {
    flex: 1;
    display: flex;
    align-items: center;
}

.day-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0.85rem;
    padding: 0.75rem;
    border: 1px dashed rgba(100, 116, 139, 0.35);
    text-align: center;
}

.day-empty {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.status-warten {
    background-color: #e2e8f0;
    color: #475569;
}

@media (max-width: 1024px) {
    .calendar-header {
        align-items: flex-start;
    }
}

.login-form input {
    background: rgba(255, 255, 255, 0.9);
}

/* Responsive Design - Mobile First */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.6875rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .overdue-alert {
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
    }
    
    .alert-icon {
        font-size: 1rem;
    }
    
    .alert-text strong {
        font-size: 0.875rem;
    }
    
    .alert-text span {
        font-size: 0.75rem;
    }
    
    .page-header {
        padding: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.375rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .filter-card {
        padding: 1rem;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }

    .data-table {
        font-size: 0.875rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid-2,
    .form-grid-street,
    .form-grid-plz {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1025px) and (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Ã–ffentliche Auftragsansicht */
.public-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    background: #f8fafc;
    min-height: 100vh;
}

.public-header {
    background: linear-gradient(135deg, #06b2ed 0%, #0891b2 100%);
    color: white;
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(6, 178, 237, 0.3);
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.public-header i {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.25rem;
}

.public-header-content {
    flex: 1;
}

.public-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.25rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.public-header-meta {
    opacity: 0.95;
    font-size: 1.125rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.75rem;
}

.public-header-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
}

.public-header-location i {
    font-size: 1rem;
    opacity: 0.8;
}

.public-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.public-card h2 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.public-card h2 i {
    color: #06b2ed;
}

.public-rueckmeldung-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.public-rueckmeldung-card h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.public-rueckmeldung-card h2 i {
    font-size: 1.75rem;
    color: #06b2ed;
    background: rgba(6, 178, 237, 0.1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
}

.status-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.status-btn {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.875rem;
    display: block;
}

.status-btn:hover {
    border-color: #06b2ed;
    background: #f0f9ff;
}

.status-btn.active {
    border-color: #06b2ed;
    background: #06b2ed;
    color: white;
}

.status-btn input[type="radio"] {
    display: none;
}

.public-form-group {
    margin-bottom: 1rem;
}

.public-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e293b;
}

.public-form-group textarea,
.public-form-group input[type="text"],
.public-form-group input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.9375rem;
}

.public-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    background: #06b2ed;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #0891b2;
}

.public-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.public-photo-item {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 1;
}

.public-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.public-comment-item {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

.public-comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.public-comment-text {
    color: #1e293b;
    line-height: 1.6;
}

.badge-status {
    background: #3b82f6;
    color: white;
}

.badge-priority {
    background: #f59e0b;
    color: white;
}

.alert-success {
    background: #10b981;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .public-container {
        padding: 0.5rem;
    }
    
    .public-header {
        padding: 1.5rem 1rem;
    }
    
    .public-header h1 {
        font-size: 1.5rem;
    }
    
    .status-selector {
        grid-template-columns: 1fr;
    }
    
    .public-info-row {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .public-info-label {
        min-width: auto;
    }
}

.public-info-row {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.public-info-label {
    font-weight: 600;
    color: #64748b;
    min-width: 120px;
    font-size: 0.875rem;
}

.text-muted {
    color: #64748b;
}

/* RÃ¼ckmeldungsformular */
.public-rueckmeldung-card {
    border: 2px solid #06b2ed;
    background: linear-gradient(135deg, rgba(6, 178, 237, 0.05) 0%, rgba(8, 145, 178, 0.05) 100%);
}

.public-card-description {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.rueckmeldung-section {
    background: white;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
}

.section-title i {
    color: #06b2ed;
    font-size: 1.125rem;
}

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

.public-form-group {
    margin-bottom: 1.25rem;
}

.public-form-group:last-child {
    margin-bottom: 0;
}

.public-form-group input[type="number"],
.public-form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.public-form-group input[type="text"]:focus,
.public-form-group input[type="number"]:focus,
.public-form-group textarea:focus,
.public-form-group select:focus {
    outline: none;
    border-color: #06b2ed;
    box-shadow: 0 0 0 3px rgba(6, 178, 237, 0.1);
}

/* Signature Pad */
.signature-pad-wrapper {
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    background: white;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.signature-canvas {
    width: 100%;
    height: 200px;
    border: 1px dashed #cbd5e1;
    border-radius: 0.375rem;
    background: #fafafa;
    cursor: crosshair;
    touch-action: none;
    display: block;
}

.signature-pad-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.75rem;
    gap: 0.5rem;
}

.btn-clear-signature {
    padding: 0.5rem 1rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.btn-clear-signature:hover {
    background: #dc2626;
}

.btn-clear-signature:active {
    transform: scale(0.98);
}

.signature-pad-wrapper.empty .signature-canvas {
    border-color: #fbbf24;
    background: #fef3c7;
}

.signature-pad-wrapper.has-signature .signature-canvas {
    border-color: #10b981;
    background: white;
}

.form-hint {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.public-form-group input[type="checkbox"] {
    margin: 0;
}

/* Public View Checkbox Wrapper (different style) */
.public-form-group .checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.public-form-group .checkbox-wrapper:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.public-form-group .checkbox-wrapper label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    line-height: 1.5;
    flex: 1;
    color: #1e293b;
    user-select: none;
}

.public-form-group .checkbox-wrapper input[type="checkbox"] {
    margin: 0;
}

.material-group {
    transition: opacity 0.3s;
}

.material-group.hidden {
    opacity: 0.5;
    pointer-events: none;
}

.material-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.9375rem;
    background: white;
    min-height: 120px;
}

.form-submit-wrapper {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}

.btn-rueckmeldung {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.0625rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(6, 178, 237, 0.3);
    transition: all 0.2s;
}

.btn-rueckmeldung:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(6, 178, 237, 0.4);
}

.btn-rueckmeldung:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.alert-error {
    background: #ef4444;
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .public-rueckmeldung-card {
        padding: 1rem;
    }
    
    .rueckmeldung-section {
        padding: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .section-title {
        font-size: 0.9375rem;
    }
    
    .public-form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .public-form-group {
        margin-bottom: 1rem;
    }
    
    .form-submit-wrapper {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
    
    .btn-rueckmeldung {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease-out;
    border-left: 4px solid;
    min-width: 300px;
    max-width: 400px;
}

.toast-success {
    border-left-color: var(--success-color);
}

.toast-error {
    border-left-color: var(--error-color);
}

.toast-info {
    border-left-color: var(--primary-color);
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.toast-success .toast-icon {
    color: var(--success-color);
}

.toast-error .toast-icon {
    color: var(--error-color);
}

.toast-info .toast-icon {
    color: var(--primary-color);
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.fade-out {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
    
    .public-container {
        padding: 0.5rem;
    }
    
    .public-rueckmeldung-card {
        padding: 0.875rem;
    }
    
    .rueckmeldung-section {
        padding: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 0.875rem;
        padding-bottom: 0.5rem;
    }
    
    .public-form-group input[type="text"],
    .public-form-group input[type="number"],
    .public-form-group textarea,
    .public-form-group select {
        padding: 0.625rem;
        font-size: 0.875rem;
    }
    
    .signature-canvas {
        height: 150px;
    }
    
    .signature-pad-wrapper {
        padding: 0.75rem;
    }
    
    .checkbox-wrapper {
        padding: 0.625rem;
    }
    
    .checkbox-wrapper label {
        font-size: 0.875rem;
    }
}

/* Tablet Optimierung */
@media (min-width: 481px) and (max-width: 1024px) {
    .public-container {
        max-width: 900px;
    }
    
    .public-form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Landing Page */
body.landing-page {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body.landing-page .app-layout,
body.landing-page .sidebar,
body.landing-page .page-wrapper {
    display: none !important;
}

.landing-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #06b2ed 0%, #0891b2 100%);
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin: 0;
}

.landing-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.portal-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    padding: 2rem;
}

.portal-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.portal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.portal-card-featured {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

/* User Avatar Styles in Tables */
.user-cell-table {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-table {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-avatar-img-table {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar-initials {
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
}

.user-info-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name-table {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

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

.role-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bearbeiter-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bearbeiter-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.bearbeiter-name {
    font-weight: 500;
    color: var(--text-primary);
}

.bearbeiter-select {
    min-width: 150px;
    padding: 0.375rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    color: var(--text-primary);
}

.bearbeiter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6, 178, 237, 0.1);
}

/* Dark Mode fÃ¼r User Avatare */
[data-theme="dark"] .user-name-table {
    color: #e2e8f0;
}

[data-theme="dark"] .bearbeiter-name {
    color: #e2e8f0;
}

[data-theme="dark"] .bearbeiter-select {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .bearbeiter-select:focus {
    border-color: #06b2ed;
    box-shadow: 0 0 0 3px rgba(6, 178, 237, 0.2);
}

.portal-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.portal-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.portal-card:hover .portal-card-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.portal-card-icon i {
    font-size: 2.5rem;
    color: white;
}

.portal-card h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.portal-card-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 1rem 0;
    font-weight: 500;
}

.portal-card-description {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
    min-height: 3.2rem;
}

.portal-card-logo {
    width: 100%;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.portal-logo-img {
    max-width: 250px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.portal-logo-img-mro {
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.portal-card-logo .portal-card-icon {
    display: flex;
}

.portal-logo-img-primary {
    display: block;
}

.portal-card-icon-fallback {
    display: none;
}

.portal-card-logo .portal-logo-img-primary.hidden + .portal-card-icon-fallback {
    display: flex;
}

.portal-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    text-align: left;
}

.portal-card-features li {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-card-features li i {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
}

.portal-card-coming-soon {
    opacity: 0.85;
    position: relative;
}

.portal-card-coming-soon-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 193, 7, 0.9);
    color: #000;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.portal-card-button-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.portal-card-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.portal-card-button:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.portal-card-button i {
    transition: transform 0.3s ease;
}

.portal-card-button:hover i {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .portal-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .portal-card {
        padding: 2rem 1.5rem;
    }
}
