/* Retail-Plus Analytics Custom Styles */

:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --accent: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --surface: #ffffff;
    --background: #f8fafc;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background);
    color: #1e293b;
    margin: 0;
    padding: 0;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Transitions */
.tab-pane {
    display: none;
    animation: fadeIn 0.2s ease-in-out forwards;
}

.tab-pane.active {
    display: block;
}

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

/* Table sorting cursor */
th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease;
}

th.sortable:hover {
    background-color: #f1f5f9;
}

/* Dropzone styling */
.dropzone {
    border: 2px dashed #cbd5e1;
    transition: all 0.2s ease;
}
.dropzone.dragover {
    border-color: #0284c7;
    background-color: #f0f9ff;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success {
    background-color: #dcfce7;
    color: #15803d;
}
.badge-warning {
    background-color: #fef3c7;
    color: #b45309;
}
.badge-danger {
    background-color: #fee2e2;
    color: #b91c1c;
}
.badge-info {
    background-color: #e0f2fe;
    color: #0369a1;
}
.badge-neutral {
    background-color: #f1f5f9;
    color: #475569;
}

/* =============================================================
   FocusProm Financial Matrix Table Styles
   ============================================================= */
.fp-sticky-col {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: #ffffff;
    box-shadow: 3px 0 8px -2px rgba(0, 0, 0, 0.08);
}

.fp-sticky-header {
    position: sticky;
    top: 0;
    z-index: 20;
}

.fp-sticky-corner {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 30;
    box-shadow: 3px 3px 8px -2px rgba(0, 0, 0, 0.12);
}

/* Section Header Rows */
.fp-section-header {
    background: linear-gradient(90deg, #1e293b 0%, #334155 100%);
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    user-select: none;
}
.fp-section-header .fp-sticky-col {
    background: #1e293b;
    color: #ffffff;
}

/* Group Level 1 Rows */
.fp-group-row {
    background-color: #f8fafc;
    font-weight: 600;
    color: #0f172a;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    user-select: none;
}
.fp-group-row .fp-sticky-col {
    background-color: #f8fafc;
    color: #0f172a;
}
.fp-group-row:hover,
.fp-group-row:hover .fp-sticky-col {
    background-color: #f1f5f9;
}

/* Subgroup Level 2 Rows */
.fp-subgroup-row {
    background-color: #ffffff;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.fp-subgroup-row .fp-sticky-col {
    background-color: #ffffff;
    color: #475569;
}
.fp-subgroup-row:hover,
.fp-subgroup-row:hover .fp-sticky-col {
    background-color: #f8fafc;
}

/* Plan / Execution Columns */
.fp-plan-col {
    background-color: #faf5ff !important;
}
.fp-plan-header {
    background-color: #ede9fe !important;
    color: #6d28d9 !important;
}
.fp-exec-col {
    background-color: #f0fdf4 !important;
}
.fp-exec-header {
    background-color: #dcfce7 !important;
    color: #15803d !important;
}

/* Cell alignment & padding */
#focuspromTable th,
#focuspromTable td {
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
}

#focuspromTable .num-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
