﻿
:root {
    --bg: #f5f4f0;
    --bg2: #eceae4;
    --panel: #ffffff;
    --panel2: #faf9f6;
    --panel3: #f0ede6;
    --border: #e2ddd4;
    --border2: #ccc8be;
    --ink: #1a1714;
    --ink2: #4a453e;
    --ink3: #8c867c;
    --ink4: #bfb9b0;
    --rust: #c0392b;
    --rust-sub: rgba(192,57,43,0.08);
    --rust-mid: rgba(192,57,43,0.18);
    --amber: #d97706;
    --amber-sub: rgba(217,119,6,0.08);
    --forest: #2d6a4f;
    --forest-sub: rgba(45,106,79,0.08);
    --slate: #374151;
    --slate-sub: rgba(55,65,81,0.08);
    --sky: #0369a1;
    --sky-sub: rgba(3,105,161,0.08);
    --plum: #7e22ce;
    --plum-sub: rgba(126,34,206,0.08);
    --r: 10px;
    --r2: 6px;
    --s1: 0 1px 3px rgba(26,23,20,0.07);
    --s2: 0 4px 16px rgba(26,23,20,0.08);
    --display: 'DM Serif Display', serif;
    --body: 'DM Sans', sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body);
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
}

/* ── TOPBAR ── */
.dash-topbar {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--s1);
}

.dash-topbar-title {
    font-family: var(--display);
    font-size: 20px;
    letter-spacing: -0.3px;
    color: var(--ink);
}

.dash-topbar-sub {
    font-size: 12px;
    color: var(--ink3);
    margin-left: 2px;
}

.dash-topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── BREADCRUMB ── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ink3);
    padding: 10px 0 0;
    margin-bottom: 14px;
}

.breadcrumb-link {
    color: var(--ink3);
    text-decoration: none;
}

    .breadcrumb-link:hover {
        color: var(--ink);
    }

.breadcrumb-separator {
    color: var(--ink4);
}

.breadcrumb-current {
    color: var(--ink);
    font-weight: 600;
}

/* ── CONTENT WRAP ── */
.dash-content {
    max-width: 1480px;
    margin: 0 auto;
    padding: 20px 28px 40px;
}

/* ── ALERT ── */
.dash-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: var(--r);
    margin-bottom: 18px;
    font-size: 12.5px;
    font-weight: 500;
}

    .dash-alert.warn {
        background: rgba(217,119,6,0.08);
        border: 1px solid rgba(217,119,6,0.22);
        color: #92400e;
    }

.dash-alert-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.dash-alert-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--ink3);
    line-height: 1;
}

/* ── KPI GRID ── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
    .kpi-grid.analytics-grid {
        grid-template-columns: 1fr;
    }

        .kpi-grid.analytics-grid .kpi {
            width: 100%;
        }
.kpi-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 18px 20px 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.18s, box-shadow 0.18s;
    animation: fadeUp 0.35s ease both;
}

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

    .kpi-card::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        border-radius: var(--r) var(--r) 0 0;
    }

    .kpi-card.c-rust::after {
        background: var(--rust);
    }

    .kpi-card.c-forest::after {
        background: var(--forest);
    }

    .kpi-card.c-amber::after {
        background: var(--amber);
    }

    .kpi-card.c-slate::after {
        background: var(--slate);
    }

.kpi-watermark {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 38px;
    opacity: 0.06;
    pointer-events: none;
}

.kpi-count {
    font-family: var(--mono);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 4px;
}

.kpi-label {
    font-size: 11.5px;
    color: var(--ink3);
    font-weight: 500;
}
/* ── ANALYTICS KPI CARD ── */
.kpi {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 14px 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--s1);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    /* Hover effect */
    .kpi:hover {
        transform: translateY(-3px);
        box-shadow: var(--s2);
    }

    /* Top color bar */
    .kpi::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
    }

    /* Color variations */
    .kpi.c-indigo::after {
        background: #6366f1;
    }

    .kpi.c-violet::after {
        background: #7c3aed;
    }

    .kpi.c-emerald::after {
        background: #059669;
    }

    .kpi.c-cyan::after {
        background: #0891b2;
    }
/* ── ANALYTICS BUTTON ── */
.analytics-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: black;
    border: none;
    border-radius: var(--r2);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    /* Icon */
    .analytics-btn i {
        font-size: 14px;
    }

    /* Hover */
    .analytics-btn:hover {
        background: #a93226;
        transform: translateY(-1px);
        box-shadow: var(--s2);
    }

    /* Click effect */
    .analytics-btn:active {
        transform: scale(0.97);
    }
/* ── ANALYTICS LAYOUT ── */
.analytics-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 16px;
}

.analytics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Better progress bar colors */
.pb-fill {
    background: linear-gradient(90deg, var(--slate), var(--ink));
}

/* Card spacing improvement */
.d-card {
    transition: all 0.2s ease;
}

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

/* Responsive */
@@media (max-width: 900px) {
    .analytics-row {
        grid-template-columns: 1fr;
    }
}
/* Icon */
.kpi-icon {
    font-size: 18px;
    opacity: 0.7;
}

/* Main value */
.kpi-val {
    font-family: var(--mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
}

/* Label */
.kpi-label {
    font-size: 11px;
    color: var(--ink3);
}

/* Delta (increase/decrease) */
.kpi-delta {
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
}

    /* Up / Down colors */
    .kpi-delta.up {
        color: var(--forest);
    }

    .kpi-delta.down {
        color: var(--rust);
    }
/* ── SECTION HEADING ── */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--display);
    font-size: 17px;
    letter-spacing: -0.2px;
}

.section-sub {
    font-size: 12px;
    color: var(--ink3);
    margin-top: 1px;
}

/* ── CARD ── */
.d-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--s1);
    animation: fadeUp 0.35s ease both;
}

.d-card-head {
    padding: 14px 20px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.d-card-title {
    font-weight: 700;
    font-size: 13.5px;
}

.d-card-sub {
    font-size: 11px;
    color: var(--ink3);
    margin-top: 2px;
}

.d-card-body {
    padding: 16px 20px;
}

/* ── GRID LAYOUTS ── */
.g2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.g21 {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 16px;
    margin-bottom: 18px;
}

.g3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

/* ── TABLE ── */
.d-table {
    width: 100%;
    border-collapse: collapse;
}

    .d-table th {
        text-align: left;
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        color: var(--ink3);
        padding: 10px 20px;
        background: var(--panel2);
        border-bottom: 1px solid var(--border);
    }

    .d-table td {
        padding: 11px 20px;
        font-size: 12.5px;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
    }

    .d-table tr:last-child td {
        border-bottom: none;
    }

    .d-table tr {
        transition: background 0.12s;
    }

        .d-table tr:hover td {
            background: var(--panel2);
        }

/* ── TAGS ── */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
}

    .tag::before {
        content: '';
        width: 5px;
        height: 5px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .tag.active {
        background: var(--forest-sub);
        color: var(--forest);
        border: 1px solid rgba(45,106,79,0.18);
    }

        .tag.active::before {
            background: var(--forest);
        }

    .tag.pending {
        background: var(--amber-sub);
        color: var(--amber);
        border: 1px solid rgba(217,119,6,0.2);
    }

        .tag.pending::before {
            background: var(--amber);
        }

    .tag.banned {
        background: var(--rust-sub);
        color: var(--rust);
        border: 1px solid rgba(192,57,43,0.2);
    }

        .tag.banned::before {
            background: var(--rust);
        }

    .tag.review {
        background: var(--plum-sub);
        color: var(--plum);
        border: 1px solid rgba(126,34,206,0.2);
    }

        .tag.review::before {
            background: var(--plum);
        }

    .tag.verified {
        background: var(--sky-sub);
        color: var(--sky);
        border: 1px solid rgba(3,105,161,0.18);
    }

        .tag.verified::before {
            background: var(--sky);
        }

    .tag.pro {
        background: var(--slate-sub);
        color: var(--slate);
        border: 1px solid rgba(55,65,81,0.2);
    }

        .tag.pro::before {
            background: var(--slate);
        }

    .tag.free {
        background: var(--bg2);
        color: var(--ink3);
        border: 1px solid var(--border);
    }

        .tag.free::before {
            background: var(--ink4);
        }

/* ── MINI BUTTONS ── */
.mbtn {
    padding: 4px 11px;
    border-radius: var(--r2);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--panel2);
    color: var(--ink2);
    transition: all 0.14s;
    font-family: var(--body);
}

    .mbtn:hover {
        background: var(--panel3);
        border-color: var(--border2);
        color: var(--ink);
    }

    .mbtn.danger:hover {
        background: var(--rust-sub);
        border-color: var(--rust-mid);
        color: var(--rust);
    }

    .mbtn.warn:hover {
        background: var(--amber-sub);
        border-color: rgba(217,119,6,0.3);
        color: var(--amber);
    }

    .mbtn.ok {
        background: var(--forest-sub);
        border-color: rgba(45,106,79,0.2);
        color: var(--forest);
    }

        .mbtn.ok:hover {
            background: var(--forest);
            color: #fff;
        }

    .mbtn.primary {
        background: var(--ink);
        color: #fff;
        border-color: var(--ink);
    }

        .mbtn.primary:hover {
            background: var(--ink2);
        }

/* ── PROGRESS BARS ── */
.pb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}

.pb-label {
    font-size: 12px;
    color: var(--ink2);
    width: 140px;
    flex-shrink: 0;
}

.pb-track {
    flex: 1;
    height: 5px;
    background: var(--bg2);
    border-radius: 20px;
    overflow: hidden;
}

.pb-fill {
    height: 100%;
    border-radius: 20px;
    transition: width 0.6s ease;
}

.pb-val {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink);
    width: 36px;
    text-align: right;
    font-family: var(--mono);
}
/* ===== Analytics Section (Single Card Layout) ===== */
.analytics-row {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 900px;
    margin: 0 auto;
}

/* ===== Card ===== */
.d-card {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--s1);
    animation: fadeUp 0.35s ease both;
}

/* ===== Card Header ===== */
.d-card-head {
    padding: 14px 20px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.d-card-title {
    font-weight: 700;
    font-size: 14px;
}

.d-card-sub {
    font-size: 11px;
    color: var(--ink3);
    margin-top: 2px;
}

/* ===== Card Body ===== */
.d-card-body {
    padding: 16px 20px;
}

/* ===== Progress Row ===== */
.pb-row {
    display: grid;
    grid-template-columns: 180px 1fr 90px;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

/* ===== Label ===== */
.pb-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Progress Bar ===== */
.pb-track {
    height: 8px;
    background: #eef1f5;
    border-radius: 10px;
    overflow: hidden;
}

.pb-fill {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #4f8cff, #6fc3ff);
    transition: width 0.6s ease;
}

/* ===== Value Section ===== */
.pb-val {
    text-align: right;
    font-size: 12px;
    font-weight: 600;
}

    .pb-val small {
        display: block;
        font-size: 11px;
        color: var(--ink3);
        font-weight: 500;
    }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .pb-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .pb-val {
        text-align: left;
    }
}
/* ── STAT ROWS ── */
.sr {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    border-bottom: 1px solid var(--border);
    gap: 10px;
}

    .sr:last-child {
        border-bottom: none;
    }

.sr-icon {
    font-size: 15px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.sr-label {
    font-size: 12.5px;
    color: var(--ink2);
    flex: 1;
}

.sr-val {
    font-size: 14px;
    font-weight: 700;
    font-family: var(--mono);
}

/* ── DONUT ── */
.donut-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
}

.donut-chart {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

    .donut-chart::after {
        content: attr(data-c);
        position: absolute;
        inset: 14px;
        border-radius: 50%;
        background: var(--panel);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        font-weight: 700;
        font-family: var(--mono);
        color: var(--ink);
    }

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dl-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    color: var(--ink2);
}

.dl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dl-val {
    margin-left: auto;
    font-weight: 700;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 11px;
    padding-left: 12px;
}

/* ── MEMBER GRID ── */
.member-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.member-item {
    padding: 14px 10px;
    text-align: center;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transition: background 0.14s;
}

    .member-item:hover {
        background: var(--panel2);
    }

    .member-item:nth-child(4n) {
        border-right: none;
    }

.member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    margin: 0 auto 6px;
    display: block;
}

.member-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg2);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    color: var(--ink4);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 auto 6px;
    text-align: center;
}

.member-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-date {
    font-size: 10px;
    color: var(--ink3);
    margin-top: 1px;
    font-family: var(--mono);
}

/* ── USER ROW ── */
.u-name {
    font-size: 12.5px;
    font-weight: 600;
}

.u-meta {
    font-size: 10.5px;
    color: var(--ink3);
}

/* ── BUTTON ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: var(--r2);
    font-family: var(--body);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.16s;
    text-decoration: none;
}

.btn-dark {
    background: var(--ink);
    color: #fff;
}

    .btn-dark:hover {
        background: var(--ink2);
    }

.btn-ghost {
    background: var(--panel2);
    color: var(--ink2);
    border: 1px solid var(--border);
}

    .btn-ghost:hover {
        background: var(--panel3);
        color: var(--ink);
        border-color: var(--border2);
    }

/* ── CHART CONTAINER ── */
.chart-wrap {
    padding: 14px 20px 10px;
}

/* ── ANIMATION ── */
@@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kpi-card:nth-child(1) {
    animation-delay: .04s;
}

.kpi-card:nth-child(2) {
    animation-delay: .08s;
}

.kpi-card:nth-child(3) {
    animation-delay: .12s;
}

.kpi-card:nth-child(4) {
    animation-delay: .16s;
}

/* ── RESPONSIVE ── */
@@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .g3 {
        grid-template-columns: 1fr 1fr;
    }
}

@@media (max-width: 900px) {
    .g2, .g21, .g3 {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-content {
        padding: 14px 16px 30px;
    }
}

@@media (max-width: 600px) {
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }

    .member-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── VIEW ALL FOOTER ── */
.card-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12px;
}

    .card-footer a {
        color: var(--sky);
        text-decoration: none;
        font-weight: 600;
    }

        .card-footer a:hover {
            text-decoration: underline;
        }

/* ── EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: 28px;
    color: var(--ink3);
    font-size: 13px;
}

#section-analytics {
    display: none;
}

