:root {
    --sidebar-bg: #1e293b;
    --sidebar-width: 260px;
    --sidebar-link: #94a3b8;
    --sidebar-link-hover: #ffffff;
    --sidebar-active-bg: #2563eb;
}

/* Layout */
#wrapper {
    min-height: 100vh;
}

#sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background-color: var(--sidebar-bg);
    flex-shrink: 0;
    transition: width 0.25s ease;
}

#page-content {
    min-height: 100vh;
    background-color: #f8fafc;
}

/* Sidebar styles */
.sidebar-header {
    background-color: rgba(0,0,0,0.2);
    color: white;
    min-height: 64px;
}

#sidebar .nav-link {
    color: var(--sidebar-link);
    border-radius: 8px;
    padding: 0.55rem 0.875rem;
    font-size: 0.875rem;
    transition: all 0.15s;
    margin-bottom: 2px;
}

#sidebar .nav-link:hover {
    color: var(--sidebar-link-hover);
    background-color: rgba(255,255,255,0.08);
}

#sidebar .nav-link.active {
    color: #fff;
    background-color: var(--sidebar-active-bg);
}

.sidebar-label {
    color: #475569;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 1rem 0.875rem 0.3rem;
    list-style: none;
}

.sidebar-portal {
    --sidebar-active-bg: #0891b2;
}

/* Avatars */
.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    text-transform: uppercase;
}

.avatar-circle-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
    text-transform: uppercase;
}

/* KPI icons */
.kpi-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Cards */
.card {
    border-radius: 12px;
}

/* Tables */
.table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

/* Navbar */
.navbar {
    min-height: 56px;
    z-index: 100;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border-color: #e2e8f0;
    font-size: 0.875rem;
}

.form-control:focus, .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-label {
    font-size: 0.8rem;
    color: #374151;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-size: 0.875rem;
}

/* Badges */
.badge {
    font-size: 0.7rem;
    font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 991px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    #sidebar.show {
        transform: translateX(0);
    }

    #page-content {
        width: 100%;
    }
}

/* Mail action cards */
.action-card {
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.action-card:hover {
    border-color: #2563eb !important;
    background-color: #eff6ff;
}

/* Notification dot */
.notif-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    position: absolute;
    top: -2px;
    right: -2px;
}

.position-relative {
    position: relative !important;
}

/* Btn extra small */
.btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.72rem;
    border-radius: 4px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Status colors */
.bg-primary-subtle { background-color: #eff6ff !important; }
.bg-success-subtle { background-color: #f0fdf4 !important; }
.bg-warning-subtle { background-color: #fffbeb !important; }
.bg-danger-subtle  { background-color: #fef2f2 !important; }
.bg-info-subtle    { background-color: #f0f9ff !important; }
