/**
 * 현장업무 — 모듈 전용 스타일.
 * 4x2 카드 그리드 × 2 섹션 (요청 / 수행).
 */

.pd-section {
    margin-bottom: 1.5rem;
}

.pd-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    padding: 0 4px;
}

.pd-section__title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-50);
}
.pd-section__title i { font-size: 13px; }

.pd-section__sub {
    font-size: 11px;
    color: var(--ink-500);
    font-weight: 400;
    margin-left: 2px;
}

.pd-section__total {
    font-size: 12px;
    color: var(--ink-400);
}
.pd-section__total span { color: var(--ink-100); font-weight: 600; }

/* 4x2 grid */
.pd-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
@media (max-width: 1023px) {
    .pd-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .pd-grid { grid-template-columns: 1fr; }
}

/* 카드 */
.pd-card {
    position: relative;
    padding: 14px 14px 12px;
    background: rgb(255 255 255 / 0.02);
    border: 1px solid var(--border, rgb(255 255 255 / 0.06));
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--t-fast) var(--ease);
    overflow: hidden;
    min-height: 120px;
}
.pd-card:hover {
    background: rgb(255 255 255 / 0.04);
    border-color: rgb(255 255 255 / 0.12);
    transform: translateY(-1px);
}
.pd-card.is-active {
    background: rgb(139 149 255 / 0.08);
    border-color: rgb(139 149 255 / 0.3);
}
.pd-card.is-zero {
    opacity: 0.5;
    cursor: default;
}
.pd-card.is-zero:hover { transform: none; background: rgb(255 255 255 / 0.02); }

/* 합계 카드 — 강조 */
.pd-card--total {
    background: linear-gradient(135deg, rgb(139 149 255 / 0.1), rgb(139 149 255 / 0.02));
    border-color: rgb(139 149 255 / 0.25);
}
.pd-card--total .pd-card__icon { color: var(--brand-light); }

.pd-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.pd-card__icon {
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 7px;
    background: rgb(255 255 255 / 0.05);
    color: var(--ink-300);
    font-size: 13px;
}

.pd-card__count {
    font-size: 26px;
    font-weight: 700;
    color: var(--ink-50);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.pd-card.is-zero .pd-card__count { color: var(--ink-500); }
.pd-card--alert .pd-card__count { color: var(--bad-300); }
.pd-card--warn  .pd-card__count { color: var(--warn-300); }
.pd-card--good  .pd-card__count { color: var(--good-300); }

.pd-card__label {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink-200);
    margin-bottom: 8px;
}

.pd-card__preview {
    font-size: 11px;
    color: var(--ink-500);
    line-height: 1.5;
    overflow: hidden;
}
.pd-card__preview-row {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pd-card__preview-row::before {
    content: '·';
    margin-right: 4px;
    color: var(--ink-600);
}

.pd-card__note {
    font-size: 10.5px;
    color: var(--info-300);
    font-style: italic;
    margin-top: 6px;
}

/* 펼침 영역 */
.pd-expand {
    margin-top: 1.5rem;
    background: rgb(0 0 0 / 0.2);
    border: 1px solid rgb(139 149 255 / 0.2);
    border-radius: 10px;
    padding: 16px;
}
.pd-expand__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgb(255 255 255 / 0.05);
}
.pd-expand__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-50);
}
.pd-expand__title i { color: var(--brand-light); font-size: 13px; }
.pd-expand__count {
    font-size: 11px;
    color: var(--ink-500);
    font-weight: 400;
    margin-left: 4px;
}

.pd-expand__body { display: flex; flex-direction: column; gap: 4px; }

.pd-expand__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    background: rgb(255 255 255 / 0.02);
    border-radius: 6px;
    font-size: 12px;
    transition: background var(--t-fast) var(--ease);
}
.pd-expand__item:hover { background: rgb(255 255 255 / 0.04); }

.pd-expand__module {
    flex-shrink: 0;
    padding: 2px 7px;
    background: rgb(139 149 255 / 0.15);
    color: var(--brand-light);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    min-width: 60px;
    text-align: center;
}

.pd-expand__title-text {
    flex: 1;
    color: var(--ink-200);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pd-expand__doc-no {
    font-family: var(--font-mono);
    color: var(--ink-300);
    font-size: 11px;
    margin-right: 6px;
}

.pd-expand__when {
    flex-shrink: 0;
    color: var(--ink-500);
    font-size: 11px;
    font-family: var(--font-mono);
}

.pd-expand__action {
    flex-shrink: 0;
    padding: 4px 10px;
    background: var(--brand);
    color: white;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--t-fast);
}
.pd-expand__action:hover { background: var(--brand-light); }

.pd-expand__empty {
    padding: 20px;
    text-align: center;
    color: var(--ink-500);
    font-size: 12px;
}

/* skeleton */
.pd-card--skeleton { cursor: default; pointer-events: none; }
.pd-card--skeleton:hover { transform: none; }
