/**
 * Practice command center — compact clinical journey UI (all specialties).
 */

.practice-form-shell.pf-clinical-dashboard {
    --pf-cc-accent: #0d9488;
    --pf-cc-radius: 8px;
    --pf-cc-gap: 0.5rem;
}

.pf-command-center {
    margin-bottom: var(--pf-dash-gap, 0.65rem);
    padding: 0.5rem 0.65rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--pf-cc-radius);
}

.pf-cc-title-simple {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}

.pf-cc-top .pf-cc-followup-strip {
    margin: 0;
}

.pf-cc-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .pf-cc-dashboard-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .pf-cc-dashboard-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .pf-cc-widget-wide {
        grid-column: span 2;
    }
}

.pf-cc-widget {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.35rem 0.45rem;
    min-height: 3.25rem;
}

.pf-cc-widget-k {
    display: block;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.pf-cc-widget-v {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-cc-widget-sub {
    display: block;
    font-size: 0.62rem;
    color: #64748b;
}

.pf-cc-widget-v.pf-cc-good { color: #047857; }
.pf-cc-widget-v.pf-cc-fair { color: #b45309; }
.pf-cc-widget-v.pf-cc-poor { color: #b91c1c; }

.pf-cc-gauge {
    height: 3px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 0.25rem;
    overflow: hidden;
}

.pf-cc-gauge-fill {
    height: 100%;
    border-radius: 2px;
    background: #94a3b8;
}

.pf-cc-gauge-fill.pf-cc-good { background: #10b981; }
.pf-cc-gauge-fill.pf-cc-fair { background: #f59e0b; }
.pf-cc-gauge-fill.pf-cc-poor { background: #ef4444; }

.pf-cc-followup-strip {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.25rem;
}

.pf-cc-followup-btn {
    min-height: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pf-cc-followup-stable {
    border-color: #6ee7b7;
    color: #047857;
}

.pf-cc-followup-improving {
    border-color: #93c5fd;
    color: #1d4ed8;
}

.pf-cc-followup-worsening {
    border-color: #fecaca;
    color: #b91c1c;
}

.pf-cc-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--pf-cc-radius);
    padding: 0.45rem 0.55rem;
    height: 100%;
}

.pf-cc-panel-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    margin-bottom: 0.35rem;
}

.pf-cc-risk-item {
    font-size: 0.75rem;
    padding: 0.3rem 0.45rem;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    line-height: 1.35;
}

.pf-cc-risk-item:last-child { margin-bottom: 0; }

.pf-cc-risk-danger { background: #fee2e2; color: #991b1b; }
.pf-cc-risk-warning { background: #fef3c7; color: #92400e; }
.pf-cc-risk-info { background: #e0f2fe; color: #075985; }
.pf-cc-risk-ok { background: #f1f5f9; color: #64748b; }

.pf-cc-actions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pf-cc-action-item {
    font-size: 0.75rem;
    padding: 0.28rem 0;
    border-bottom: 1px dashed #e2e8f0;
    color: #334155;
}

.pf-cc-action-item.is-done { color: #94a3b8; }

.pf-cc-ai-details {
    border: 1px dashed #cbd5e1;
    border-radius: var(--pf-cc-radius);
    padding: 0.35rem 0.5rem;
    background: #fafafa;
}

.pf-cc-ai-summary {
    cursor: pointer;
    margin-bottom: 0;
    list-style: none;
}

.pf-cc-ai-body {
    padding-top: 0.35rem;
}

.pf-quick-action-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.pf-quick-action-bar .btn {
    min-height: 32px;
    min-width: 32px;
    flex-shrink: 0;
}

.pf-toolbar-divider {
    width: 1px;
    height: 1.25rem;
    background: #e2e8f0;
    flex-shrink: 0;
    margin: 0 0.1rem;
}

.pf-toolbar-status-select {
    width: auto !important;
    min-width: 6.5rem;
    max-width: 9.5rem;
}

.pf-clinical-dashboard .pf-practice-footer .pf-practice-footer-toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.pf-clinical-dashboard .pf-practice-footer .pf-save-visit-row {
    flex-shrink: 0;
    margin-left: auto;
}

.pf-continuous-card.pf-continuous-prominent {
    border-left: 3px solid var(--pf-cc-accent);
}

.pf-continuous-card.is-expanded .pf-continuous-subtitle {
    color: var(--pf-cc-accent);
    font-weight: 600;
}

.pf-cc-accordion-wrap {
    border: 1px solid #e2e8f0;
    border-radius: var(--pf-cc-radius);
    background: #fff;
}

.pf-cc-accordion-summary {
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    list-style: none;
}

.pf-cc-accordion-summary::-webkit-details-marker { display: none; }

.pf-cc-accordion-body {
    padding: 0 0.65rem 0.65rem;
    border-top: 1px solid #f1f5f9;
}

.pf-ed-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
}

.pf-ed-pre {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.5rem;
    max-height: 200px;
    overflow: auto;
}

@media (max-width: 767.98px) {
    .pf-command-center {
        padding: 0.5rem;
    }

}
