/* ═══════════════════════════════════════════════
   GCMS — GameStop Café Management System
   Main Stylesheet
   ═══════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────── */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 60px;
    --gcms-primary: #6366f1;
    --gcms-success: #10b981;
    --gcms-warning: #f59e0b;
    --gcms-danger: #ef4444;
    --gcms-bg: #0f172a;
    --gcms-surface: #1e293b;
    --gcms-border: #334155;
    --gcms-text: #e2e8f0;
    --gcms-muted: #94a3b8;
    --gcms-sidebar-bg: #1e293b;
    --gcms-topbar-bg: #1e293b;
    --sidebar-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Base ────────────────────────────────────── */
* { box-sizing: border-box; }

body.gcms-body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--gcms-bg);
    color: var(--gcms-text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* ── Layout ──────────────────────────────────── */
.gcms-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--gcms-sidebar-bg);
    border-right: 1px solid var(--gcms-border);
    display: flex;
    flex-direction: column;
    transition: width var(--sidebar-transition);
    z-index: 1000;
    overflow: hidden;
}

.gcms-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--sidebar-transition);
}

/* ── Sidebar Header ──────────────────────────── */
.sidebar-header {
    padding: 1.25rem 1.25rem;
    border-bottom: 1px solid var(--gcms-border);
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gcms-primary);
    text-decoration: none;
    white-space: nowrap;
}

.sidebar-logo {
    max-height: 36px;
    max-width: 180px;
    object-fit: contain;
}

/* ── Sidebar Menu ────────────────────────────── */
.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0;
}

.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-track { background: transparent; }
.sidebar-menu::-webkit-scrollbar-thumb { background: var(--gcms-border); border-radius: 2px; }

.nav-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gcms-muted);
    padding: 0.75rem 1.25rem 0.25rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    color: var(--gcms-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}

.sidebar-menu .nav-link i {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.sidebar-menu .nav-link:hover {
    color: var(--gcms-text);
    background: rgba(99, 102, 241, 0.1);
}

.sidebar-menu .nav-link.active {
    color: var(--gcms-primary);
    background: rgba(99, 102, 241, 0.15);
    border-right: 3px solid var(--gcms-primary);
}

/* ── Sidebar Footer ──────────────────────────── */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--gcms-border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--gcms-text);
    border-radius: 0.5rem;
    padding: 0.5rem;
    transition: background 0.15s;
}

.sidebar-user:hover { background: rgba(255,255,255,0.05); color: var(--gcms-text); }

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gcms-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.sidebar-user-info { overflow: hidden; }
.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    font-size: 0.7rem;
    color: var(--gcms-muted);
    display: block;
}

/* ── Top Bar ─────────────────────────────────── */
.gcms-topbar {
    height: var(--topbar-height);
    background: var(--gcms-topbar-bg);
    border-bottom: 1px solid var(--gcms-border);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    color: var(--gcms-muted);
    padding: 0.25rem;
    border: none;
}

.sidebar-toggle:hover { color: var(--gcms-text); }

.topbar-actions .btn-link {
    color: var(--gcms-muted);
    text-decoration: none;
    padding: 0.25rem;
}

.topbar-actions .btn-link:hover { color: var(--gcms-text); }

/* ── Page Content ────────────────────────────── */
.gcms-content {
    flex: 1;
    padding: 1.5rem;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--gcms-text);
}

/* ── Cards ───────────────────────────────────── */
.card {
    background: var(--gcms-surface);
    border: 1px solid var(--gcms-border);
    border-radius: 0.75rem;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gcms-border);
    padding: 1rem 1.25rem;
}

/* ── Stat Cards ──────────────────────────────── */
.stat-card {
    background: var(--gcms-surface);
    border: 1px solid var(--gcms-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s;
}

.stat-card:hover { border-color: var(--gcms-primary); }

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gcms-muted);
    margin-top: 0.25rem;
}

/* ── Auth Pages ──────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gcms-bg);
    background-image: radial-gradient(
        ellipse at 50% 50%,
        rgba(99, 102, 241, 0.1) 0%,
        transparent 70%
    );
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.auth-card {
    background: var(--gcms-surface);
    border: 1px solid var(--gcms-border);
    border-radius: 1rem;
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 2.5rem 2rem 1.5rem;
}

.auth-logo {
    width: 70px;
    height: 70px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gcms-primary);
    margin: 0 auto 1rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}

.auth-subtitle {
    color: var(--gcms-muted);
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
}

.auth-body { padding: 1.5rem 2rem; }

.auth-footer {
    padding: 1rem 2rem;
    text-align: center;
    border-top: 1px solid var(--gcms-border);
}

/* ── Form Controls ───────────────────────────── */
.form-control, .form-select {
    background: var(--gcms-bg);
    border-color: var(--gcms-border);
    color: var(--gcms-text);
    border-radius: 0.5rem;
}

.form-control:focus, .form-select:focus {
    background: var(--gcms-bg);
    border-color: var(--gcms-primary);
    color: var(--gcms-text);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gcms-muted);
}

/* ── Buttons ─────────────────────────────────── */
.btn-primary {
    background: var(--gcms-primary);
    border-color: var(--gcms-primary);
    font-weight: 600;
}

.btn-primary:hover {
    background: #4f46e5;
    border-color: #4f46e5;
}

/* ── Avatar Placeholder ──────────────────────── */
.avatar-placeholder-lg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gcms-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

/* ── Messages ────────────────────────────────── */
.messages-container { margin-bottom: 1.5rem; }

/* ── Breadcrumb ──────────────────────────────── */
.breadcrumb-item a { color: var(--gcms-primary); text-decoration: none; }
.breadcrumb-item.active { color: var(--gcms-muted); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--gcms-muted); }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
    .gcms-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .gcms-sidebar.open {
        transform: translateX(0);
    }

    .gcms-main {
        margin-left: 0;
    }
}

/* ── Station Cards ───────────────────────────── */
.station-card {
    background: var(--gcms-surface);
    border: 1px solid var(--gcms-border);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.station-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.station-available { border-color: #10b981; }
.station-occupied  { border-color: #6366f1; }
.station-maintenance { border-color: #f59e0b; }
.station-offline   { border-color: #475569; }

.station-card-header {
    padding: 0.875rem 1rem;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border-bottom: 1px solid var(--gcms-border);
}

.station-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gcms-text);
}

.station-type-label {
    font-size: 0.72rem;
    color: var(--gcms-muted);
}

.station-status-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-available  { background: rgba(16,185,129,0.15); color: #10b981; }
.status-occupied   { background: rgba(99,102,241,0.15); color: #818cf8; }
.status-maintenance{ background: rgba(245,158,11,0.15); color: #f59e0b; }
.status-offline    { background: rgba(71,85,105,0.2);   color: #94a3b8; }

.station-card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.station-card-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--gcms-border);
    background: rgba(0,0,0,0.1);
}

.station-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    padding: 0.5rem 0;
}

/* Session Info inside station card */
.session-info { flex: 1; }
.session-customer {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.session-meta {
    font-size: 0.75rem;
    color: var(--gcms-muted);
    margin-bottom: 0.25rem;
}
.session-timer {
    font-size: 0.85rem;
    font-weight: 600;
}
.session-cost { font-size: 0.9rem; color: var(--gcms-muted); }

/* ── Big Timer (Session Detail) ──────────────── */
.session-big-timer {
    font-size: 3.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1;
}

/* ── Mini Station Grid (Dashboard) ──────────── */
.station-mini {
    display: block;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--gcms-border);
    border-radius: 0.5rem;
    padding: 0.6rem 0.75rem;
    transition: border-color 0.15s, background 0.15s;
    color: var(--gcms-text);
}

.station-mini:hover {
    background: rgba(99,102,241,0.1);
    border-color: var(--gcms-primary);
    color: var(--gcms-text);
}

.station-mini.station-available { border-color: rgba(16,185,129,0.4); }
.station-mini.station-occupied  { border-color: rgba(99,102,241,0.4); }

.station-mini-name {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.station-mini-status {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Stat sub-label ──────────────────────────── */
.stat-sub {
    font-size: 0.7rem;
    color: var(--gcms-muted);
    margin-top: 0.15rem;
}

/* ── Mono font for IDs ───────────────────────── */
.fw-mono { font-family: 'Courier New', monospace; }

/* ── Table ───────────────────────────────────── */
.table {
    color: var(--gcms-text);
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(99,102,241,0.07);
}
.table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gcms-muted);
    border-bottom-color: var(--gcms-border);
}
.table td { border-bottom-color: var(--gcms-border); }

/* ── Payment Method Cards ─────────────────────── */
.payment-method-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--gcms-surface);
    border: 1px solid var(--gcms-border);
    border-radius: 0.75rem;
    text-decoration: none;
    color: var(--gcms-text);
    transition: border-color 0.2s, background 0.2s, transform 0.1s;
    height: 100%;
    min-height: 140px;
    cursor: pointer;
}

.payment-method-card:hover {
    border-color: var(--gcms-primary);
    background: rgba(99,102,241,0.08);
    color: var(--gcms-text);
    transform: translateY(-2px);
}

.payment-method-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.payment-method-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.payment-method-desc {
    font-size: 0.72rem;
    color: var(--gcms-muted);
}

/* ── Receipt ─────────────────────────────────── */
.receipt-card {
    font-family: 'Courier New', monospace;
    background: #fff;
    color: #111;
    border-radius: 0.5rem;
}

.receipt-card .receipt-divider {
    text-align: center;
    color: #888;
    margin: 0.75rem 0;
    font-size: 0.8rem;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.15rem 0;
    font-size: 0.85rem;
}

.receipt-total {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.35rem 0;
}

.receipt-item {
    margin-bottom: 0.5rem;
}

.receipt-item-desc {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.1rem;
}

/* ── M-Pesa Spinner ──────────────────────────── */
.mpesa-spinner {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(76,175,80,0.2);
    border-top-color: #4caf50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Print ───────────────────────────────────── */
@media print {
    .gcms-sidebar,
    .gcms-topbar,
    .btn,
    .breadcrumb,
    .page-header { display: none !important; }
    .gcms-main { margin-left: 0 !important; }
    .receipt-card { border: none; box-shadow: none; }
}

/* ── Payment Nav Tiles ───────────────────────── */
.payment-nav-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.25rem 0.75rem;
    background: var(--gcms-surface);
    border: 1px solid var(--gcms-border);
    border-radius: 0.75rem;
    text-decoration: none;
    color: var(--gcms-text);
    transition: border-color 0.2s, background 0.2s, transform 0.1s;
    min-height: 110px;
    cursor: pointer;
}

.payment-nav-tile:hover {
    border-color: var(--gcms-primary);
    background: rgba(99,102,241,0.08);
    color: var(--gcms-text);
    transform: translateY(-2px);
}

.payment-nav-tile-warning {
    border-color: rgba(245,158,11,0.5);
    background: rgba(245,158,11,0.05);
}

.payment-nav-tile-warning:hover {
    border-color: #f59e0b;
    background: rgba(245,158,11,0.1);
}

.payment-nav-tile-dev {
    border-style: dashed;
    border-color: rgba(245,158,11,0.4);
    opacity: 0.8;
}

.payment-nav-icon {
    font-size: 1.75rem;
    margin-bottom: 0.4rem;
    display: block;
}

.payment-nav-label {
    font-size: 0.82rem;
    font-weight: 600;
}

.payment-nav-sub {
    font-size: 0.7rem;
    color: var(--gcms-muted);
    margin-top: 0.15rem;
}

/* ── Method Badges ───────────────────────────── */
.method-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.method-cash {
    background: rgba(16,185,129,0.15);
    color: #10b981;
}

.method-mpesa {
    background: rgba(76,175,80,0.15);
    color: #4caf50;
}

/* ── POS Screen Layout ───────────────────────── */
.pos-screen {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1rem;
    height: calc(100vh - 120px);
    overflow: hidden;
}

@media (max-width: 992px) {
    .pos-screen {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
}

/* ── Catalog ─────────────────────────────────── */
.pos-catalog {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--gcms-surface);
    border: 1px solid var(--gcms-border);
    border-radius: 0.75rem;
}

.pos-catalog-header {
    padding: 0.875rem;
    border-bottom: 1px solid var(--gcms-border);
    flex-shrink: 0;
}

.pos-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    padding: 0.875rem;
    overflow-y: auto;
    flex: 1;
}

.pos-product-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--gcms-border);
    border-radius: 0.5rem;
    padding: 0.6rem;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    text-align: center;
    position: relative;
    user-select: none;
}

.pos-product-card:hover {
    border-color: var(--gcms-primary);
    transform: scale(1.02);
}

.pos-product-card:active {
    transform: scale(0.98);
}

.pos-product-img {
    width: 100%;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.4rem;
}

.pos-product-img-placeholder {
    width: 100%;
    height: 64px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 0.4rem;
}

.pos-product-name {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.pos-product-price {
    font-size: 0.8rem;
    color: var(--gcms-primary);
    font-weight: 700;
}

.pos-out-of-stock {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #ef4444;
    text-transform: uppercase;
}

/* ── Cart ────────────────────────────────────── */
.pos-cart {
    display: flex;
    flex-direction: column;
    background: var(--gcms-surface);
    border: 1px solid var(--gcms-border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.pos-cart-header {
    padding: 0.875rem;
    border-bottom: 1px solid var(--gcms-border);
    flex-shrink: 0;
}

.pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 2rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-bottom: 1px solid var(--gcms-border);
}

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cart-item-price { color: var(--gcms-muted); }

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.qty-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    font-size: 0.75rem;
    line-height: 1;
}

.qty-display {
    width: 24px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.cart-item-total {
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
    min-width: 50px;
    text-align: right;
}

.pos-cart-session-line {
    padding: 0.6rem 0.875rem;
    background: rgba(99,102,241,0.08);
    border-top: 1px solid rgba(99,102,241,0.2);
    border-bottom: 1px solid var(--gcms-border);
}

.pos-cart-discount {
    padding: 0.5rem 0.875rem;
    border-top: 1px solid var(--gcms-border);
    flex-shrink: 0;
}

.pos-cart-totals {
    padding: 0.75rem 0.875rem;
    border-top: 1px solid var(--gcms-border);
    flex-shrink: 0;
}

.pos-cart-total-line {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 800;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 2px solid var(--gcms-border);
}

.pos-cart-actions {
    padding: 0.75rem;
    border-top: 1px solid var(--gcms-border);
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}


/* ── Customer Avatars ────────────────────────── */
.customer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gcms-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.customer-avatar-lg {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gcms-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

/* ── Tier Badges ─────────────────────────────── */
.tier-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tier-badge-lg {
    display: inline-block;
    padding: 0.4rem 1.25rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tier-bronze   { background: rgba(205,127,50,0.2);  color: #cd7f32; }
.tier-silver   { background: rgba(192,192,192,0.2); color: #a0a0a0; }
.tier-gold     { background: rgba(255,215,0,0.2);   color: #ffd700; }
.tier-platinum { background: rgba(229,228,226,0.2); color: #c0c0c0; }

/* ── Employee Cards ──────────────────────────── */
.employee-card {
    transition: border-color 0.2s, box-shadow 0.2s;
}

.employee-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* ── PIN Pad ─────────────────────────────────── */
.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    max-width: 240px;
    margin: 0 auto;
}

.pin-btn {
    height: 56px;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 0.5rem !important;
}

/* ── PIN Dots ────────────────────────────────── */
.pin-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--gcms-border);
    background: transparent;
    transition: background 0.15s, border-color 0.15s;
}

.pin-dot.filled {
    background: var(--gcms-primary);
    border-color: var(--gcms-primary);
}

/* ── Attendance Dots ─────────────────────────── */
.attendance-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
}

.att-present  { background: rgba(16,185,129,0.2);  color: #10b981; }
.att-late     { background: rgba(245,158,11,0.2);  color: #f59e0b; }
.att-half     { background: rgba(6,182,212,0.2);   color: #06b6d4; }
.att-absent   { background: rgba(71,85,105,0.15);  color: #64748b; }

/* ── Attendance Table ────────────────────────── */
.attendance-table .sticky-col {
    position: sticky;
    left: 0;
    background: var(--gcms-surface);
    z-index: 1;
    min-width: 160px;
    border-right: 1px solid var(--gcms-border);
}
/* ── Shift Timer Badge ───────────────────────── */
.shift-timer-badge {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 0.5rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    color: #10b981;
    font-weight: 600;
}

/* ── Restaurant Table Cards ──────────────────── */
.table-card {
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 160px;
}

.table-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.table-available { border-color: rgba(16,185,129,0.4); }
.table-occupied  { border-color: rgba(245,158,11,0.5); }
.table-bill      { border-color: rgba(99,102,241,0.6); }
.table-cleaning  { border-color: rgba(100,116,139,0.3); }
.table-reserved  { border-color: rgba(6,182,212,0.4); }

/* ── KOT Cards ───────────────────────────────── */
.kot-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--gcms-warning);
}

/* ── Menu item 86'd ──────────────────────────── */
.item-unavailable {
    opacity: 0.45;
    text-decoration: line-through;
}

/* ════════════════════════════════════════════
   REPORTS & ANALYTICS (Phase 10)
   ════════════════════════════════════════════ */

/* ── Period Picker ────────────────────────────── */
.period-picker-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.period-picker-bar .btn {
    white-space: nowrap;
}

/* ── Comparison / Stat Cards with Trend ───────── */
.stat-card .stat-sub {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-sub.text-success i,
.stat-sub.text-danger i {
    font-size: 0.7rem;
}

/* Pulse highlight when a comparison is "New" (no previous period data) */
.stat-sub .badge-new {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
}

/* ── Chart Containers ─────────────────────────── */
.card canvas {
    max-width: 100%;
}

/* Prevents Chart.js canvases from collapsing to 0 height inside flex/grid cards */
.chart-container {
    position: relative;
    width: 100%;
    min-height: 220px;
}

.chart-container.chart-sm {
    min-height: 160px;
}

.chart-container.chart-lg {
    min-height: 320px;
}

/* ── Utilization Progress Bars (Gaming report) ── */
.utilization-bar-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
}

.utilization-bar-wrap .progress {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.utilization-bar-wrap .progress-bar {
    border-radius: 999px;
    transition: width 0.3s ease;
}

.utilization-label {
    font-size: 0.78rem;
    font-weight: 600;
    min-width: 38px;
    text-align: right;
}

/* Color thresholds — reused inline via template logic, defined here for consistency */
.util-high   { background: #10b981; }  /* 70%+ */
.util-medium { background: #f59e0b; }  /* 40-69% */
.util-low    { background: #ef4444; }  /* <40% */

/* ── Report Navigation Tiles (reports hub) ─────── */
.payment-nav-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
    padding: 1.25rem 0.75rem;
    background: var(--gcms-surface);
    border: 1px solid var(--gcms-border);
    border-radius: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    height: 100%;
}

.payment-nav-tile:hover {
    border-color: var(--gcms-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: inherit;
}

.payment-nav-icon {
    font-size: 1.8rem;
}

.payment-nav-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.payment-nav-sub {
    font-size: 0.72rem;
    color: var(--gcms-text-muted);
}

/* ── Leaderboard Rows (Staff/Customer reports) ── */
.leaderboard-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}

.leaderboard-rank.rank-1 { background: rgba(255, 215, 0, 0.25); color: #ffd700; }
.leaderboard-rank.rank-2 { background: rgba(192, 192, 192, 0.25); color: #c0c0c0; }
.leaderboard-rank.rank-3 { background: rgba(205, 127, 50, 0.25); color: #cd7f32; }

/* ── Export Dropdown Buttons ──────────────────── */
.export-dropdown .dropdown-menu {
    min-width: 160px;
}

.export-dropdown .dropdown-item i {
    width: 18px;
}

/* ── Retention / Health Mini Bars (Loyalty, Customer reports) ── */
.retention-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gcms-border);
    font-size: 0.85rem;
}

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

/* ── Empty State for Reports ──────────────────── */
.report-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gcms-text-muted);
}

.report-empty-state i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

/* ── Print-friendly tweaks (in case of browser print of report pages) ── */
@media print {
    .sidebar, .navbar, .period-picker-bar, .export-dropdown, .btn {
        display: none !important;
    }
    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}
/* ── Scrollbar ───────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gcms-bg); }
::-webkit-scrollbar-thumb { background: var(--gcms-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gcms-muted); }