/* ===== Base Styles ===== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', sans-serif;
}

/* ===== Custom Scrollbar ===== */
.custom-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ===== Sidebar Scrollbar ===== */
#sidebar .custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
}

/* ===== Filter Tabs ===== */
.filter-tab {
    color: #6b7280;
}

.filter-tab.active {
    background: white;
    color: #7c3aed;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* ===== Custom Checkbox ===== */
.custom-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #7c3aed;
    cursor: pointer;
}

/* ===== Table Row Styles ===== */
#tableBody tr {
    transition: background-color 0.15s ease;
}

#tableBody tr:hover {
    background-color: #faf9ff;
}

/* ===== Status Badges ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-active {
    background: #ecfdf5;
    color: #059669;
}

.status-active::before {
    background: #10b981;
    box-shadow: 0 0 0 2px #d1fae5;
}

.status-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.status-inactive::before {
    background: #9ca3af;
}

.status-pending {
    background: #fffbeb;
    color: #d97706;
}

.status-pending::before {
    background: #f59e0b;
    box-shadow: 0 0 0 2px #fef3c7;
}

/* ===== Avatar ===== */
.avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f3f4f6;
}

/* ===== Sort Icons ===== */
.sort-active .sort-icon {
    color: #7c3aed;
}

/* ===== Action Button ===== */
.action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #6b7280;
    transition: all 0.15s ease;
}

.action-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.action-btn.delete:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* ===== Page Button ===== */
.page-btn {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.15s ease;
    cursor: pointer;
}

.page-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.page-btn.active {
    background: #7c3aed;
    color: white;
}

/* ===== Fade In Animation ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* ===== Revenue Bar ===== */
.revenue-bar {
    width: 60px;
    height: 4px;
    background: #f3f4f6;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.revenue-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #a78bfa, #7c3aed);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .avatar-img {
        width: 32px;
        height: 32px;
    }
}

/* ===== Sidebar Collapse ===== */
#sidebar {
    transition: width 0.3s ease-in-out, transform 0.3s ease-in-out;
}

#sidebar.collapsed {
    width: 72px;
}

#sidebar.collapsed .sidebar-text {
    display: none;
}

#sidebar.collapsed .sidebar-header {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
    height: auto;
    min-height: 64px;
}

#sidebar.collapsed .sidebar-collapse-btn {
    margin-left: 0;
}

#sidebar.collapsed nav {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

#sidebar.collapsed .nav-item {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

#sidebar.collapsed .user-card-inner {
    justify-content: center;
}

.icon-expand {
    display: none;
}

#sidebar.collapsed .icon-collapse {
    display: none;
}

#sidebar.collapsed .icon-expand {
    display: inline-block;
}