:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --sidebar-bg: #111827;
    --sidebar-txt: #9ca3af;
    --sidebar-txt-active: #ffffff;
    --bg-main: #f3f4f6;
    --bg-card: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
}

.dashboard-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-txt);
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo h2 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.sidebar-nav {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--sidebar-txt);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

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

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.top-header {
    background-color: var(--bg-card);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-main);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    width: 300px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    color: var(--text-main);
}

.search-bar svg {
    color: var(--text-muted);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.notifications-wrapper {
    position: relative;
}

.notifications {
    position: relative;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.notif-dropdown {
    position: absolute;
    top: 40px;
    right: -20px;
    width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
}

.notif-dropdown.active {
    display: flex;
}

.notif-dropdown h3 {
    padding: 1rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    margin: 0;
}

.notif-list {
    max-height: 300px;
    overflow-y: auto;
}

.notif-item {
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.notif-item:hover {
    background: var(--bg-main);
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.notif-item.unread .notif-dot {
    background: var(--primary);
}

.notif-text p {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.notif-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mark-read-btn {
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    border-top: 1px solid var(--border);
}

.mark-read-btn:hover {
    background: var(--bg-main);
}

.avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    cursor: pointer;
}

.content-wrapper {
    padding: 2rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Tabs */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Table */
.recent-activity {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.recent-activity h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
}

.cell-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cell-user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.st-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.st-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* Empty States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    padding: 5rem 2rem;
    border-radius: 12px;
    border: 1px dashed var(--border);
    text-align: center;
}

.empty-state svg {
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 400px;
}

.btn {
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

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

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

@media(max-width: 768px) {
    .sidebar { margin-left: -260px; position: fixed; height: 100%; z-index: 50; }
    .sidebar.active { margin-left: 0; }
    .search-bar { display: none; }
}
