/**
 * 입고관리 — 모듈 전용.
 */

/* 모바일(≤640px): 필터는 '이번 달'(기간)·'전체 상태'만 노출, 거래처·창고 드롭다운은 숨김 */
@media (max-width: 640px) {
    #vendorFilter,
    #warehouseFilter { display: none; }
}

/* 셀 세로 구분선 — 발주관리 목록 규격 */
#receiveTable thead th,
#receiveTable tbody td {
    border-right: 1px solid rgb(255 255 255 / 0.07);
}
#receiveTable thead th:last-child,
#receiveTable tbody td:last-child {
    border-right: 0;
}
#receiveTable tbody tr {
    cursor: pointer;
    transition: background var(--t-fast) var(--ease);
}
#receiveTable tbody tr:hover td { background: rgb(255 255 255 / 0.025); }

/* ───────── 통계 카드 = 필터 드릴다운 (S5) ───────── */
.stat-card {
    cursor: pointer;
    transition: border-color var(--t-fast, .12s) var(--ease, ease),
                background-color var(--t-fast, .12s) var(--ease, ease);
}
.stat-card:hover { border-color: rgb(255 255 255 / 0.16); background: rgb(255 255 255 / 0.02); }
.stat-card:focus-visible {
    outline: 2px solid var(--brand-400, #6ea8fe);
    outline-offset: 2px;
}

/* drawer 너비 (입고는 라인 테이블이 넓어야 함) */
.c-drawer.c-drawer--wide {
    width: min(900px, 96vw);
}
.c-drawer.c-drawer--wide[aria-hidden="false"] { right: 0; }
.c-drawer.c-drawer--wide[aria-hidden="true"]  { right: calc(-1 * min(900px, 96vw)); }

/* 라인 테이블 — drawer 안 좁은 공간이라 컴팩트 */
#lineTable.table-compact th,
#lineTable.table-compact td {
    padding: 6px 8px;
    font-size: 12px;
}
#lineTable thead th { background: transparent; }
#lineTable tbody td { border-bottom: 1px solid rgb(255 255 255 / 0.04); }

/* S4: 라인 셀 인라인 편집 — 수량·단가 (우측 정렬 보정) */
#lineTable .c-cell-edit.is-editing { padding: 0; margin: 0; }
#lineTable .c-cell-edit.is-editing input { text-align: right; }

/* ───────── 모달 (Lot 라벨 인쇄) ───────── */
.c-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgb(11 14 22 / 0.55);
    backdrop-filter: blur(4px);
    z-index: 90;
}
.c-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 91;
    width: min(560px, 92vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: var(--surface-2, #15192a);
    border: 1px solid var(--border, rgb(255 255 255 / 0.08));
    border-radius: 14px;
    box-shadow: 0 30px 80px rgb(0 0 0 / 0.5);
    overflow: hidden;
}
.c-modal__head {
    display: flex; align-items: center;
    padding: 14px 18px;
    font-size: 14px; font-weight: 600;
    color: var(--ink-100);
    border-bottom: 1px solid rgb(255 255 255 / 0.06);
}
.c-modal__close {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: var(--ink-400);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all var(--t-fast) var(--ease);
}
.c-modal__close:hover { background: rgb(255 255 255 / 0.05); color: var(--ink-100); }
.c-modal__body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.c-modal__foot {
    padding: 12px 18px;
    border-top: 1px solid rgb(255 255 255 / 0.06);
    display: flex; gap: 8px; justify-content: flex-end;
    background: rgb(255 255 255 / 0.012);
}
