/* Department Progress Card Surface v1 (Spec 2026-05-05 §8.4) —
   카드 footer 진행 button + 모달 스타일. */

/* ─── Modal (#dept-progress-modal) — overlay + dialog ─── */
#dept-progress-modal.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
#dept-progress-modal.modal-backdrop.is-hidden { display: none; }
#dept-progress-modal .modal {
    background: var(--paper, #fff);
    color: var(--ink, #111);
    border-radius: 6px;
    box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.35);
    width: min(640px, 100%);
    max-height: min(80vh, 720px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#dept-progress-modal .modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}
#dept-progress-modal .modal-emp {
    display: flex;
    align-items: center;
    gap: 10px;
}
#dept-progress-modal .modal-emp-avatar { font-size: 20px; }
#dept-progress-modal .modal-emp-name { font-weight: 600; font-size: 14px; }
#dept-progress-modal .modal-emp-role { font-size: 11px; color: #666; }
#dept-progress-modal .modal-x {
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 16px;
    color: inherit;
    padding: 4px 8px;
    line-height: 1;
}
#dept-progress-modal .modal-body {
    padding: 14px 18px;
    overflow-y: auto;
    flex: 1;
}
#dept-progress-modal .modal-foot {
    padding: 10px 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: right;
    flex-shrink: 0;
}
#dept-progress-modal .modal-foot .btn {
    color: inherit;
    text-decoration: none;
    font-size: 12px;
}
#dept-progress-modal .modal-foot .btn:hover { text-decoration: underline; }

.dc-progress-row {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.dc-progress-trigger {
    display: inline-block;
    width: 100%;
    text-align: left;
    padding: 6px 10px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    color: inherit;
    transition: background 0.15s ease;
    font-family: inherit;
}

.dc-progress-trigger:not(:disabled):hover {
    background: rgba(0, 0, 0, 0.04);
}

.dc-progress-trigger:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.dc-progress-active { border-left: 3px solid #2196f3; }
.dc-progress-idle { border-left: 3px solid #4caf50; }
.dc-progress-stub { border-left: 3px solid #ff9800; }

/* Legacy Admin Page Migration Wave 1 (Spec 2026-05-17 §4.1.1) —
   큐레이터 카드 inline 7-pip mini bar + idle completed info.
   button 안 우측 정렬, 한지 톤 (먹/인주). */
.dc-progress-trigger { display: flex; align-items: center; gap: 8px; }
.dc-progress-trigger .dc-progress-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-progress-pips {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}
.dc-progress-pips .pip {
    display: inline-block;
    width: 6px;
    height: 10px;
    border: 1px solid #847b6b; /* var(--ink-mute) fallback */
    border-radius: 1px;
    background: transparent;
}
.dc-progress-pips .pip-done { background: #1f2937; border-color: #1f2937; }
.dc-progress-pips .pip-run {
    background: #9f1239; /* 인주 */
    border-color: #9f1239;
    animation: dc-progress-pip-pulse 1s ease-in-out infinite;
}
.dc-progress-pips .pip-pending { background: transparent; }
@keyframes dc-progress-pip-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.dc-progress-completed-info {
    font-size: 11px;
    color: #4a4339; /* var(--ink-soft) fallback */
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

#dept-progress-modal .dpm-section { margin-bottom: 14px; }

#dept-progress-modal .dpm-section-title {
    font-size: 12px;
    color: #666;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#dept-progress-modal .dpm-active-card,
#dept-progress-modal .dpm-recent-row {
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    margin-bottom: 4px;
}

#dept-progress-modal .dpm-job { font-weight: 600; margin-bottom: 4px; }
#dept-progress-modal .dpm-step { font-size: 12px; color: #666; }

#dept-progress-modal .dpm-recent-row {
    display: block;
    gap: 8px;
    font-size: 12px;
}

#dept-progress-modal .dpm-recent-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

#dept-progress-modal .dpm-recent-row.st-succeeded { border-left: 3px solid #4caf50; }
#dept-progress-modal .dpm-recent-row.st-failed { border-left: 3px solid #c00; }
#dept-progress-modal .dpm-recent-row.st-aborted { border-left: 3px solid #ff9800; }

#dept-progress-modal .dpm-recent-status {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
}

#dept-progress-modal .dpm-recent-time { color: #666; font-size: 11px; }

#dept-progress-modal .dpm-failure {
    margin-top: 8px;
    padding: 8px 10px;
    background: #fff5f5;
    border: 1px solid #f3b6b6;
    border-radius: 4px;
    color: #7f1d1d;
}

#dept-progress-modal .dpm-failure-label {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
}

#dept-progress-modal .dpm-failure-summary {
    line-height: 1.45;
}

#dept-progress-modal .dpm-failure-detail {
    margin-top: 6px;
}

#dept-progress-modal .dpm-failure-detail summary {
    cursor: pointer;
    color: #991b1b;
    font-size: 11px;
}

#dept-progress-modal .dpm-failure-detail pre {
    margin: 6px 0 0;
    padding: 6px;
    max-height: 120px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: #fff;
    border: 1px solid #f3b6b6;
    border-radius: 4px;
    color: #555;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
}

#dept-progress-modal .dpm-empty {
    color: #999;
    font-style: italic;
    padding: 6px;
}

#dept-progress-modal .dpm-error {
    color: #c00;
    padding: 6px;
}
