/* DRB Portal - Common Stylesheet (EUMC 브랜드 적용) */

/* 모바일에서 페이지 끝까지 끌었을 때 외곽 흰색(rubber-band) 노출 방지.
   common.css 를 로드하는 모든 페이지에 자동 적용 — 신규 페이지에서도 별도 작업 불필요. */
html,body{overscroll-behavior:none}

/* 사전 검토의견·중요 안내 강조 박스
   · 노란/금색 톤 + 좌측 진한 컬러 바 + 옅은 배경
   · 페이지 로드 직후 2초간 부드러운 펄스로 시선 유도 (1회만, blink 아님 — WCAG 준수)
   · 사용처: 위원 안건 상세의 간사 사전 검토의견 등 */
.brief-highlight{
  border:1px solid #f5c84a;
  border-left:5px solid #C9821E;
  background:#fff9e6;
  border-radius:6px;
  padding:14px 18px;
  margin-bottom:14px;
  animation: brief-pulse 2s ease-out 1;
}
.brief-highlight .brief-title{
  font-size:13px;
  font-weight:700;
  color:#6f4a00;
  margin-bottom:6px;
  display:flex;
  align-items:center;
  gap:6px;
}
.brief-highlight .brief-body{
  font-size:13.5px;
  line-height:1.65;
  color:#3b2a00;
  white-space:pre-wrap;
}
@keyframes brief-pulse{
  0%   { box-shadow: 0 0 0 0   rgba(201,130,30,0.55); }
  60%  { box-shadow: 0 0 0 14px rgba(201,130,30,0); }
  100% { box-shadow: 0 0 0 0   rgba(201,130,30,0); }
}
/* 사용자 모션 최소화 설정 존중 — 펄스 끄고 정적 강조만 */
@media (prefers-reduced-motion: reduce){
  .brief-highlight{ animation: none; }
}

:root{
  /* 이화의료원 Main Color */
  --primary:#00583F;              /* Dark Green - PANTONE 330C */
  --primary-dark:#003F2D;          /* Dark Green 더 진한 변형 */
  --primary-light:#E6F1ED;         /* Dark Green 7% 틴트 */
  --accent:#16B1A9;                /* Emerald Green - PANTONE 326C */
  --accent-light:#E3F5F3;
  --gold:#887734;                  /* Gold - PANTONE 872C (서브 포인트) */
  --silver:#8A8D8F;                /* Silver - PANTONE 877C */
  --text:#1f2937;
  --text-soft:#4b5563;
  --muted:#6b7280;
  --line:#e5e7eb;
  --bg:#f7f9fc;
  --card:#ffffff;
  --ok:#137333;
  --ok-bg:#e6f4ea;
  --warn:#b06000;
  --warn-bg:#fef3e2;
  --err:#b3261e;
  --err-bg:#fce8e6;
  --info:#00583F;                  /* 이화 Dark Green로 통일 */
  --info-bg:#E6F1ED;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{font-family:'Noto Sans KR',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--text);background:var(--bg);line-height:1.6;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button{font-family:inherit}

/* Top bar */
.topbar{background:var(--primary-dark);color:#d7e8e0;font-size:12px}
.topbar .inner{max-width:1200px;margin:0 auto;padding:8px 24px;display:flex;justify-content:space-between;align-items:center}
.topbar a{margin-left:16px;opacity:.9}
.topbar a:hover{opacity:1;text-decoration:underline}
/* HERA 연구분석포털 진입(원내 접속 시에만 노출) — 일반 링크와 구분되는 pill */
.topbar a.hera-portal-link{display:inline-block;padding:1px 9px;border:1px solid rgba(255,255,255,.45);border-radius:11px;font-weight:600;opacity:1}
.topbar a.hera-portal-link:hover{background:rgba(255,255,255,.14);text-decoration:none}

/* Header */
header.site{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:100}
header.site .inner{max-width:1200px;margin:0 auto;padding:18px 24px;display:flex;justify-content:space-between;align-items:center}
.brand{display:flex;align-items:center;gap:12px}
.brand .mark{width:44px;height:44px;flex-shrink:0;background:url('logo-crest.svg') center/contain no-repeat}
.brand .name{font-weight:700;font-size:18px;color:var(--primary-dark);line-height:1.2}
.brand .sub{font-size:12px;color:var(--muted);margin-top:1px}
.brand .org{display:block;font-size:11px;color:var(--primary);font-weight:600;letter-spacing:.3px;margin-bottom:2px}
nav.main ul{display:flex;gap:4px;list-style:none}
nav.main a{display:block;padding:10px 18px;font-weight:500;font-size:15px;color:var(--text-soft);border-radius:6px}
nav.main a:hover{background:var(--primary-light);color:var(--primary)}
nav.main a.active{color:var(--primary);font-weight:700}

/* Page head (breadcrumb + title) */
.page-head{background:#fff;border-bottom:1px solid var(--line)}
.page-head .inner{max-width:1200px;margin:0 auto;padding:32px 24px 40px}
.breadcrumb{color:var(--muted);font-size:13px;margin-bottom:12px}
.breadcrumb a:hover{color:var(--primary)}
.breadcrumb span{margin:0 6px;color:#c0c6ce}
.page-head h1{font-size:30px;font-weight:900;color:var(--primary-dark);letter-spacing:-.5px}
.page-head .subtitle{color:var(--text-soft);margin-top:8px}

/* Main */
main{max-width:1200px;margin:0 auto;padding:40px 24px}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 22px;border-radius:6px;font-weight:700;font-size:15px;border:1px solid transparent;cursor:pointer;transition:.15s}
.btn-primary{background:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-dark)}
.btn-secondary{background:#fff;color:var(--primary);border-color:var(--primary)}
.btn-secondary:hover{background:var(--primary-light)}
.btn-ghost{background:transparent;color:var(--text-soft);border-color:var(--line)}
.btn-ghost:hover{background:#f3f4f6}
.btn svg{width:16px;height:16px}
.btn-sm{padding:8px 14px;font-size:13px}

/* Badges / tags */
.tag{display:inline-block;padding:3px 10px;border-radius:4px;font-size:11px;font-weight:600;letter-spacing:.3px}
.tag-new{background:var(--accent);color:#fff}
.tag-notice{background:var(--primary);color:#fff}
.tag-guide{background:#6b7280;color:#fff}
.badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600}
.badge::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.badge-ok{background:var(--ok-bg);color:var(--ok)}
.badge-warn{background:var(--warn-bg);color:var(--warn)}
.badge-err{background:var(--err-bg);color:var(--err)}
.badge-info{background:var(--info-bg);color:var(--info)}
.badge-muted{background:#f3f4f6;color:var(--muted)}

/* Cards / panels */
.panel{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:28px}
.panel h3{font-size:18px;font-weight:700;margin-bottom:18px;color:var(--primary-dark)}

/* Section head */
.section-head{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:24px;flex-wrap:wrap;gap:12px}
.section-head h2{font-size:22px;font-weight:800;color:var(--primary-dark)}
.section-head .bar{display:inline-block;width:28px;height:4px;background:var(--primary);margin-bottom:10px;border-radius:2px}

/* Tables */
table.data{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--line);border-radius:8px;overflow:hidden}
table.data thead{background:#f3f6fb}
table.data th{text-align:left;padding:14px 16px;font-size:13px;font-weight:700;color:var(--primary-dark);border-bottom:1px solid var(--line)}
table.data td{padding:14px 16px;font-size:14px;color:var(--text-soft);border-bottom:1px solid var(--line)}
table.data tbody tr:last-child td{border-bottom:none}
table.data tbody tr:hover{background:#fafcff;cursor:pointer}
table.data td.num{text-align:center;font-family:'Roboto Mono',monospace;color:var(--muted);font-size:13px}
table.data td.center{text-align:center}
table.data td strong{color:var(--text)}

/* Footer */
footer{background:var(--primary-dark);color:#c6d9d0;margin-top:64px}
footer .inner{max-width:1200px;margin:0 auto;padding:40px 24px 32px;display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:40px}
footer h4{color:#fff;font-size:14px;font-weight:700;margin-bottom:14px}
footer p,footer a{font-size:13px;line-height:1.9;color:#bcc9df}
footer a:hover{color:#fff}
footer ul{list-style:none}
.kakao-ch-btn{display:inline-flex;align-items:center;gap:6px;background:#FEE500;color:#191919 !important;font-weight:700;font-size:12.5px;padding:7px 12px;border-radius:6px;line-height:1}
.kakao-ch-btn:hover{background:#f5dc00;color:#191919 !important}
.kakao-ch-card{display:flex;gap:18px;align-items:center;background:#fffbe6;border:1px solid #FEE500;border-radius:10px;padding:18px 20px;margin:18px 0 26px}
.kakao-ch-card img{flex:0 0 auto;border-radius:6px;background:#fff}
.kakao-ch-card-title{font-weight:700;font-size:15px;margin-bottom:6px;color:#1a1a1a}
.kakao-ch-card-body p{font-size:13px;color:var(--muted);line-height:1.7;margin-bottom:12px}
@media(max-width:560px){.kakao-ch-card{flex-direction:column;text-align:center}}
.copyright{max-width:1200px;margin:0 auto;padding:16px 24px;border-top:1px solid rgba(255,255,255,.1);font-size:12px;color:#8ea0bf;display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px}

/* 가로 스크롤 wrapper — 모바일에서 넓은 테이블이 페이지를 깨지 않도록 자체 스크롤 */
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* 모바일 햄버거 버튼 — 데스크톱은 숨김, 모바일에서만 표시 */
.nav-toggle{display:none;background:none;border:none;padding:6px;margin-left:8px;cursor:pointer;color:var(--primary-dark);align-items:center;justify-content:center;border-radius:6px}
.nav-toggle:hover{background:var(--primary-light)}
.nav-toggle:focus-visible{outline:2px solid var(--primary);outline-offset:2px}

/* Responsive */
@media (max-width:900px){
  /* iOS Safari 자동 줌 방지 — 포커스 시 입력 폼이 16px 미만이면 자동 확대됨 */
  input,textarea,select{font-size:16px}

  /* 테이블이 viewport 에 맞춰 압축되지 않도록 최소폭 보장 → .table-scroll 가로 스크롤 활성 */
  .table-scroll table.data{min-width:720px}
  .table-scroll table{min-width:600px}

  /* topbar — 모바일에서 좌우 패딩 축소 + 가독성 폰트 */
  .topbar .inner{padding:6px 12px;font-size:11px}
  .topbar a{margin-left:10px}

  /* brand 부제 텍스트 — 좁은 헤더에서 공간 절약 (admin.html 과 일관) */
  header.site .brand .sub{display:none}

  nav.main{display:none}
  /* 모바일에서 햄버거 버튼 노출 */
  .nav-toggle{display:inline-flex}
  /* nav.main 이 .open 일 때만 헤더 아래 풀폭 오버레이로 표시 */
  header.site .inner{position:relative}
  nav.main.open{display:block;position:absolute;top:100%;left:0;right:0;background:#fff;border-top:1px solid var(--line);box-shadow:0 6px 20px rgba(0,0,0,.08);max-height:calc(100vh - 80px);overflow-y:auto}
  nav.main.open ul{flex-direction:column;gap:0;list-style:none;padding:8px 16px;margin:0}
  nav.main.open a{display:block;padding:14px 12px;font-size:15px;border-bottom:1px solid var(--line);border-radius:0}
  nav.main.open li:last-child a{border-bottom:none}
  footer .inner{grid-template-columns:1fr}
  .page-head h1{font-size:24px}
}

/* ─────────────────────────────────────────────────────────────────────
 * 문서 미리보기 모달 (접수확인서·결정문·반출승인서 공용)
 *  - assets/doc-render.js 의 render*Sheet() 가 .doc-sheet 안 내용을 만듦
 *  - 신청자(my-applications.html) 와 관리자(admin.html) 양쪽에서 사용
 * ───────────────────────────────────────────────────────────────────── */
.doc-overlay{position:fixed;inset:0;background:rgba(0,63,45,.5);display:none;align-items:flex-start;justify-content:center;z-index:1000;padding:32px 20px;overflow-y:auto}
.doc-overlay.show{display:flex}
.doc-modal{background:#fff;border-radius:12px;max-width:760px;width:100%;box-shadow:0 20px 60px rgba(0,0,0,.2);overflow:hidden;display:flex;flex-direction:column;max-height:calc(100vh - 64px)}
.doc-head{padding:18px 24px;background:linear-gradient(90deg,var(--primary-dark),var(--primary));color:#fff;display:flex;justify-content:space-between;align-items:center;gap:16px}
.doc-head h3{font-size:17px;font-weight:700;line-height:1.4}
.doc-close{background:rgba(255,255,255,.2);border:none;color:#fff;width:30px;height:30px;border-radius:50%;cursor:pointer;font-size:20px;line-height:1;flex-shrink:0}
.doc-close:hover{background:rgba(255,255,255,.35)}
.doc-body{padding:28px 32px;overflow-y:auto;flex:1;background:#fafbfc}
.doc-foot{padding:14px 24px;background:#fff;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px;flex-shrink:0}

.doc-sheet{background:#fff;border:1px solid var(--line);border-radius:8px;padding:32px 36px;box-shadow:0 2px 12px rgba(0,0,0,.04)}
.doc-sheet .head-line{text-align:center;color:#003F2D;font-weight:600;font-size:13px;border-bottom:2px solid #00583F;padding-bottom:8px;margin-bottom:18px}
.doc-sheet h2.title{text-align:center;color:#003F2D;font-size:24px;letter-spacing:6px;font-weight:800;margin:18px 0 4px}
.doc-sheet .subtitle{text-align:center;color:#56637A;font-size:11px;margin-bottom:22px;letter-spacing:1px}
.doc-sheet table.info{width:100%;border-collapse:collapse;margin-bottom:18px;border:1px solid #D5DADF}
.doc-sheet table.info th,.doc-sheet table.info td{padding:11px 14px;font-size:13px;border-top:1px solid #D5DADF;text-align:left;vertical-align:top}
.doc-sheet table.info tr:first-child th,.doc-sheet table.info tr:first-child td{border-top:none}
.doc-sheet table.info th{background:#F5F7FA;color:#003F2D;font-weight:600;width:140px;border-right:1px solid #D5DADF}
.doc-sheet .result-box{margin:16px 0 22px;padding:18px 22px;border-left:4px solid #00583F;background:#E6F4EE;display:flex;align-items:center;justify-content:center;gap:18px}
.doc-sheet .result-box .lbl{font-size:12px;color:#56637A;letter-spacing:4px}
.doc-sheet .result-box .val{font-size:22px;font-weight:800;color:#00583F}
.doc-sheet .result-box.warn{border-left-color:#C9821E;background:#FFF6E0}
.doc-sheet .result-box.warn .val{color:#C9821E}
.doc-sheet .result-box.amend{border-left-color:#AD1457;background:#FCE4EC}
.doc-sheet .result-box.amend .val{color:#AD1457}
.doc-sheet .result-box.hold{border-left-color:#546E7A;background:#ECEFF1}
.doc-sheet .result-box.hold .val{color:#546E7A}
.doc-sheet .result-box.rej{border-left-color:#C62828;background:#FFEBEE}
.doc-sheet .result-box.rej .val{color:#C62828}
.doc-sheet h4.sec{font-size:13px;color:#003F2D;font-weight:700;border-bottom:1px solid #D5DADF;padding-bottom:6px;margin:18px 0 10px}
.doc-sheet p.body{font-size:13px;line-height:1.75;color:#111827;white-space:pre-wrap}
.doc-sheet .cond-box{margin-top:8px;padding:14px 18px;background:#E6F4EE;border-left:3px solid #00583F;border-radius:0 4px 4px 0}
.doc-sheet .cond-box.warn{background:#FFF6E0;border-left-color:#C9821E}
.doc-sheet .cond-box.amend{background:#FCE4EC;border-left-color:#AD1457}
.doc-sheet .cond-box ul{margin:0;padding-left:20px}
.doc-sheet .cond-box li{font-size:12.5px;line-height:1.7;color:#111827;margin-bottom:3px}
.doc-sheet .confirm-text{text-align:center;font-size:13px;color:#111827;margin:22px 0 8px;line-height:1.7}
.doc-sheet .legal-text{text-align:center;font-size:11.5px;color:#56637A;line-height:1.65;margin-bottom:24px}
.doc-sheet .issue-block{text-align:center;margin-top:18px}
.doc-sheet .issue-date{font-size:14px;color:#111827;margin-bottom:14px}
.doc-sheet .issue-org{font-size:15px;color:#003F2D;font-weight:600;display:inline-flex;align-items:center;gap:6px}
.doc-sheet .issue-org img{height:42px;display:inline-block}
.doc-sheet .footnote{margin-top:22px;padding-top:14px;border-top:1px solid #D5DADF;font-size:11px;color:#56637A;line-height:1.7}
.doc-sheet .footnote li{margin-bottom:3px}
.doc-empty{padding:60px 20px;text-align:center;color:var(--muted);font-size:14px}

@media (max-width:600px){
  .doc-overlay{padding:0}
  .doc-modal{border-radius:0;max-height:100vh}
  .doc-body{padding:14px}
  .doc-sheet{padding:20px 16px}
  .doc-sheet table.info th{width:90px;font-size:12px;padding:8px 10px}
  .doc-sheet table.info td{font-size:12px;padding:8px 10px}
}
