.sidebar {
    width: 260px;
    background: var(--glass-sidebar);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 40;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid var(--border-subtle);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(34,197,94,0.2); border-radius: 4px; }
.dark .sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }
.sidebar.collapsed { transform: translateX(-100%); }
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    /* end above the fixed bottom nav (4rem + safe area) so the last items and the language picker stay reachable */
    .sidebar { height: auto; bottom: calc(4rem + env(safe-area-inset-bottom, 0px)); }
}

.sidebar-logo {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-logo img { height: 40px; }

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    background: var(--bg-body);
}
@media (max-width: 1024px) {
    .main-content { margin-left: 0; }
}

.topbar {
    padding: 0.875rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--glass-topbar);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    margin: 4px 0;
    position: relative;
    overflow: hidden;
}
.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #22c55e, #16a34a);
    border-radius: 0 4px 4px 0;
    transition: height 0.3s ease;
}
.nav-item:hover {
    background: rgba(34,197,94,0.08);
    color: #16a34a;
}
.dark .nav-item:hover {
    background: rgba(34,197,94,0.1);
    color: #4ade80;
}
.nav-item:hover::before { height: 60%; }
.nav-item.active {
    background: linear-gradient(135deg, rgba(34,197,94,0.15) 0%, rgba(34,197,94,0.05) 100%);
    color: #16a34a;
}
.dark .nav-item.active { color: #4ade80; }
.nav-item.active::before { height: 70%; }
.nav-item i { font-size: 1.25rem; transition: transform 0.3s ease; }
.nav-item:hover i { transform: scale(1.1); }

.nav-group-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 1.25rem 1rem 0.5rem;
}

.stat-card {
    background: var(--glass-card);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border-subtle);
    transition: all 0.2s;
}
.stat-card:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.stat-icon.green {
    background: var(--primary-100);
    color: var(--primary-600);
}
.stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}
.dark .stat-icon.blue {
    background: rgba(37,99,235,0.2);
    color: #60a5fa;
}
.stat-icon.orange {
    background: #ffedd5;
    color: #ea580c;
}
.dark .stat-icon.orange {
    background: rgba(234,88,12,0.2);
    color: #fb923c;
}
.stat-icon.purple {
    background: #f3e8ff;
    color: #9333ea;
}
.dark .stat-icon.purple {
    background: rgba(147,51,234,0.2);
    color: #c084fc;
}

.table-pagination {
    background: var(--glass-card);
    border-radius: 0.75rem;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

.hs-tab-active\:bg-primary.active {
    background-color: var(--primary) !important;
    color: white !important;
}

.hs-collapse:not(.open) {
    display: none;
}
.hs-collapse.open {
    display: block;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--glass-dropdown);
    border: 1px solid var(--border-default);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-elevated);
    min-width: 200px;
    z-index: 50;
    display: none;
}
.dropdown-menu.show {
    display: block;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 35;
    display: none;
}
.overlay.show {
    display: block;
}

/* Modal dark mode support - handled by theme.css */

/* Button styles for filter panel */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    gap: 0.25rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-600);
    border-color: var(--primary-600);
}

.btn-secondary {
    background-color: var(--default-200);
    color: var(--default-700);
    border-color: var(--default-300);
}

.btn-secondary:hover {
    background-color: var(--default-300);
    color: var(--default-800);
}

.dark .btn-secondary {
    background-color: var(--default-700);
    color: var(--default-200);
    border-color: var(--default-600);
}

.dark .btn-secondary:hover {
    background-color: var(--default-600);
    color: var(--default-100);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

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

/* Google Translate branding link ("Google Dịch") next to the language picker */
.VIpgJd-ZVi9od-l4eHX-hSRGPd, span:has(> .VIpgJd-ZVi9od-l4eHX-hSRGPd) { display: none !important; }

/* Tailwind arbitrary-value classes used by this theme's templates that the compiled CSS does not contain (tests/TailwindClassesTest.php keeps this list honest) */
.min-w-\[140px\] { min-width: 140px; }
.min-w-\[180px\] { min-width: 180px; }
.max-h-\[90vh\] { max-height: 90vh; }
