:root {
    --bg: #0a0e1a;
    --s1: #111827;
    --s2: #1a2332;
    --s3: #242e42;
    --border: rgba(255, 255, 255, 0.08);
    --border2: rgba(255, 255, 255, 0.14);
    --text: #f0f4f9;
    --muted: #6b7c9d;
    --muted2: #8fa3bd;
    --accent: #00d68f;
    /* giống index */
    --accentB: #00b4ff;
    /* giống index */
    --warn: #f59e0b;
    --danger: #ef4444;
    --purple: #a78bfa;
    --font-d: "Syne", sans-serif;
    --font-b: "Inter", sans-serif;
    --nav-w: 200px;
    --top-h: 64px;
    --r: 8px;
    --r-lg: 12px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

#body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-b);
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--s3);
    border-radius: 3px;
}

#nav {
    width: var(--nav-w);
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--s1), var(--bg));
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 16px 10px;
    gap: 4px;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 8px 12px 6px;
    margin: 8px 0 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r);
    cursor: pointer;
    transition: 0.2s;
    color: var(--muted2);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-color: var(--border2);
}

.nav-item.active {
    background: rgba(0, 214, 143, 0.15);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.nav-icon {
    width: 16px;
    height: 16px;
    text-align: center;
    font-size: 13px;
}

.nav-logout {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.nav-logout .nav-item {
    color: #ef4444;
    border: 1px solid #ef4444;
    background: transparent;
}

.nav-logout .nav-item:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

#topbar {
    height: var(--top-h);
    flex-shrink: 0;
    background: var(--s1);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
    position: relative;
    z-index: 100;
}

#topbar::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(0, 214, 143, 0.3),
            transparent);
}

.tb-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.tb-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), var(--accentB));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    box-shadow: 0 0 20px rgba(0, 214, 143, 0.25);
    flex-shrink: 0;
}

.tb-title {
    font-family: var(--font);
    font-size: 14px;
    letter-spacing: 0.06em;
    color: var(--text);
    font-weight: 600;
}

.tb-sep {
    width: 1px;
    height: 28px;
    background: var(--border);
    margin: 0 4px;
}

.tb-pill {
    background: var(--s2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 11px;
    color: var(--muted2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tb-pill strong {
    color: var(--text);
    font-size: 13px;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.tb-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00b4ff, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    border: 2px solid var(--border2);
    transition: 0.2s;
}

.tb-avatar:hover {
    border-color: var(--accent);
}

.tb-user-info {
    text-align: right;
}

.tb-user-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
}

.tb-user-role {
    font-size: 10px;
    color: var(--muted);
}

.btn-export {
    background: transparent;
    border: 1px solid var(--border2);
    color: var(--muted2);
    padding: 8px 14px;
    border-radius: var(--r);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-top: 2px;
}

.btn-export:hover {
    border-color: var(--accentB);
    color: var(--accentB);
    background: rgba(0, 180, 255, 0.08);
}

.btn-add {
    background: linear-gradient(135deg, var(--accent), #059669);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--r);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-add:hover {
    transform: translateY(-2px);
}

.btn-add:active {
    transform: scale(0.98);
}

#content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: linear-gradient(135deg,
            rgba(10, 14, 26, 0),
            rgba(0, 214, 143, 0.03)) !important;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    gap: 16px;
}

.page-title {
    font-family: var(--font);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
}

.icon-btn {
    background: rgba(0, 0, 0, 0.85);
    border-radius: 8px;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.filterIndex {
    background: var(--s2);
    border: 1px solid var(--border);
    border-radius: var(--r);
    color: var(--muted2);
    padding: 6px 10px;
    font-size: 11px;
    font-family: var(--font);
    cursor: pointer;
    transition: 0.2s;
    max-width: 120px;
}