/* Command Center — Overview Page
   ============================== */

.command-center {
    padding-bottom: 60px;
}

/* Page Header */
.cc-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
}

.cc-page-title {
    font-size: 24px;
    font-weight: 600;
}

.cc-page-sub {
    font-size: 13px;
    color: var(--fg-muted);
    margin-top: 4px;
}

.cc-header-actions {
    display: flex;
    gap: 8px;
}

/* ============================================
   GREETING + WEATHER CARD
   ============================================ */

.cc-greeting-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 36px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--bg-layer-2), var(--bg-layer-1)) !important;
    position: relative;
    overflow: hidden;
}

.cc-greeting-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 30%, rgba(59, 130, 246, 0.04), transparent 50%),
                radial-gradient(ellipse at 80% 70%, rgba(34, 197, 94, 0.03), transparent 50%);
    pointer-events: none;
}

.greeting-left {
    position: relative;
}

.greeting-text h2 {
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.greeting-name {
    font-weight: 600;
}

.greeting-motto {
    font-size: 14px;
    color: var(--fg-muted);
    margin-top: 6px;
}

.greeting-time {
    margin-top: 16px;
}

.time-display {
    font-size: 48px;
    font-weight: 200;
    letter-spacing: -0.04em;
    font-family: var(--font-heading);
    line-height: 1;
}

.greeting-right {
    text-align: center;
    position: relative;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.weather-icon {
    font-size: 32px;
}

.weather-temp {
    font-size: 36px;
    font-weight: 300;
    letter-spacing: -0.03em;
    font-family: var(--font-heading);
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.weather-desc {
    font-size: 14px;
    color: var(--fg);
}

.weather-location {
    font-size: 12px;
    color: var(--fg-muted);
}

/* ============================================
   STAT CARDS ROW
   ============================================ */

.cc-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 20px 22px;
    transition: all var(--duration) var(--ease-liquid);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.stat-card-icon {
    display: flex;
    color: var(--fg-muted);
}

.stat-card-icon svg {
    width: 16px;
    height: 16px;
}

.stat-card-label {
    font-size: 13px;
    color: var(--fg-muted);
}

.stat-card-body {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 300;
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
}

.stat-card-change {
    font-size: 12px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 6px;
}

.stat-card-change.positive {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.stat-card-change.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.stat-card-change.neutral {
    color: var(--fg-muted);
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   EXECUTIVE BRIEFING + WORKFORCE ACTIVITY
   ============================================ */

.cc-briefing-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.briefing-panel {
    padding: 0;
    overflow: hidden;
}

.briefing-surface {
    position: relative;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-layer-2), var(--bg-layer-1));
}

.briefing-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(40, 40, 40, 0.3), transparent 50%);
    pointer-events: none;
}

.briefing-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px 16px;
    position: relative;
}

.briefing-indicator {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fg-muted);
    flex-shrink: 0;
}

.briefing-indicator svg {
    width: 18px;
    height: 18px;
}

.briefing-title {
    font-size: 17px;
    font-weight: 500;
}

.briefing-subtitle {
    font-size: 11px;
    color: var(--fg-muted);
    margin-top: 2px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.briefing-body {
    padding: 0 28px 24px;
    position: relative;
}

.briefing-text {
    font-size: 14px;
    line-height: 1.65;
    color: var(--fg);
    margin-bottom: 24px;
}

.briefing-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

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

.b-stat-value {
    font-size: 28px;
    font-weight: 300;
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
    line-height: 1;
}

.b-stat-label {
    font-size: 10px;
    color: var(--fg-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Workforce Panel */
.workforce-panel {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.workforce-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 12px;
}

.workforce-title {
    font-size: 15px;
    font-weight: 500;
}

.workforce-list {
    flex: 1;
    padding: 4px 12px;
}

.agent-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    border-radius: 10px;
    transition: all 0.3s var(--ease-liquid);
    cursor: pointer;
}

.agent-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.agent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-layer-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
}

.agent-avatar.idle {
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.agent-avatar.thinking {
    border: 1px solid rgba(234, 179, 8, 0.2);
    animation: think-pulse 2.5s ease-in-out infinite;
}

.agent-avatar.processing {
    border: 1px solid rgba(59, 130, 246, 0.2);
}

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

.agent-name {
    font-size: 13px;
    font-weight: 500;
}

.agent-role {
    font-size: 11px;
    color: var(--fg-dim);
    margin-top: 2px;
}

.workforce-footer {
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.workforce-footer .btn-ghost {
    width: 100%;
    justify-content: center;
    font-size: 12px;
}

/* ============================================
   MIDDLE ROW: INSIGHTS + CALENDAR
   ============================================ */

.cc-middle-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Insights Panel */
.insights-panel {
    padding: 24px 28px;
}

.insights-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.insights-title {
    font-size: 16px;
    font-weight: 500;
}

.insights-sub {
    font-size: 12px;
    color: var(--fg-muted);
    margin-top: 2px;
}

.insights-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-layer-2);
    border-radius: 8px;
    padding: 3px;
}

.insights-tab {
    padding: 6px 14px;
    font-size: 12px;
    color: var(--fg-muted);
    border-radius: 6px;
    transition: all 0.3s;
}

.insights-tab.active {
    background: var(--bg-elevated);
    color: var(--fg);
}

.insights-body {
    display: flex;
    align-items: center;
    gap: 32px;
}

.insights-ring {
    flex-shrink: 0;
}

.progress-ring {
    display: block;
}

.ring-progress {
    transition: stroke-dashoffset 1.5s var(--ease-liquid);
}

.insights-metrics {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.insight-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-label {
    font-size: 13px;
    font-weight: 500;
}

.metric-value {
    font-size: 13px;
    font-weight: 500;
}

.metric-desc {
    font-size: 11px;
    color: var(--fg-dim);
}

.metric-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1.5s var(--ease-liquid);
}

/* Calendar Panel */
.calendar-panel {
    padding: 24px;
}

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

.calendar-title {
    font-size: 16px;
    font-weight: 500;
}

.calendar-nav {
    display: flex;
    gap: 4px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
    margin-bottom: 20px;
}

.cal-day-label {
    font-size: 11px;
    color: var(--fg-dim);
    padding: 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cal-day {
    font-size: 13px;
    padding: 8px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--fg-muted);
    position: relative;
}

.cal-day:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--fg);
}

.cal-day.today {
    background: var(--fg);
    color: var(--bg);
    font-weight: 600;
}

.cal-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #3b82f6;
}

.cal-day.today.has-event::after {
    background: var(--bg);
}

.cal-day.empty {
    cursor: default;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.cal-event {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.cal-event-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cal-event-text {
    flex: 1;
}

.cal-event-time {
    color: var(--fg-dim);
    font-size: 12px;
}

/* ============================================
   BOTTOM ROW: QUICK TASKS + RECENT PROJECTS
   ============================================ */

.cc-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

/* Quick Tasks */
.tasks-panel {
    padding: 24px;
}

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

.tasks-title {
    font-size: 16px;
    font-weight: 500;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.task-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.task-item input[type="checkbox"] {
    display: none;
}

.task-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s;
}

.task-item input:checked ~ .task-check {
    background: #22c55e;
    border-color: #22c55e;
}

.task-item input:checked ~ .task-check::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    font-weight: 700;
}

.task-text {
    flex: 1;
    font-size: 13px;
}

.task-text.done {
    text-decoration: line-through;
    color: var(--fg-dim);
}

.task-priority {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.task-priority.high {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.task-priority.medium {
    color: #eab308;
    background: rgba(234, 179, 8, 0.1);
}

.task-priority.low {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

/* Recent Projects */
.projects-panel {
    padding: 24px;
}

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

.projects-title {
    font-size: 16px;
    font-weight: 500;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.project-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.project-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.project-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

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

.project-name {
    font-size: 14px;
    font-weight: 500;
    display: block;
}

.project-meta {
    font-size: 12px;
    color: var(--fg-dim);
    display: block;
    margin-top: 2px;
}

.project-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.progress-mini {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.progress-mini-fill {
    height: 100%;
    background: var(--fg);
    border-radius: 2px;
    transition: width 1s var(--ease-liquid);
}

.project-pct {
    font-size: 12px;
    color: var(--fg-muted);
    min-width: 32px;
    text-align: right;
}

/* ============================================
   MODULE QUICK ACCESS (Compact)
   ============================================ */

.cc-modules {
    margin-top: 8px;
}

.modules-heading {
    font-size: 13px;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
}

.modules-grid-compact {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.module-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    background: var(--bg-layer-1);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: all var(--duration) var(--ease-liquid);
}

.module-tile:hover {
    background: var(--bg-layer-2);
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.module-tile-icon {
    display: flex;
    color: var(--fg-muted);
    transition: color 0.3s;
}

.module-tile-icon svg {
    width: 22px;
    height: 22px;
}

.module-tile:hover .module-tile-icon {
    color: var(--fg);
}

.module-tile-label {
    font-size: 12px;
    color: var(--fg-muted);
    transition: color 0.3s;
}

.module-tile:hover .module-tile-label {
    color: var(--fg);
}

/* Scaffold pages */
.scaffold-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
}

.scaffold-card {
    padding: 48px;
    text-align: center;
    max-width: 400px;
}

.scaffold-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border-radius: 16px;
    background: var(--bg-layer-3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fg-dim);
}

.scaffold-icon svg {
    width: 28px;
    height: 28px;
    opacity: 0.4;
}

.scaffold-name {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
}

.scaffold-desc {
    font-size: 14px;
    color: var(--fg-muted);
    margin-bottom: 20px;
}

.scaffold-badge {
    font-size: 12px;
    padding: 6px 16px;
    border-radius: 99px;
    background: var(--bg-layer-3);
    color: var(--fg-muted);
}

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

@media (max-width: 1200px) {
    .cc-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .modules-grid-compact {
        grid-template-columns: repeat(3, 1fr);
    }
    .briefing-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .cc-middle-row,
    .cc-bottom-row {
        grid-template-columns: 1fr;
    }
    .cc-briefing-row {
        grid-template-columns: 1fr;
    }
    .cc-greeting-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
    .greeting-right {
        text-align: left;
    }
    .weather-widget {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    /* Page header */
    .cc-page-header {
        margin-bottom: 20px;
    }
    .cc-page-title {
        font-size: 20px;
    }

    /* Greeting card */
    .cc-greeting-card {
        padding: 24px 20px;
        margin-bottom: 16px;
    }
    .greeting-text h2 {
        font-size: 20px;
    }
    .time-display {
        font-size: 36px;
    }
    .weather-temp {
        font-size: 28px;
    }

    /* Stat cards */
    .cc-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 16px;
    }
    .stat-card {
        padding: 16px;
    }
    .stat-card-value {
        font-size: 22px;
    }

    /* Briefing */
    .cc-briefing-row {
        gap: 16px;
        margin-bottom: 16px;
    }
    .briefing-header {
        padding: 20px 20px 12px;
    }
    .briefing-body {
        padding: 0 20px 20px;
    }
    .briefing-text {
        font-size: 13px;
    }
    .briefing-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    .b-stat-value {
        font-size: 22px;
    }

    /* Workforce */
    .agent-row {
        padding: 10px 8px;
    }
    .agent-avatar {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    /* Insights */
    .insights-body {
        flex-direction: column;
        gap: 20px;
    }

    /* Calendar */
    .cal-day {
        padding: 6px 2px;
        font-size: 12px;
    }

    /* Tasks & Projects */
    .cc-bottom-row {
        gap: 16px;
        margin-bottom: 20px;
    }
    .tasks-panel,
    .projects-panel {
        padding: 20px;
    }

    /* Modules */
    .modules-grid-compact {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .module-tile {
        padding: 16px 12px;
    }

    /* Scaffold */
    .scaffold-card {
        padding: 32px 24px;
    }
    .scaffold-name {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .cc-stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .stat-card-value {
        font-size: 20px;
    }
    .stat-card-label {
        font-size: 11px;
    }

    .greeting-text h2 {
        font-size: 18px;
    }
    .time-display {
        font-size: 32px;
    }
    .weather-temp {
        font-size: 24px;
    }
    .weather-icon {
        font-size: 24px;
    }

    .briefing-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .b-stat-value {
        font-size: 20px;
    }

    .insights-panel,
    .calendar-panel {
        padding: 20px;
    }

    .modules-grid-compact {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-progress {
        display: none;
    }
}
