/* 1. Global Reset & Container */
#tc-stats-root, 
#tc-stats-root * { 
    box-sizing: border-box; 
}

.tc-stats-container { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    color: #1a1a1a; 
    max-width: 1200px; 
    margin: 10px auto; 
    padding: 0 10px; 
    line-height: 1.5; 
}

/* 2. Responsive Summary Grid */
.tc-summary-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 12px;
    margin-bottom: 25px;
}

@media (min-width: 768px) {
    .tc-summary-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.tc-summary-card { 
    padding: 18px; 
    border-radius: 12px; 
    color: #ffffff !important; 
    display: flex; 
    flex-direction: column;
}

.tc-summary-card.today { background: #059669; box-shadow: 0 8px 12px -3px rgba(5, 150, 105, 0.2); }
.tc-summary-card.current { background: #4f46e5; box-shadow: 0 8px 12px -3px rgba(79, 70, 229, 0.2); }
.tc-summary-card.previous { background: #475569; }

.tc-summary-header { 
    margin-bottom: 10px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); 
    padding-bottom: 6px; 
}

.tc-summary-label { font-size: 0.7rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; }
.tc-summary-stats { display: flex; justify-content: space-between; align-items: flex-end; }
.tc-summary-val { display: block; font-size: 1.4rem; font-weight: 800; line-height: 1; }
.tc-summary-txt { font-size: 0.6rem; text-transform: uppercase; opacity: 0.9; }

/* 3. Event Cards & Tables */
.tc-stat-card { 
    background: #ffffff; 
    border: 1px solid #e5e7eb; 
    border-radius: 12px; 
    margin-bottom: 25px; 
    overflow: hidden; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); 
}

.tc-card-header { padding: 15px 18px; background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
.tc-card-header h3 { margin: 0; font-size: 1rem; font-weight: 700; color: #111827; }

.tc-stat-table { width: 100%; border-collapse: collapse; table-layout: auto; }

/* Global Header Style */
.tc-stat-table th { 
    padding: 12px 15px; 
    font-size: 0.65rem; 
    text-transform: uppercase; 
    color: #6b7280; 
    border-bottom: 1px solid #f3f4f6; 
}

/* 1st Column: Event Name (Left) */
.tc-stat-table th:first-child,
.tc-stat-table td:first-child {
    text-align: left;
}

/* 2nd Column: Tickets Sold (Center) */
.tc-stat-table th:nth-child(2),
.tc-stat-table td:nth-child(2) {
    text-align: center !important;
}

/* 3rd Column: Revenue (Right) */
.tc-stat-table th:last-child,
.tc-stat-table td:last-child {
    text-align: right;
}

.tc-stat-table td { 
    padding: 14px 15px; 
    font-size: 0.85rem; 
    border-bottom: 1px solid #f3f4f6; 
    vertical-align: middle; 
}

.tc-row-title { font-weight: 600; color: #374151; word-break: break-word; }
.tc-row-num { font-family: monospace; font-weight: 600; }

/* 4. Card Footers (Totals) - Fixed to Right */
.tc-total-footer { 
    padding: 15px 18px; 
    background: #f9fafb; 
    display: flex; 
    flex-direction: column; 
    align-items: flex-end; 
    gap: 12px; 
    border-top: 1px solid #e5e7eb; 
}

@media (min-width: 600px) {
    .tc-total-footer { flex-direction: row; justify-content: flex-end; gap: 40px; }
}

.tc-total-item { text-align: right; }
.tc-total-label { 
    display: block; 
    font-size: 0.6rem; 
    color: #6b7280; 
    text-transform: uppercase; 
    font-weight: 700; 
    margin-bottom: 2px;
}

.tc-total-value { 
    font-size: 1.15rem; 
    font-weight: 800; 
    color: #10b981; 
}

.tc-sold-count { 
    color: #4f46e5; 
}

/* Today Breakdown Special Styling */
.tc-today-breakdown { border: 2px solid #059669; }
.today-footer { background: #f0fdf4 !important; }

/* Mobile Optimization */
@media (max-width: 480px) {
    .tc-stat-table td, .tc-stat-table th { padding: 10px 8px; font-size: 0.75rem; }
    .tc-summary-val { font-size: 1.25rem; }
}