/* ========================================
   REPORT CHIUSURE - PizzaFactory 2.0
   Glassmorphism Light (coerente con dashboard.css)
   ======================================== */

.rc-wrapper {
    padding: 20px 24px;
    background: #f5f7fa;
    min-height: calc(100vh - 80px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   HEADER
   ======================================== */
.rc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 16px 24px;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.1);
    border: 1px solid #e0e6ed;
    margin-bottom: 20px;
}

.rc-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rc-title-icon {
    font-size: 24px;
}

.rc-header-left h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
}

.rc-month-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rc-month-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f0f2f5;
    border: 1px solid #e0e6ed;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rc-month-btn:hover {
    background: var(--primary-color, #71a894);
    color: white;
    border-color: var(--primary-color, #71a894);
}

.rc-month-label {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    min-width: 160px;
    text-align: center;
}

.rc-header-right {
    display: flex;
    align-items: center;
}

.rc-chiusure-count {
    font-size: 14px;
    font-weight: 600;
    color: #7f8c8d;
    background: #f0f2f5;
    padding: 6px 14px;
    border-radius: 20px;
}

/* ========================================
   BODY - 2 colonne
   ======================================== */
.rc-body {
    display: flex;
    gap: 20px;
    min-height: 0;
}

/* ========================================
   COLONNA KPI (sinistra)
   ======================================== */
.rc-kpi-col {
    width: 38%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Grid 2x2 */
.rc-kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.rc-kpi-card {
    background: white;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.08);
    border: 1px solid #e0e6ed;
    text-align: center;
    transition: transform 0.15s ease;
}

.rc-kpi-card:hover {
    transform: translateY(-2px);
}

.rc-kpi-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.rc-kpi-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
}

.rc-kpi-card.kpi-entrata .rc-kpi-value {
    color: var(--primary-color, #71a894);
}

.rc-kpi-card.kpi-uscita .rc-kpi-value {
    color: var(--accent-red, #ec676c);
}

.rc-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Medie row */
.rc-medie-row {
    display: flex;
    gap: 10px;
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(31, 38, 135, 0.06);
    border: 1px solid #e0e6ed;
}

.rc-media-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.rc-media-icon {
    font-size: 18px;
}

.rc-media-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.rc-media-label {
    font-size: 12px;
    color: #7f8c8d;
}

/* Box Netto */
.rc-netto-box {
    background: white;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.1);
    border: 2px solid #e0e6ed;
    margin-top: auto;
}

.rc-netto-box.positivo {
    border-color: var(--primary-color, #71a894);
    background: linear-gradient(135deg, #f0faf6, #ffffff);
}

.rc-netto-box.negativo {
    border-color: var(--accent-red, #ec676c);
    background: linear-gradient(135deg, #fff5f5, #ffffff);
}

.rc-netto-label {
    font-size: 13px;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.rc-netto-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 32px;
    font-weight: 800;
    color: #2c3e50;
}

.rc-netto-box.positivo .rc-netto-value {
    color: var(--primary-color, #71a894);
}

.rc-netto-box.negativo .rc-netto-value {
    color: var(--accent-red, #ec676c);
}

.rc-netto-formula {
    font-size: 11px;
    color: #95a5a6;
    margin-top: 6px;
}

/* ========================================
   COLONNA TABELLA (destra)
   ======================================== */
.rc-table-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.rc-table-wrapper {
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.08);
    border: 1px solid #e0e6ed;
    overflow: auto;
    flex: 1;
    max-height: calc(100vh - 280px);
}

.rc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.rc-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.rc-table th {
    background: #f8f9fb;
    padding: 10px 8px;
    text-align: right;
    font-size: 11px;
    font-weight: 700;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #e0e6ed;
    white-space: nowrap;
}

.rc-table th:first-child {
    text-align: left;
    padding-left: 16px;
}

.rc-table td {
    padding: 10px 8px;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    color: #2c3e50;
    border-bottom: 1px solid #f0f2f5;
}

.rc-table td:first-child {
    text-align: left;
    padding-left: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #34495e;
}

.rc-table tbody tr:hover {
    background: #f8fafe;
}

.rc-table td.positivo {
    color: var(--primary-color, #71a894);
}

.rc-table td.negativo {
    color: var(--accent-red, #ec676c);
}

.rc-table td.zero {
    color: #bdc3c7;
}

/* Tfoot totali */
.rc-table tfoot {
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.rc-table tfoot td {
    background: #f0f2f5;
    font-weight: 700;
    font-size: 13px;
    border-top: 2px solid #e0e6ed;
    color: #2c3e50;
}

.rc-table tfoot td:first-child {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* ========================================
   DETTAGLI BOLLE/SPESE
   ======================================== */
.rc-dettagli {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rc-dettagli-toggle {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.rc-dettagli-toggle:hover {
    background: #f8f9fb;
}

.rc-dettagli-toggle span {
    color: #7f8c8d;
    font-weight: 500;
}

.rc-dettagli-content {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 12px 16px;
    max-height: 200px;
    overflow-y: auto;
}

.rc-dettaglio-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f0f2f5;
    font-size: 13px;
}

.rc-dettaglio-item:last-child {
    border-bottom: none;
}

.rc-dettaglio-info {
    color: #34495e;
}

.rc-dettaglio-meta {
    font-size: 11px;
    color: #95a5a6;
}

.rc-dettaglio-importo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--accent-red, #ec676c);
}

/* ========================================
   EMPTY STATE
   ======================================== */
.rc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #95a5a6;
    text-align: center;
}

.rc-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.rc-empty-text {
    font-size: 16px;
    font-weight: 500;
}

/* ========================================
   SCROLLBAR
   ======================================== */
.rc-table-wrapper::-webkit-scrollbar,
.rc-dettagli-content::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.rc-table-wrapper::-webkit-scrollbar-track,
.rc-dettagli-content::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 3px;
}

.rc-table-wrapper::-webkit-scrollbar-thumb,
.rc-dettagli-content::-webkit-scrollbar-thumb {
    background: #c0c7d0;
    border-radius: 3px;
}

.rc-table-wrapper::-webkit-scrollbar-thumb:hover,
.rc-dettagli-content::-webkit-scrollbar-thumb:hover {
    background: #a0a8b4;
}
