:root {
    --sidebar-width: 130px;
    --topbar-height: 60px;
    --breadcrumb-height: 44px;
    --header-total: calc(var(--topbar-height) + var(--breadcrumb-height));
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --bg-body: #E7F1F9;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e5e7eb;
    --success: #22c55e;
    --danger: #ef4444;
    --shadow: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-body);
    color: var(--text-dark);
    min-height: 100vh;
}

body.sidebar-open {
    overflow: hidden;
}

/* ============================================
   TOP AREA - Logo sits on body bg, topbar is white
   ============================================ */
.top-area {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    display: flex;
    z-index: 1100;
    background: var(--bg-body);
}

.top-logo-spacer {
    width: var(--sidebar-width);
    height: var(--topbar-height);
    flex-shrink: 0;
    background: var(--bg-body);
}

.topbar {
    flex: 1;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: var(--topbar-height);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-search {
    position: relative;
    width: 260px;
}

.topbar-search input {
    width: 100%;
    padding: 9px 16px 9px 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-white);
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s;
}

.topbar-search input:focus {
    border-color: var(--primary);
}

.topbar-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
}

.topbar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-right .btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    font-size: 18px;
}

.topbar-right .btn-icon:hover {
    background: #dbeafe;
    color: var(--primary);
}

.topbar-right .btn-icon .badge-count {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-body);
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-divider {
    width: 1px;
    height: 28px;
    background: var(--border);
    margin: 0 4px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid var(--border);
}

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

/* ============================================
   BREADCRUMB BAR - Below topbar
   ============================================ */
.breadcrumb-area {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    height: var(--breadcrumb-height);
    display: flex;
    z-index: 1099;
    background: var(--bg-body);
}

.breadcrumb-spacer {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

.breadcrumb-bar {
    flex: 1;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 28px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.breadcrumb-bar a {
    color: var(--primary-dark);
    font-weight: 600;
}
.breadcrumb-bar a:hover {
    text-decoration: underline;
}

.breadcrumb-bar i {
    font-size: 14px;
    color: var(--text-light);
}

/* (sidebar styles moved to public/css/admin-sidebar.css) */

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

/* ============================================
   PAGE CONTENT
   ============================================ */
.page-content {
    padding: 20px 28px 40px;
}

/* ============================================
   STAT CARDS
   ============================================ */
.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    height: 100%;
}

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

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

.stat-card .stat-icon {
    color: var(--text-light);
    font-size: 22px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

/* ============================================
   ADMIN CARDS
   ============================================ */
.admin-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-card .card-header-custom {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card .card-header-custom h6 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
}

.admin-card .card-body-custom {
    padding: 0 24px 24px;
}

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

.filter-dropdown {
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-dark);
    background: var(--bg-white);
    outline: none;
    cursor: pointer;
    font-weight: 500;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* ============================================
   IB SUMMARY
   ============================================ */
.summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: #f8f9fb;
    border-radius: 10px;
    margin-bottom: 12px;
}

.summary-item:last-child { margin-bottom: 0; }

.summary-item .summary-label {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.summary-item .summary-sublabel {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.summary-item .summary-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
}

/* ============================================
   TABLE
   ============================================ */
.admin-table {
    width: 100%;
    font-size: 14px;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table thead th {
    background: #eef3ff;
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    padding: 14px 18px;
    border: none;
    white-space: nowrap;
}

.admin-table thead th:first-child { border-radius: 10px 0 0 10px; }
.admin-table thead th:last-child { border-radius: 0 10px 10px 0; }

.admin-table tbody td {
    padding: 16px 18px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-dark);
    font-size: 14px;
}

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

/* ============================================
   STATUS BADGES
   ============================================ */
.badge-status {
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-active { background: #dcfce7; color: #16a34a; }
.badge-suspended { background: #fee2e2; color: #ef4444; }
.badge-inactive { background: #fef3c7; color: #b45309; }

/* ============================================
   VIEW ALL / ACTION DOTS
   ============================================ */
.view-all {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.view-all:hover { text-decoration: underline; }

.btn-dots {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}
.btn-dots:hover { background: #f1f5f9; color: var(--text-dark); }

/* ============================================
   MINI STAT CARDS
   ============================================ */
.mini-stat {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    height: 100%;
}

.mini-stat .mini-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

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

.mini-stat .mini-icon { color: var(--text-light); font-size: 20px; }

.mini-stat .mini-value {
    font-size: 38px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

/* ============================================
   TOP PERFORMERS
   ============================================ */
.performers-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.performers-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 220px;
    min-width: 28px;
    padding-bottom: 0;
}

.performers-y-axis span {
    font-size: 11px;
    color: var(--text-light);
    text-align: right;
}

.performers-chart {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 20px;
    flex-grow: 1;
}

.performer-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Bar = tall rounded rectangle, avatar sits at bottom inside */
.performer-bar {
    width: 80px;
    border-radius: 16px;
    background: #d6e4f7;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
}

.performer-bar.highlight {
    background: var(--primary);
}

.performer-avatar-wrap {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e8eef6;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg-white);
    overflow: hidden;
    flex-shrink: 0;
    z-index: 2;
}

.performer-avatar-wrap span {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.performer-avatar-wrap.active-performer {
    background: var(--primary-dark);
    border-color: var(--bg-white);
}
.performer-avatar-wrap.active-performer span { color: #fff; }

.performer-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    margin-top: 8px;
    text-align: center;
    max-width: 90px;
    line-height: 1.3;
}

.performer-tooltip {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 5;
}
.performer-tooltip strong { font-weight: 700; }

/* ============================================
   ACTION BUTTON (other pages)
   ============================================ */
.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.btn-action:hover {
    background: #dbeafe;
    color: var(--primary);
    border-color: var(--primary);
}

/* (sidebar responsive styles moved to public/css/admin-sidebar.css) */

/* Mobile - max 768px (Bootstrap md) */
@media (max-width: 767.98px) {
    .topbar-title {
        display: none;
    }

    .topbar-search {
        width: 160px;
    }

    .topbar-divider {
        display: none;
    }

    .topbar-right .btn-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .topbar-right {
        gap: 6px;
    }

    .avatar {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .page-content {
        padding: 14px 14px 30px;
    }

    .breadcrumb-bar {
        padding: 0 14px;
        font-size: 13px;
    }

    .admin-card .card-header-custom {
        padding: 16px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .admin-card .card-header-custom h6 {
        font-size: 15px;
    }

    .admin-card .card-body-custom {
        padding: 0 16px 16px;
    }

    .stat-card {
        padding: 14px 16px;
    }

    .stat-card .stat-value {
        font-size: 24px;
    }

    .mini-stat {
        padding: 14px 16px;
    }

    .mini-stat .mini-value {
        font-size: 30px;
    }

    .summary-item {
        padding: 14px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .summary-item .summary-value {
        font-size: 18px;
    }

    .performers-chart {
        gap: 10px;
        min-height: 180px;
    }

    .performer-bar {
        width: 40px;
    }

    .performer-name {
        font-size: 10px;
        max-width: 60px;
    }

    .performer-avatar-wrap {
        width: 36px;
        height: 36px;
        margin-top: -18px;
    }

    .performer-avatar-wrap span {
        font-size: 11px;
    }

    .performers-y-axis {
        display: none;
    }
}

/* Small Mobile - max 576px (Bootstrap sm) */
@media (max-width: 575.98px) {
    .topbar-search {
        width: 120px;
    }

    .topbar-search input {
        font-size: 13px;
        padding: 7px 12px 7px 34px;
    }

    .topbar {
        padding: 0 12px;
    }

    .page-content {
        padding: 12px 12px 24px;
    }

    .breadcrumb-bar {
        padding: 0 12px;
    }

    .admin-table {
        font-size: 12px;
    }

    .admin-table thead th {
        padding: 10px 10px;
        font-size: 11px;
    }

    .admin-table tbody td {
        padding: 12px 10px;
        font-size: 12px;
    }

    .filter-dropdown {
        font-size: 12px;
        padding: 5px 28px 5px 10px;
    }

    .chart-container {
        height: 200px;
    }
}
