/* Dashboard Layout & Panels */

/* Override .content styles for all tabs except chat */
#home.content,
#messages.content,
#files.content,
#productivity.content,
#profile.content,
#settings.content {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    min-height: auto !important;
}

.dashboard-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: var(--bg-primary);
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 12px 38px rgba(15, 23, 42, 0.12);
}

.dashboard-kicker {
    margin: 0 0 4px;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.dashboard-title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--text-primary);
}

.dashboard-subtitle {
    margin: 0;
    color: var(--text-secondary);
    max-width: 620px;
}

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

.dashboard-btn {
    border: 1px solid rgba(124, 139, 255, 0.3);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    background: rgba(124, 139, 255, 0.08);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.dashboard-btn.primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 28px rgba(124, 139, 255, 0.28);
}

.dashboard-btn.ghost {
    background: rgba(255, 255, 255, 0.7);
}

.dashboard-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.dashboard-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Stat Row */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.stat-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: var(--bg-primary);
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: -10px auto auto 50%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(124, 139, 255, 0.2) 0%, transparent 70%);
    transform: translateX(-50%);
    pointer-events: none;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(124, 139, 255, 0.25);
}

.stat-card.accent-1 .stat-icon { background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); }
.stat-card.accent-2 .stat-icon { background: linear-gradient(135deg, #34d399, #10b981); }
.stat-card.accent-3 .stat-icon { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #4b5563; }
.stat-card.accent-4 .stat-icon { background: linear-gradient(135deg, #60a5fa, #3b82f6); }

.stat-meta {
    position: relative;
    z-index: 1;
}

.stat-label {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.stat-value {
    margin: 2px 0 0;
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Panels */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
    align-items: start;
}

.dashboard-panel {
    background: var(--bg-primary);
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    padding: 14px 16px;
    min-height: 240px;
}

.dashboard-panel.span-2 {
    grid-column: span 2;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.panel-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.panel-link {
    border: 1px solid rgba(124, 139, 255, 0.2);
    background: var(--bg-secondary);
    padding: 7px 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.panel-link:hover {
    background: rgba(124, 139, 255, 0.12);
    color: var(--primary-hover);
}

.list-scroll {
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-item {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.activity-item.completed .activity-item-title {
    text-decoration: line-through;
    color: var(--text-tertiary);
}

.activity-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(124, 139, 255, 0.12);
    color: var(--text-primary);
    flex-shrink: 0;
}

.activity-item-content {
    flex: 1;
}

.activity-item-title {
    margin: 0 0 4px;
    font-weight: 700;
    color: var(--text-primary);
}

.activity-item-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.activity-item-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.activity-item-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(124, 139, 255, 0.14);
    color: var(--text-primary);
}

.activity-item-badge.reminder {
    background: rgba(248, 180, 0, 0.18);
    color: #b45309;
}

.activity-item-badge.goal {
    background: rgba(16, 185, 129, 0.18);
    color: #0f5132;
}

.activity-item-badge.chat {
    background: rgba(96, 165, 250, 0.18);
    color: #1d4ed8;
}

.chat-message-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-message-sender {
    font-weight: 700;
    color: var(--text-primary);
}

.chat-message-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.empty-state {
    padding: 12px;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px dashed rgba(124, 139, 255, 0.3);
    color: var(--text-secondary);
    font-size: 14px;
}

.badge-soon {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(124, 139, 255, 0.16);
    border: 1px solid rgba(124, 139, 255, 0.22);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 12px;
}

.panel-copy {
    margin: 6px 0 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.panel-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 1024px) {
    .dashboard-panel.span-2 {
        grid-column: span 1;
    }

    .dashboard-header {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
}

/* ================================================================
   SIMPLIFIED DASHBOARD - NEW DESIGN
   ================================================================ */

/* Hero Section */
.dashboard-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.hero-content {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 24px;
    padding: 32px;
    color: white;
    box-shadow: 0 20px 60px rgba(124, 139, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.hero-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-greeting {
    position: relative;
    z-index: 1;
}

.hero-title {
    margin: 0 0 8px;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-stat-value {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.hero-stat-label {
    font-size: 13px;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* AI Hero Panel */
.hero-ai-panel {
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-hero-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-hero-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.ai-hero-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.ai-hero-subtitle {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.ai-refresh-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(124, 139, 255, 0.2);
    background: rgba(124, 139, 255, 0.08);
    color: var(--text-primary);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.2s ease;
}

.ai-refresh-btn:hover {
    background: rgba(124, 139, 255, 0.15);
    transform: rotate(90deg);
}

.ai-insights-container-compact {
    min-height: 120px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.ai-summary-simple {
    padding: 8px 0;
}

.ai-summary-simple p {
    margin: 8px 0;
    line-height: 1.6;
}

.ai-tip {
    margin-top: 12px;
    padding: 10px;
    background: rgba(124, 139, 255, 0.08);
    border-radius: 8px;
    border-left: 3px solid var(--color-primary);
    font-size: 13px;
}

.ai-action-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.ai-action-suggestion-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid rgba(124, 139, 255, 0.3);
    border-radius: 10px;
    background: rgba(124, 139, 255, 0.08);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.ai-action-suggestion-btn:hover {
    background: rgba(124, 139, 255, 0.15);
    border-color: rgba(124, 139, 255, 0.5);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(124, 139, 255, 0.2);
}

.ai-action-icon-small {
    font-size: 18px;
    flex-shrink: 0;
}

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

.ai-action-btn-compact {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border: 1px solid rgba(124, 139, 255, 0.2);
    border-radius: 12px;
    background: rgba(124, 139, 255, 0.05);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-action-btn-compact:hover {
    background: rgba(124, 139, 255, 0.12);
    border-color: rgba(124, 139, 255, 0.4);
    transform: translateY(-2px);
}

.ai-action-btn-compact .ai-action-icon {
    font-size: 20px;
}

/* Today's Focus Section */
.today-focus-section {
    margin-bottom: 24px;
}

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

.section-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.section-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid rgba(124, 139, 255, 0.2);
    border-radius: 8px;
    background: rgba(124, 139, 255, 0.05);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.section-toggle:hover {
    background: rgba(124, 139, 255, 0.1);
}

.section-toggle svg {
    transition: transform 0.2s ease;
}

.today-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.today-card {
    background: var(--bg-primary);
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
    padding: 20px;
    transition: all 0.3s ease;
}

.today-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
}

.today-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.today-card-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: rgba(124, 139, 255, 0.1);
    border-radius: 12px;
}

.today-card.priority .today-card-icon {
    background: rgba(239, 68, 68, 0.1);
}

.today-card.reminders .today-card-icon {
    background: rgba(245, 158, 11, 0.1);
}

.today-card.goals .today-card-icon {
    background: rgba(34, 197, 94, 0.1);
}

.today-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.today-card-body {
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.today-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.2s ease;
}

.today-item:hover {
    background: rgba(124, 139, 255, 0.05);
    border-color: rgba(124, 139, 255, 0.3);
}

.today-item-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.today-item-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    font-size: 14px;
}

.today-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.today-item-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.today-item-time,
.today-item-priority {
    font-size: 12px;
    color: var(--text-secondary);
}

.today-item-ai-help {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(124, 139, 255, 0.2);
    background: rgba(124, 139, 255, 0.08);
    color: var(--color-primary);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0;
}

.today-item:hover .today-item-ai-help {
    opacity: 1;
}

.today-item-ai-help:hover {
    background: rgba(124, 139, 255, 0.15);
    border-color: rgba(124, 139, 255, 0.4);
    transform: scale(1.1);
}

.today-item.priority-high {
    border-left: 3px solid #dc2626;
}

.today-item.priority-medium {
    border-left: 3px solid #d97706;
}

.today-item.priority-low {
    border-left: 3px solid #16a34a;
}

.today-card-action {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(124, 139, 255, 0.3);
    border-radius: 10px;
    background: rgba(124, 139, 255, 0.08);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.today-card-action:hover {
    background: rgba(124, 139, 255, 0.15);
    transform: translateY(-1px);
}

.empty-state-mini {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Quick Stats Section */
.quick-stats-section {
    margin-bottom: 24px;
}

.stat-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.stat-card-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-primary);
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
    transition: all 0.2s ease;
}

.stat-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.stat-icon-compact {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.stat-card-compact.accent-1 .stat-icon-compact {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

.stat-card-compact.accent-2 .stat-icon-compact {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.stat-card-compact.accent-3 .stat-icon-compact {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #4b5563;
}

.stat-card-compact.accent-4 .stat-icon-compact {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.stat-meta-compact {
    flex: 1;
}

.stat-label-compact {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value-compact {
    margin: 4px 0 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-hero {
        grid-template-columns: 1fr;
    }
    
    .today-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .hero-stat-value {
        font-size: 24px;
    }
}


/* AI Insights Styles */
.ai-insights-container {
    min-height: 200px;
    padding: 16px;
}

.ai-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    gap: 8px;
}

.ai-insights-content {
    padding: 12px 0;
}

.ai-insights-content h3,
.ai-insights-content h4 {
    margin: 16px 0 8px;
    color: var(--text-primary);
    font-weight: 700;
}

.ai-insights-content h3:first-child,
.ai-insights-content h4:first-child {
    margin-top: 0;
}

.ai-insights-content p {
    margin: 8px 0;
    line-height: 1.6;
    color: var(--text-secondary);
}

.ai-insights-content ul,
.ai-insights-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.ai-insights-content li {
    margin: 6px 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ai-empty-state {
    text-align: center;
    padding: 40px 20px;
}

.ai-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.ai-empty-state h4 {
    margin: 12px 0 8px;
    color: var(--text-primary);
}

.ai-empty-state p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.ai-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.ai-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(124, 139, 255, 0.2);
    border-radius: 12px;
    background: rgba(124, 139, 255, 0.05);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-action-btn:hover {
    background: rgba(124, 139, 255, 0.1);
    border-color: rgba(124, 139, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 139, 255, 0.15);
}

.ai-action-icon {
    font-size: 20px;
}

.ai-summary,
.ai-recommendations {
    margin: 16px 0;
    padding: 12px;
    background: rgba(124, 139, 255, 0.04);
    border-radius: 12px;
    border-left: 3px solid var(--color-primary);
}

.ai-recommendations ul {
    margin: 8px 0 0;
}

.ai-note {
    margin-top: 12px;
    padding: 10px;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}
