:root {
    --sidebar-bg: #1A1A1A;
    --header-bg: #0A0A0A;
    --accent: #D4AF37;
    --accent-hover: #b8960e;
    --page-bg: #F5F5F5;
    --card-bg: #FFFFFF;
    --sidebar-width: 250px;
    --header-height: 60px;
    --text-muted-custom: #888;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--page-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

/* ===================== SIDEBAR ===================== */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

#sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px;
    border-bottom: 1px solid rgba(212,175,55,0.2);
    text-decoration: none;
}

#sidebar .sidebar-brand .brand-icon {
    width: 38px;
    height: 38px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #000;
    font-weight: 700;
    flex-shrink: 0;
}

#sidebar .sidebar-brand span {
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

#sidebar .sidebar-brand span em {
    color: var(--accent);
    font-style: normal;
}

#sidebar .nav-section-title {
    color: #555;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 20px 20px 8px;
}

#sidebar .nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: #AAAAAA;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

#sidebar .nav-item a:hover {
    color: #FFFFFF;
    background-color: rgba(255,255,255,0.05);
}

#sidebar .nav-item a.active {
    color: var(--accent);
    background-color: rgba(212,175,55,0.1);
    border-left-color: var(--accent);
}

#sidebar .nav-item a i {
    width: 18px;
    text-align: center;
    font-size: 15px;
}

#sidebar .sidebar-footer {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

#sidebar .sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #888;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 0;
    transition: color 0.2s;
}

#sidebar .sidebar-footer a:hover {
    color: #e74c3c;
}

/* ===================== HEADER ===================== */
#header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background-color: var(--header-bg);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#header .page-title {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

#header .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

#header .admin-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #CCCCCC;
    font-size: 13px;
}

#header .admin-badge .avatar {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 700;
    font-size: 13px;
}

/* ===================== MAIN CONTENT ===================== */
#main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    min-height: 100vh;
}

.content-wrapper {
    padding: 28px 28px;
}

/* ===================== CARDS ===================== */
.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 22px 24px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted-custom);
    font-weight: 500;
}

.stat-card .stat-change {
    font-size: 12px;
    margin-top: 8px;
    font-weight: 600;
}

.stat-change.positive { color: #27ae60; }
.stat-change.negative { color: #e74c3c; }

/* ===================== SECTION CARD ===================== */
.section-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: none;
}

.section-card .section-card-header {
    padding: 18px 22px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-card .section-card-header h5 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1A1A1A;
}

.section-card .section-card-body {
    padding: 22px;
}

/* ===================== TABLES ===================== */
.table-custom thead th {
    background-color: #F8F9FA;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    border-bottom: 2px solid #e9ecef;
    padding: 12px 16px;
    white-space: nowrap;
}

.table-custom tbody td {
    padding: 13px 16px;
    vertical-align: middle;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
    color: #333;
}

.table-custom tbody tr:hover {
    background-color: #FAFAFA;
}

/* ===================== BUTTONS ===================== */
.btn-gold {
    background-color: var(--accent);
    color: #000;
    border: none;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-gold:hover {
    background-color: var(--accent-hover);
    color: #000;
}

.btn-gold:focus {
    box-shadow: 0 0 0 0.25rem rgba(212,175,55,0.35);
    color: #000;
}

/* ===================== BADGES ===================== */
.badge-vip {
    background-color: rgba(212,175,55,0.15);
    color: var(--accent);
    font-weight: 600;
    border: 1px solid rgba(212,175,55,0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
}

.badge-online {
    background-color: rgba(39,174,96,0.15);
    color: #27ae60;
    font-weight: 600;
    border: 1px solid rgba(39,174,96,0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
}

.badge-offline {
    background-color: rgba(150,150,150,0.12);
    color: #888;
    font-weight: 600;
    border: 1px solid rgba(150,150,150,0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
}

.badge-banned {
    background-color: rgba(231,76,60,0.12);
    color: #e74c3c;
    border: 1px solid rgba(231,76,60,0.25);
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
}

/* ===================== AVATAR ===================== */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #ddd;
}

.user-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 700;
    font-size: 13px;
}

/* ===================== FORMS ===================== */
.form-label {
    font-weight: 600;
    font-size: 13px;
    color: #444;
    margin-bottom: 6px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(212,175,55,0.2);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

/* ===================== GIFT THUMBNAIL ===================== */
.gift-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: contain;
    background: #f5f5f5;
    border: 1px solid #eee;
    padding: 3px;
}

.gift-thumb-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #f5f5f5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 22px;
    border: 1px solid #eee;
}

/* ===================== UPLOAD ZONE ===================== */
.upload-zone {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #FAFAFA;
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--accent);
    background: rgba(212,175,55,0.04);
}

.upload-zone .upload-icon {
    font-size: 36px;
    color: #ccc;
    margin-bottom: 10px;
}

.upload-preview {
    max-width: 120px;
    max-height: 120px;
    border-radius: 8px;
    object-fit: contain;
    margin-top: 12px;
    display: none;
    border: 2px solid var(--accent);
    padding: 4px;
    background: #fff;
}

/* ===================== SORTABLE ===================== */
.sortable-ghost {
    opacity: 0.4;
    background-color: rgba(212,175,55,0.1) !important;
}

.sortable-chosen {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
}

.drag-handle {
    cursor: grab;
    color: #ccc;
    padding: 4px 8px;
}

.drag-handle:active {
    cursor: grabbing;
}

/* ===================== PAGE TITLE AREA ===================== */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0;
}

.page-header p {
    color: #888;
    margin: 4px 0 0;
    font-size: 13px;
}

/* ===================== CHART CONTAINERS ===================== */
.chart-container {
    position: relative;
    height: 260px;
}

/* ===================== TOAST ===================== */
.toast-container {
    z-index: 9999;
}

/* ===================== PAGINATION ===================== */
.page-link {
    color: var(--accent);
}

.page-link:hover {
    color: var(--accent-hover);
}

.page-item.active .page-link {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #000;
}

/* ===================== SEARCH BAR ===================== */
.search-box {
    position: relative;
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 14px;
}

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

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
    }

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

    #header {
        left: 0;
    }

    #main-content {
        margin-left: 0;
    }

    .content-wrapper {
        padding: 16px;
    }
}

/* ===================== MISC ===================== */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-dot.online { background: #27ae60; }
.status-dot.offline { background: #ccc; }

.action-btn {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.action-btn:hover { opacity: 0.8; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}
