.metric-card {
            background: #f8f9fc;
            border-radius: 12px;
            padding: 1rem;
            text-align: center;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
            transition: all 0.2s;
            height: 100%;
        }
        .metric-value {
            font-size: 1.8rem;
            font-weight: 700;
            color: #2c3e66;
            font-family: 'Courier New', monospace;
        }
        .metric-label {
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #6c86a3;
        }
        .data-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.9rem;
        }
        .data-table th, .data-table td {
            padding: 10px 8px;
            text-align: center;
            border-bottom: 1px solid #e2e8f0;
            vertical-align: middle;
        }
        .data-table th {
            background-color: #f1f5f9;
            font-weight: 600;
        }
        .residual-badge {
            font-family: monospace;
            font-weight: 500;
        }
        .negative-residual { color: #d9534f; }
        .positive-residual { color: #5cb85c; }
        .example-preset {
            display: inline-flex;
            gap: 0.5rem;
            margin: 1rem 0;
            flex-wrap: wrap;
        }
        .preset-btn {
            background: #f1f5f9;
            border: none;
            padding: 0.3rem 0.9rem;
            border-radius: 30px;
            font-size: 0.8rem;
            color: #1e466e;
            transition: all 0.2s;
        }
        .preset-btn:hover {
            background: #e0e7ff;
            transform: translateY(-1px);
        }
        .residual-canvas {
            background: #ffffff;
            border-radius: 12px;
            border: 1px solid #e2e8f0;
            width: 100%;
            height: auto;
            margin-top: 1rem;
        }
        .legend-residual {
            display: flex;
            justify-content: center;
            gap: 1.2rem;
            margin-top: 0.5rem;
            font-size: 0.75rem;
        }
        .legend-dot {
            width: 14px;
            height: 14px;
            display: inline-block;
            border-radius: 2px;
            margin-right: 5px;
        }
        .legend-dot.positive { background-color: #5cb85c; }
        .legend-dot.negative { background-color: #d9534f; }
        .btn-icon {
            margin-left: 6px;
        }
        .table-container {
            overflow-x: auto;
        }
        .action-buttons {
            display: flex;
            gap: 0.6rem;
            justify-content: flex-end;
            margin: 1rem 0;
            flex-wrap: wrap;
        }
        .import-preview {
            font-size: 0.85rem;
            background: #f8f9fa;
            border-radius: 8px;
            padding: 1rem;
            margin-top: 1rem;
        }
        .modal-import textarea {
            font-family: monospace;
            font-size: 0.9rem;
        }