/* ═══════════════════════════════════════
   FOODCOURT ADMIN — DESIGN SYSTEM
   ═══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ─── RESET ─────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    font-size: 14px;
    color: #111;
    background: #f5f6fa;
    -webkit-font-smoothing: antialiased;
}

/* ─── TYPOGRAPHY ────────────────────── */
.page-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.page-subtitle {
    font-size: 13px;
    color: #999;
    margin: 4px 0 0;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    margin: 0;
}

.label-upper {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .8px;
}

/* ─── LAYOUT ────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.page-header-left {
    display: flex;
    flex-direction: column;
}

.page-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ─── CARDS ─────────────────────────── */
.fc-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

.fc-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fc-card-body {
    padding: 20px;
}

/* ─── STAT CARDS ────────────────────── */
.stat-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    line-height: 1;
}

.stat-card-label {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

/* ─── TABLE ─────────────────────────── */
.fc-table {
    width: 100%;
    border-collapse: collapse;
}

    .fc-table thead tr {
        background: #fafafa;
        border-bottom: 1px solid #f0f0f0;
    }

    .fc-table thead th {
        padding: 10px 16px;
        font-size: 11px;
        font-weight: 600;
        color: #999;
        letter-spacing: .8px;
        text-align: left;
        white-space: nowrap;
    }

    .fc-table tbody tr {
        border-bottom: 1px solid #f8f8f8;
        transition: background .15s;
    }

        .fc-table tbody tr:hover {
            background: #fafafa;
        }

        .fc-table tbody tr:last-child {
            border-bottom: none;
        }

    .fc-table tbody td {
        padding: 12px 16px;
        vertical-align: middle;
        font-size: 13px;
    }

/* ─── TABLE PAGINATION ──────────────── */
.fc-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid #f5f5f5;
    background: #fafafa;
    font-size: 12px;
    color: #999;
}

/* ─── SEARCH BAR ────────────────────── */
.fc-search-bar {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* ─── STATUS PILLS ──────────────────── */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

    .status-pill::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        display: inline-block;
    }

.sp-active {
    background: #e8f5e9;
    color: #2e7d32;
}

    .sp-active::before {
        background: #2e7d32;
    }

.sp-grace {
    background: #fff8e1;
    color: #f57f17;
}

    .sp-grace::before {
        background: #f57f17;
    }

.sp-suspended {
    background: #fce4ec;
    color: #c62828;
}

    .sp-suspended::before {
        background: #c62828;
    }

.sp-cancelled {
    background: #f5f5f5;
    color: #666;
}

    .sp-cancelled::before {
        background: #999;
    }

.sp-blocked {
    background: #ffebee;
    color: #b71c1c;
}

    .sp-blocked::before {
        background: #b71c1c;
    }

.sp-pending {
    background: #fff8e1;
    color: #f57f17;
}

    .sp-pending::before {
        background: #f57f17;
    }

.sp-paid {
    background: #e8f5e9;
    color: #2e7d32;
}

    .sp-paid::before {
        background: #2e7d32;
    }

.sp-settled {
    background: #e8f5e9;
    color: #2e7d32;
}

    .sp-settled::before {
        background: #2e7d32;
    }

.sp-overdue {
    background: #fce4ec;
    color: #c62828;
}

    .sp-overdue::before {
        background: #c62828;
    }

.sp-open {
    background: #e8f5e9;
    color: #2e7d32;
}

    .sp-open::before {
        background: #2e7d32;
    }

.sp-completed {
    background: #e3f2fd;
    color: #1565c0;
}

    .sp-completed::before {
        background: #1565c0;
    }

.sp-preparing {
    background: #fff8e1;
    color: #f57f17;
}

    .sp-preparing::before {
        background: #f57f17;
    }

/* ─── AMOUNT TEXT ───────────────────── */
.amount-primary {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.amount-muted {
    font-size: 12px;
    color: #999;
}

.amount-success {
    font-size: 14px;
    font-weight: 600;
    color: #2e7d32;
}

.amount-danger {
    font-size: 14px;
    font-weight: 600;
    color: #c62828;
}

.amount-warning {
    font-size: 14px;
    font-weight: 600;
    color: #f57f17;
}

/* ─── USER AVATAR ───────────────────── */
.fc-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
    background: #e74c3c;
}

    .fc-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
    }

/* ─── ENTITY ROW (table name+sub) ───── */
.entity-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.entity-info {
    display: flex;
    flex-direction: column;
}

.entity-name {
    font-size: 13px;
    font-weight: 600;
    color: #111;
}

.entity-sub {
    font-size: 12px;
    color: #999;
    margin-top: 1px;
}

/* ─── DUE BADGES ────────────────────── */
.due-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.db-sub {
    background: #fff3e0;
    color: #e65100;
}

.db-comm {
    background: #fce4ec;
    color: #c62828;
}

/* ─── ACTION BUTTONS ────────────────── */
.action-btn-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* ─── FILTER BAR ────────────────────── */
.filter-bar {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* ─── EMPTY STATE ───────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 10px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    opacity: .3;
    margin-bottom: 4px;
}

/* ─── MUD OVERRIDES ─────────────────── */
.mud-drawer {
    background: #1a1a2e !important;
}

.mud-nav-link {
    color: rgba(255,255,255,.6) !important;
    border-radius: 8px !important;
    margin: 1px 8px !important;
    font-size: 13px !important;
}

    .mud-nav-link:hover,
    .mud-nav-link.active {
        background: rgba(255,255,255,.08) !important;
        color: white !important;
    }

    .mud-nav-link .mud-icon-root {
        color: rgba(255,255,255,.5) !important;
        font-size: 18px !important;
    }

    .mud-nav-link.active .mud-icon-root {
        color: white !important;
    }

.mud-appbar {
    border-bottom: 1px solid #f0f0f0 !important;
}

.mud-table-cell {
    padding: 12px 16px !important;
}

.mud-input-outlined .mud-input-outlined-border {
    border-radius: 8px !important;
}

.mud-button-root {
    border-radius: 8px !important;
}

.mud-icon-button {
    border-radius: 8px !important;
}

.mud-chip {
    border-radius: 6px !important;
}

.mud-paper {
    border-radius: 12px !important;
}

/* ─── RESPONSIVE TABLE ─── */
.fc-desktop-only {
    display: block;
}

.fc-mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .fc-desktop-only {
        display: none;
    }

    .fc-mobile-only {
        display: block;
    }
}

