/*
 * 삼양식품 식품연구소 확장 — 공통 스타일 (samyang.enabled 일 때만 _layout/common/style.html 이 싣는다)
 * 색은 samyang-theme.css 의 토큰(--sy-*)을 쓴다. 토큰이 없을 때를 위해 기존 구노 파랑을 대체값으로 둔다
 */

/* ── 사이드바 메뉴 아이콘 (기존 메뉴와 같은 흰색 24px 선 아이콘) ───────────────────────── */
.nav-menu .menuCd.SY_RESEARCH_DATA,
.nav-menu .menuCd.SY_APPROVAL,
.nav-menu .menuCd.SY_SEAL,
.nav-menu .menuCd.SY_SETTINGS {
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 20px 20px;
}
.nav-menu .menuCd.SY_RESEARCH_DATA {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='8' ry='3'/%3E%3Cpath d='M4 5v6c0 1.7 3.6 3 8 3s8-1.3 8-3V5'/%3E%3Cpath d='M4 11v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6'/%3E%3C/svg%3E");
}
.nav-menu .menuCd.SY_APPROVAL {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6'/%3E%3Cpath d='M8.5 14.5l2.5 2.5 4.5-5'/%3E%3C/svg%3E");
}
.nav-menu .menuCd.SY_SEAL {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6v4a3 3 0 0 1-1 2.2V12h-4V9.2A3 3 0 0 1 9 7z'/%3E%3Cpath d='M5 12h14l1 5H4z'/%3E%3Cpath d='M6 21h12'/%3E%3C/svg%3E");
}
.nav-menu .menuCd.SY_SETTINGS {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z'/%3E%3C/svg%3E");
}

/* ── 공통 부품 ─────────────────────────────────────────────────────────────── */
.sy-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
}
.sy-card + .sy-card { margin-top: 16px; }
.sy-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 16px;
}
.sy-sub { color: #868e96; font-size: 14px; }
.sy-muted { color: #adb5bd; }
.sy-mono {
    font-family: Consolas, "D2Coding", "Courier New", monospace;
    font-size: 12px;
    color: #495057;
    word-break: break-all;
}

/* 상태 뱃지 */
.sy-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 24px;
    white-space: nowrap;
    background: #f1f3f5;
    color: #495057;
}
.sy-badge.blue   { background: var(--sy-tint, #edf3fd); color: var(--sy-primary, #1761de); }
.sy-badge.green  { background: #e6f6f4; color: #138a7e; }
.sy-badge.red    { background: #fdecee; color: #d63447; }
.sy-badge.amber  { background: #fff4e0; color: #b26a00; }
.sy-badge.gray   { background: #f1f3f5; color: #868e96; }
.sy-badge.dark   { background: #343a40; color: #fff; }
.sy-badge.outline { background: #fff; border: 1px solid #dee2e6; color: #495057; }

/* 착수 단계 사전 검증(PoC) 대상 표시 */
.sy-poc {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    color: #b26a00;
    font-size: 12px;
    font-weight: 600;
    background: #fffaf0;
}

/* 결재선 단계 표시 (가로) */
.sy-steps {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}
.sy-steps > li {
    position: relative;
    flex: 1 1 0;
    min-width: 140px;
    padding: 14px 16px 14px 44px;
    border: 1px solid #dee2e6;
    background: #fff;
    margin-right: -1px;
}
.sy-steps > li:first-child { border-radius: 10px 0 0 10px; }
.sy-steps > li:last-child  { border-radius: 0 10px 10px 0; margin-right: 0; }
.sy-steps > li .no {
    position: absolute;
    left: 14px;
    top: 16px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e9ecef;
    color: #495057;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}
.sy-steps > li .nm   { font-size: 12px; color: #868e96; }
.sy-steps > li .who  { font-size: 15px; font-weight: 700; color: #212529; }
.sy-steps > li .when { font-size: 12px; color: #868e96; margin-top: 2px; }
.sy-steps > li.approval { background: #f3fbfa; }
.sy-steps > li.approval .no { background: #26a69a; color: #fff; }
.sy-steps > li.current { background: var(--sy-tint, #edf3fd); border-color: var(--sy-accent, #1761de); z-index: 1; }
.sy-steps > li.current .no { background: var(--sy-primary, #1761de); color: #fff; }
.sy-steps > li.reject { background: #fdf3f4; }
.sy-steps > li.reject .no { background: #d63447; color: #fff; }

/* 세로 타임라인 — 잇는 선 없이 상태 점과 여백만 쓴다 */
.sy-timeline { list-style: none; margin: 0; padding: 0; }
.sy-timeline > li { position: relative; padding: 0 0 20px 20px; }
.sy-timeline > li:last-child { padding-bottom: 0; }
.sy-timeline > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sy-accent, #1761de);
}
.sy-timeline > li.green::before { background: #26a69a; }
.sy-timeline > li.gray::before  { background: #adb5bd; }
.sy-timeline > li.red::before   { background: #d63447; }
.sy-timeline .t-date  { font-size: 12px; color: #868e96; }
.sy-timeline .t-title { font-size: 15px; font-weight: 500; color: #212529; margin-top: 2px; }
.sy-timeline .t-desc  { font-size: 13px; color: #495057; margin-top: 2px; }

/* 화면 제목 — 삼양 화면 묶음이 자간을 0 으로 되돌려도 기존 화면 제목(노트 관리 현황 등)과 같은 자간 */
#main .main-title-sty01 { letter-spacing: -0.7px; word-spacing: -0.64px; }

/* 상단 탭 — 기존 노트 관리 현황·감사 기록 탭(tab-board-sty02)과 같은 글꼴·간격·밑줄 */
.sy-tabs { display: flex; gap: 20px; border-bottom: 1px solid #e9ecef; margin-bottom: 24px; }
.sy-tabs a {
    display: inline-block;
    padding: 0 0 10px;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.7px;
    color: #495057;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}
.sy-tabs a.active, .sy-tabs a:hover { color: #495057; border-bottom-color: #cc4e00; }

/* 빈 목록 */
.sy-empty { padding: 48px 0; text-align: center; color: #adb5bd; font-size: 14px; }

/* 안내 상자 (기존 info 박스와 같은 톤) */
.sy-info {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 16px;
    border: 1px solid var(--sy-tint-border, #c9daf8);
    border-radius: 10px;
    background: var(--sy-tint, #f4f8fe);
    color: #344054;
    font-size: 14px;
}
.sy-info.warn { border-color: #f5d9a8; background: #fffaf0; }

/* 월말 작성 독려 배너 (대시보드) */
.sy-remind-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: var(--sy-tint, #edf3fd);
    border: 1px solid var(--sy-tint-border, #c9daf8);
    color: var(--sy-ink, #212529);
}
.sy-remind-banner .msg { font-size: 15px; font-weight: 600; }
.sy-remind-banner .sub { font-size: 13px; color: var(--sy-ink-2, #495057); }
.sy-remind-banner .count { font-size: 28px; font-weight: 700; color: var(--sy-primary, #1761de); font-variant-numeric: tabular-nums; }

/* ── 연구노트 화면 왼쪽 열 ─────────────────────────────────────────────────────
 * 열 전체가 한 줄기로 스크롤한다(카드 안 스크롤 없음). 열기·닫기 탭이 열 밖(right:-41px)에 걸려 있어
 * 열 자체가 아니라 안쪽 틀(.sy-left-scroll — _layout/note/layout.html, 삼양 켜짐일 때만 있다)이 스크롤한다.
 * 위·아래로 더 있으면 가장자리에 그림자·흐림이 생긴다(sy-note.js 가 sy-scroll-up/down 을 붙인다).
 * 카드 셋(연구노트 정보 · 연구데이터 · 결재선)은 같은 모양: 흰 바탕, 가는 테두리, 12px 모서리.
 */
html body #main-body #main-body-left {
    --sy-left-canvas: #f6f6f5;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: var(--sy-left-canvas) !important;
    border-right-color: #e7e5e3;
}
html body #main-body #main-body-left > .sy-left-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(38, 38, 38, 0.24) transparent;
    padding: 16px 8px 40px 16px;
    /* 기존 body 의 자간·어간(-0.7px · -0.64px)은 12px 글자에서 띄어쓰기를 지운다 — 이 열 안에서만 되돌린다 */
    letter-spacing: 0;
    word-spacing: normal;
}
html body #main-body #main-body-left::before,
html body #main-body #main-body-left::after {
    content: '';
    position: absolute;
    left: 0;
    right: 12px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
html body #main-body #main-body-left::before {
    top: 0;
    height: 10px;
    background: linear-gradient(rgba(38, 38, 38, 0.09), rgba(38, 38, 38, 0));
}
html body #main-body #main-body-left::after {
    bottom: 0;
    height: 48px;
    background: linear-gradient(rgba(246, 246, 245, 0), var(--sy-left-canvas) 85%);
}
html body #main-body #main-body-left.sy-scroll-up::before,
html body #main-body #main-body-left.sy-scroll-down::after { opacity: 1; }

/* 카드 — 기존 「연구노트 정보」(.note-info-box)와 삼양 카드(.sy-note-card)를 같은 모양으로 */
html body #main-body #main-body-left .note-info-box,
html body #main-body #main-body-left .sy-note-card {
    min-height: 0;
    margin: 0;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e9e7e4;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(38, 38, 38, 0.04);
}
html body #main-body #main-body-left .sy-left-scroll > .note-info-box ~ .note-info-box,
html body #main-body #main-body-left #sy-note-panel { margin-top: 12px; }
html body #main-body #main-body-left #sy-note-panel { display: flex; flex-direction: column; gap: 12px; }
html body #main-body #main-body-left #sy-note-panel:empty { display: none; }
html body #main-body #main-body-left .note-info-box > .title,
html body #main-body #main-body-left .sy-note-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: 0;
    color: var(--sy-ink, #212529);
}
html body #main-body #main-body-left .note-info-box > .cont { margin-top: 10px; }
/* 생성자·소유자 이메일은 한 줄을 넘겨 카드를 늘린다 — 숨기고 마우스를 올리면 보이게(sy-note.js 가 title 을 단다) */
html body #main-body #main-body-left .note-info-box .cont .txt-info-cont .create-user-email,
html body #main-body #main-body-left .note-info-box .cont .txt-info-cont .owner-email { display: none; }

/* 점검 단추 묶음 — 카드들과 간격을 맞추고, 숨긴 기존 점검자 상자 자리 때문에 생기는 이중 여백을 없앤다 */
html body #main-body #main-body-left .sy-left-scroll > .ma-t20 { margin-top: 16px !important; }
html body #main-body #main-body-left .inspection-status-box.d-none + .button-sty003 { margin-top: 0 !important; }
html body #main-body #main-body-left .sy-left-scroll .button-sty003 {
    height: 40px;
    border-color: #d5d1cd;
    color: var(--sy-ink-2, #495057);
    font-size: 15px;
    transition: background-color 0.15s ease-out, border-color 0.15s ease-out;
}
html body #main-body #main-body-left .sy-left-scroll .button-sty003:hover {
    opacity: 1 !important;
    background: #faf9f8;
    border-color: #b9b3ad;
}
html body #main-body #main-body-left .sy-left-scroll .button-sty003:focus-visible {
    outline: none;
    box-shadow: var(--sy-focus);
}
@media (prefers-reduced-motion: reduce) {
    html body #main-body #main-body-left::before,
    html body #main-body #main-body-left::after { transition: none; }
}

/* ── 삼양 화면 글자 간격 — 기존 body 의 자간(-0.7px)은 12–13px 글자에서 숫자·띄어쓰기를 붙인다.
 *    삼양이 만든 화면(결재·직인·연구과제·운영 설정)은 연구데이터·노트 왼쪽 열과 같은 -0.01em */
html body .sy-page,
html body .sy-set,
html body .syt-main { letter-spacing: 0; }
/* 아이콘 단추의 선 아이콘 */
.sy-btn.icon svg { width: 14px; height: 14px; display: block; }

/* 템플릿 불러오기 창 — 카드를 창 너비에 맞춰 3열로 고르게 놓는다(기존은 181px 고정 4열이라 줄이 바뀌면 카드 간격이 어긋난다) */
html body .modal .modal-pop .modal-body .load-template-list {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
    margin: 16px 0 0; padding: 0 4px 4px 0; list-style: none;
}
html body .modal .modal-pop .modal-body .load-template-list li { display: block; width: auto; height: auto; margin: 0 !important; overflow: hidden; }
html body .modal .modal-pop .modal-body .load-template-list li .box-img { height: auto; }
html body .modal .modal-pop .modal-body .load-template-list li .box-img img { display: block; width: 100%; height: auto; aspect-ratio: 179 / 104; object-fit: cover; }
html body .modal .modal-pop .modal-body .load-template-list li .box-cont { height: auto; min-height: 68px; padding: 10px 12px; gap: 6px; }
html body .modal .modal-pop .modal-body .load-template-list li .box-cont .txt-info { gap: 8px; }
html body .modal .modal-pop .modal-body .load-template-list li label { inset: 0; width: auto; height: auto; margin: 0; }
html body .modal .modal-pop .modal-body .load-template-list li .input-box { top: 6px; right: 27px; }

/* 선택 상자 — 브라우저 기본 화살표 대신 같은 자리(오른쪽 12px)의 화살표. 연구데이터·운영 설정·직인 화면이 함께 쓴다 */
select.syrdp-select, select.sy-select, select.syseal-select,
select.syrdp-select:disabled, select.sy-select:disabled, select.syseal-select:disabled {
    padding-right: 32px;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23868e96' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 12px;
}
