:root {
    --jost-blue: #003da5;
    --jost-orange: #f58220;
    --text-dark: #1a1a1a;
    --text-medium: #4a5568;
    --text-light: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e0;
    --status-success: #48bb78;
    --status-error: #f56565;
    --status-warning: #ed8936;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--jost-blue) 0%, #002d7a 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow-lg);
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.logo-section {
    padding: 0 2rem 2rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo-image {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.logo-subtitle {
    font-size: 0.875rem;
    opacity: 0.8;
    font-weight: 400;
}

.carrier-badge {
    display: inline-block;
    background: var(--jost-orange);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-section {
    padding: 0 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-item.active {
    background: rgba(245, 130, 32, 0.2);
    color: var(--jost-orange);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    background-color: var(--bg-secondary);
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-medium);
    font-size: 1rem;
}

.card {
    background: var(--bg-primary);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-medium);
}

.card-body {
    padding: 1.5rem;
}

.upload-card {
    margin-bottom: 2rem;
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: end;
}

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

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.file-upload-wrapper {
    position: relative;
}

.file-upload-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    border: 2px dashed var(--border-medium);
    border-radius: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-medium);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 80px;
}

.file-upload-area:hover {
    border-color: var(--jost-blue);
    background: #f8f9ff;
    color: var(--jost-blue);
}

.file-upload-area.has-file {
    border-color: var(--jost-blue);
    background: #f0f7ff;
    color: var(--jost-blue);
    border-style: solid;
}

.upload-icon {
    width: 24px;
    height: 24px;
    opacity: 0.6;
}

.file-info {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-medium);
}

.file-info.success {
    color: var(--status-success);
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-medium);
    border-radius: 0.5rem;
    background-color: var(--bg-primary);
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 3rem;
}

.form-select:hover {
    border-color: var(--jost-blue);
    background-color: #f8f9ff;
}

.form-select:focus {
    outline: none;
    border-color: var(--jost-blue);
    box-shadow: 0 0 0 3px rgba(0, 61, 165, 0.1);
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--jost-orange) 0%, #e06d1a 100%);
    color: white;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 160px;
    height: 48px;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #e06d1a 0%, var(--jost-orange) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    background: var(--bg-tertiary);
    color: var(--text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

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

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

.summary-widget {
    background: linear-gradient(135deg, var(--jost-blue) 0%, #002d7a 100%);
    color: white;
    border: none;
}

.summary-widget .card-body {
    padding: 2rem;
}

.summary-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.status-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.status-icon.success {
    background: var(--status-success);
}

.status-icon.error {
    background: var(--status-error);
}

.status-icon.warning {
    background: var(--jost-orange);
}

.status-text {
    flex: 1;
}

.status-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.status-subtitle {
    opacity: 0.8;
    font-size: 0.875rem;
}

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

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.summary-widget .stat-value {
    color: white;
}
.summary-widget .stat-label {
    color: white;
}



.stat-label {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.currency-widget {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
}

.currency-rate {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1rem 0;
}

.currency-formula {
    opacity: 0.9;
    font-size: 0.875rem;
    font-family: 'Source Code Pro', monospace;
}

.audit-log {
    font-family: 'Source Code Pro', monospace;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    padding: 1rem;
}

.audit-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border-light);
}

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

.audit-title {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.audit-status {
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.audit-status.ok {
    background-color: var(--status-success);
    color: white;
}

.audit-status.fail {
    background-color: var(--status-error);
    color: white;
}

.audit-status.warning {
    background-color: var(--status-warning);
    color: white;
}

.audit-details {
    font-size: 0.875rem;
    padding-left: 1rem;
    color: var(--text-medium);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.results-table th,
.results-table td {
    border: 1px solid var(--border-light);
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
}

.results-table th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-dark);
}

.results-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.results-table th.sortable:hover {
    background-color: var(--bg-tertiary);
}

.results-table th.sortable::after {
    content: '↕';
    margin-left: 0.5rem;
    opacity: 0.5;
    font-size: 0.75rem;
}

.results-table th.sortable.asc::after {
    content: '▲';
    opacity: 1;
    color: var(--jost-blue);
}

.results-table th.sortable.desc::after {
    content: '▼';
    opacity: 1;
    color: var(--jost-blue);
}

.results-table td.status-ok {
    background-color: #f0fff4;
    color: var(--status-success);
    font-weight: 600;
    text-align: center;
}

.results-table td.status-fail {
    background-color: #fff5f5;
    color: var(--status-error);
    font-weight: 600;
    text-align: center;
}

.results-table td.status-warning {
    background-color: #fffaf0;
    color: var(--status-warning);
    font-weight: 600;
    text-align: center;
}

.results-table td.status-favorable {
    background-color: #f0fff4;
    color: var(--status-success);
    font-weight: 600;
    text-align: center;
}

.results-table td.status-error {
    background-color: #fff5f5;
    color: var(--status-error);
    font-weight: 700;
    text-align: center;
}

.bemerkung {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.8rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.spinner {
    width: 64px;
    height: 64px;
    border: 4px solid var(--bg-tertiary);
    border-top: 4px solid var(--jost-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
    max-width: 400px;
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ===== STATISTICS DISPLAY ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

/* Stat Card Variants */
.stat-success {
    border-left: 4px solid var(--status-success);
}

.stat-success .stat-value {
    color: var(--status-success);
}

.stat-warning {
    border-left: 4px solid var(--status-warning);
}

.stat-warning .stat-value {
    color: var(--status-warning);
}

.stat-error {
    border-left: 4px solid var(--status-error);
}

.stat-error .stat-value {
    color: var(--status-error);
}

.stat-total {
    border-left: 4px solid var(--jost-blue);
}

.stat-total .stat-value {
    color: var(--jost-blue);
}

.stat-deviation {
    border-left: 4px solid var(--jost-orange);
}

.stat-deviation .stat-value {
    color: var(--jost-orange);
    font-size: 1.5rem;
}

/* ===== RESULT DISPLAY ===== */
.table-container {
    margin-top: 1.5rem;
    overflow-x: auto;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-medium);
    font-size: 1.125rem;
}

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

.card-header .card-title {
    margin-bottom: 0;
}

.card-header .btn {
    margin-left: auto;
}

/* Status Badge Variants with Hero Icons */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hero Icon Styling */
.status-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.status-ok {
    background-color: #f0fff4;
    color: #22543d;
    border: 1px solid #c6f6d5;
}

.status-ok .status-icon {
    color: #22c55e;
}

.status-fail {
    background-color: #fff5f5;
    color: #742a2a;
    border: 1px solid #fed7d7;
}

.status-fail .status-icon {
    color: #ef4444;
}

.status-warning {
    background-color: #fffaf0;
    color: #7c2d12;
    border: 1px solid #feebc8;
}

.status-warning .status-icon {
    color: #f97316;
}

.status-favorable {
    background-color: #f0fdf4;
    color: #14532d;
    border: 1px solid #bbf7d0;
}

.status-favorable .status-icon {
    color: #22c55e;
}

.status-unknown {
    background-color: var(--bg-tertiary);
    color: var(--text-medium);
    border: 1px solid var(--border-medium);
}

/* ===== OVERVIEW CARD ===== */
.overview-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.overview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
}

.overview-label {
    font-weight: 500;
    color: var(--text-medium);
}

.overview-value {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.125rem;
}


@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }

    .upload-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
}