/* ==================== MOOD DASHBOARD - ADVANCED ==================== */
/* Overhaul: rounded cards, better spacing, full dark mode support */

/* ==================== HEADER ==================== */

.mood-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.mood-dash-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.mood-dash-subtitle {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* ==================== SEARCH BAR ==================== */

.mood-dash-search-bar {
    position: relative;
    margin-bottom: 16px;
}

.mood-dash-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
    pointer-events: none;
}

.mood-dash-search-input {
    width: 100%;
    padding: 14px 18px 14px 46px;
    border: 1.5px solid var(--color-border);
    border-radius: 12px !important;
    background: var(--color-bg-card);
    color: var(--color-text);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.mood-dash-search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

.mood-dash-search-input::placeholder {
    color: var(--color-text-light);
    opacity: 0.6;
}

/* ==================== FILTERS ==================== */

.mood-dash-filters {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.mood-dash-filter-row-top {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.mood-dash-filter-row-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.mood-dash-filter-select-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mood-dash-filter-group {
    display: flex;
    gap: 4px;
    background: #f3f4f6;
    border-radius: 12px !important;
    padding: 4px;
}

.mood-dash-filter-btn {
    padding: 9px 18px;
    border: none;
    border-radius: 10px !important;
    background: transparent;
    color: var(--color-text-light);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mood-dash-filter-btn:hover {
    color: var(--color-text);
    background: rgba(var(--color-primary-rgb), 0.04);
}

.mood-dash-filter-btn.active {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.3);
}

.mood-dash-custom-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mood-dash-custom-range span {
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.mood-dash-date-input {
    padding: 9px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: 10px !important;
    font-size: 0.85rem;
    color: var(--color-text);
    background: var(--color-bg-card);
    outline: none;
    transition: border-color 0.2s;
}

.mood-dash-date-input:focus {
    border-color: var(--color-primary);
}

.mood-dash-apply-btn {
    padding: 9px 18px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 10px !important;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.mood-dash-apply-btn:hover {
    background: #5a00d4;
    transform: translateY(-1px);
}

.mood-dash-select {
    padding: 9px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: 10px !important;
    font-size: 0.85rem;
    color: var(--color-text);
    background: var(--color-bg-card);
    min-width: 180px;
    outline: none;
    transition: border-color 0.2s;
    cursor: pointer;
}

.mood-dash-select:focus {
    border-color: var(--color-primary);
}

/* ==================== STAT CARDS ==================== */

.mood-dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.mood-dash-stat-card {
    background: var(--color-bg-card);
    padding: 24px 20px;
    border-radius: 16px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--color-border);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mood-dash-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), #a855f7);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.mood-dash-stat-card:hover::before {
    transform: scaleX(1);
}

.mood-dash-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(var(--color-primary-rgb), 0.1);
}

.mood-dash-stat-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.mood-dash-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.mood-dash-stat-label {
    font-size: 0.76rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ==================== CHARTS ROW ==================== */

.mood-dash-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.mood-dash-chart-card {
    background: var(--color-bg-card);
    padding: 24px;
    border-radius: 16px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--color-border);
    transition: box-shadow 0.2s ease;
}

.mood-dash-chart-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.mood-dash-chart-title {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.mood-dash-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mood-dash-bar-item {
    display: grid;
    grid-template-columns: 130px 1fr 80px;
    align-items: center;
    gap: 12px;
}

.mood-dash-bar-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
}

.mood-dash-bar-track {
    height: 26px;
    background: #f3f4f6;
    border-radius: 13px !important;
    overflow: hidden;
}

.mood-dash-bar-fill {
    height: 100%;
    border-radius: 13px !important;
    transition: width 0.5s ease;
    min-width: 2px;
}

.mood-dash-bar-value {
    font-size: 0.82rem;
    color: var(--color-text);
    font-weight: 600;
    text-align: right;
}

.mood-dash-bar-pct {
    font-weight: 400;
    color: var(--color-text-light);
    font-size: 0.78rem;
}

/* ==================== TAGS CLOUD ==================== */

.mood-dash-tags-section {
    background: var(--color-bg-card);
    padding: 24px;
    border-radius: 16px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--color-border);
    margin-bottom: 24px;
}

.mood-dash-section-title {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.mood-dash-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mood-dash-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1.5px solid var(--color-border);
    border-radius: 20px !important;
    background: var(--color-bg-card);
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.mood-dash-tag-pill:hover {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.06);
    transform: translateY(-1px);
}

.mood-dash-tag-pill.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.25);
}

.mood-dash-tag-pill.active .mood-dash-tag-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.mood-dash-tag-sm {
    padding: 5px 12px;
    font-size: 0.78rem;
}

.mood-dash-tag-md {
    padding: 7px 16px;
    font-size: 0.85rem;
}

.mood-dash-tag-lg {
    padding: 9px 18px;
    font-size: 0.92rem;
    font-weight: 600;
}

.mood-dash-tag-count {
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 10px !important;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-light);
}

/* ==================== ALERTS SECTION ==================== */

.mood-dash-alerts-section {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 16px !important;
    padding: 24px;
    margin-bottom: 24px;
}

.mood-dash-alerts-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.mood-dash-alerts-icon {
    font-size: 1.25rem;
}

.mood-dash-alerts-title {
    color: #dc2626;
    margin-bottom: 0;
}

.mood-dash-alerts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.mood-dash-alert-card {
    background: white;
    border: 1px solid #fecaca;
    border-radius: 12px !important;
    overflow: hidden;
    display: flex;
    transition: transform 0.2s, box-shadow 0.2s;
}

.mood-dash-alert-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.12);
}

.mood-dash-alert-card-accent {
    width: 4px;
    background: linear-gradient(180deg, #ef4444, #f97316);
    flex-shrink: 0;
}

.mood-dash-alert-card-body {
    padding: 16px;
    flex: 1;
}

.mood-dash-alert-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.mood-dash-alert-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}

.mood-dash-alert-dept {
    font-size: 0.78rem;
    color: var(--color-text-light);
}

.mood-dash-alert-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.mood-dash-alert-reason {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 8px !important;
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.78rem;
    font-weight: 500;
}

.mood-dash-alert-comment {
    font-size: 0.82rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-top: 4px;
}

/* ==================== TABLE ==================== */

.mood-dash-table-container {
    background: var(--color-bg-card);
    border-radius: 16px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--color-border);
    overflow: hidden;
    margin-bottom: 24px;
}

.mood-dash-table {
    width: 100%;
    border-collapse: collapse;
}

.mood-dash-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid var(--color-border);
}

.mood-dash-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light);
    white-space: nowrap;
}

.mood-dash-sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.mood-dash-sortable:hover {
    color: var(--color-primary);
}

.mood-dash-sort-active {
    color: var(--color-primary) !important;
}

.mood-dash-sort-arrow {
    font-size: 0.72rem;
    margin-left: 4px;
    opacity: 0.7;
}

.mood-dash-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
    color: var(--color-text);
    vertical-align: middle;
}

.mood-dash-table-row {
    cursor: pointer;
    transition: background 0.15s;
}

.mood-dash-table tbody .mood-dash-table-row:hover {
    background: rgba(var(--color-primary-rgb), 0.03);
}

.mood-dash-table-row.mood-dash-row-expanded {
    background: rgba(var(--color-primary-rgb), 0.04);
}

.mood-dash-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mood-dash-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    object-fit: cover;
    border: 2px solid #f0f0f0;
    flex-shrink: 0;
}

.mood-dash-user-name {
    font-weight: 600;
    font-size: 0.88rem;
}

.mood-dash-clickable-name {
    cursor: pointer;
    transition: color 0.2s;
}

.mood-dash-clickable-name:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.mood-dash-user-email {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.mood-dash-mood-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 8px !important;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.mood-dash-tags-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mood-dash-tag-mini {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px 8px;
    border-radius: 8px !important;
    background: #f3f4f6;
    font-size: 0.72rem;
    color: var(--color-text);
    white-space: nowrap;
}

.mood-dash-tag-more {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}

.mood-dash-comment-cell {
    font-size: 0.82rem;
    color: var(--color-text-light);
    cursor: help;
}

.mood-dash-empty-cell {
    color: #ccc;
}

/* ==================== EXPANDED ROW ==================== */

.mood-dash-expanded-row td {
    padding: 0 !important;
    border-bottom: 2px solid var(--color-primary) !important;
}

.mood-dash-expanded-content {
    padding: 20px 24px;
    background: rgba(var(--color-primary-rgb), 0.02);
    border-top: 1px solid rgba(var(--color-primary-rgb), 0.1);
}

.mood-dash-expanded-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 14px;
}

.mood-dash-expanded-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--color-bg-card);
    padding: 12px;
    border-radius: 10px !important;
    border: 1px solid var(--color-border);
}

.mood-dash-expanded-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light);
}

.mood-dash-expanded-value {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text);
}

.mood-dash-expanded-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.mood-dash-expanded-comment {
    margin-top: 10px;
}

.mood-dash-expanded-comment-text {
    font-size: 0.88rem;
    color: var(--color-text);
    font-style: italic;
    margin: 6px 0 0 0;
    line-height: 1.5;
    padding: 12px 16px;
    background: rgba(var(--color-primary-rgb), 0.03);
    border-radius: 10px !important;
    border-left: 3px solid var(--color-primary);
}

/* ==================== PERSON DETAIL MODAL ==================== */

.mood-dash-person-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal, 1050);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mood-dash-person-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.mood-dash-person-modal-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px !important;
}

.mood-dash-person-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 20px !important;
    padding: 28px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.mood-dash-person-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 10px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text-light);
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.mood-dash-person-close:hover {
    background: #e0e0e0;
    color: var(--color-text);
    transform: scale(1.05);
}

.mood-dash-person-loading {
    text-align: center;
    padding: 40px;
    color: var(--color-text-light);
}

.mood-dash-person-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.mood-dash-person-avatar {
    width: 60px;
    height: 60px;
    border-radius: 16px !important;
    object-fit: cover;
    border: 3px solid var(--color-primary);
    flex-shrink: 0;
}

.mood-dash-person-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-text);
}

.mood-dash-person-dept {
    font-size: 0.82rem;
    color: var(--color-text-light);
    margin-top: 2px;
}

.mood-dash-person-averages {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 24px;
}

.mood-dash-person-avg-card {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 12px !important;
    text-align: center;
    border: 1px solid var(--color-border);
}

.mood-dash-person-avg-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light);
    margin-bottom: 6px;
}

.mood-dash-person-avg-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.mood-dash-person-section-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

.mood-dash-person-timeline {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.mood-dash-person-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.mood-dash-person-day-emoji {
    width: 46px;
    height: 46px;
    border-radius: 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: transform 0.15s;
}

.mood-dash-person-day-emoji:hover {
    transform: scale(1.08);
}

.mood-dash-person-day-empty {
    background: #f3f4f6;
    border-radius: 12px !important;
    color: #ccc;
    font-size: 1rem;
}

.mood-dash-person-day-label {
    font-size: 0.72rem;
    color: var(--color-text-light);
    text-transform: capitalize;
    font-weight: 500;
}

.mood-dash-person-last-comment {
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
}

.mood-dash-person-last-comment p {
    font-size: 0.9rem;
    color: var(--color-text);
    font-style: italic;
    line-height: 1.5;
    margin: 0;
    padding: 12px 16px;
    background: rgba(var(--color-primary-rgb), 0.03);
    border-radius: 10px !important;
    border-left: 3px solid var(--color-primary);
}

/* ==================== DARK THEME ==================== */

[data-theme="dark"] .mood-dash-header h2 {
    color: #f0f0f0;
}

[data-theme="dark"] .mood-dash-subtitle {
    color: #a0a0b0;
}

/* Search */
[data-theme="dark"] .mood-dash-search-input {
    background: #1e1e2e;
    border-color: #3a3a4e;
    color: #f0f0f0;
}

[data-theme="dark"] .mood-dash-search-input:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

[data-theme="dark"] .mood-dash-search-input::placeholder {
    color: #6b6b80;
}

[data-theme="dark"] .mood-dash-search-icon {
    color: #6b6b80;
}

/* Filters */
[data-theme="dark"] .mood-dash-filter-group {
    background: #2a2a3e;
}

[data-theme="dark"] .mood-dash-filter-btn {
    color: #a0a0b0;
}

[data-theme="dark"] .mood-dash-filter-btn:hover {
    color: #f0f0f0;
    background: rgba(168, 85, 247, 0.08);
}

[data-theme="dark"] .mood-dash-filter-btn.active {
    background: linear-gradient(135deg, var(--color-primary), #a855f7);
    box-shadow: 0 2px 10px rgba(var(--color-primary-rgb), 0.35);
}

[data-theme="dark"] .mood-dash-date-input,
[data-theme="dark"] .mood-dash-select {
    background: #1e1e2e;
    border-color: #3a3a4e;
    color: #f0f0f0;
}

[data-theme="dark"] .mood-dash-date-input:focus,
[data-theme="dark"] .mood-dash-select:focus {
    border-color: #a855f7;
}

[data-theme="dark"] .mood-dash-apply-btn {
    background: linear-gradient(135deg, var(--color-primary), #a855f7);
}

[data-theme="dark"] .mood-dash-apply-btn:hover {
    background: linear-gradient(135deg, #5a00d4, #9333ea);
}

[data-theme="dark"] .mood-dash-custom-range span {
    color: #808090;
}

/* Stat cards */
[data-theme="dark"] .mood-dash-stat-card {
    background: #1e1e2e;
    border-color: #2a2a3e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .mood-dash-stat-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .mood-dash-stat-card::before {
    background: linear-gradient(90deg, #a855f7, var(--color-primary));
}

[data-theme="dark"] .mood-dash-stat-value {
    color: #a855f7;
}

[data-theme="dark"] .mood-dash-stat-label {
    color: #808090;
}

/* Charts */
[data-theme="dark"] .mood-dash-chart-card {
    background: #1e1e2e;
    border-color: #2a2a3e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .mood-dash-chart-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .mood-dash-chart-title {
    color: #808090;
}

[data-theme="dark"] .mood-dash-bar-track {
    background: #2a2a3e;
}

[data-theme="dark"] .mood-dash-bar-label {
    color: #e0e0e0;
}

[data-theme="dark"] .mood-dash-bar-value {
    color: #e0e0e0;
}

[data-theme="dark"] .mood-dash-bar-pct {
    color: #808090;
}

/* Tags */
[data-theme="dark"] .mood-dash-tags-section {
    background: #1e1e2e;
    border-color: #2a2a3e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .mood-dash-section-title {
    color: #808090;
}

[data-theme="dark"] .mood-dash-tag-pill {
    background: #252538;
    border-color: #3a3a4e;
    color: #e0e0e0;
}

[data-theme="dark"] .mood-dash-tag-pill:hover {
    background: rgba(168, 85, 247, 0.12);
    border-color: #a855f7;
}

[data-theme="dark"] .mood-dash-tag-pill.active {
    background: linear-gradient(135deg, var(--color-primary), #a855f7);
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(var(--color-primary-rgb), 0.35);
}

[data-theme="dark"] .mood-dash-tag-count {
    background: #3a3a4e;
    color: #a0a0b0;
}

[data-theme="dark"] .mood-dash-tag-mini {
    background: #2a2a3e;
    color: #e0e0e0;
}

/* Alerts */
[data-theme="dark"] .mood-dash-alerts-section {
    background: #2a1a1a;
    border-color: #4a2020;
}

[data-theme="dark"] .mood-dash-alerts-title {
    color: #f87171;
}

[data-theme="dark"] .mood-dash-alert-card {
    background: #1e1e2e;
    border-color: #4a2020;
}

[data-theme="dark"] .mood-dash-alert-card:hover {
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.15);
}

[data-theme="dark"] .mood-dash-alert-card-accent {
    background: linear-gradient(180deg, #f87171, #ef4444);
}

[data-theme="dark"] .mood-dash-alert-name {
    color: #f0f0f0;
}

[data-theme="dark"] .mood-dash-alert-dept {
    color: #808090;
}

[data-theme="dark"] .mood-dash-alert-reason {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

[data-theme="dark"] .mood-dash-alert-comment {
    color: #a0a0b0;
}

/* Table */
[data-theme="dark"] .mood-dash-table-container {
    background: #1e1e2e;
    border-color: #2a2a3e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .mood-dash-table thead {
    background: #252538;
    border-bottom-color: #3a3a4e;
}

[data-theme="dark"] .mood-dash-table th {
    color: #808090;
}

[data-theme="dark"] .mood-dash-table td {
    border-bottom-color: #2a2a3e;
    color: #e0e0e0;
}

[data-theme="dark"] .mood-dash-table tbody .mood-dash-table-row:hover {
    background: rgba(168, 85, 247, 0.06);
}

[data-theme="dark"] .mood-dash-table-row.mood-dash-row-expanded {
    background: rgba(168, 85, 247, 0.08);
}

[data-theme="dark"] .mood-dash-avatar {
    border-color: #3a3a4e;
}

[data-theme="dark"] .mood-dash-user-name {
    color: #f0f0f0;
}

[data-theme="dark"] .mood-dash-user-email {
    color: #6b6b80;
}

[data-theme="dark"] .mood-dash-clickable-name:hover {
    color: #a855f7;
}

[data-theme="dark"] .mood-dash-comment-cell {
    color: #a0a0b0;
}

[data-theme="dark"] .mood-dash-empty-cell {
    color: #555;
}

/* Expanded row */
[data-theme="dark"] .mood-dash-expanded-content {
    background: rgba(168, 85, 247, 0.04);
    border-top-color: rgba(168, 85, 247, 0.15);
}

[data-theme="dark"] .mood-dash-expanded-item {
    background: #252538;
    border-color: #3a3a4e;
}

[data-theme="dark"] .mood-dash-expanded-label {
    color: #808090;
}

[data-theme="dark"] .mood-dash-expanded-value {
    color: #e0e0e0;
}

[data-theme="dark"] .mood-dash-expanded-comment-text {
    color: #d0d0d0;
    background: rgba(168, 85, 247, 0.06);
    border-left-color: #a855f7;
}

/* Person modal */
[data-theme="dark"] .mood-dash-person-modal-backdrop {
    background: rgba(0, 0, 0, 0.65);
}

[data-theme="dark"] .mood-dash-person-card {
    background: #1e1e2e;
    border-color: #2a2a3e;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .mood-dash-person-close {
    background: #2a2a3e;
    color: #a0a0b0;
}

[data-theme="dark"] .mood-dash-person-close:hover {
    background: #3a3a4e;
    color: #f0f0f0;
}

[data-theme="dark"] .mood-dash-person-loading {
    color: #808090;
}

[data-theme="dark"] .mood-dash-person-avatar {
    border-color: #a855f7;
}

[data-theme="dark"] .mood-dash-person-name {
    color: #f0f0f0;
}

[data-theme="dark"] .mood-dash-person-dept {
    color: #808090;
}

[data-theme="dark"] .mood-dash-person-avg-card {
    background: #252538;
    border-color: #3a3a4e;
}

[data-theme="dark"] .mood-dash-person-avg-label,
[data-theme="dark"] .mood-dash-person-section-label {
    color: #808090;
}

[data-theme="dark"] .mood-dash-person-day-emoji {
    /* emoji backgrounds come from inline styles, this handles the wrapper */
}

[data-theme="dark"] .mood-dash-person-day-empty {
    background: #2a2a3e;
    color: #555;
}

[data-theme="dark"] .mood-dash-person-day-label {
    color: #6b6b80;
}

[data-theme="dark"] .mood-dash-person-last-comment {
    border-top-color: #3a3a4e;
}

[data-theme="dark"] .mood-dash-person-last-comment p {
    color: #d0d0d0;
    background: rgba(168, 85, 247, 0.06);
    border-left-color: #a855f7;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1024px) {
    .mood-dash-charts-row {
        grid-template-columns: 1fr;
    }

    .mood-dash-expanded-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mood-dash-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .mood-dash-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .mood-dash-filter-row-top,
    .mood-dash-filter-row-bottom {
        flex-direction: column;
    }

    .mood-dash-filter-select-group {
        flex-direction: column;
    }

    .mood-dash-select {
        width: 100%;
        min-width: unset;
    }

    .mood-dash-bar-item {
        grid-template-columns: 100px 1fr 70px;
    }

    .mood-dash-custom-range {
        flex-wrap: wrap;
    }

    .mood-dash-table-container {
        overflow-x: auto;
    }

    .mood-dash-alerts-list {
        grid-template-columns: 1fr;
    }

    .mood-dash-person-timeline {
        gap: 4px;
    }

    .mood-dash-person-day-emoji {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .mood-dash-person-averages {
        grid-template-columns: 1fr;
    }

    .mood-dash-chart-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .mood-dash-stats {
        grid-template-columns: 1fr;
    }

    .mood-dash-expanded-grid {
        grid-template-columns: 1fr;
    }

    .mood-dash-person-modal {
        padding: 10px;
    }

    .mood-dash-person-card {
        padding: 20px;
    }

    .mood-dash-stat-card {
        padding: 18px 16px;
    }

    .mood-dash-header h2 {
        font-size: 1.4rem;
    }
}
