/**
 * 창고이동 — 모듈 전용. 출고 모듈과 동일 톤.
 */

.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)); }

/* 라인 모드 토글 */
.ship-mode-tabs {
    display: inline-flex;
    background: rgb(255 255 255 / 0.025);
    border: 1px solid var(--border, rgb(255 255 255 / 0.08));
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}
.ship-mode-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: var(--ink-400);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--t-fast) var(--ease);
}
.ship-mode-tab:hover { color: var(--ink-200); }
.ship-mode-tab[aria-pressed="true"] {
    background: linear-gradient(180deg, rgb(139 149 255 / 0.18), rgb(139 149 255 / 0.06));
    color: var(--brand-light);
    box-shadow: inset 0 0 0 1px var(--border-brand);
}

.ship-line-add {
    padding: 12px 14px;
    background: rgb(255 255 255 / 0.012);
    border: 1px solid rgb(255 255 255 / 0.04);
    border-radius: 10px;
}

/* 시리얼 검색 인풋 */
.ship-search {
    position: relative;
    display: flex;
    align-items: stretch;
    height: 38px;
    border-radius: 8px;
    background: linear-gradient(180deg, #080a0f, #0c0f15);
    box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.4), 0 0 0 1px var(--border);
    transition: box-shadow var(--t-base) var(--ease);
}
.ship-search:focus-within {
    box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.4), 0 0 0 1px var(--border-brand), var(--ring-brand);
}
.ship-search__icon {
    align-self: center;
    padding-left: 12px;
    color: var(--ink-500);
    font-size: 12px;
    pointer-events: none;
}
.ship-search input.ship-search__input {
    flex: 1 !important;
    min-width: 0 !important;
    height: 100% !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
    padding: 0 12px !important;
    margin: 0 !important;
    color: var(--ink-100) !important;
    font-size: 13px !important;
    font-family: 'JetBrains Mono', monospace !important;
    border-radius: 0 !important;
    width: auto !important;
}
.ship-search__input::placeholder {
    color: var(--ink-500);
    font-family: var(--font-sans);
}

/* 라인 테이블 */
#linesTable.table-compact th,
#linesTable.table-compact td {
    padding: 6px 8px;
    font-size: 12px;
}
#linesTable thead th { background: transparent; }
#linesTable tbody td { border-bottom: 1px solid rgb(255 255 255 / 0.04); }

.ship-line-type {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10px;
}
.ship-line-type--serial {
    background: rgb(105 214 133 / 0.12);
    border: 1px solid rgb(105 214 133 / 0.30);
    color: #69d685;
}
.ship-line-type--lot {
    background: rgb(139 149 255 / 0.12);
    border: 1px solid rgb(139 149 255 / 0.30);
    color: var(--brand-light);
}

.ship-line-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--ink-300);
}

.ship-line-remove {
    background: transparent;
    border: 0;
    color: var(--ink-500);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}
.ship-line-remove:hover {
    color: var(--bad-300);
    background: rgb(255 95 103 / 0.08);
}

#tbl tbody tr {
    cursor: pointer;
    transition: background var(--t-fast) var(--ease);
}
#tbl tbody tr:hover td {
    background: rgb(255 255 255 / 0.025);
}
#tbl tbody tr.row-canceled { opacity: 0.55; }

/* ───── MR 매칭 ───── */
.chip-mr {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    background: rgb(91 154 255 / 0.12);
    color: rgb(140 184 255);
    border: 1px solid rgb(91 154 255 / 0.20);
}

/* ───── 모달 ───── */
.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: 85vh;
    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--wide { width: min(900px, 95vw); }
.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);
}
#mrImportTable.table-compact th,
#mrImportTable.table-compact td {
    padding: 6px 8px;
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   이동 상세 — 큼직한 카드형 정보 (고도화)
   기존의 작은 2단 라벨/값 그리드를 '이동 경로 hero + 정보 카드'로 교체.
   ═══════════════════════════════════════════════════════════════ */
.tr-detail { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }

/* 이동 경로 hero — 출발창고 → 도착창고를 큼직하게 */
.tr-route {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 20px 18px;
    border-radius: 16px;
    background: linear-gradient(180deg, #1c2030 0%, #14171f 100%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), inset 0 0 0 1px var(--border, rgb(255 255 255 / 0.08));
}
.tr-route__node { text-align: center; min-width: 0; }
.tr-route__label {
    font-size: 12px; font-weight: 700; letter-spacing: 0.10em;
    text-transform: uppercase; color: var(--text-dim, rgb(245 247 251 / 0.5));
    margin-bottom: 8px;
}
.tr-route__wh {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 21px; font-weight: 800; line-height: 1.2;
    color: var(--text, #f5f7fb); word-break: keep-all;
}
.tr-route__wh i { font-size: 18px; color: var(--brand-light, #a3acff); }
.tr-route__arrow {
    display: grid; place-items: center;
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--brand-soft, rgb(139 149 255 / 0.10));
    box-shadow: inset 0 0 0 1px var(--brand-line, rgb(139 149 255 / 0.22));
    color: var(--brand-light, #a3acff); font-size: 17px;
}

/* 정보 카드 그리드 — 일자 · 등록자 */
.tr-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tr-meta__card {
    display: flex; align-items: center; gap: 13px;
    padding: 15px 16px; border-radius: 14px;
    background: rgb(255 255 255 / 0.025);
    box-shadow: inset 0 0 0 1px var(--border, rgb(255 255 255 / 0.08));
}
.tr-meta__ico {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: grid; place-items: center;
    background: linear-gradient(180deg, rgb(36 41 60 / 1), rgb(22 25 36 / 1));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), inset 0 0 0 1px var(--border, rgb(255 255 255 / 0.08));
    color: var(--text-dim, rgb(245 247 251 / 0.5)); font-size: 17px;
}
.tr-meta__label {
    font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
    color: var(--text-dim, rgb(245 247 251 / 0.5)); margin-bottom: 4px;
}
.tr-meta__value { font-size: 17px; font-weight: 700; color: var(--text, #f5f7fb); }
.tr-meta__value.num { font-family: var(--en); font-variant-numeric: tabular-nums; }

/* 메모 · 취소 — 가로 전체 카드 */
.tr-note {
    display: flex; gap: 12px; padding: 15px 16px; border-radius: 14px;
    background: rgb(255 255 255 / 0.025);
    box-shadow: inset 0 0 0 1px var(--border, rgb(255 255 255 / 0.08));
}
.tr-note > i { font-size: 16px; margin-top: 2px; color: var(--text-dim, rgb(245 247 251 / 0.5)); }
.tr-note__label { font-size: 12px; font-weight: 600; color: var(--text-dim, rgb(245 247 251 / 0.5)); margin-bottom: 4px; }
.tr-note__text { font-size: 15px; line-height: 1.55; color: var(--text-muted, rgb(245 247 251 / 0.72)); white-space: pre-wrap; }
.tr-note--bad { background: rgb(232 112 113 / 0.08); box-shadow: inset 0 0 0 1px rgb(232 112 113 / 0.25); }
.tr-note--bad > i,
.tr-note--bad .tr-note__text { color: var(--red, #e87071); }

/* 좁은 폭(드로어가 모바일에서 축소)에서는 1단으로 */
@media (max-width: 540px) {
    .tr-meta { grid-template-columns: 1fr; }
    .tr-route__wh { font-size: 18px; }
}
