/* ============================================
   TABLE MISSION CONTROL - Dark Editorial Design System
   ============================================ */

/* Background — subtle gradient, no animation */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: var(--color-bg-primary);
}

/* ============================================
   CONTAINER
   ============================================ */
.mc-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* ============================================
   TOP NAVIGATION
   ============================================ */
.mc-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--color-bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.mc-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color, #00cfb4);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 12px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mc-back-btn:hover {
    background: var(--color-bg-hover);
    transform: translateX(-2px);
}

.mc-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

.mc-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mc-range-select {
    padding: 8px 32px 8px 14px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text-primary);
    font-size: 13px;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    min-height: 38px;
}

.mc-refresh-btn {
    padding: 8px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
}

.mc-refresh-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.mc-refresh-btn.spinning svg {
    animation: spin 0.8s linear infinite;
}

/* ============================================
   LOADING
   ============================================ */
.mc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 20px;
    gap: 20px;
}

.mc-loading p {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

/* ============================================
   SUMMARY STATS BAR
   ============================================ */
.mc-summary-bar {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.mc-summary-card {
    flex: 1;
    min-width: 160px;
    background: var(--color-bg-secondary);
    border-radius: 16px;
    padding: 18px 20px;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.3s ease;
}

.mc-summary-card:hover {
    border-color: var(--color-border-light);
    transform: translateY(-2px);
}

.mc-summary-card.highlight {
    border-color: rgba(255, 200, 0, 0.3);
    background: rgba(255, 200, 0, 0.04);
}

.mc-summary-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: rgba(74, 144, 226, 0.15);
    color: var(--accent-color, #00cfb4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-summary-icon.revenue-icon {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.mc-summary-icon.peak-icon {
    background: rgba(255, 200, 0, 0.15);
    color: #ffc800;
}

.mc-summary-data {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mc-summary-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.1;
}

.mc-summary-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   TABS
   ============================================ */
.mc-tabs {
    display: flex;
    gap: 6px;
    background: var(--color-bg-secondary);
    padding: 6px;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mc-tab {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.mc-tab:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.mc-tab.active {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mc-tab-content {
    display: none;
    animation: fadeInTab 0.3s ease;
}

.mc-tab-content.active {
    display: block;
}

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

/* ============================================
   SECTION HEADERS
   ============================================ */
.mc-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.mc-section-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

.mc-section-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-tertiary);
}

/* ============================================
   TABLE STATS GRID
   ============================================ */
.mc-table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.mc-table-stat-card {
    background: var(--color-bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mc-table-stat-card:hover {
    border-color: var(--color-border-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.mc-tsc-header {
    padding: 18px 20px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
}

.mc-tsc-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.mc-tsc-type {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mc-tsc-type-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.mc-tsc-body {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.mc-tsc-stat {
    text-align: center;
}

.mc-tsc-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.mc-tsc-stat-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.mc-tsc-footer {
    padding: 12px 20px 16px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mc-tsc-top-players {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mc-tsc-player-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
}

.mc-tsc-health {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
}

.mc-tsc-health-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.mc-tsc-health-dot.good { background: var(--color-success); }
.mc-tsc-health-dot.warning { background: var(--color-warning); }
.mc-tsc-health-dot.overdue { background: var(--color-error); }

/* --- Table Card: Header Right (badges + type) --- */
.mc-tsc-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* --- Table Card: Ranking Badges --- */
.mc-tsc-badges {
    display: flex;
    gap: 5px;
}

.mc-tsc-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.mc-tsc-badge svg {
    flex-shrink: 0;
    vertical-align: middle;
}

.mc-badge-session {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.mc-badge-revenue {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.mc-badge-efficiency {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

/* --- Table Card: Top Card Highlight --- */
.mc-table-stat-card.mc-tsc-top {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.08);
}

/* --- Table Card: Utilization Bar --- */
.mc-tsc-utilization {
    padding: 10px 20px 12px;
}

.mc-tsc-util-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.mc-tsc-util-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mc-tsc-util-pct {
    font-size: 12px;
    font-weight: 700;
}

.mc-tsc-util-bar {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--color-bg-tertiary);
    overflow: hidden;
}

.mc-tsc-util-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================
   TOP TABLES LEADERBOARD
   ============================================ */
.mc-top-tables {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.mc-top-card {
    background: var(--color-bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mc-top-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
}

.mc-top-active::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.mc-top-revenue::before { background: linear-gradient(90deg, #22c55e, #4ade80); }
.mc-top-efficient::before { background: linear-gradient(90deg, #a855f7, #c084fc); }

.mc-top-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.mc-top-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mc-top-active .mc-top-icon { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.mc-top-revenue .mc-top-icon { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.mc-top-efficient .mc-top-icon { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.mc-top-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.mc-top-subtitle {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mc-top-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-top-metric {
    font-size: 13px;
    font-weight: 600;
}

.mc-top-active .mc-top-metric { color: #60a5fa; }
.mc-top-revenue .mc-top-metric { color: #4ade80; }
.mc-top-efficient .mc-top-metric { color: #c084fc; }

.mc-top-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    opacity: 0.15;
}

.mc-top-active .mc-top-badge { color: #3b82f6; }
.mc-top-revenue .mc-top-badge { color: #22c55e; }
.mc-top-efficient .mc-top-badge { color: #a855f7; }

/* ============================================
   TABLE SORT CONTROLS
   ============================================ */
.mc-table-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.mc-table-controls-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mc-sort-pills {
    display: flex;
    gap: 6px;
}

.mc-sort-pill {
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: var(--color-bg-secondary);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mc-sort-pill:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
}

.mc-sort-pill.active {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

/* ============================================
   ANALYTICS GRID
   ============================================ */
.mc-analytics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.mc-analytics-card {
    background: var(--color-bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.mc-card-header {
    padding: 20px 24px 14px;
    border-bottom: 1px solid var(--color-border);
}

.mc-card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

.mc-card-subtitle {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-tertiary);
    display: block;
    margin-top: 4px;
}

/* ============================================
   HEATMAP
   ============================================ */
.mc-heatmap {
    padding: 20px 24px;
    overflow-x: auto;
}

.mc-heatmap-grid {
    display: grid;
    grid-template-columns: 50px repeat(24, 1fr);
    gap: 3px;
    min-width: 600px;
}

.mc-heatmap-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    padding-right: 8px;
}

.mc-heatmap-hour-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-align: center;
    padding-bottom: 4px;
}

.mc-heatmap-cell {
    aspect-ratio: 1;
    border-radius: 4px;
    min-height: 24px;
    transition: all 0.2s ease;
    cursor: default;
    position: relative;
}

.mc-heatmap-cell:hover {
    transform: scale(1.3);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.mc-heatmap-cell[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 100;
}

.hm-0 { background: var(--color-bg-tertiary); }
.hm-1 { background: rgba(74, 144, 226, 0.2); }
.hm-2 { background: rgba(74, 144, 226, 0.35); }
.hm-3 { background: rgba(74, 144, 226, 0.5); }
.hm-4 { background: rgba(74, 144, 226, 0.65); }
.hm-5 { background: rgba(74, 144, 226, 0.85); }

/* ============================================
   BAR CHART
   ============================================ */
.mc-bar-chart {
    padding: 20px 24px;
}

.mc-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.mc-bar-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    min-width: 80px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-bar-track {
    flex: 1;
    height: 28px;
    background: var(--color-bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.mc-bar-fill {
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--accent-color, #00cfb4), rgba(74, 222, 128, 0.8));
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    padding-left: 10px;
    min-width: 40px;
}

.mc-bar-value {
    font-size: 11px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}

/* ============================================
   RECENT SESSIONS
   ============================================ */
.mc-recent-list {
    padding: 8px 0;
    max-height: 400px;
    overflow-y: auto;
}

.mc-recent-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.2s ease;
}

.mc-recent-item:hover {
    background: var(--color-bg-tertiary);
}

.mc-recent-item:last-child {
    border-bottom: none;
}

.mc-recent-table {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-primary);
    min-width: 80px;
}

.mc-recent-players {
    flex: 1;
    font-size: 12px;
    color: var(--color-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mc-recent-duration {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    min-width: 60px;
    text-align: right;
}

.mc-recent-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-success);
    min-width: 65px;
    text-align: right;
}

.mc-recent-time {
    font-size: 11px;
    color: var(--color-text-tertiary);
    min-width: 70px;
    text-align: right;
}

/* ============================================
   MAINTENANCE
   ============================================ */
.mc-add-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent-color, #00cfb4);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mc-add-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Form Card */
.mc-form-card {
    background: var(--color-bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--color-border-light);
    margin-bottom: 20px;
    overflow: hidden;
    animation: fadeInTab 0.3s ease;
}

.mc-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-border);
}

.mc-form-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

.mc-form-close {
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mc-form-close:hover {
    background: var(--color-bg-hover);
}

.mc-form-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mc-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.mc-form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mc-form-group input,
.mc-form-group select,
.mc-form-group textarea {
    padding: 10px 14px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    min-height: 42px;
    transition: all 0.2s ease;
}

.mc-form-group input:focus,
.mc-form-group select:focus,
.mc-form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color, #00cfb4);
    background: var(--color-bg-hover);
}

.mc-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.mc-form-row {
    display: flex;
    gap: 14px;
}

.mc-form-submit {
    padding: 14px 24px;
    background: var(--accent-color, #00cfb4);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mc-form-submit:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.mc-form-submit:active {
    transform: translateY(0) scale(0.98);
}

/* Maintenance List */
.mc-maintenance-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mc-maint-card {
    background: var(--color-bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.2s ease;
}

.mc-maint-card:hover {
    border-color: var(--color-border-light);
}

.mc-maint-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.mc-maint-icon.scheduled { background: rgba(59, 130, 246, 0.15); color: var(--color-info); }
.mc-maint-icon.in-progress { background: rgba(251, 191, 36, 0.15); color: var(--color-warning); }
.mc-maint-icon.completed { background: var(--color-success-bg); color: var(--color-success); }

.mc-maint-info {
    flex: 1;
    min-width: 0;
}

.mc-maint-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.mc-maint-meta {
    font-size: 12px;
    color: var(--color-text-tertiary);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.mc-maint-desc {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.mc-maint-status {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.mc-maint-status.scheduled { background: rgba(59, 130, 246, 0.15); color: var(--color-info); }
.mc-maint-status.in-progress { background: rgba(251, 191, 36, 0.15); color: var(--color-warning); }
.mc-maint-status.completed { background: var(--color-success-bg); color: var(--color-success); }

.mc-maint-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.mc-maint-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-tertiary);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mc-maint-action-btn:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

/* ============================================
   PLAYER LEADERBOARD
   ============================================ */
.mc-leaderboard {
    background: var(--color-bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.mc-lb-header {
    display: grid;
    grid-template-columns: 50px 1fr 80px 80px 80px 100px;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-border);
    font-size: 10px;
    font-weight: 700;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mc-lb-row {
    display: grid;
    grid-template-columns: 50px 1fr 80px 80px 80px 100px;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-border);
    align-items: center;
    transition: background 0.2s ease;
}

.mc-lb-row:hover {
    background: var(--color-bg-tertiary);
}

.mc-lb-row:last-child {
    border-bottom: none;
}

.mc-lb-rank {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-tertiary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-lb-rank.top-3 {
    color: #ffc800;
}

.mc-lb-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.mc-lb-stat {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-align: center;
}

.mc-lb-fav-table {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-color, #00cfb4);
    text-align: center;
}

/* ============================================
   WAITLIST ANALYTICS
   ============================================ */

/* Waitlist Summary Cards */
.mc-wl-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.mc-wl-summary-card {
    background: var(--color-bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    padding: 18px 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.mc-wl-summary-card:hover {
    border-color: var(--color-border-light);
    transform: translateY(-2px);
}

.mc-wl-summary-card.wl-seated {
    border-color: rgba(74, 222, 128, 0.2);
    background: rgba(74, 222, 128, 0.04);
}

.mc-wl-summary-card.wl-noshow {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.04);
}

.mc-wl-summary-card.wl-conversion {
    border-color: rgba(139, 92, 246, 0.2);
    background: rgba(139, 92, 246, 0.04);
}

.mc-wl-summary-card.wl-wait {
    border-color: rgba(251, 191, 36, 0.2);
    background: rgba(251, 191, 36, 0.04);
}

.mc-wl-summary-card.wl-party {
    border-color: rgba(74, 144, 226, 0.2);
    background: rgba(74, 144, 226, 0.04);
}

.mc-wl-summary-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.mc-wl-summary-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.wl-seated .mc-wl-summary-value { color: var(--color-success); }
.wl-noshow .mc-wl-summary-value { color: var(--color-error); }
.wl-conversion .mc-wl-summary-value { color: #8b5cf6; }
.wl-wait .mc-wl-summary-value { color: var(--color-warning); }
.wl-party .mc-wl-summary-value { color: var(--accent-color, #00cfb4); }

/* Conversion Funnel */
.mc-wl-funnel {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mc-wl-funnel-stage {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mc-wl-funnel-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.mc-wl-funnel-icon {
    font-size: 16px;
}

.mc-wl-funnel-count {
    margin-left: auto;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.mc-wl-funnel-bar-track {
    height: 24px;
    background: var(--color-bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
}

.mc-wl-funnel-bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 4px;
}

.mc-wl-funnel-dropoff {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-tertiary);
    padding-left: 28px;
}

.mc-wl-noshow-callout {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

/* Hourly Chart */
.mc-wl-hour-chart {
    padding: 20px 24px;
}

.mc-wl-hour-grid {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 180px;
}

.mc-wl-hour-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
}

.mc-wl-hour-bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.mc-wl-hour-bar {
    width: 100%;
    max-width: 28px;
    border-radius: 4px 4px 0 0;
    background: rgba(74, 144, 226, 0.5);
    transition: height 0.6s ease, background 0.3s ease;
    min-height: 2px;
}

.mc-wl-hour-col.peak .mc-wl-hour-bar {
    background: linear-gradient(180deg, #ffc800, #f59e0b);
    box-shadow: 0 0 12px rgba(255, 200, 0, 0.3);
}

.mc-wl-hour-col:hover .mc-wl-hour-bar {
    background: rgba(74, 144, 226, 0.8);
}

.mc-wl-hour-col.peak:hover .mc-wl-hour-bar {
    background: linear-gradient(180deg, #ffc800, #f59e0b);
}

.mc-wl-hour-val {
    font-size: 9px;
    font-weight: 700;
    color: var(--color-text-secondary);
    min-height: 14px;
}

.mc-wl-hour-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--color-text-tertiary);
    min-height: 12px;
}

/* Table Preferences */
.mc-wl-prefs .mc-bar-fill.mc-wl-pref-bar {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

/* Repeat Visitors Table */
.mc-wl-visitors {
    overflow-x: auto;
}

.mc-wl-visitor-header {
    display: grid;
    grid-template-columns: 50px 1fr 70px 70px 80px 80px;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-border);
    font-size: 10px;
    font-weight: 700;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mc-wl-visitor-row {
    display: grid;
    grid-template-columns: 50px 1fr 70px 70px 80px 80px;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-border);
    align-items: center;
    transition: background 0.2s ease;
}

.mc-wl-visitor-row:hover {
    background: var(--color-bg-tertiary);
}

.mc-wl-visitor-row:last-child {
    border-bottom: none;
}

.mc-wl-visitor-rank {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-tertiary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mc-wl-visitor-rank.top-3 {
    color: #ffc800;
}

.mc-wl-visitor-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.mc-wl-visitor-stat {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-align: center;
}

/* Recent Waitlist */
.mc-wl-recent {
    max-height: 400px;
    overflow-y: auto;
}

.mc-wl-recent-list {
    padding: 0;
}

.mc-wl-recent-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.2s ease;
}

.mc-wl-recent-item:hover {
    background: var(--color-bg-tertiary);
}

.mc-wl-recent-item:last-child {
    border-bottom: none;
}

.mc-wl-recent-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

.mc-wl-recent-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-primary);
    white-space: nowrap;
}

.mc-wl-recent-party {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-tertiary);
    white-space: nowrap;
}

.mc-wl-recent-pref {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-wl-recent-wait {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    min-width: 70px;
    text-align: right;
    white-space: nowrap;
}

.mc-wl-recent-status {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.mc-wl-recent-time {
    font-size: 11px;
    color: var(--color-text-tertiary);
    min-width: 80px;
    text-align: right;
    white-space: nowrap;
}

/* ============================================
   EMPTY STATES
   ============================================ */
.mc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 14px;
    text-align: center;
}

.mc-empty svg {
    color: var(--color-text-tertiary);
    opacity: 0.4;
}

.mc-empty h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

.mc-empty p {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin: 0;
    max-width: 360px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .mc-container {
        padding: 12px;
    }

    .mc-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px 16px;
    }

    .mc-title {
        text-align: left;
        font-size: 18px;
    }

    .mc-nav-actions {
        justify-content: flex-end;
    }

    .mc-summary-bar {
        gap: 10px;
    }

    .mc-summary-card {
        min-width: 140px;
        padding: 14px 16px;
    }

    .mc-summary-value {
        font-size: 18px;
    }

    .mc-table-grid {
        grid-template-columns: 1fr;
    }

    .mc-top-tables {
        grid-template-columns: 1fr;
    }

    .mc-table-controls {
        flex-wrap: wrap;
    }

    .mc-sort-pills {
        flex-wrap: wrap;
    }

    .mc-tsc-badges {
        display: none;
    }

    .mc-lb-header,
    .mc-lb-row {
        grid-template-columns: 36px 1fr 60px 60px 60px 80px;
        gap: 8px;
        padding: 12px 14px;
        font-size: 12px;
    }

    .mc-heatmap-grid {
        min-width: 500px;
    }

    .mc-form-row {
        flex-direction: column;
    }

    .mc-wl-summary {
        grid-template-columns: repeat(3, 1fr);
    }

    .mc-wl-visitor-header,
    .mc-wl-visitor-row {
        grid-template-columns: 36px 1fr 55px 55px 65px 65px;
        gap: 8px;
        padding: 12px 14px;
        font-size: 12px;
    }
}

@media (max-width: 600px) {
    .mc-summary-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .mc-tabs {
        overflow-x: auto;
    }

    .mc-tab {
        min-width: 100px;
        padding: 10px 14px;
        font-size: 13px;
    }

    .mc-lb-header,
    .mc-lb-row {
        grid-template-columns: 30px 1fr 50px 70px;
    }

    .mc-lb-header > :nth-child(4),
    .mc-lb-row > :nth-child(4),
    .mc-lb-header > :nth-child(5),
    .mc-lb-row > :nth-child(5) {
        display: none;
    }

    .mc-recent-time {
        display: none;
    }

    .mc-wl-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .mc-wl-visitor-header,
    .mc-wl-visitor-row {
        grid-template-columns: 30px 1fr 50px 50px;
    }

    .mc-wl-visitor-header > :nth-child(5),
    .mc-wl-visitor-row > :nth-child(5),
    .mc-wl-visitor-header > :nth-child(6),
    .mc-wl-visitor-row > :nth-child(6) {
        display: none;
    }

    .mc-wl-recent-pref,
    .mc-wl-recent-time {
        display: none;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
.mc-table-stat-card {
    animation: fadeInTab 0.4s ease backwards;
}

.mc-table-stat-card:nth-child(1) { animation-delay: 0.05s; }
.mc-table-stat-card:nth-child(2) { animation-delay: 0.1s; }
.mc-table-stat-card:nth-child(3) { animation-delay: 0.15s; }
.mc-table-stat-card:nth-child(4) { animation-delay: 0.2s; }
.mc-table-stat-card:nth-child(5) { animation-delay: 0.25s; }
.mc-table-stat-card:nth-child(6) { animation-delay: 0.3s; }

/* ============================================
   EXPORT BUTTON
   ============================================ */
.mc-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--color-bg-tertiary, rgba(255,255,255,0.06));
    border: 1px solid var(--color-border, rgba(255,255,255,0.08));
    border-radius: 8px;
    color: var(--color-text-secondary, rgba(255,255,255,0.6));
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}
.mc-export-btn:hover {
    background: var(--accent-color-dim, rgba(74,144,226,0.15));
    color: var(--accent-color, #4A90E2);
    border-color: var(--accent-color, #4A90E2);
}

.chart-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.chart-card-header h3 { margin: 0; }
.chart-card-header span { flex: 1; }

/* Cart item tag in transaction list */
.mc-recent-cart {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: rgba(251, 191, 36, 0.12);
    color: var(--color-warning);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
