.admin-shell {
    background: #f3f5f9;
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    color: #1e293b;
    min-height: 100vh;
}

.admin-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: #0f172a;
    color: #cbd5e1;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 0 1.25rem 1.5rem;
    border-bottom: 1px solid #1e293b;
    color: #f1f5f9;
    font-weight: 600;
    font-size: 1.1rem;
}

.sidebar-brand small {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: #64748b !important;
    margin-top: 4px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0.75rem;
    gap: 0.25rem;
}

.sidebar-nav a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: background 0.15s, color 0.15s;
}

.sidebar-nav a:hover {
    background: #1e293b;
    color: #f8fafc;
}

.sidebar-nav hr {
    border-color: #1e293b;
    margin: 0.5rem 0;
}

.admin-main-wrapper {
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    background: #1e293b;
    color: #f1f5f9;
    border-bottom: 1px solid #0f172a;
}

.admin-topbar .text-muted {
    color: #94a3b8 !important;
}

.admin-topbar .btn-outline-light {
    border-color: #475569;
    color: #e2e8f0;
}

.admin-main {
    background: #f3f5f9;
    flex: 1;
}

.admin-main .card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .admin-grid { grid-template-columns: 1fr; }
    .admin-sidebar { position: relative; height: auto; }
}

/* ------- Messages offcanvas chat ------- */
#messagesPanel { width: 380px; }
.messages-list .msg-row { margin-bottom: 0.6rem; display: flex; }
.messages-list .msg-row.mine { justify-content: flex-end; }
.messages-list .msg-bubble {
    max-width: 80%;
    padding: 0.55rem 0.85rem;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e6e6ea;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.messages-list .msg-bubble.mine {
    background: #fff7d6;
    border-color: #f4dd76;
}
.messages-list .msg-meta {
    font-size: 0.7rem;
    color: #6b6b76;
    display: flex;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 0.2rem;
}
.messages-list .msg-role {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    color: #fff;
    background: #6c757d;
    font-size: 0.62rem;
}
.messages-list .msg-role.role-kitchen { background: #d97706; }
.messages-list .msg-role.role-staff   { background: #0d6efd; }
.messages-list .msg-role.role-admin   { background: #dc3545; }
.messages-list .msg-role.role-manager { background: #6f42c1; }
.messages-list .msg-author { font-weight: 600; color: #444; }
.messages-list .msg-time { margin-left: auto; opacity: 0.7; }
.messages-list .msg-body { white-space: pre-wrap; word-wrap: break-word; }

/* ------- Tables overview grid ------- */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.65rem;
}
.table-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.85rem 0.75rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    transition: transform 0.12s, box-shadow 0.12s;
}
.table-card:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,0.08); }
.table-card .t-num { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.table-card .t-status { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.table-card .t-time { font-size: 0.75rem; opacity: 0.7; }
.table-card .t-actions { margin-top: 0.25rem; display: flex; gap: 0.3rem; flex-wrap: wrap; justify-content: center; }
.table-card.status-available { border-color: #28a745; background: #f0fff5; }
.table-card.status-available .t-num { color: #198754; }
.table-card.status-occupied { border-color: #f0ad4e; background: #fff8e9; }
.table-card.status-occupied .t-num { color: #b58105; }
.table-card.status-cleaning { border-color: #dc3545; background: #fff0f1; }
.table-card.status-cleaning .t-num { color: #b1303b; }
