/*
 * 삼양식품 식품연구소 확장 — 연구노트 순차 결재·전자서명·삭제 승인 (samyang/note/fragments.html 이 싣는다)
 * 색은 테마 변수만 쓴다(삼양 주황 테마는 통합 브랜치가 정한다). 기본값은 구노 기본 색.
 */

/* ── 결재선(세로) — 공용 .sy-steps 의 세로 배치판. 좁은 패널·모달 오른쪽 칸에 쓴다 ───────────── */
.sy-steps.sy-steps-v {
    flex-direction: column;
    flex-wrap: nowrap;
}
.sy-steps.sy-steps-v > li {
    flex: none;
    min-width: 0;
    margin-right: 0;
    margin-bottom: -1px;
    padding: 12px 14px 12px 46px;
    border-radius: 0;
}
.sy-steps.sy-steps-v > li:first-child { border-radius: 10px 10px 0 0; }
.sy-steps.sy-steps-v > li:last-child { border-radius: 0 0 10px 10px; margin-bottom: 0; }
.sy-steps.sy-steps-v > li:only-child { border-radius: 10px; }
.sy-steps.sy-steps-v > li .no { top: 14px; }
.sy-steps > li.skip .who,
.sy-steps > li.skip .nm { color: #adb5bd; }
.sy-steps > li .who .sy-ofcps { font-size: 12px; font-weight: 500; color: #868e96; margin-left: 2px; }
.sy-steps > li .sy-opinion {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #f1c6cc;
    color: #b42335;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-all;
}
.sy-steps > li.approval .sy-opinion { border-color: #dee2e6; color: #495057; }
.sy-steps > li .sy-sig { margin-top: 4px; font-size: 11px; color: #868e96; }
.sy-steps > li .sy-sig .sy-mono { font-size: 11px; }

/* ── 노트 화면 왼쪽 패널 카드 — 모양·간격은 samyang.css(왼쪽 열)가 「연구노트 정보」와 맞춘다 ───── */
#sy-note-panel:empty { display: none; }
.sy-note-card {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
}
.sy-note-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

/* 결재선 레일 — 단계마다 점 · 결재자 · 상태, 아래에 단계·시각. 점 사이 선: 승인한 구간은 실선, 남은 구간은 점선 */
.sy-rail { list-style: none; margin: 0; padding: 0; }
.sy-rail-step {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    column-gap: 12px;
    padding-bottom: 14px;
}
.sy-rail-step:last-child { padding-bottom: 0; }
.sy-rail-dot {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    border: 1.5px solid #cfcac5;
    background: #fff;
    color: #77726d;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.sy-rail-dot svg { width: 12px; height: 12px; }
.is-done .sy-rail-dot { border-color: #138a7e; background: #138a7e; color: #fff; }
.is-reject .sy-rail-dot { border-color: #d63447; background: #d63447; color: #fff; }
.is-current .sy-rail-dot {
    border-color: var(--sy-primary, #1761de);
    background: var(--sy-primary, #1761de);
    color: #fff;
}
.is-skip .sy-rail-dot { border-color: #e1e4e7; background: #f1f3f5; color: #adb5bd; }
.sy-rail-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sy-rail-who {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    line-height: 24px;
    color: var(--sy-ink, #212529);
}
.sy-rail-ofcps { margin-left: 5px; font-size: 12px; font-weight: 500; color: #6f6a65; }
.sy-rail-st { flex: none; font-size: 12px; font-weight: 700; line-height: 24px; color: #77726d; }
.is-done .sy-rail-st { color: #0f7a6f; }
.is-reject .sy-rail-st { color: #c02a3c; }
.is-current .sy-rail-st { color: var(--sy-primary, #1761de); }
.is-wait .sy-rail-st,
.is-skip .sy-rail-st { font-weight: 600; }
.is-wait .sy-rail-who,
.is-skip .sy-rail-who { font-weight: 500; color: #4a4643; }
.sy-rail-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 0 6px;
    font-size: 12px;
    line-height: 18px;
    color: #6f6a65;
    font-variant-numeric: tabular-nums;
}
.sy-rail-when::before { content: '·'; margin-right: 6px; color: #c4bfba; }
.sy-rail-op {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    margin: 6px 0 0;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f7f6f4;
    font-size: 13px;
    line-height: 19px;
    color: #3f3b37;
    white-space: pre-wrap;
    word-break: break-all;
}
.is-reject .sy-rail-op { background: #fdf2f3; color: #a3202f; }
.sy-rail-sig { margin-top: 4px; font-size: 11px; line-height: 16px; color: #77726d; }
.sy-rail-sig .sy-mono { font-size: 11px; color: #5c5853; }
.sy-note-card-title { font-size: 15px; font-weight: 700; color: var(--sy-ink, #212529); }
.sy-note-card-sub { font-size: 12px; color: #868e96; margin: -6px 0 10px; }
.sy-note-kv { font-size: 13px; color: #495057; line-height: 1.6; }
.sy-note-kv b { color: var(--sy-ink, #212529); font-weight: 600; }
.sy-note-reason {
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 13px;
    color: #495057;
    white-space: pre-wrap;
    word-break: break-all;
}
.sy-note-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ── 점검 요청 창(순차 결재) ────────────────────────────────────────────── */
.modal .modal-pop .modal-body.inspection.sy-note-reqst .wrap-right { overflow-y: auto; }
.sy-note-reqst .sy-steps.sy-steps-v > li { padding-top: 10px; padding-bottom: 10px; }
.sy-note-reqst .sy-steps.sy-steps-v > li .no { top: 12px; }
.sy-note-reqst .sy-note-reqst-help { margin-top: 12px; padding: 10px 14px; font-size: 12px; }
.sy-note-notice { margin-top: 10px; font-size: 12px; color: #868e96; }
.sy-note-notice li { margin-top: 2px; }
.sy-note-line-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

/* ── 점검 관리 창: 전자서명 비밀번호 ───────────────────────────────────── */
.modal .modal-pop .modal-body.inspection.sy-note-signing .wrap-left { overflow-y: auto; }
/* 기존 h-150(!important)보다 낮춰 서명 칸까지 한 화면에 보이게 한다 */
.modal .modal-pop .modal-body.inspection.sy-note-signing #inspctnDesc { height: 84px !important; }
.sy-note-sign {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--sy-tint-border, #c9daf8);
    border-radius: 10px;
    background: var(--sy-tint, #edf3fd);
}
.sy-note-sign .modal-cont-label { display: flex; align-items: center; gap: 6px; }
.sy-note-sign input[type="password"] { width: 100%; background: #fff; }
.sy-note-sign input[type="password"]:focus { outline: 2px solid var(--sy-accent, #1761de); outline-offset: 1px; }
.sy-note-sign-help { margin-top: 6px; font-size: 12px; color: #495057; line-height: 1.5; }
.sy-note-line { margin-bottom: 16px; }

/* ── 삭제 승인 ──────────────────────────────────────────────────────────── */
.sy-note-del-help { margin-bottom: 14px; }
.sy-note-del-form textarea { width: 100%; min-height: 120px; }
.sy-note-del-count { text-align: right; font-size: 12px; color: #868e96; margin-top: 4px; }
dl.sy-kv { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
dl.sy-kv dt { color: #868e96; font-weight: 500; }
dl.sy-kv dd { margin: 0; color: var(--sy-ink, #212529); word-break: break-all; }
.sy-del-body .sy-del-decide { margin-top: 16px; }
.sy-del-body .sy-del-decide .radio-box-sty02 { margin-top: 6px; }
.sy-del-body textarea { width: 100%; height: 72px !important; min-height: 0; margin-top: 6px; }
.sy-del-body dl.sy-kv { gap: 6px 12px; font-size: 13px; }
.sy-del-body .sy-note-reason { margin-top: 0; max-height: 72px; overflow-y: auto; }
.modal .modal-pop .modal-body.sy-del-body { height: auto; max-height: 480px; padding: 20px 32px; }

/* 노트 관리 현황 — 삭제 요청 행·안내 */
.note-info-box .status.sy-status-del { color: #d63447; background: #fdecee; }
.sy-del-row .sy-ellipsis {
    max-width: 180px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.sy-del-banner { cursor: pointer; margin-bottom: 12px; }
.sy-del-banner:hover { border-color: var(--sy-accent, #1761de); }
.sy-del-banner b { color: var(--sy-ink, #212529); }
.sy-step-badge { margin-left: 6px; }
