/* =====================================================
   XinGame Admin Panel - Flat Design
   ===================================================== */

:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #5541d7;
    --success: #00b894;
    --success-light: #55efc4;
    --warning: #fdcb6e;
    --warning-light: #ffeaa7;
    --danger: #d63031;
    --danger-light: #ff7675;
    --info: #0984e3;
    --info-light: #74b9ff;

    --bg-main: #f5f6fa;
    --bg-white: #ffffff;
    --bg-sidebar: #2d3436;
    --bg-sidebar-hover: #3d4547;
    --bg-sidebar-active: #4a3fcf;
    --bg-card: #ffffff;
    --bg-input: #f8f9fa;

    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-light: #b2bec3;
    --text-white: #ffffff;
    --text-sidebar: #dfe6e9;

    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.06);

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --sidebar-width: 250px;
    --sidebar-collapsed: 68px;
    --topbar-height: 64px;

    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { font-size: 14px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
img { max-width: 100%; }

/* =====================================================
   Sidebar
   ===================================================== */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: width var(--transition-slow), min-width var(--transition-slow);
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
    min-width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.logo-icon {
    font-size: 24px;
    color: var(--primary-light);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.5px;
}

.sidebar-toggle {
    color: var(--text-sidebar);
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.sidebar-toggle:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-white);
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .user-detail-mini,
.sidebar.collapsed .logout-btn { display: none; }

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
}

.sidebar.collapsed .user-info-mini { justify-content: center; }
.sidebar.collapsed .user-avatar-mini { margin: 0; }

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.nav-section {
    padding: 16px 12px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.3);
    white-space: nowrap;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-sidebar);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    margin-bottom: 2px;
    white-space: nowrap;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-white);
}

.nav-item.active {
    background: var(--bg-sidebar-active);
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(74, 63, 207, 0.3);
}

.nav-item svg { flex-shrink: 0; }

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info-mini {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-mini {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.user-detail-mini { overflow: hidden; }
.user-name-mini {
    color: var(--text-white);
    font-size: 0.8rem;
    font-weight: 500;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-mini {
    color: var(--text-light);
    font-size: 0.7rem;
    display: block;
}

.logout-btn {
    margin-left: auto;
    color: var(--text-light);
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.logout-btn:hover { color: var(--danger); background: rgba(255,255,255,0.05); }

/* =====================================================
   Main Content
   ===================================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-slow);
}

.sidebar.collapsed ~ .main-content { margin-left: var(--sidebar-collapsed); }

.top-bar {
    height: var(--topbar-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.server-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.notification-bell {
    padding: 8px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition);
}

.notification-bell:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.page-content {
    padding: 24px;
    flex: 1;
}

/* =====================================================
   Cards
   ===================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border: 1px solid var(--border-light);
    transition: box-shadow var(--transition), transform var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.purple { background: #e8e5ff; color: var(--primary); }
.stat-icon.green { background: #d5f5e3; color: var(--success); }
.stat-icon.blue { background: #d4e6f9; color: var(--info); }
.stat-icon.orange { background: #fdebd0; color: #e67e22; }
.stat-icon.red { background: #fadbd8; color: var(--danger); }
.stat-icon.teal { background: #d1f2eb; color: #1abc9c; }

.stat-icon svg { width: 24px; height: 24px; }

.stat-info { flex: 1; }

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stat-change {
    font-size: 0.75rem;
    margin-top: 4px;
    font-weight: 500;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* =====================================================
   Panel / Content Cards
   ===================================================== */
.panel {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
    overflow: hidden;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-body {
    padding: 20px;
}

.panel-body.no-padding { padding: 0; }

/* =====================================================
   Tables
   ===================================================== */
.table-wrapper { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

table td {
    padding: 12px 16px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

table tbody tr:hover { background: #fafbfc; }
table tbody tr:last-child td { border-bottom: none; }

/* =====================================================
   Buttons
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(108,92,231,0.3); }

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover { background: #00a884; }

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover { background: #c0392b; }

.btn-warning {
    background: var(--warning);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f8f7ff;
}

.btn-sm { padding: 5px 10px; font-size: 0.78rem; }
.btn-lg { padding: 12px 24px; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* =====================================================
   Forms
   ===================================================== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.1);
    background: var(--bg-white);
}

.form-control::placeholder { color: var(--text-light); }

textarea.form-control { min-height: 100px; resize: vertical; }

select.form-control { cursor: pointer; }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: var(--radius-sm);
}

.form-success {
    color: var(--success);
    font-size: 0.8rem;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #ecfdf5;
    border-radius: var(--radius-sm);
}

/* =====================================================
   Badges & Tags
   ===================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
}

.badge-success { background: #d5f5e3; color: #006644; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fce4ec; color: #c62828; }
.badge-info { background: #e3f2fd; color: #0d47a1; }
.badge-primary { background: #ede9fe; color: #5b21b6; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-live { background: #fee2e2; color: #dc2626; animation: pulse 2s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.online { background: var(--success); }
.status-dot.offline { background: var(--text-light); }
.status-dot.busy { background: var(--warning); }

/* =====================================================
   Live Stream Card Grid
   ===================================================== */
.live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.live-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
    cursor: pointer;
}

.live-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.live-card-thumb {
    height: 180px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.live-card-thumb .play-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all var(--transition);
}

.live-card:hover .play-icon {
    background: var(--primary);
    transform: scale(1.1);
}

.live-badge-top {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--danger);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.live-viewers {
    position: absolute;
    bottom: 12px;
    left: 12px;
    color: white;
    font-size: 0.78rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.5);
    padding: 4px 10px;
    border-radius: 12px;
}

.live-platform-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.live-card-body {
    padding: 14px;
}

.live-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.live-card-host {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-card-host img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* =====================================================
   Pagination
   ===================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.pagination button {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: #f8f7ff;
}

.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled { opacity: 0.3; cursor: not-allowed; }

.pagination-info {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* =====================================================
   Modal
   ===================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
    flex-direction: column;
}

.modal-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.modal-card.wide { max-width: 700px; }

.modal-header {
    padding: 32px 32px 0;
    text-align: center;
}

.modal-body {
    padding: 24px 32px;
}

.modal-footer {
    padding: 16px 32px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-light);
}

.login-logo { margin-bottom: 16px; }
.login-logo .logo-icon-large { font-size: 40px; color: var(--primary); display: block; }
.login-logo h2 { font-size: 1.5rem; color: var(--text-primary); margin: 8px 0 4px; }
.login-logo p { color: var(--text-secondary); font-size: 0.875rem; }

.login-form { padding: 24px 32px 32px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* =====================================================
   Toast
   ===================================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 14px 20px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
    font-size: 0.875rem;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* =====================================================
   Charts / Graphs placeholders
   ===================================================== */
.chart-container {
    width: 100%;
    height: 300px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    gap: 12px;
    overflow: hidden;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--primary), var(--primary-light));
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.6s ease;
    position: relative;
}

.chart-bar-label {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.chart-bar-value {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
}

/* =====================================================
   User list / Ranking
   ===================================================== */
.rank-list { display: flex; flex-direction: column; }

.rank-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}

.rank-item:hover { background: #fafbfc; }
.rank-item:last-child { border: none; }

.rank-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.rank-number.gold { background: linear-gradient(135deg, #f6d365, #fda085); color: white; }
.rank-number.silver { background: linear-gradient(135deg, #a8c0ff, #8f94fb); color: white; }
.rank-number.bronze { background: linear-gradient(135deg, #d4a373, #e29578); color: white; }
.rank-number.default { background: var(--bg-input); color: var(--text-secondary); }

.rank-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.rank-info { flex: 1; min-width: 0; }
.rank-name { font-weight: 600; font-size: 0.9rem; }
.rank-level { font-size: 0.75rem; color: var(--text-secondary); }
.rank-value { font-weight: 700; font-size: 1rem; text-align: right; }
.rank-value-label { font-size: 0.7rem; color: var(--text-secondary); text-align: right; }

/* =====================================================
   Game Room Cards
   ===================================================== */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.room-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    padding: 20px;
    transition: all var(--transition);
    box-shadow: var(--shadow-card);
}

.room-card:hover { box-shadow: var(--shadow-md); }

.room-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.room-game-icon {
    font-size: 1.5rem;
}

.room-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.room-code {
    font-size: 0.7rem;
    color: var(--text-light);
    font-family: monospace;
}

.room-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.room-stat {
    background: var(--bg-input);
    padding: 8px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.room-stat-value {
    font-weight: 700;
    font-size: 0.9rem;
}

.room-stat-label {
    font-size: 0.68rem;
    color: var(--text-secondary);
}

/* =====================================================
   Filter Bar
   ===================================================== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar .form-control { max-width: 200px; }

.search-input {
    flex: 1;
    max-width: 300px;
    position: relative;
}

.search-input svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-input .form-control { padding-left: 36px; }

/* =====================================================
   Empty State
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.empty-state h3 { font-size: 1rem; margin-bottom: 4px; }
.empty-state p { font-size: 0.85rem; }

/* =====================================================
   Loading
   ===================================================== */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* =====================================================
   Tabs
   ===================================================== */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 20px;
}

.tab-item {
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all var(--transition);
}

.tab-item:hover { color: var(--text-primary); }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); }

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 768px) {
    .sidebar { width: var(--sidebar-collapsed); min-width: var(--sidebar-collapsed); }
    .sidebar .logo-text, .sidebar .nav-item span,
    .sidebar .nav-section, .sidebar .user-detail-mini, .sidebar .logout-btn { display: none; }
    .sidebar .nav-item { justify-content: center; padding: 12px; }
    .sidebar .user-info-mini { justify-content: center; }
    .main-content { margin-left: var(--sidebar-collapsed); }
    .page-content { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .live-grid { grid-template-columns: 1fr; }
    .room-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

/* =====================================================
   Settings Page
   ===================================================== */
.settings-section {
    margin-bottom: 24px;
}

.settings-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* =====================================================
   Vip Level Badges
   ===================================================== */
.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.vip-1 { background: linear-gradient(135deg, #cd7f32, #b8860b); color: white; }
.vip-2 { background: linear-gradient(135deg, #c0c0c0, #a8a8a8); color: #333; }
.vip-3 { background: linear-gradient(135deg, #ffd700, #ffb300); color: #333; }

/* =====================================================
   Profile Image
   ===================================================== */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
