/* ==========================================================================
   GEMDesk - Executive Operations Dashboard Styling
   ========================================================================== */

/* Dashboard Header & Welcome Banner */
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.dash-title h2 {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.02em;
}

.dash-title p {
    color: var(--slate-500);
    font-size: 0.88rem;
    margin-top: 2px;
}

.dash-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Smart "Today" Ribbon */
.today-ribbon {
    background: linear-gradient(135deg, var(--slate-900), var(--slate-850));
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    border: 1px solid var(--slate-800);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
    color: var(--white);
}

.today-item {
    display: flex;
    align-items: center;
    gap: 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 14px;
}

.today-item:last-child {
    border-right: none;
}

.today-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.today-meta h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
}

.today-meta span {
    font-size: 0.76rem;
    color: var(--slate-400);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Executive Financial KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.kpi-card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-card-highlight {
    border-color: #c7d2fe;
    background: linear-gradient(180deg, #ffffff 0%, #f5f3ff 100%);
}

.kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.kpi-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--slate-100);
    color: var(--slate-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.kpi-icon-primary {
    background: #eef2ff;
    color: var(--primary);
}

.kpi-icon-success {
    background: #ecfdf5;
    color: var(--success);
}

.kpi-icon-warning {
    background: #fffbeb;
    color: var(--warning);
}

.kpi-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.kpi-subtext {
    font-size: 0.78rem;
    color: var(--slate-500);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Order Lifecycle Status Pipeline */
.pipeline-section {
    margin-bottom: 28px;
}

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

.pipeline-card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    text-align: center;
    transition: all 0.15s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.pipeline-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.pipeline-count {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1.2;
}

.pipeline-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--slate-500);
    margin-top: 4px;
}

/* "What Needs My Attention?" Triage Panel */
.triage-deck {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.triage-card {
    border-radius: var(--radius-md);
    padding: 16px 18px;
    background: var(--white);
    border: 1px solid var(--slate-200);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.15s ease;
}

.triage-card:hover {
    box-shadow: var(--shadow-md);
}

.triage-card-high {
    border-left: 4px solid var(--danger);
    background: linear-gradient(90deg, #fff5f5 0%, #ffffff 20%);
}

.triage-card-medium {
    border-left: 4px solid var(--warning);
    background: linear-gradient(90deg, #fffdf5 0%, #ffffff 20%);
}

.triage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.triage-badge {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.triage-badge-high {
    background: #fee2e2;
    color: #b91c1c;
}

.triage-badge-medium {
    background: #fef3c7;
    color: #b45309;
}

.triage-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.3;
}

.triage-msg {
    font-size: 0.82rem;
    color: var(--slate-600);
    line-height: 1.4;
    margin-top: 4px;
}

.triage-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--slate-100);
    padding-top: 10px;
}

/* Two-Column Analytics & Performance Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

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