/**
 * assets/css/chat_page/dashboard.css
 *
 * Styling for the Personal User Dashboard module.
 * Seamlessly integrates with AbraCollab Dark & Light color schemes.
 * Fully responsive across all viewport sizes and mobile devices.
 */

:root {
    --dash-primary: #4f46e5;
    --dash-primary-hover: #4338ca;
    --dash-primary-subtle: rgba(79, 70, 229, 0.12);
    --dash-success: #10b981;
    --dash-success-subtle: rgba(16, 185, 129, 0.12);
    --dash-warning: #f59e0b;
    --dash-warning-subtle: rgba(245, 158, 11, 0.12);
    --dash-danger: #ef4444;
    --dash-danger-subtle: rgba(239, 68, 68, 0.12);
    --dash-info: #06b6d4;
    --dash-info-subtle: rgba(6, 182, 212, 0.12);
    --dash-violet: #8b5cf6;
    --dash-violet-subtle: rgba(139, 92, 246, 0.12);
    --dash-card-radius: 14px;
}

body.dark_mode {
    --dash-primary: #818cf8;
    --dash-primary-hover: #a5b4fc;
    --dash-primary-subtle: rgba(99, 102, 241, 0.22);
}

/* ─────────────────────────────────────────────────────────────
 * CONTAINER & ROOT LAYOUT
 * ───────────────────────────────────────────────────────────── */
.personal_dashboard_module {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 28px;
    background-color: var(--middle-bg-color, #f8fafc);
    color: var(--text-color, #1e293b);
    box-sizing: border-box;
    width: 100%;
}

body.dark_mode .personal_dashboard_module {
    background-color: var(--middle-bg-color, #0f172a);
    color: var(--text-color, #f1f5f9);
}

.user_dashboard_view {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .personal_dashboard_module {
        padding: 16px 12px;
    }
}

@media (max-width: 480px) {
    .personal_dashboard_module {
        padding: 12px 8px;
    }
}

/* ─────────────────────────────────────────────────────────────
 * DASHBOARD MODULE IN COLUMN 1 (ASIDE)
 * ───────────────────────────────────────────────────────────── */
.dashboard_management_module {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

body.dark_mode .dashboard_management_module {
    background: #0b0f19 !important;
    color: #e2e8f0 !important;
}

body.light_mode .dashboard_management_module {
    background: #ffffff !important;
    color: #334155 !important;
}

.dash_aside_body {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 16px 14px 70px 14px !important;
    box-sizing: border-box !important;
    scrollbar-width: thin !important;
}

.dash_sidebar_slot,
.dash_mobile_slot {
    width: 100%;
}

/* Bottom Dock in Column 1 */
.dashboard_management_module .dash_dock_tools {
    display: block !important;
    position: absolute !important;
    bottom: 0px !important;
    left: 0px !important;
    right: 0px !important;
    width: 100% !important;
    z-index: 10 !important;
    margin: 0px !important;
    padding: 0px !important;
}

.dashboard_management_module .dash_dock_tools > .dock_container {
    --trans: 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    width: 100%;
    height: 54px;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    padding: 0px 8px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
    pointer-events: all;
    overflow: visible;
}

body.dark_mode .dashboard_management_module .dash_dock_tools > .dock_container {
    background: rgba(15, 23, 42, 0.92) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon {
    position: relative;
    flex: 0 0 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform-origin: bottom center;
    transition: transform var(--trans), margin var(--trans), background 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    border-radius: 8px;
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon.active {
    background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35) !important;
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon.active:hover {
    background: linear-gradient(135deg, #4338ca, #4f46e5) !important;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.45) !important;
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon.todo,
.dashboard_management_module .dash_dock_tools > .dock_container .icon.todo.active,
.dashboard_management_module .dash_dock_tools > .dock_container .icon[data-dock="action"] {
    background: transparent !important;
    box-shadow: none !important;
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon:hover {
    transform: scale(1.4) translateY(-6px);
    z-index: 10;
    margin-inline: 4px;
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon:hover + .icon,
.dashboard_management_module .dash_dock_tools > .dock_container .icon:has(+ .icon:hover) {
    transform: scale(1.18) translateY(-3px);
    z-index: 5;
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon .img {
    width: 34px;
    height: 34px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.12));
    transition: transform 0.15s ease;
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon:active .img {
    transform: scale(0.9) translateY(2px);
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon .img.img_groups {
    background-image: url('../../files/dock/mygroups.png?v=2');
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon .img.img_tasks {
    background-image: url('../../files/dock/mytasks.png?v=2');
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon .img.img_actions {
    background-image: url('../../files/dock/myactions.png?v=2');
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon .img.img_messages {
    background-image: url('../../files/dock/mymessages.png?v=2');
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon .img.img_notifications {
    background-image: url('../../files/dock/mynotifications.png?v=2');
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon .img.img_notes {
    background-image: url('../../files/dock/dock_notes.png?v=2');
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon.todo.disabled {
    opacity: 0.45;
    cursor: default;
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon.todo.disabled:hover {
    transform: none;
    margin-inline: 0px;
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon .tiptext {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.92);
    padding: 4px 8px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    z-index: 100;
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon .tiptext:after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px 4px 0 4px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.92) transparent transparent transparent;
}

.dashboard_management_module .dash_dock_tools > .dock_container .icon:hover .tiptext {
    opacity: 1;
}

body.dark_mode .dashboard_management_module .dash_dock_tools > .dock_container .icon .tiptext {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
}

body.dark_mode .dashboard_management_module .dash_dock_tools > .dock_container .icon .tiptext:after {
    border-top-color: rgba(30, 41, 59, 0.95);
}

/* ── Hero & KPIs in Column 1 ── */
.dashboard_management_module .dash_hero {
    padding: 14px 16px !important;
    margin-bottom: 14px !important;
    margin-top: 0 !important;
    border-radius: var(--dash-card-radius) !important;
    height: auto !important;
    min-height: 0 !important;
}

.dashboard_management_module .dash_hero_inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    height: auto !important;
    min-height: 0 !important;
}

.dashboard_management_module .dash_hero_left {
    display: block !important;
    width: 100% !important;
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
}

.dashboard_management_module .dash_hero_text {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.dashboard_management_module .dash_hero_eyebrow {
    margin-bottom: 3px !important;
    line-height: 1.2 !important;
}

.dashboard_management_module .dash_hero_title {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin: 0 0 4px 0 !important;
}

.dashboard_management_module .dash_hero_subtitle {
    font-size: 0.82rem !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.dashboard_management_module .dash_hero_actions {
    display: flex;
    width: 100%;
    gap: 8px;
}

.dashboard_management_module .dash_hero_actions .dash_btn {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.dashboard_management_module .dash_kpis_grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-bottom: 14px;
}

.dashboard_management_module .dash_kpis_grid > .dash_kpi_card:not(.kpi_next_event):not(.kpi_focus_time) {
    grid-column: span 1 !important;
}

.dashboard_management_module .dash_kpis_grid > .dash_kpi_card.kpi_next_event,
.dashboard_management_module .dash_kpis_grid > .dash_kpi_card.kpi_focus_time {
    grid-column: span 2 !important;
}

.dashboard_management_module .dash_kpi_card {
    padding: 12px 14px;
    border-radius: 12px;
}

.dashboard_management_module .dash_kpi_value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 4px 0 2px 0;
}

.dashboard_management_module .dash_kpi_label {
    font-size: 0.85rem;
    font-weight: 700;
}

.dashboard_management_module .dash_kpi_sub {
    font-size: 0.72rem;
    line-height: 1.3;
}

/* ─────────────────────────────────────────────────────────────
 * HERO SECTION
 * ───────────────────────────────────────────────────────────── */
.dash_hero {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid rgba(79, 70, 229, 0.18);
    border-radius: var(--dash-card-radius);
    padding: 22px 26px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

body.dark_mode .dash_hero {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.16) 0%, rgba(15, 23, 42, 0.6) 100%);
    border-color: rgba(99, 102, 241, 0.25);
}

.dash_hero_inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.dash_hero_left {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
    flex: 1 1 auto;
}

.dash_hero_avatar_box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f46e5, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    flex-shrink: 0;
}

.dash_hero_text {
    min-width: 0;
    flex: 1 1 auto;
}

.dash_hero_eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dash-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.dash_dot_live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--dash-success);
    display: inline-block;
    box-shadow: 0 0 8px var(--dash-success);
    animation: dashPulse 2s infinite;
    flex-shrink: 0;
}

@keyframes dashPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.dash_hero_title {
    font-size: 1.55rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
    word-break: break-word;
}

.dash_hero_subtitle {
    font-size: 0.9rem;
    color: var(--text-muted, #64748b);
    margin: 4px 0 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dash_stat_pill strong {
    color: var(--text-color, #0f172a);
}

body.dark_mode .dash_stat_pill strong {
    color: #f8fafc;
}

.dash_stat_sep {
    color: #94a3b8;
}

.dash_hero_actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.dash_btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dash_btn_refresh {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--text-color, #334155);
}

body.dark_mode .dash_btn_refresh {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.dash_btn_refresh:hover {
    background: #ffffff;
    border-color: var(--dash-primary);
    color: var(--dash-primary);
}

body.dark_mode .dash_btn_refresh:hover {
    background: rgba(51, 65, 85, 0.9);
    color: #ffffff;
}

.dash_btn_refresh.rotating svg {
    animation: dashSpin 0.7s linear infinite;
}

@keyframes dashSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.dash_btn_primary {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.dash_btn_primary:hover {
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

@media (max-width: 768px) {
    .dash_hero {
        padding: 14px 16px;
        border-radius: 12px;
        margin-top: 0;
        height: auto;
        min-height: 0;
    }
    .dash_hero_inner {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 10px;
        height: auto;
        min-height: 0;
    }
    .dash_hero_left {
        display: block;
        width: 100%;
        flex: 0 0 auto;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        gap: 0;
    }
    .dash_hero_text {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    .dash_hero_eyebrow {
        margin-bottom: 2px;
    }
    .dash_hero_title {
        font-size: 1.3rem;
        margin: 0 0 4px 0;
    }
    .dash_hero_subtitle {
        margin: 0;
    }
    .dash_hero_actions {
        width: 100%;
        gap: 8px;
        flex: 0 0 auto;
        margin-top: 2px;
    }
    .dash_hero_actions .dash_btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* ─────────────────────────────────────────────────────────────
 * KPI CARDS GRID (6 Cards)
 * ───────────────────────────────────────────────────────────── */
.dash_kpis_grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.dash_kpi_card.kpi_next_event,
.dash_kpi_card.kpi_focus_time {
    grid-column: span 3;
}

@media (max-width: 1200px) {
    .dash_kpis_grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
    .dash_kpis_grid > .dash_kpi_card:not(.kpi_next_event):not(.kpi_focus_time) {
        grid-column: span 2;
    }
    .dash_kpi_card.kpi_next_event,
    .dash_kpi_card.kpi_focus_time {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    .dash_kpis_grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .dash_kpis_grid > .dash_kpi_card:not(.kpi_next_event):not(.kpi_focus_time) {
        grid-column: span 1;
    }
    .dash_kpi_card.kpi_next_event,
    .dash_kpi_card.kpi_focus_time {
        grid-column: span 2;
    }
}

@media (max-width: 420px) {
    .dash_kpis_grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

.dash_kpi_card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, rgba(226, 232, 240, 0.8));
    border-radius: var(--dash-card-radius);
    padding: 16px 18px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .dash_kpi_card {
        padding: 12px 14px;
    }
}

@media (max-width: 420px) {
    .dash_kpi_card {
        padding: 10px 10px;
    }
}

body.dark_mode .dash_kpi_card {
    background: var(--card-bg, #1e293b);
    border-color: rgba(255, 255, 255, 0.08);
}

.dash_kpi_card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.dark_mode .dash_kpi_card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.15);
}

.dash_kpi_top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    min-width: 0;
}

.dash_kpi_icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (max-width: 420px) {
    .dash_kpi_icon {
        width: 30px;
        height: 30px;
    }
    .dash_kpi_icon svg {
        width: 16px;
        height: 16px;
    }
}

.dash_kpi_badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

@media (max-width: 420px) {
    .dash_kpi_badge {
        font-size: 0.65rem;
        padding: 1px 5px;
    }
}

.dash_kpi_value {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2px;
}

@media (max-width: 768px) {
    .dash_kpi_value {
        font-size: 1.55rem;
    }
}

@media (max-width: 420px) {
    .dash_kpi_value {
        font-size: 1.35rem;
    }
}

.dash_kpi_label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color, #1e293b);
}

@media (max-width: 420px) {
    .dash_kpi_label {
        font-size: 0.78rem;
    }
}

body.dark_mode .dash_kpi_label {
    color: #f1f5f9;
}

.dash_kpi_sub {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 420px) {
    .dash_kpi_sub {
        font-size: 0.7rem;
    }
}

.dash_kpi_indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
}

/* Card Accents */
.kpi_overdue .dash_kpi_icon { background: var(--dash-danger-subtle); color: var(--dash-danger); }
.kpi_overdue .dash_kpi_badge { background: var(--dash-danger-subtle); color: var(--dash-danger); }
.kpi_overdue .dash_kpi_indicator { background: var(--dash-danger); }

.kpi_due_today .dash_kpi_icon { background: var(--dash-warning-subtle); color: var(--dash-warning); }
.kpi_due_today .dash_kpi_badge { background: var(--dash-warning-subtle); color: var(--dash-warning); }
.kpi_due_today .dash_kpi_indicator { background: var(--dash-warning); }

.kpi_due_soon .dash_kpi_icon { background: var(--dash-info-subtle); color: var(--dash-info); }
.kpi_due_soon .dash_kpi_badge { background: var(--dash-info-subtle); color: var(--dash-info); }
.kpi_due_soon .dash_kpi_indicator { background: var(--dash-info); }

.kpi_my_tasks .dash_kpi_icon { background: var(--dash-primary-subtle); color: var(--dash-primary); }
.kpi_my_tasks .dash_kpi_badge { background: var(--dash-primary-subtle); color: var(--dash-primary); }
.kpi_my_tasks .dash_kpi_indicator { background: var(--dash-primary); }

body.dark_mode .kpi_my_tasks .dash_kpi_icon {
    background: rgba(99, 102, 241, 0.22);
    color: #818cf8;
    border: 1px solid rgba(129, 140, 248, 0.25);
}
body.dark_mode .kpi_my_tasks .dash_kpi_badge {
    background: rgba(99, 102, 241, 0.22);
    color: #818cf8;
    border: 1px solid rgba(129, 140, 248, 0.25);
}
body.dark_mode .kpi_my_tasks .dash_kpi_indicator {
    background: #818cf8;
}

.kpi_in_progress .dash_kpi_icon { background: var(--dash-violet-subtle); color: var(--dash-violet); }
.kpi_in_progress .dash_kpi_badge { background: var(--dash-violet-subtle); color: var(--dash-violet); }
.kpi_in_progress .dash_kpi_indicator { background: var(--dash-violet); }

.kpi_completed .dash_kpi_icon { background: var(--dash-success-subtle); color: var(--dash-success); }
.kpi_completed .dash_kpi_badge { background: var(--dash-success-subtle); color: var(--dash-success); }
.kpi_completed .dash_kpi_indicator { background: var(--dash-success); }

.kpi_next_event .dash_kpi_icon { background: rgba(99, 102, 241, 0.12); color: #6366f1; }
.kpi_next_event .dash_kpi_badge { background: rgba(99, 102, 241, 0.12); color: #6366f1; }
.kpi_next_event .dash_kpi_indicator { background: #6366f1; }
.kpi_next_event .kpi_val_next_event { font-size: 1.45rem; }

.kpi_focus_time .dash_kpi_icon { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.kpi_focus_time .dash_kpi_badge { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.kpi_focus_time .dash_kpi_indicator { background: #10b981; }
.kpi_focus_time .kpi_val_focus_time { font-size: 1.6rem; }

/* ─────────────────────────────────────────────────────────────
 * MAIN 2-COLUMN GRID
 * ───────────────────────────────────────────────────────────── */
.dash_main_grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 20px;
    align-items: start;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 1080px) {
    .dash_main_grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
}

.dash_col_left,
.dash_col_right {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Card Base */
.dash_card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, rgba(226, 232, 240, 0.8));
    border-radius: var(--dash-card-radius);
    padding: 20px 22px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 768px) {
    .dash_card {
        padding: 16px 14px;
        border-radius: 12px;
        margin-bottom: 14px !important;
    }
}

@media (max-width: 480px) {
    .dash_card {
        padding: 14px 12px;
    }
}

body.dark_mode .dash_card {
    background: var(--card-bg, #1e293b);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dash_card_header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.dash_card_header_left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 200px;
}

.dash_card_header_left > div {
    min-width: 0;
    flex: 1 1 auto;
}

.dash_card_icon_badge {
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    min-height: 36px;
    max-height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

.icon_focus { background: var(--dash-primary-subtle); color: var(--dash-primary); }
.icon_velocity { background: var(--dash-violet-subtle); color: var(--dash-violet); }
.icon_projects { background: var(--dash-info-subtle); color: var(--dash-info); }
.icon_ai { background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.2)); color: #8b5cf6; }
.icon_deadlines { background: var(--dash-warning-subtle); color: var(--dash-warning); }
.icon_activity { background: rgba(148, 163, 184, 0.15); color: #64748b; }

.dash_card_title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
    word-break: break-word;
}

.dash_card_desc {
    font-size: 0.8rem;
    color: var(--text-muted, #94a3b8);
    margin: 2px 0 0 0;
    word-break: break-word;
}

.dash_card_header_right {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .dash_card_header_right {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
}

.dash_card_body {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.dash_link_btn {
    background: none;
    border: none;
    color: var(--dash-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.dash_link_btn:hover {
    background: var(--dash-primary-subtle);
}

/* ─────────────────────────────────────────────────────────────
 * MY FOCUS TASK ITEMS
 * ───────────────────────────────────────────────────────────── */
.dash_focus_list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.dash_focus_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(241, 245, 249, 0.6);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.2s ease;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

body.dark_mode .dash_focus_item {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(255, 255, 255, 0.05);
}

.dash_focus_item:hover {
    background: #ffffff;
    border-color: var(--dash-primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transform: translateX(2px);
}

body.dark_mode .dash_focus_item:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(99, 102, 241, 0.5);
}

.dash_focus_left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.dash_task_checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    color: transparent;
    margin-top: 2px;
}

.dash_task_checkbox:hover {
    border-color: var(--dash-success);
    background: var(--dash-success-subtle);
}

.dash_focus_item.completed .dash_task_checkbox {
    background: var(--dash-success);
    border-color: var(--dash-success);
    color: #ffffff;
}

.dash_focus_item.completed .dash_focus_title {
    text-decoration: line-through;
    opacity: 0.6;
}

.dash_focus_content {
    flex: 1 1 auto;
    min-width: 0;
}

.dash_focus_title_row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
    min-width: 0;
}

.dash_task_number {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    background: rgba(100, 116, 139, 0.12);
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.dash_focus_title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-color, #1e293b);
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
}

body.dark_mode .dash_focus_title {
    color: #f8fafc;
}

.dash_focus_title:hover {
    color: var(--dash-primary);
}

.dash_focus_meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    flex-wrap: wrap;
    min-width: 0;
}

.dash_tag_project {
    color: var(--text-muted, #64748b);
    background: rgba(148, 163, 184, 0.15);
    padding: 2px 7px;
    border-radius: 5px;
    font-weight: 500;
    white-space: nowrap;
}

.dash_tag_due {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 5px;
    font-weight: 600;
    white-space: nowrap;
}

.due_overdue { background: var(--dash-danger-subtle); color: var(--dash-danger); }
.due_today { background: var(--dash-warning-subtle); color: var(--dash-warning); }
.due_tomorrow, .due_soon { background: var(--dash-info-subtle); color: var(--dash-info); }
.due_later { background: rgba(148, 163, 184, 0.15); color: #64748b; }

/* Priority badges (matching Kanban board) */
.task_priority_badge,
.dash_tag_priority {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: normal;
}

.task_priority_badge.badge-danger,
.dash_tag_priority.badge-danger    { background: rgba(220,53,69,0.15) !important;  color: #dc3545 !important; }
.task_priority_badge.badge-warning,
.dash_tag_priority.badge-warning   { background: rgba(255,193,7,0.15) !important;  color: #ffc107 !important; }
.task_priority_badge.badge-info,
.dash_tag_priority.badge-info      { background: rgba(13,202,240,0.15) !important; color: #0dcaf0 !important; }
.task_priority_badge.badge-secondary,
.dash_tag_priority.badge-secondary { background: rgba(108,117,125,0.15) !important; color: #6c757d !important; }

.dash_focus_actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.dash_btn_action {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    padding: 5px 9px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-color, #475569);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

body.dark_mode .dash_btn_action {
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.1);
}

.dash_btn_action:hover {
    background: var(--dash-primary);
    border-color: var(--dash-primary);
    color: #ffffff;
}

@media (max-width: 600px) {
    .dash_focus_item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 12px;
    }
    .dash_focus_left {
        width: 100%;
    }
    .dash_focus_title {
        white-space: normal;
        word-break: break-word;
    }
    .dash_focus_actions {
        justify-content: flex-end;
        width: 100%;
        padding-top: 8px;
        border-top: 1px solid rgba(148, 163, 184, 0.15);
    }
    .dash_focus_actions .dash_btn_action {
        flex: 1 1 auto;
        justify-content: center;
        padding: 6px 8px;
    }
}

/* ─────────────────────────────────────────────────────────────
 * VELOCITY & CHART
 * ───────────────────────────────────────────────────────────── */
.dash_range_toggle {
    display: flex;
    background: rgba(148, 163, 184, 0.15);
    border-radius: 8px;
    padding: 2px;
    flex-shrink: 0;
}

.dash_range_btn {
    border: none;
    background: none;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.dark_mode .dash_range_btn {
    color: #94a3b8;
}

.dash_range_btn.active {
    background: #ffffff;
    color: var(--dash-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

body.dark_mode .dash_range_btn.active {
    background: var(--card-bg, #334155);
    color: #ffffff;
}

.dash_velocity_stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(241, 245, 249, 0.5);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

body.dark_mode .dash_velocity_stats {
    background: rgba(15, 23, 42, 0.4);
}

@media (max-width: 768px) {
    .dash_velocity_stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 10px 12px;
    }
}

@media (max-width: 380px) {
    .dash_velocity_stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

.dash_vstat_item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash_vstat_label {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash_vstat_val {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color, #1e293b);
}

@media (max-width: 768px) {
    .dash_vstat_val {
        font-size: 1.15rem;
    }
}

body.dark_mode .dash_vstat_val {
    color: #f8fafc;
}

.dot_completed { width: 8px; height: 8px; border-radius: 50%; background: #8b5cf6; display: inline-block; flex-shrink: 0; }
.dot_created { width: 8px; height: 8px; border-radius: 50%; background: #06b6d4; display: inline-block; flex-shrink: 0; }

.dash_chart_wrapper {
    min-height: 240px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

#dash_velocity_apexchart {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    overflow: hidden;
}

#dash_velocity_apexchart svg {
    max-width: 100% !important;
}

/* ─────────────────────────────────────────────────────────────
 * WORKLOAD BY PROJECT
 * ───────────────────────────────────────────────────────────── */
.dash_projects_list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.dash_project_item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background-color 0.15s;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.dash_project_item:hover {
    background: rgba(148, 163, 184, 0.1);
}

.dash_project_row_top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 600;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.dash_project_name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash_project_dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}

.dash_project_counts {
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    flex-shrink: 0;
    white-space: nowrap;
}

.dash_project_bar {
    height: 7px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.2);
    overflow: hidden;
    position: relative;
    width: 100%;
    min-width: 0;
}

.dash_project_bar_fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* ─────────────────────────────────────────────────────────────
 * AI DAILY BRIEFING CARD
 * ───────────────────────────────────────────────────────────── */
.dash_ai_card {
    background: #141829;
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 18px;
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

body:not(.dark_mode) .dash_ai_card {
    background: #ffffff;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.06);
}

body.dark_mode .dash_ai_card {
    background: #131627;
    border-color: rgba(139, 92, 246, 0.28);
}

.dash_ai_glow {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, rgba(99, 102, 241, 0.18) 45%, transparent 75%);
    pointer-events: none;
    z-index: 1;
}

body:not(.dark_mode) .dash_ai_glow {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(99, 102, 241, 0.08) 45%, transparent 75%);
}

.dash_ai_header {
    position: relative;
    z-index: 2;
    margin-bottom: 16px;
}

.dash_ai_title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

body:not(.dark_mode) .dash_ai_title {
    color: #0f172a;
}

.dash_ai_desc {
    font-size: 0.86rem;
    font-weight: 400;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}

body:not(.dark_mode) .dash_ai_desc {
    color: #64748b;
}

.dash_ai_body {
    position: relative;
    z-index: 2;
}

.dash_ai_content {
    font-size: 0.94rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 20px;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

body:not(.dark_mode) .dash_ai_content {
    color: #334155;
}

.dash_ai_content p {
    margin: 0;
}

.dash_ai_content strong.text-danger {
    color: #ef4444 !important;
    font-weight: 600;
}

.dash_ai_content strong.text-warning {
    color: #f59e0b !important;
    font-weight: 600;
}

.dash_ai_content .focus_rec_task {
    color: #93c5fd;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.15s ease;
}

.dash_ai_content .focus_rec_task:hover {
    color: #bfdbfe;
}

body:not(.dark_mode) .dash_ai_content .focus_rec_task {
    color: #4f46e5;
}

body:not(.dark_mode) .dash_ai_content .focus_rec_task:hover {
    color: #4338ca;
}

.dash_ai_content em {
    font-style: italic;
    color: inherit;
}

.dash_ai_footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
    margin-top: 4px;
}

.dash_btn_focus_cta {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: 100%;
    gap: 8px !important;
    padding: 0.55rem 1.4rem !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    border-radius: 50rem !important;
    box-sizing: border-box !important;
}

.dash_btn_focus_cta svg {
    flex-shrink: 0;
    margin-right: 2px;
}

/* ─────────────────────────────────────────────────────────────
 * UPCOMING DEADLINES
 * ───────────────────────────────────────────────────────────── */
.dash_deadlines_list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.dash_deadline_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(241, 245, 249, 0.5);
    border: 1px solid rgba(226, 232, 240, 0.7);
    cursor: pointer;
    transition: all 0.15s ease;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

body.dark_mode .dash_deadline_item {
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
}

.dash_deadline_item:hover {
    background: #ffffff;
    border-color: var(--dash-warning);
    transform: translateX(2px);
}

body.dark_mode .dash_deadline_item:hover {
    background: rgba(30, 41, 59, 0.8);
}

.dash_deadline_info {
    flex: 1 1 auto;
    min-width: 0;
}

.dash_deadline_title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color, #1e293b);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

body.dark_mode .dash_deadline_title {
    color: #f1f5f9;
}

.dash_deadline_proj {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.dash_deadline_badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
 * RECENT ACTIVITY STREAM
 * ───────────────────────────────────────────────────────────── */
.dash_activity_feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.dash_activity_item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.82rem;
    line-height: 1.4;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.dash_act_avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #cbd5e1;
}

.dash_act_avatar_initials {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--dash-primary-subtle);
    color: var(--dash-primary);
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash_act_content {
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

.dash_act_desc {
    color: var(--text-color, #334155);
}

body.dark_mode .dash_act_desc {
    color: #cbd5e1;
}

.dash_act_time {
    font-size: 0.72rem;
    color: var(--text-muted, #94a3b8);
}

/* Skeletons */
.dash_skeleton_loader {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    width: 100%;
}

.dash_skeleton_row {
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.1) 25%, rgba(148, 163, 184, 0.2) 50%, rgba(148, 163, 184, 0.1) 75%);
    background-size: 200% 100%;
    animation: dashShimmer 1.5s infinite;
    min-width: 0;
    width: 100%;
}

@keyframes dashShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.dash_empty_state {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-muted, #94a3b8);
    font-size: 0.88rem;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}
