:root {
    --wa-green: #25D366;
    --wa-dark: #075E54;
    --wa-teal: #128C7E;
    --wa-light: #DCF8C6;
    --sidebar-width: 260px;
}
* { font-family: 'Inter', sans-serif; }
body { background: #f0f2f5; min-height: 100vh; }

/* Sidebar */
.sidebar {
    position: fixed; top: 0; left: 0; width: var(--sidebar-width); height: 100vh;
    background: linear-gradient(180deg, var(--wa-dark) 0%, var(--wa-teal) 100%);
    color: white; z-index: 1000; transition: transform 0.3s ease; overflow-y: auto;
}
.sidebar-brand {
    padding: 1.25rem 1rem; font-size: 1.2rem; font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    display: flex; align-items: center; gap: 0.5rem;
}
.sidebar-brand i { font-size: 1.5rem; }
.sidebar-nav { padding: 0.5rem 0; padding-bottom: 80px; }
.sidebar-nav .nav-item { margin: 2px 0.5rem; }
.sidebar-nav .nav-link {
    color: rgba(255,255,255,0.8); padding: 0.65rem 1rem; border-radius: 8px;
    display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem;
    transition: all 0.2s; text-decoration: none;
}
.sidebar-nav .nav-link:hover, .sidebar-nav .nav-link.active {
    background: rgba(255,255,255,0.15); color: white;
}
.sidebar-nav .nav-link i { width: 20px; text-align: center; }
.sidebar-nav .nav-section {
    padding: 1rem 1rem 0.3rem; font-size: 0.7rem; text-transform: uppercase;
    letter-spacing: 1px; color: rgba(255,255,255,0.5); font-weight: 600;
}
.sidebar-user {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 1rem;
    background: rgba(0,0,0,0.1); border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-user .user-info { display: flex; align-items: center; gap: 0.5rem; }
.sidebar-user .avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--wa-green);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.85rem; color: white;
}
.sidebar-user .user-name { font-size: 0.85rem; font-weight: 500; }
.sidebar-user .user-role { font-size: 0.7rem; color: rgba(255,255,255,0.6); }

/* Main content */
.main-content { margin-left: var(--sidebar-width); min-height: 100vh; transition: margin-left 0.3s ease; }
.topbar {
    background: white; padding: 0.75rem 1.5rem; border-bottom: 1px solid #e0e0e0;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 999;
}
.topbar .page-title { font-weight: 600; font-size: 1.1rem; margin: 0; }
.content-area { padding: 1.5rem; }
.menu-toggle {
    display: none; background: none; border: none; font-size: 1.3rem;
    color: var(--wa-dark); cursor: pointer; padding: 0.25rem;
}
.sidebar-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 999;
}

/* Cards */
.stat-card {
    background: white; border-radius: 12px; padding: 1.25rem; border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); transition: transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; }
.stat-card .stat-label { font-size: 0.8rem; color: #6c757d; }

.card-custom { border: none; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.card-custom .card-header {
    background: white; border-bottom: 1px solid #f0f0f0; padding: 1rem 1.25rem;
    font-weight: 600; border-radius: 12px 12px 0 0 !important;
}

/* Status badges */
.status-badge { padding: 0.35rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 500; }
.status-connected { background: #dcfce7; color: #166534; }
.status-disconnected { background: #fee2e2; color: #991b1b; }
.status-connecting { background: #fef3c7; color: #92400e; }

/* Table */
.table-custom { border-radius: 12px; overflow: hidden; }
.table-custom th {
    background: #f8f9fa; font-weight: 600; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* Alert */
.alert { border-radius: 10px; border: none; }

/* Empty state */
.empty-state { text-align: center; padding: 3rem 1rem; color: #6c757d; }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

/* Animations */
.fade-in { animation: fadeIn 0.3s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Auth pages */
.auth-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #075E54 0%, #128C7E 50%, #25D366 100%);
    display: flex; align-items: center; justify-content: center;
}
.auth-card { border: none; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }

/* Mobile */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .sidebar-overlay.show { display: block; }
    .content-area { padding: 1rem; }
}
@media (max-width: 575.98px) {
    .stat-card .stat-value { font-size: 1.4rem; }
    .topbar { padding: 0.75rem 1rem; }
    .content-area { padding: 0.75rem; }
}
