/**
 * ============================================================
 *  Abrechnungsspitzen Extraktor - Zusätzliche Styles
 *  PDF Allrounder - SEP Interactive
 * ============================================================
 */

/* ===== Status Badges für Dateiliste ===== */
.file-item .status.netto { 
    background: rgba(5, 150, 105, 0.2); 
    color: #10b981; 
}

.file-item .status.brutto { 
    background: rgba(220, 38, 38, 0.2); 
    color: #ef4444; 
}

/* ===== Haupt-Tabelle im Excel-Stil ===== */
.excel-table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
    background: #1e1e3f;
    border-radius: 8px;
    padding: 1rem;
}

.excel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 1400px;
}

.excel-table th,
.excel-table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #3a3a5a;
    text-align: right;
    white-space: nowrap;
}

.excel-table th {
    background: #1e40af;
    color: white;
    font-weight: 600;
    text-align: center;
}

.excel-table th.group-header {
    background: #3b82f6;
}

.excel-table th.netto-header {
    background: #059669;
}

.excel-table th.brutto-header {
    background: #dc2626;
}

.excel-table th.spacer,
.excel-table td.spacer {
    background: #2a2a4a;
    width: 20px;
    min-width: 20px;
    border-color: #3a3a5a;
}

.excel-table td {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    background: #252550;
    color: #e0e0e0;
}

.excel-table td.text-left {
    text-align: left;
}

.excel-table td.netto {
    background: rgba(5, 150, 105, 0.1);
}

.excel-table td.brutto {
    background: rgba(220, 38, 38, 0.1);
}

.excel-table td.spitze-positive {
    color: #ef4444;
    font-weight: 600;
}

.excel-table td.spitze-negative {
    color: #10b981;
    font-weight: 600;
}

/* Editierbare Felder */
.excel-table td.editable {
    cursor: text;
    position: relative;
    transition: background-color 0.2s;
}

.excel-table td.editable:hover {
    background-color: rgba(59, 130, 246, 0.2) !important;
    outline: 1px solid #3b82f6;
}

.excel-table td.editable:focus {
    background-color: rgba(59, 130, 246, 0.3) !important;
    outline: 2px solid #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.excel-table td.editable::after {
    content: '✎';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.2s;
    color: #3b82f6;
}

.excel-table td.editable:hover::after {
    opacity: 0.5;
}

.excel-table tr.sum-row {
    background: rgba(254, 243, 199, 0.15);
}

.excel-table tr.sum-row td {
    border-top: 2px solid #4fc3f7;
    background: rgba(254, 243, 199, 0.1);
    color: #fef3c7;
    font-weight: 700;
}

.excel-table tr:hover:not(.sum-row):not(:first-child) {
    background: rgba(79, 195, 247, 0.1);
}

.excel-table tr:hover:not(.sum-row):not(:first-child) td {
    background: rgba(79, 195, 247, 0.05);
}

.excel-table .delete-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.excel-table .delete-btn:hover {
    opacity: 1;
}

/* ===== Typ-Spalte Badges ===== */
.excel-table .type-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.excel-table .type-badge.netto {
    background: #059669;
    color: white;
}

.excel-table .type-badge.brutto {
    background: #dc2626;
    color: white;
}

/* ===== Stats Bar ===== */
.stats-bar {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    background: #2a2a4a;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #3a3a5a;
    min-width: 150px;
}

.stat-item .label {
    font-size: 0.75rem;
    color: #a0a0c0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-item .value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    color: #4fc3f7;
}

.stat-item .value.positive { color: #ef4444; }
.stat-item .value.negative { color: #10b981; }

/* ===== MwSt Info Box ===== */
.mwst-info {
    background: rgba(79, 195, 247, 0.1);
    border-left: 4px solid #4fc3f7;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.875rem;
    color: #a0a0c0;
}

.mwst-info strong {
    color: #4fc3f7;
}

/* ===== File List für Upload ===== */
.file-list {
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    background: #2a2a4a;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid #3a3a5a;
}

.file-item .name {
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #e0e0e0;
}

.file-item .status {
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.file-item .status.success { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.file-item .status.error { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.file-item .status.processing { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }

/* ===== Info Text ===== */
.info-text {
    font-size: 0.875rem;
    color: #a0a0c0;
    margin-top: 0.5rem;
}

/* ===== Upload Section Overrides ===== */
.upload-card .upload-area {
    border-color: #4a4a7a;
    padding: 3rem;
}

.upload-card .upload-area:hover {
    border-color: #4fc3f7;
    background: rgba(79, 195, 247, 0.05);
}

.upload-card .upload-area .drop-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ===== Results Card ===== */
.results-card {
    margin-top: 1.5rem;
}

/* ===== Success/Danger Color Variables ===== */
.success-color { color: #10b981; }
.danger-color { color: #ef4444; }

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .stats-bar {
        flex-direction: column;
    }
    
    .stat-item {
        width: 100%;
    }
}
