/**
 * Dashboard Styles - Formal Corporate Design
 * Matching ServiceDesk Professional System Design
 */

/* ============================================================================
   DESIGN TOKENS - Inheriting from ServiceDesk
   ============================================================================ */

/* Uses variables from servicedesk.css:
   --sd-primary, --sd-bg-page, --sd-bg-white, --sd-border, --sd-text-*, etc.
*/

/* ============================================================================
   CONTAINER & BASE LAYOUT
   ============================================================================ */

.dash-container {
    padding: 0;
    max-width: 100%;
}

/* ============================================================================
   HERO SECTION - Welcome Area
   ============================================================================ */

.dash-hero {
    background: var(--sd-bg-white);
    border: 1px solid var(--sd-border);
    border-bottom: 2px solid #d1d8e0;
    padding: 24px 32px;
    margin-bottom: 24px;
}

.dash-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.dash-welcome {
    flex: 1;
}

.dash-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--sd-text-dark);
    margin: 0 0 4px 0;
}

.dash-subtitle {
    font-size: 13px;
    color: var(--sd-text-secondary);
    margin: 0 0 12px 0;
}

.dash-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: var(--sd-bg-light);
    border: 1px solid var(--sd-border-light);
    border-radius: 12px;
    font-size: 11px;
    color: var(--sd-text-secondary);
}

.dash-live-dot {
    width: 6px;
    height: 6px;
    background: var(--sd-success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.dash-live-text {
    font-weight: 600;
    color: var(--sd-success);
}

.dash-live-time {
    color: var(--sd-text-muted);
}

.dash-quick-actions {
    display: flex;
    gap: 8px;
}

.dash-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    background: #ffffff;
    border: 1px solid var(--sd-border);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sd-text-dark);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.dash-action-btn:hover {
    background: var(--sd-bg-light);
    border-color: var(--sd-primary);
    color: var(--sd-text-dark);
}

.dash-action-btn-primary,
.dash-action-primary {
    background: var(--sd-primary);
    color: white;
    border-color: var(--sd-primary);
}

.dash-action-btn-primary:hover,
.dash-action-primary:hover {
    filter: brightness(0.9);
    color: white;
}

.dash-action-secondary {
    background: white;
}

.dash-action-btn i,
.dash-action-primary i,
.dash-action-secondary i {
    font-size: 12px;
}

/* ============================================================================
   PAGE HEADER - Formal & Clean
   ============================================================================ */

.dash-page-header {
    background: var(--sd-bg-white);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: var(--sd-space-lg);
    margin-bottom: var(--sd-space-lg);
    box-shadow: var(--sd-shadow-sm);
}

.dash-page-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--sd-space-lg);
    margin-bottom: var(--sd-space-md);
}

.dash-page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--sd-text-dark);
    margin: 0 0 4px 0;
}

.dash-page-subtitle {
    font-size: var(--sd-fs-sm);
    color: var(--sd-text-secondary);
    margin: 0;
}

.dash-header-actions {
    display: flex;
    gap: var(--sd-space-sm);
}

.dash-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--sd-primary);
    color: white;
    border: none;
    border-radius: var(--sd-radius);
    font-size: var(--sd-fs-sm);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.dash-action-btn:hover {
    filter: brightness(0.9);
    color: white;
}

.dash-action-btn-secondary {
    background: white;
    color: var(--sd-text-body);
    border: 1px solid var(--sd-border);
}

.dash-action-btn-secondary:hover {
    background: var(--sd-bg-light);
    border-color: var(--sd-primary);
    color: var(--sd-text-body);
}

.dash-meta-info {
    display: flex;
    gap: var(--sd-space-lg);
    padding-top: var(--sd-space-md);
    border-top: 1px solid var(--sd-border-light);
}

.dash-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--sd-fs-sm);
    color: var(--sd-text-secondary);
}

.dash-meta-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sd-success);
}

.dash-meta-label {
    font-weight: 600;
    color: var(--sd-text-body);
}

/* ============================================================================
   METRICS GRID - Formal Cards
   ============================================================================ */

.dash-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

/* ============================================================================
   MAIN GRID LAYOUT
   ============================================================================ */

.dash-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.dash-left-col,
.dash-right-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dash-metric-card {
    background: var(--sd-bg-white);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: var(--sd-space-md);
    box-shadow: var(--sd-shadow-sm);
    transition: all 0.2s;
}

.dash-metric-card:hover {
    box-shadow: var(--sd-shadow-md);
    border-color: rgba(var(--sd-primary-rgb), 0.3);
}

.dash-metric-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--sd-space-sm);
}

.dash-metric-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sd-bg-light);
    border: 1px solid var(--sd-border-light);
    border-radius: var(--sd-radius);
    color: var(--sd-primary);
    font-size: 18px;
}

.dash-metric-card.dash-metric-primary .dash-metric-icon {
    color: var(--sd-primary);
    background: rgba(var(--sd-primary-rgb), 0.08);
    border-color: rgba(var(--sd-primary-rgb), 0.2);
}
.dash-metric-card.dash-metric-success .dash-metric-icon {
    color: var(--sd-success);
    background: #f0fdf4;
    border-color: var(--sd-success-light, #86efac);
}
.dash-metric-card.dash-metric-warning .dash-metric-icon {
    color: var(--sd-warning);
    background: #fffbeb;
    border-color: var(--sd-warning-light, #fde047);
}
.dash-metric-card.dash-metric-danger .dash-metric-icon {
    color: var(--sd-danger);
    background: #fef2f2;
    border-color: var(--sd-danger-light, #fca5a5);
}
.dash-metric-card.dash-metric-info .dash-metric-icon {
    color: var(--sd-primary);
    background: rgba(var(--sd-primary-rgb), 0.08);
    border-color: rgba(var(--sd-primary-rgb), 0.2);
}

.dash-metric-label {
    font-size: var(--sd-fs-sm);
    font-weight: 600;
    color: var(--sd-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dash-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--sd-text-dark);
    line-height: 1;
    margin-bottom: 6px;
}

.dash-metric-unit {
    font-size: 16px;
    font-weight: 600;
    color: var(--sd-text-muted);
    margin-left: 2px;
}

.dash-metric-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--sd-space-sm);
    padding-top: var(--sd-space-sm);
    border-top: 1px solid var(--sd-border-light);
}

.dash-metric-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--sd-fs-xs);
    font-weight: 600;
}

.dash-metric-trend.positive { color: var(--sd-success); }
.dash-metric-trend.negative { color: var(--sd-danger); }

.dash-metric-link {
    font-size: var(--sd-fs-xs);
    color: var(--sd-primary);
    text-decoration: none;
    font-weight: 600;
}

.dash-metric-link:hover {
    text-decoration: underline;
}

.dash-progress-bar {
    height: 4px;
    background: var(--sd-bg-light);
    border-radius: 2px;
    overflow: hidden;
    margin-top: var(--sd-space-sm);
}

.dash-progress-fill {
    height: 100%;
    background: var(--sd-primary);
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* ============================================================================
   MAIN CONTENT GRID
   ============================================================================ */

.dash-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--sd-space-lg);
    margin-bottom: var(--sd-space-lg);
}

.dash-col-left,
.dash-col-right {
    display: flex;
    flex-direction: column;
    gap: var(--sd-space-lg);
}

/* ============================================================================
   CARDS - Formal Professional Style
   ============================================================================ */

.dash-card {
    background: var(--sd-bg-white);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    box-shadow: var(--sd-shadow-sm);
    overflow: hidden;
}

.dash-card-header {
    padding: var(--sd-space-md) var(--sd-space-lg);
    background: var(--sd-bg-panel-header);
    border-bottom: 1px solid var(--sd-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dash-card-title {
    font-size: var(--sd-fs-base);
    font-weight: 700;
    color: var(--sd-text-dark);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-card-title i {
    color: var(--sd-primary);
    font-size: 14px;
}

.dash-card-subtitle {
    font-size: var(--sd-fs-xs);
    color: var(--sd-text-muted);
    margin: 3px 0 0 0;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
}

.dash-card-actions {
    display: flex;
    gap: var(--sd-space-xs);
}

.dash-card-action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    color: var(--sd-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: var(--sd-fs-xs);
}

.dash-card-action-btn:hover {
    background: var(--sd-primary);
    border-color: var(--sd-primary);
    color: white;
}

.dash-card-body {
    padding: var(--sd-space-lg);
}

.dash-card-body-compact {
    padding: var(--sd-space-md);
}

.dash-card-body-table {
    padding: 0;
}

.dash-card.dash-full-width {
    grid-column: 1 / -1;
}

/* ============================================================================
   STATS BLOCKS
   ============================================================================ */

.dash-stats-list {
    display: flex;
    flex-direction: column;
    gap: var(--sd-space-md);
}

.dash-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--sd-space-sm);
    background: var(--sd-bg-light);
    border: 1px solid var(--sd-border-light);
    border-radius: var(--sd-radius);
}

.dash-stat-label {
    font-size: var(--sd-fs-sm);
    color: var(--sd-text-body);
    font-weight: 500;
}

.dash-stat-value {
    font-size: var(--sd-fs-lg);
    font-weight: 700;
    color: var(--sd-text-dark);
}

.dash-stat-bar {
    height: 6px;
    background: var(--sd-bg-light);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}

.dash-stat-fill {
    height: 100%;
    background: var(--sd-primary);
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ============================================================================
   LISTS - Formal Professional
   ============================================================================ */

.dash-list {
    display: flex;
    flex-direction: column;
}

.dash-list-item {
    display: flex;
    align-items: center;
    gap: var(--sd-space-md);
    padding: var(--sd-space-sm) var(--sd-space-md);
    border-bottom: 1px solid var(--sd-border-light);
    transition: all 0.2s;
}

.dash-list-item:last-child {
    border-bottom: none;
}

.dash-list-item:hover {
    background: var(--sd-bg-light);
}

.dash-list-rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sd-bg-light);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    font-size: var(--sd-fs-sm);
    font-weight: 700;
    color: var(--sd-text-secondary);
    flex-shrink: 0;
}

.dash-list-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sd-primary);
    color: white;
    border-radius: var(--sd-radius);
    font-size: var(--sd-fs-sm);
    font-weight: 600;
    flex-shrink: 0;
}

.dash-list-content {
    flex: 1;
    min-width: 0;
}

.dash-list-title {
    font-size: var(--sd-fs-sm);
    font-weight: 600;
    color: var(--sd-text-dark);
    margin-bottom: 2px;
}

.dash-list-meta {
    font-size: var(--sd-fs-xs);
    color: var(--sd-text-muted);
}

.dash-list-value {
    font-size: var(--sd-fs-base);
    font-weight: 700;
    color: var(--sd-primary);
}

/* ============================================================================
   TABLE - Formal Style
   ============================================================================ */

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

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--sd-fs-sm);
}

.dash-table thead {
    background: var(--sd-bg-panel-header);
    border-bottom: 2px solid var(--sd-border);
}

.dash-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: var(--sd-fs-xs);
    font-weight: 700;
    color: var(--sd-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.dash-table tbody tr {
    border-bottom: 1px solid var(--sd-border-light);
    background: var(--sd-row-even);
}

.dash-table tbody tr:nth-child(odd) {
    background: var(--sd-row-odd);
}

.dash-table tbody tr:hover {
    background: var(--sd-row-hover);
}

.dash-table td {
    padding: 10px 12px;
    color: var(--sd-text-body);
}

.dash-table-id {
    font-weight: 700;
    color: var(--sd-primary);
    text-decoration: none;
}

.dash-table-id:hover {
    text-decoration: underline;
}

.dash-table-subject {
    color: var(--sd-text-dark);
    text-decoration: none;
    font-weight: 500;
}

.dash-table-subject:hover {
    color: var(--sd-primary);
}

.dash-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--sd-radius-pill);
    font-size: var(--sd-fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.dash-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

/* ============================================================================
   EMPTY STATES
   ============================================================================ */

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

.dash-empty-state i {
    font-size: 48px;
    color: var(--sd-text-light);
    margin-bottom: var(--sd-space-md);
}

.dash-empty-state h3 {
    font-size: var(--sd-fs-base);
    font-weight: 600;
    color: var(--sd-text-secondary);
    margin: 0 0 6px 0;
}

.dash-empty-state p {
    font-size: var(--sd-fs-sm);
    color: var(--sd-text-muted);
    margin: 0;
}

/* ============================================================================
   URGENT/ALERT SECTION
   ============================================================================ */

.dash-urgent-section {
    border-left: 3px solid var(--sd-danger);
}

.dash-urgent-list {
    display: flex;
    flex-direction: column;
}

.dash-urgent-item {
    display: flex;
    gap: var(--sd-space-md);
    padding: var(--sd-space-sm) var(--sd-space-md);
    border-bottom: 1px solid var(--sd-border-light);
    text-decoration: none;
    transition: all 0.2s;
}

.dash-urgent-item:last-child {
    border-bottom: none;
}

.dash-urgent-item:hover {
    background: var(--sd-bg-light);
}

.dash-urgent-priority {
    width: 4px;
    height: 100%;
    border-radius: 2px;
    flex-shrink: 0;
}

.dash-urgent-content {
    flex: 1;
    min-width: 0;
}

.dash-urgent-id {
    font-size: var(--sd-fs-xs);
    font-weight: 700;
    color: var(--sd-primary);
    margin-bottom: 2px;
}

.dash-urgent-subject {
    font-size: var(--sd-fs-sm);
    font-weight: 600;
    color: var(--sd-text-dark);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-urgent-meta {
    font-size: var(--sd-fs-xs);
    color: var(--sd-text-muted);
}

/* ============================================================================
   STATUS DISTRIBUTION
   ============================================================================ */

.dash-status-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dash-status-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dash-status-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.dash-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-status-name {
    font-size: var(--sd-fs-sm);
    font-weight: 600;
    color: var(--sd-text-dark);
    flex: 1;
}

.dash-status-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.dash-status-count {
    font-size: var(--sd-fs-base);
    font-weight: 700;
    color: var(--sd-text-dark);
}

.dash-status-percentage {
    font-size: var(--sd-fs-xs);
    font-weight: 600;
    color: var(--sd-text-muted);
    min-width: 40px;
    text-align: right;
}

.dash-status-bar {
    height: 6px;
    background: var(--sd-bg-light);
    border-radius: 3px;
    overflow: hidden;
    margin-left: 18px;
}

.dash-status-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* ============================================================================
   CATEGORIES LIST
   ============================================================================ */

.dash-categories-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dash-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-category-name {
    font-size: var(--sd-fs-sm);
    font-weight: 600;
    color: var(--sd-text-dark);
    min-width: 140px;
    flex-shrink: 0;
}

.dash-category-count {
    font-size: var(--sd-fs-base);
    font-weight: 700;
    color: var(--sd-primary);
    min-width: 35px;
    text-align: right;
}

.dash-category-bar {
    flex: 1;
    height: 8px;
    background: var(--sd-bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.dash-category-fill {
    height: 100%;
    background: var(--sd-primary);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* ============================================================================
   AGENTS/PERFORMERS LIST
   ============================================================================ */

.dash-agents-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-agent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--sd-bg-light);
    border: 1px solid var(--sd-border-light);
    border-radius: var(--sd-radius);
    transition: all 0.2s;
}

.dash-agent-item:hover {
    background: rgba(var(--sd-primary-rgb), 0.05);
    border-color: rgba(var(--sd-primary-rgb), 0.2);
}

.dash-agent-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-agent-medal {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: var(--sd-fs-sm);
    font-weight: 700;
    color: white;
}

.dash-medal-gold {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #8b6914;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.dash-medal-silver {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #5a5a5a;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.dash-medal-bronze {
    background: linear-gradient(135deg, #cd7f32, #daa06d);
    color: #5c3317;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4);
}

.dash-agent-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--sd-border);
    border-radius: 50%;
    font-size: var(--sd-fs-sm);
    font-weight: 700;
    color: var(--sd-text-secondary);
}

.dash-agent-avatar {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.dash-agent-info {
    flex: 1;
    min-width: 0;
}

.dash-agent-name {
    font-size: var(--sd-fs-sm);
    font-weight: 600;
    color: var(--sd-text-dark);
    margin-bottom: 2px;
}

.dash-agent-stats {
    display: flex;
    gap: 12px;
}

.dash-agent-stat {
    font-size: var(--sd-fs-xs);
    color: var(--sd-text-muted);
}

.dash-agent-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sd-success);
    font-size: 16px;
    flex-shrink: 0;
}

/* ============================================================================
   TABLE SPECIFIC ELEMENTS
   ============================================================================ */

.dash-table-responsive {
    overflow-x: auto;
}

.dash-table-row {
    cursor: pointer;
}

.dash-ticket-id {
    font-family: var(--sd-font-mono);
    font-weight: 700;
    font-size: var(--sd-fs-sm);
    color: var(--sd-primary);
    text-decoration: none;
    padding: 3px 8px;
    border: 1.5px solid var(--sd-primary);
    border-radius: 2px;
    display: inline-block;
    background: rgba(var(--sd-primary-rgb), 0.04);
}

.dash-ticket-id:hover {
    background: rgba(var(--sd-primary-rgb), 0.1);
    text-decoration: none;
}

.dash-ticket-subject {
    color: var(--sd-text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--sd-fs-sm);
}

.dash-ticket-subject:hover {
    color: var(--sd-primary);
    text-decoration: none;
}

.dash-requester {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-requester-name {
    font-size: var(--sd-fs-sm);
    font-weight: 600;
    color: var(--sd-text-dark);
}

.dash-requester-email {
    font-size: var(--sd-fs-xs);
    color: var(--sd-text-muted);
}

.dash-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--sd-fs-xs);
    font-weight: 600;
}

.dash-status-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.dash-priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--sd-radius);
    border: 1px solid;
    font-size: var(--sd-fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.dash-agent-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--sd-fs-sm);
    font-weight: 500;
    color: var(--sd-text-dark);
}

.dash-unassigned {
    font-size: var(--sd-fs-xs);
    color: var(--sd-text-muted);
    font-style: italic;
}

.dash-time {
    font-size: var(--sd-fs-xs);
    color: var(--sd-text-muted);
    white-space: nowrap;
}

.dash-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--sd-text-secondary);
    background: var(--sd-bg-light);
    border: 1px solid var(--sd-border-light);
    border-radius: var(--sd-radius);
    text-decoration: none;
    transition: all 0.2s;
}

.dash-action-icon:hover {
    background: var(--sd-primary);
    border-color: var(--sd-primary);
    color: white;
}

/* ============================================================================
   URGENT CARD SPECIFIC
   ============================================================================ */

.dash-card-urgent {
    border-left: 3px solid var(--sd-danger);
}

.dash-urgent-badge {
    background: var(--sd-danger);
    color: white;
    font-size: var(--sd-fs-xs);
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--sd-radius-pill);
}

.dash-urgent-agent {
    color: var(--sd-text-secondary);
}

.dash-urgent-unassigned {
    color: var(--sd-danger);
    font-weight: 600;
}

.dash-urgent-arrow {
    color: var(--sd-text-light);
    font-size: var(--sd-fs-xs);
    flex-shrink: 0;
}

/* ============================================================================
   METRIC SUBLABEL & IMPROVEMENTS
   ============================================================================ */

.dash-metric-sublabel {
    font-size: var(--sd-fs-xs);
    color: var(--sd-text-muted);
    font-weight: 500;
    margin-top: 3px;
}

.dash-metric-content {
    flex: 1;
}

.dash-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--sd-radius);
    font-size: var(--sd-fs-xs);
    font-weight: 600;
}

.dash-trend-up {
    background: #f0fdf4;
    color: var(--sd-success);
}

.dash-trend-down {
    background: #fef2f2;
    color: var(--sd-danger);
}

.dash-metric-progress {
    margin-top: 8px;
}

.dash-metric-card.dash-metric-gradient {
    background: linear-gradient(135deg, rgba(var(--sd-primary-rgb), 0.05), rgba(var(--sd-primary-rgb), 0.01));
    border-color: rgba(var(--sd-primary-rgb), 0.15);
}

/* ============================================================================
   VIEW ALL BUTTON
   ============================================================================ */

.dash-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: white;
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    color: var(--sd-text-secondary);
    font-size: var(--sd-fs-xs);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.dash-view-all-btn:hover {
    background: var(--sd-primary);
    border-color: var(--sd-primary);
    color: white;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1200px) {
    .dash-content-grid {
        grid-template-columns: 1fr;
    }

    .dash-main-grid {
        grid-template-columns: 1fr;
    }

    .dash-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .dash-page-header-top {
        flex-direction: column;
        align-items: stretch;
    }

    .dash-header-actions {
        width: 100%;
    }

    .dash-action-btn {
        flex: 1;
        justify-content: center;
    }

    .dash-metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dash-meta-info {
        flex-direction: column;
        gap: var(--sd-space-sm);
    }

    .dash-hero-content {
        flex-direction: column;
    }

    .dash-quick-actions {
        width: 100%;
    }

    .dash-table {
        min-width: 700px;
    }
}

@media (max-width: 480px) {
    .dash-metrics-grid {
        grid-template-columns: 1fr;
    }
}
