/* =============================================
   DASHBOARD PAGE STYLES
   ============================================= */

.dashboard-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.dashboard-header-left h1 {
    margin: 0 0 4px 0;
}

.dashboard-header-left p {
    margin: 0;
    color: #64748b;
}

.dashboard-header-right {
    display: flex;
    align-items: center;
}

/* Department Filter */
.department-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.department-filter label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
}

.department-filter .filter-icon {
    font-size: 1.2rem;
}

.department-filter .filter-label {
    white-space: nowrap;
}

.department-filter select {
    padding: 8px 32px 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    color: #1e3a8a;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 220px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231e3a8a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.department-filter select:hover {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

.department-filter select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
    }
    
    .department-filter {
        width: 100%;
    }
    
    .department-filter select {
        flex: 1;
        min-width: 0;
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-icon {
    font-size: 2rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3a8a;
    line-height: 1;
}

.stat-change {
    margin-top: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

/* Call Queue Section */
.call-queue-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.priority-tabs {
    display: flex;
    gap: 8px;
}

.priority-tab {
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.priority-tab.active {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1e3a8a;
}

.priority-tab:hover:not(.active) {
    border-color: #cbd5e1;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.queue-item {
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.queue-item:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.queue-item-info {
    flex: 1;
}

.queue-item-name {
    font-weight: 600;
    color: #1e3a8a;
    font-size: 1rem;
    margin-bottom: 4px;
}

.queue-item-meta {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.queue-item-actions {
    display: flex;
    gap: 8px;
}

/* =============================================
   V6.1 GROUP-FOCUSED DASHBOARD
   ============================================= */

/* Group Cards - Compact Version */
.group-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 10px;
    transition: all 0.2s;
    cursor: pointer;
}

.group-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.12);
    transform: translateY(-1px);
}

.group-card.user-group {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    box-shadow: 0 1px 6px rgba(59, 130, 246, 0.08);
}

.group-card.user-group:hover {
    box-shadow: 0 3px 16px rgba(59, 130, 246, 0.2);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.group-title h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0;
    line-height: 1.3;
}

.campaign-name {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
}

.group-total {
    text-align: right;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.total-count {
    font-size: 1.8rem;
    font-weight: 800;
    color: #3b82f6;
    line-height: 1;
}

.total-label {
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.group-body {
    margin-bottom: 10px;
}

/* Activity Name List - Compact */
.activity-name-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.activity-name-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.activity-name-item:hover {
    background: #eff6ff;
    border-color: #3b82f6;
}

/* Inline department badge (replaces icon) */
.inline-dept-badge {
    font-size: 1rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.inline-dept-badge.user-dept {
    filter: drop-shadow(0 0 2px rgba(59, 130, 246, 0.5));
}

.activity-name-text {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e3a8a;
}

.activity-due-date {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.activity-due-date.overdue {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.activity-due-date.today {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.activity-due-date.upcoming {
    background: #dbeafe;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}

.activity-name-count {
    font-size: 0.95rem;
    font-weight: 700;
    color: #3b82f6;
    background: white;
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    min-width: 32px;
    text-align: center;
}

.activity-cancel-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 6px;
    opacity: 0.5;
    transition: all 0.2s;
    flex-shrink: 0;
}

.activity-cancel-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Department Summary - Compact */
.dept-summary {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.dept-badge {
    padding: 4px 8px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #475569;
}

.dept-badge.user-dept {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e3a8a;
}

/* Group Footer - Compact */
.group-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.group-footer .btn {
    flex: 1;
    max-width: 150px;
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 8px;
}

.empty-state p {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.error-state {
    text-align: center;
    padding: 60px 20px;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.error-state h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 8px;
}

.error-state p {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .priority-tabs {
        width: 100%;
        justify-content: stretch;
    }
    
    .priority-tab {
        flex: 1;
        text-align: center;
        font-size: 0.75rem;
        padding: 6px 8px;
    }
    
    .activity-actions {
        flex-direction: column;
    }
    
    .activity-actions .btn {
        width: 100%;
    }
}
