/* ================================================================
   HOME TAB - MISSION CONTROL (ORIGINAL MOCKUP ALIGNMENT)
   ================================================================ */

:root {
    --mc-primary-gradient: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary) 100%);
    /* Purple/Lavender */
    --mc-bg-gradient: linear-gradient(180deg, #F3F4F6 0%, #F9FAFB 100%);
    --mc-card-bg: #FFFFFF;
    --mc-text-main: #1F2937;
    --mc-text-sub: #6B7280;
    --mc-border-light: #E5E7EB;
    --mc-shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --mc-shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    --mc-shadow-glow: 0 0 25px rgba(139, 92, 246, 0.2);
    --mc-radius-card: 24px;
    --mc-radius-pill: 9999px;
    --mc-font-family: 'Outfit', sans-serif;
}

/* --- Layout --- */
.home-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 8px;
    /* Minimal top padding - dashboard style */
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Compact gap between sections */
    font-family: var(--mc-font-family);
    padding-bottom: 140px;
    /* Space for larger dock */
    color: var(--mc-text-main);
}

/* --- 1. Top Status Pill Bar (CRITICAL) --- */
.status-pill-bar {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 2px;
    /* Minimal spacing from title */
    margin-bottom: 12px;
    /* Reduced spacing to content */
    padding: 0 16px;
}

.status-pill-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    /* Compact gap between pills */
    padding: 6px 18px;
    /* Reduced padding */
    min-height: 44px;
    /* Compact height */

    /* Pastel Gradient - Softer and more subtle */
    background: linear-gradient(90deg, rgba(224, 231, 255, 0.6) 0%, rgba(245, 236, 255, 0.6) 50%, rgba(224, 231, 255, 0.6) 100%);
    border: 1px solid rgba(118, 75, 162, 0.1);

    border-radius: 100px;

    /* Softer shadow for informational feel */
    box-shadow:
        0 6px 18px -4px rgba(118, 75, 162, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.4) inset;

    width: auto;
    max-width: 800px;
}

/* Remove the old pseudo-element glow since we use box-shadow now */
.status-pill-container::before {
    display: none;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    /* Compact pills */
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    /* Smaller text */
    font-weight: 500;
    color: #4B5563;
    white-space: nowrap;
    cursor: default;
    box-shadow: none;
    border: 1px solid transparent;
}

/* 4. Remove hover affordance */
.status-pill:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: none;
}

.status-pill span {
    font-size: 1.1rem;
    /* 3. Smaller icons */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

/* Specific Colors & Halo Glows */
.status-pill.warning {
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.12), inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.status-pill.warning span {
    color: #EF4444;
    /* Red/Orange Icon */
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.3));
}

.status-pill.info {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.12), inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.status-pill.info span {
    color: #3B82F6;
    /* Blue Icon */
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}

.status-pill.success {
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.12), inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.status-pill.success span {
    color: #22C55E;
    /* Green Icon */
    filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.3));
}

/* --- 2. Title Area --- */
.mission-title-area {
    text-align: center;
    position: relative;
    margin-bottom: 0;
    margin-top: 24px;
}

.mission-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--purple-light);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    position: relative;
    -webkit-text-fill-color: var(--purple-light);
    filter: none;
}

@media (max-width: 768px) {
    .mission-title {
        font-size: 1.75rem;
        line-height: 1.2;
        flex-direction: column;
        gap: 8px;
    }

    .mission-icon {
        font-size: 1.5rem;
    }

    .home-container {
        padding: 16px;
        padding-top: 8px;
    }

    .status-pill-container {
        padding: 6px 16px;
        min-height: 48px;
        gap: 12px;
        overflow-x: auto;
        justify-content: flex-start;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .status-pill-container::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .status-pill {
        padding: 4px 12px;
        font-size: 0.8rem;
        flex-shrink: 0;
        /* Prevent shrinking */
    }
}

.mission-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.4));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* --- 3. Main Grid --- */
.mission-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    /* Adjusted ratio */
    gap: 20px;
    /* Reduced gap between columns */
    align-items: start;
}

@media (max-width: 1024px) {
    .mission-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Cards General --- */
.mc-card {
    background: var(--mc-card-bg);
    border-radius: 20px;
    /* Slightly smaller radius */
    padding: 20px;
    /* Reduced padding */
    box-shadow: var(--mc-shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.mc-card-title {
    font-size: 1.1rem;
    /* Slightly smaller */
    font-weight: 700;
    color: var(--mc-text-main);
    margin-bottom: 14px;
    /* Reduced margin */
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Left Card: Priority Hub --- */
.priority-hub-card {
    min-height: auto;
    /* Remove fixed min-height - size to content */
    display: flex;
    flex-direction: column;
}

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

.ph-tabs {
    display: flex;
    background: #F3F4F6;
    padding: 5px;
    border-radius: 14px;
}

.ph-tab {
    padding: 6px 16px;
    /* Reduced padding */
    border-radius: 10px;
    font-size: 0.85rem;
    /* Slightly smaller */
    font-weight: 600;
    color: var(--mc-text-sub);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
}

.ph-tab.active {
    background: white;
    color: var(--color-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Progress Arc (Semi-Circle) */
.ph-progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 0 20px 0;
    /* Reduced bottom margin */
    position: relative;
    height: 110px;
    /* Reduced height for arc */
}

.progress-ring-svg {
    width: 200px;
    /* Slightly smaller */
    height: 100px;
    /* Half height */
    overflow: visible;
}

/* We'll use a path for the arc in HTML, or style the circle to be an arc */
.progress-ring-circle-bg {
    fill: none;
    stroke: #F3F4F6;
    stroke-width: 16;
    /* Thicker */
    stroke-linecap: round;
}

.progress-ring-circle {
    fill: none;
    stroke: var(--purple-light);
    stroke-width: 16;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

.progress-text-group {
    text-align: center;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.progress-percent {
    font-size: 2.75rem;
    /* Reduced to match smaller arc */
    font-weight: 800;
    color: var(--mc-text-main);
    line-height: 1;
    letter-spacing: -0.03em;
}

.progress-label {
    font-size: 0.8rem;
    /* Smaller label */
    color: #9CA3AF;
    font-weight: 500;
    margin-top: 2px;
    /* Reduced margin */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Task List */
.ph-task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Reduced gap between tasks */
}

/* Task Row (Card-like) */
.ph-task-row {
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    align-items: center;
    gap: 12px;
    /* Reduced gap */
    padding: 14px 18px;
    /* More compact padding */
    background: white;
    border: 1px solid #F3F4F6;
    border-radius: 16px;
    /* Slightly smaller radius */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.ph-task-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.06);
    border-color: #E5E7EB;
}

/* Checkbox */
.task-check {
    width: 24px;
    height: 24px;
    border: 2px solid #D1D5DB;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
}

.task-check.checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* Priority Dot */
.task-priority-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.task-priority-dot.urgent {
    background: #EF4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.task-priority-dot.important {
    background: #F59E0B;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.task-priority-dot.normal {
    background: #10B981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* Task Info */
.task-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--mc-text-main);
}

.task-context {
    font-size: 0.85rem;
    color: #9CA3AF;
    font-weight: 500;
}

/* Right Side Meta */
.task-meta-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.task-pill {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.task-pill.urgent {
    background: #FEF2F2;
    color: #EF4444;
}

.task-pill.important {
    background: #FFFBEB;
    color: #F59E0B;
}

.task-pill.normal {
    background: #ECFDF5;
    color: #10B981;
}

.task-time {
    font-size: 0.85rem;
    color: #9CA3AF;
    font-weight: 500;
}

/* Menu Icon */
.task-menu {
    color: #D1D5DB;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.task-menu:hover {
    color: var(--mc-text-sub);
}


/* --- Right Column Stack --- */
.right-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Reduced gap between cards */
}

/* AI Insights Card */
.ai-card {
    background: var(--purple-light);
    color: var(--text-primary);
    border: 1px solid var(--purple-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

/* Remove decorative blur */
.ai-card::before {
    display: none;
}

.ai-card-title {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.ai-suggestion-panel {
    background: rgba(255, 255, 255, 0.6);
    /* Lighter glass */
    backdrop-filter: blur(16px);
    border-radius: 16px;
    /* Slightly smaller */
    padding: 14px;
    /* Reduced padding */
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.05);
}

.ai-text {
    font-size: 0.95rem;
    /* Slightly smaller */
    line-height: 1.5;
    margin-bottom: 14px;
    /* Reduced */
    font-weight: 500;
    color: #1F2937;
    /* Dark text for readability */
}

.ai-actions {
    display: flex;
    gap: 10px;
    /* Reduced */
}

.ai-btn {
    padding: 8px 16px;
    /* Smaller buttons */
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.ai-btn:hover {
    transform: translateY(-2px);
}

.ai-btn.primary {
    background: var(--white);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ai-btn.secondary {
    background: var(--white);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.ai-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-primary);
}

/* Active Agents Card */
.agent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Reduced gap */
}

.agent-row {
    display: flex;
    align-items: center;
    padding: 10px;
    /* Reduced padding */
    border-radius: 14px;
    transition: background 0.2s;
}

.agent-row:hover {
    background: #F9FAFB;
}

.agent-icon-box {
    width: 40px;
    /* Smaller icon box */
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    /* Smaller icon */
    margin-right: 12px;
    /* Reduced margin */
}

.agent-icon-box.green {
    background: #ECFDF5;
    color: #10B981;
}

.agent-icon-box.blue {
    background: #EFF6FF;
    color: #3B82F6;
}

.agent-info {
    flex: 1;
}

.agent-name {
    font-weight: 700;
    font-size: 0.95rem;
    /* Slightly smaller */
    color: var(--mc-text-main);
}

.agent-status-text {
    font-size: 0.8rem;
    /* Smaller */
    color: var(--mc-text-sub);
    margin-top: 1px;
}

.agent-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 12px;
}

.agent-status-dot.green {
    background: #10B981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.agent-status-dot.blue {
    background: #3B82F6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* Automations Card */
.auto-content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 8px;
    /* Reduced */
}

.auto-stat {
    display: flex;
    flex-direction: column;
}

.auto-number {
    font-size: 3rem;
    /* Reduced from 4rem */
    font-weight: 800;
    color: var(--mc-text-main);
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 4px;
    /* Reduced */
}

.auto-label {
    font-size: 0.85rem;
    /* Smaller */
    color: var(--mc-text-sub);
    font-weight: 500;
}

.auto-chart {
    width: 120px;
    height: 60px;
    filter: drop-shadow(0 4px 6px rgba(139, 92, 246, 0.2));
}

.auto-chart path {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 4;
    /* Thicker */
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auto-link {
    position: absolute;
    bottom: 32px;
    right: 32px;
    font-size: 0.9rem;
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}

.auto-link:hover {
    color: var(--color-primary);
}

/* --- 4. Bottom Dock (Removed) --- */