/* ============================================
   MADx Hub Report Panel Styles
   v5.0 - Unified black/red/white theme
   ============================================ */

.report-panel {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 340px;
    max-height: calc(100vh - 100px);
    background: #0a0a1a;
    border: 1px solid #333;
    border-top: 2px solid #e63946;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.report-panel-hidden {
    transform: translateX(400px);
    opacity: 0;
    pointer-events: none;
}

/* Header */
.report-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #0a0a1a;
    border-bottom: 1px solid #222;
}

.report-panel-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.report-panel-close {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.report-panel-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e63946;
}

/* Body */
.report-panel-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

/* Sections */
.report-section {
    margin-bottom: 20px;
}

.report-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #e63946;
    margin-bottom: 8px;
}

/* Preset buttons */
.report-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.report-preset {
    padding: 6px 12px;
    font-size: 12px;
    background: #111;
    border: 1px solid #333;
    color: #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.report-preset:hover {
    border-color: #e63946;
    color: #fff;
}

.report-preset.active {
    background: #e63946;
    border-color: #e63946;
    color: #fff;
}

/* Custom dates */
.report-custom-dates {
    margin-top: 12px;
    padding: 12px;
    background: #111;
    border-radius: 8px;
    border: 1px solid #222;
}

.report-date-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.report-date-row:last-child {
    margin-bottom: 0;
}

.report-date-row label {
    width: 50px;
    font-size: 12px;
    color: #888;
}

.report-date-input {
    flex: 1;
    padding: 8px 10px;
    font-size: 13px;
    background: #0a0a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 6px;
}

.report-date-input:focus {
    outline: none;
    border-color: #e63946;
}

/* Select */
.report-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
}

.report-select:focus {
    outline: none;
    border-color: #e63946;
}

/* Checkboxes */
.report-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #ccc;
}

.report-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #e63946;
    cursor: pointer;
}

/* Text input */
.report-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    border-radius: 8px;
    box-sizing: border-box;
}

.report-input:focus {
    outline: none;
    border-color: #e63946;
}

/* Preview box */
.report-preview {
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
    background: #111;
    border: 1px solid #222;
    border-left: 3px solid #e63946;
    border-radius: 8px;
    margin-bottom: 16px;
}

.report-preview-stat {
    text-align: center;
}

.report-preview-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 4px;
}

.report-preview-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

/* Export button */
.report-export-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    background: #e63946;
    border: 1px solid #e63946;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-export-btn:hover:not(:disabled) {
    background: #d32f3f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.report-export-btn:active:not(:disabled) {
    transform: translateY(0);
}

.report-export-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.report-export-icon {
    font-size: 16px;
}

/* Status message */
.report-status {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 12px;
    text-align: center;
    border-radius: 6px;
    min-height: 20px;
}

.report-status:empty {
    display: none;
}

.report-status-success {
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid rgba(230, 57, 70, 0.3);
    color: #e63946;
}

.report-status-error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff6b6b;
}

/* Toolbar button */
#reportToggleBtn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    background: #0a0a1a;
    border: 1px solid #333;
    color: #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

#reportToggleBtn:hover {
    border-color: #e63946;
    color: #fff;
}

/* Responsive */
@media (max-width: 480px) {
    .report-panel {
        right: 10px;
        left: 10px;
        width: auto;
        max-height: calc(100vh - 80px);
    }
    
    .report-presets {
        gap: 4px;
    }
    
    .report-preset {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .report-preview {
        padding: 10px 12px;
    }
    
    .report-preview-value {
        font-size: 16px;
    }
}