
* {
    -webkit-font-smoothing: antialiased;
}

/* Material Design Custom Styles */
:root {
    --mdc-theme-primary: #1976d2;
    --mdc-theme-secondary: #03dac6;
    --mdc-theme-surface: #ffffff;
    --mdc-theme-background: #f5f5f5;
    --mdc-theme-error: #b00020;
    --mdc-theme-on-primary: #ffffff;
    --mdc-theme-on-secondary: #000000;
    --mdc-theme-on-surface: #000000;
    --mdc-theme-on-error: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--mdc-theme-background);
    color: var(--mdc-theme-on-surface);
}

/* Top App Bar Customization */
.mdc-top-app-bar {
    background-color: var(--mdc-theme-primary);
    color: var(--mdc-theme-on-primary);
}

.mdc-top-app-bar__title {
    font-weight: 500;
    margin-left: 8px;
}

/* Main Content */
.main-content {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Configuration Card */
.config-card {
    margin-bottom: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-content {
    padding: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
    margin-top: 16px;
}

.mdc-text-field {
    width: 100%;
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stats-card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.stats-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stats-content {
    display: flex;
    align-items: center;
    padding: 20px;
}

.stats-icon {
    font-size: 40px;
    margin-right: 16px;
    color: var(--mdc-theme-primary);
}

.stats-icon.active {
    color: #4caf50;
}

.stats-icon.cancelled {
    color: var(--mdc-theme-error);
}

.stats-text {
    flex: 1;
}

.stats-number {
    font-size: 28px;
    font-weight: 500;
    color: var(--mdc-theme-on-surface);
    line-height: 1;
}

.stats-label {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Table Card */
.table-card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table-container {
    overflow-x: auto;
    margin-top: 16px;
}

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

.mdc-data-table__header-cell {
    background-color: #f8f9fa;
    font-weight: 500;
    color: var(--mdc-theme-on-surface);
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.mdc-data-table__cell {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.mdc-data-table__row:hover {
    background-color: #f8f9fa;
}

.mdc-data-table__row.cancelled {
    background-color: #ffebee;
}

.mdc-data-table__row.cancelled:hover {
    background-color: #ffcdd2;
}

/* Status Chips */
.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-chip.active {
    background-color: #e8f5e8;
    color: #2e7d32;
}

.status-chip.cancelled {
    background-color: #ffebee;
    color: #c62828;
}

.status-chip i {
    margin-right: 4px;
    font-size: 16px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.action-button {
    min-width: 40px;
    padding: 8px;
    border-radius: 50%;
}

.action-button.details-button {
    --mdc-theme-primary: #2196f3;
    --mdc-theme-on-primary: #ffffff;
    background-color: #2196f3;
    color: white;
}

.action-button.details-button:hover {
    background-color: #1976d2;
}

.action-button.cancel-button {
    --mdc-theme-primary: #f44336;
    --mdc-theme-on-primary: #ffffff;
    background-color: #f44336;
    color: white;
}

.action-button.cancel-button:hover {
    background-color: #d32f2f;
}

.action-button.cancel-button:disabled {
    background-color: #ffcdd2;
    color: #c62828;
    cursor: not-allowed;
}

.action-button .mdc-button__label {
    display: none;
}

.action-button .mdc-button__icon {
    margin: 0;
    font-size: 18px;
}

/* Status chip für stornierte Lieferungen */
.status-chip.cancelled-inline {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    background-color: #ffebee;
    color: #c62828;
}

.status-chip.cancelled-inline .material-icons {
    font-size: 14px;
    margin-right: 4px;
}


.action-button.disabled {
    --mdc-theme-primary: #e0e0e0;
    --mdc-theme-on-primary: #9e9e9e;
    cursor: not-allowed;
}


/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: rgba(0, 0, 0, 0.6);
}

.empty-icon {
    font-size: 80px;
    color: rgba(0, 0, 0, 0.3);
    margin-bottom: 16px;
}

.empty-state h3 {
    margin: 16px 0 8px 0;
    font-weight: 400;
}

.empty-state p {
    margin: 0;
    opacity: 0.7;
}

/* Progress Bar */
#progressBar {
    margin: 16px 0;
}

/* Snackbar Customization */
.mdc-snackbar {
    z-index: 1000;
}

.mdc-snackbar.success .mdc-snackbar__surface {
    background-color: #4caf50;
}

.mdc-snackbar.error .mdc-snackbar__surface {
    background-color: var(--mdc-theme-error);
}

/* Dialog Customization */
.mdc-dialog .mdc-dialog__title {
    color: var(--mdc-theme-on-surface);
}

.mdc-dialog .mdc-dialog__content {
    color: rgba(0, 0, 0, 0.6);
}

.mdc-dialog .mdc-button--raised {
    --mdc-theme-primary: #f44336;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .card-content {
        padding: 16px;
    }
    
    .mdc-data-table__header-cell,
    .mdc-data-table__cell {
        padding: 12px 8px;
        font-size: 14px;
    }
    
    .stats-content {
        padding: 16px;
    }
    
    .stats-icon {
        font-size: 32px;
        margin-right: 12px;
    }
    
    .stats-number {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
    }
    
    .empty-state {
        padding: 60px 16px;
    }
    
    .empty-icon {
        font-size: 60px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Details Modal Styles */
.details-modal .mdc-dialog__surface {
    max-width: 800px;
    width: 90vw;
    max-height: 80vh;
}

.details-content {
    padding: 0;
    max-height: 60vh;
    overflow-y: auto;
}

.details-section {
    margin-bottom: 24px;
}

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

.section-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--mdc-theme-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 2px solid #e0e0e0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.detail-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid var(--mdc-theme-primary);
}

.detail-label {
    font-size: 11px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 14px;
    color: #333;
    word-break: break-word;
    line-height: 1.4;
}

    .detail-value.empty {
        color: #999;
        font-style: italic;
    }

.json-container {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Responsive adjustments für Details Modal */
@media (max-width: 768px) {
    .action-buttons {
        gap: 6px;
    }

    .action-button {
        min-width: 36px;
        padding: 6px;
    }

    .action-button .mdc-button__icon {
        font-size: 16px;
    }
}