/* ============================================================
   SEDMS — Unified Stylesheet (1:1 port from user ZIP)
   sgw-* (LoginScreen) / pas-* (ProjectAccess) / ws-* (Workspace)
   drs-* (DrawingRegister) / ddp-* (DetailPanel) / odb-* (Overview)
   No emojis. Pretendard + Iconify + FontAwesome icons.
   ============================================================ */

@import url('/static/sedms-base.css');
/* excel-ribbon.css는 renderer.tsx에서 ?v=ASSET_VER 포함 <link>로 직접 로드 (캐시 무효화) */
@import url('/static/excel-grid.css');
@import url('/static/excel-workspace.css');

/* Reset baseline so #root style remains valid */
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Pretendard Variable', 'Pretendard', 'Apple SD Gothic Neo',
    'Noto Sans KR', 'Malgun Gothic', system-ui, -apple-system, sans-serif;
  background: #050e1f;
  color: #142233;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
* { box-sizing: border-box; }

/* ── SGW LoginScreen (sgw-* — 805 lines ported) ───────────── */
@keyframes sgw-fadeIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@keyframes sgw-spin   { to { transform:rotate(360deg); } }

.sgw-bg {
  height: 100dvh; width: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: linear-gradient(160deg, #050e1f 0%, #0b1e3d 60%, #050e1f 100%);
  overflow: hidden; gap: 0;
}
.sgw-upper {
  display: flex; align-items: flex-end; justify-content: center;
  flex: 1; width: 100%; padding-bottom: 0;
  animation: sgw-fadeIn .35s ease;
}
.sgw-card {
  width: 100%; max-width: 340px;
  border-radius: 16px 16px 0 0; overflow: hidden;
  box-shadow: 0 -4px 40px rgba(0,0,0,.6), 0 20px 60px rgba(0,0,0,.5);
}
.sgw-card-logo {
  background: #fff; padding: 18px 24px 14px;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid #e2e8f0;
}
.sgw-card-logo img { max-height: 52px; max-width: 200px; object-fit: contain; }
.sgw-logo-fallback { font-size: 22px; font-weight: 900; color: #0f172a; letter-spacing: -1px; }
.sgw-logo-fallback span { color: #1d4ed8; }
.sgw-card-body {
  background: #0f1e3a; padding: 22px 20px 20px;
  display: flex; flex-direction: column; gap: 0;
}
.sgw-error {
  padding: 10px 14px; border-radius: 10px;
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.25);
  color: #fca5a5; font-size: 11.5px; margin-bottom: 12px; white-space: pre-line;
}
/* Google Sign-In 공식 스타일 (https://developers.google.com/identity/branding-guidelines) */
.sgw-login-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: #ffffff;
  color: #3c4043; font-weight: 500; font-size: 15px;
  font-family: 'Roboto', 'Pretendard Variable', system-ui, sans-serif;
  letter-spacing: 0; text-transform: none;
  padding: 12px 16px; border-radius: 8px;
  border: 1px solid #dadce0; cursor: pointer;
  transition: background .2s, box-shadow .2s, border-color .2s;
  box-shadow: 0 1px 3px rgba(60,64,67,.15); margin-bottom: 14px;
}
.sgw-login-btn:hover:not(:disabled) {
  background: #f7f8f8; box-shadow: 0 2px 6px rgba(60,64,67,.2); border-color: #c6c9cd;
}
.sgw-login-btn:active:not(:disabled) { background: #eef0f1; }
.sgw-login-btn:disabled { opacity: .5; cursor: not-allowed; }
.sgw-login-btn-icon {
  background: transparent; border-radius: 0;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-weight: 900;
}
.sgw-spin {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  border-radius: 50%; animation: sgw-spin .6s linear infinite; flex-shrink: 0;
}
.sgw-or { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sgw-or-line { flex: 1; height: 1px; background: rgba(255,255,255,.08); }
.sgw-or-text { font-size: 10px; color: #475569; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sgw-test-roles {
  margin-bottom: 14px; padding: 10px;
  border: 1px dashed rgba(96, 165, 250, 0.3); border-radius: 6px;
  background: rgba(96, 165, 250, 0.04);
}
.sgw-test-roles-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; color: #93c5fd; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px;
}
.sgw-test-roles-title .iconify, .sgw-test-roles-title svg { font-size: 13px; width: 13px; height: 13px; }
.sgw-test-roles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sgw-test-role-btn {
  --test-accent: #60a5fa;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px; color: #e5e7eb;
  font-family: inherit; font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: all 140ms cubic-bezier(0.16, 1, 0.3, 1);
}
.sgw-test-role-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.06);
  border-color: var(--test-accent); color: var(--test-accent);
}
.sgw-test-role-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.sgw-test-role-icon { font-size: 16px; color: var(--test-accent); flex: 0 0 16px; width: 16px; height: 16px; }
.sgw-test-role-label { letter-spacing: 0.02em; }
.sgw-test-roles-hint {
  margin: 8px 0 0; font-size: 10px; color: #64748b;
  text-align: center; letter-spacing: 0.04em; line-height: 1.4;
}
.sgw-contact { font-size: 11px; color: #475569; text-align: center; padding: 4px 0 0; }
.sgw-contact a { color: #60a5fa; text-decoration: none; }
.sgw-hero {
  flex-shrink: 0; width: 100%; max-width: 340px;
  height: min(38vh, 260px);
  position: relative; overflow: hidden;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
/* SEcMS 형상 이식: 동영상/이미지를 hero 영역에 절대배치로 겹침 (fallback 위, overlay 아래) */
.sgw-hero video, .sgw-hero img, .sgw-hero-video {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; opacity: .85;
}
.sgw-hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to bottom, rgba(15,30,58,.85) 0%, rgba(15,30,58,.2) 40%, rgba(15,30,58,.5) 100%);
}
.sgw-hero-fallback {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(circle at 30% 50%, rgba(96,165,250,.18) 0%, transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(59,130,246,.12) 0%, transparent 55%),
    linear-gradient(180deg, #0b1e3d 0%, #050e1f 100%);
}

/* ── ProjectAccessScreenSecms (pas-* — SECMS light theme) ── */
@keyframes pa-fade-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

.pas-shell {
  min-height: 100dvh; width: 100%;
  background: #f5f7fa; color: #1a2030;
  padding: 24px 32px 48px;
  word-break: keep-all; line-height: 1.5; overflow-y: auto;
}
.pas-topbar {
  max-width: 1024px; margin: 0 auto 18px;
  display: flex; justify-content: flex-end; align-items: center; gap: 10px;
  font-size: 12px; color: #4a5568;
}
.pas-topbar-user { font-weight: 500; color: #1a2030; }
.pas-topbar-email { color: #6b7280; }
.pas-topbar-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px;
  background: #fff; border: 1px solid #c0ccd8; border-radius: 6px;
  color: #1a2030; font-family: inherit; font-size: 11px; font-weight: 600;
  cursor: pointer;
  transition: all 140ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pas-topbar-btn:hover { background: #f0f4f8; border-color: #93a3b3; }
.pas-container {
  max-width: 1024px; margin: 0 auto;
  background: #fff;
  border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 28px 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  animation: pa-fade-in 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pas-section-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 18px;
}
.pas-section-title {
  font-size: 22px; font-weight: 800; color: #1a2030; letter-spacing: -0.01em;
}
.pas-section-sub { margin-top: 2px; font-size: 12px; color: #6b7280; }
.pas-btn-pri {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  background: #2563eb; border: 0; border-radius: 8px;
  color: #fff; font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pas-btn-pri:hover { background: #1d4ed8; }
.pas-vessel-list { display: flex; flex-direction: column; gap: 10px; }
.pas-vessel-card {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  transition: border-color 140ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pas-vessel-card:hover { border-color: #93c5fd; }
.pas-vessel-icon {
  flex: 0 0 56px; width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: #eff6ff; border: 1.5px solid #2563eb; border-radius: 8px;
  color: #2563eb; font-size: 28px;
}
.pas-vessel-icon svg { width: 30px; height: 30px; }
.pas-vessel-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pas-vessel-row1 {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 16px; color: #1a2030;
}
.pas-vessel-badge {
  display: inline-flex; align-items: center;
  height: 18px; padding: 0 6px;
  font-size: 10px; font-weight: 700;
  background: #dbeafe; color: #1d4ed8;
  border-radius: 3px; letter-spacing: 0.04em;
}
.pas-vessel-status-chip {
  display: inline-flex; align-items: center;
  height: 18px; padding: 0 6px;
  font-size: 10px; font-weight: 700;
  border-radius: 3px; letter-spacing: 0.04em;
}
.pas-vessel-status-ready { background: #dcfce7; color: #166534; }
.pas-vessel-status-pending { background: #fef3c7; color: #92400e; }
.pas-vessel-row2 {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; color: #4a5568;
}
.pas-vessel-meta { display: inline-flex; align-items: center; gap: 4px; }
.pas-vessel-meta svg { font-size: 12px; width: 12px; height: 12px; color: #6b7280; }
.pas-vessel-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.pas-btn-sec {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 12px;
  background: #fff; border: 1px solid #c0ccd8; border-radius: 6px;
  color: #1a2030; font-family: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer;
  transition: all 140ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pas-btn-sec:hover { background: #f0f4f8; border-color: #93a3b3; }
.pas-btn-sec.is-danger { color: #dc2626; }
.pas-btn-sec.is-danger:hover { background: #fef2f2; border-color: #fca5a5; }
.pas-btn-pri-sm {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 14px;
  background: #2563eb; border: 0; border-radius: 6px;
  color: #fff; font-family: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pas-btn-pri-sm:hover { background: #1d4ed8; }
.pas-empty { text-align: center; padding: 48px 24px; color: #6b7280; font-size: 13px; }
.pas-divider { margin: 28px 0 22px; border: 0; border-top: 1px solid #e2e8f0; }
.pas-section-title.is-group {
  display: flex; align-items: center; gap: 8px; font-size: 16px; color: #1a2030;
}
.pas-section-title.is-group svg { font-size: 18px; width: 18px; height: 18px; color: #16a34a; }
.pas-group-actions { display: flex; align-items: center; gap: 8px; }
.pas-btn-group-join {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px;
  background: #fff; border: 1px solid #c0ccd8; border-radius: 6px;
  color: #1a2030; font-family: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: all 140ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pas-btn-group-join:hover { background: #f0f4f8; }
.pas-btn-group-create {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px;
  background: #16a34a; border: 0; border-radius: 6px;
  color: #fff; font-family: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pas-btn-group-create:hover { background: #15803d; }
.pas-group-list { display: flex; flex-direction: column; gap: 8px; }
.pas-group-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
}
.pas-group-icon {
  flex: 0 0 40px; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: #ecfdf5; border-radius: 6px;
  color: #16a34a; font-size: 22px;
}
.pas-group-icon svg { width: 22px; height: 22px; }
.pas-group-main { flex: 1 1 auto; min-width: 0; }
.pas-group-name-row {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14px; color: #1a2030;
}
.pas-group-owner-badge {
  display: inline-flex; align-items: center;
  height: 18px; padding: 0 6px;
  font-size: 10px; font-weight: 700;
  background: #fed7aa; color: #9a3412;
  border-radius: 3px; letter-spacing: 0.04em;
}
.pas-group-meta {
  margin-top: 2px;
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; color: #4a5568;
}
.pas-group-meta-item { display: inline-flex; align-items: center; gap: 4px; }
.pas-group-meta-item svg { width: 12px; height: 12px; color: #6b7280; }
.pas-group-actions-row { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

/* ── ezPDF style menubar + icon toolbar (도면 매니저 상단) ── */
.ezp-menubar {
  display: flex; align-items: center; gap: 0;
  height: 26px;
  background: linear-gradient(180deg, #F5F7FA 0%, #E9EEF6 100%);
  border-bottom: 1px solid #C9D5E6;
  padding: 0 8px;
  font-size: 12px;
  user-select: none;
}
.ezp-menu {
  padding: 4px 10px; cursor: pointer;
  color: #142233; border-radius: 3px;
  transition: background-color .1s;
}
.ezp-menu:hover { background: #DDE7F5; }
.ezp-menu.is-active { background: #C5D9F1; color: #16305F; font-weight: 600; }

.ezp-toolbar {
  display: flex; align-items: stretch; gap: 0;
  background: linear-gradient(180deg, #FAFCFF 0%, #EFF4FB 100%);
  border-bottom: 1px solid #C9D5E6;
  padding: 4px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ezp-toolbar::-webkit-scrollbar { display: none; }
.ezp-tg {
  display: flex; align-items: center; gap: 2px;
  padding: 0 6px;
  border-right: 1px solid #C9D5E6;
}
.ezp-tg:last-child { border-right: 0; }
.ezp-tg-label {
  font-size: 9px; color: #7E92AE; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  margin-right: 4px;
  min-width: 30px; text-align: center;
}
.ezp-tbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border: 1px solid transparent; border-radius: 4px;
  background: transparent; color: #1F3F7E;
  font-size: 15px; cursor: pointer;
  transition: all .12s;
}
.ezp-tbtn:hover {
  background: rgba(47,91,170,.1);
  border-color: rgba(47,91,170,.28);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;
}
.ezp-tbtn.is-active {
  background: linear-gradient(180deg, #2F5BAA 0%, #1F3F7E 100%);
  border-color: #1F3F7E; color: #fff;
}
.ezp-tbtn:disabled { opacity: .4; cursor: not-allowed; }
.ezp-tbtn svg { width: 16px; height: 16px; }

/* ── Workspace Header (ws-header — Office blue gradient) ── */
.ws-shell { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; background: #E5EAF2; }
.ws-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; height: 50px; padding: 0 12px;
  background: linear-gradient(90deg, #16305F 0%, #1F3F7E 55%, #2F5BAA 100%);
  color: white; flex-shrink: 0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.ws-header-left { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; }
.ws-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ws-header-mark {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: #16305F;
  font-size: 12px; font-weight: 800; border-radius: 5px;
  flex-shrink: 0; letter-spacing: -0.02em;
}
.ws-header-mark-btn { cursor: pointer; border: none; transition: opacity .13s; }
.ws-header-mark-btn:hover { opacity: .85; }
.ws-header-brand { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
.ws-header-appname { font-size: 13px; font-weight: 700; letter-spacing: 0.01em; line-height: 1.1; }
.ws-header-sub { font-size: 10px; color: rgba(255,255,255,.55); line-height: 1; }
.ws-header-sep { width: 1px; height: 18px; background: rgba(255,255,255,.22); flex-shrink: 0; }
.ws-header-project { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.ws-header-project-code {
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  color: rgba(255,255,255,.92); white-space: nowrap;
}
.ws-header-project-name {
  font-size: 11px; color: rgba(255,255,255,.6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 260px;
}
.ws-header-module {
  font-size: 11.5px; font-weight: 600;
  color: rgba(255,255,255,.78); white-space: nowrap;
}
.ws-header-user {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  padding: 5px 10px; border-radius: 20px; cursor: default;
}
.ws-header-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: #2F5BAA;
  border: 1.5px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: white; flex-shrink: 0;
}
.ws-header-user-info { display: flex; flex-direction: column; gap: 1px; }
.ws-header-username { font-size: 12px; color: white; font-weight: 500; line-height: 1; }
.ws-header-role { font-size: 9.5px; color: rgba(255,255,255,.65); line-height: 1; }

/* ── Workspace Ribbon (Office-style category-grouped buttons) ── */
.ws-ribbon {
  display: flex; align-items: stretch; gap: 0;
  background: linear-gradient(180deg, #F2F6FE 0%, #E7EEFA 100%);
  border-bottom: 1px solid #9FB3CE;
  height: 70px; flex-shrink: 0;
  overflow-x: auto; scrollbar-width: none;
  user-select: none;
  box-shadow: 0 1px 2px rgba(20,34,51,.04);
  padding: 0 8px;
  position: sticky; top: 50px; z-index: 99;
}
.ws-ribbon::-webkit-scrollbar { display: none; }
.ws-ribbon-group {
  display: flex; flex-direction: column;
  align-items: stretch; min-width: 0;
  padding: 4px 2px 0 2px;
}
.ws-ribbon-btns { display: flex; flex: 1; align-items: flex-start; gap: 1px; padding: 0 2px; }
.ws-ribbon-group-label {
  font-size: 9px; font-weight: 600;
  color: #7E92AE; text-align: center;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 4px; border-top: 1px solid #C9D5E6;
  margin-top: 2px; white-space: nowrap;
}
.ws-ribbon-btn {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start; gap: 4px;
  padding: 6px 8px; min-width: 56px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer; border-radius: 7px;
  font-family: inherit;
  transition: background 120ms, border-color 120ms;
}
.ws-ribbon-btn:hover:not(.ws-ribbon-btn--locked) {
  background: rgba(47,91,170,.1);
  border-color: rgba(47,91,170,.28);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;
}
.ws-ribbon-btn-icon { display: block; width: 22px; height: 22px; color: #1F3F7E; flex-shrink: 0; }
.ws-ribbon-btn-icon svg { width: 100%; height: 100%; }
.ws-ribbon-btn-label {
  font-size: 10.5px; font-weight: 500;
  color: #142233; white-space: nowrap; line-height: 1.1;
}
.ws-ribbon-btn--active {
  background: linear-gradient(180deg, #2F5BAA 0%, #1F3F7E 100%);
  border-color: #1F3F7E;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 4px 12px rgba(20,34,51,.08);
}
.ws-ribbon-btn--active .ws-ribbon-btn-icon { color: #fff; }
.ws-ribbon-btn--active .ws-ribbon-btn-label { color: #fff; font-weight: 700; }
.ws-ribbon-btn--locked { opacity: 0.36; cursor: not-allowed; }
.ws-ribbon-btn-ro {
  position: absolute; top: 3px; right: 3px;
  font-size: 8px; font-weight: 700;
  background: rgba(112,173,71,.15);
  color: #4F8F3A;
  border: 1px solid rgba(112,173,71,.3);
  padding: 0 3px; border-radius: 2px;
}
.ws-ribbon-sep {
  width: 1px; background: #C9D5E6;
  margin: 6px 4px; align-self: stretch; flex-shrink: 0;
}
.ws-body { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.ws-content { flex: 1; min-width: 0; overflow: auto; }
.ws-content::-webkit-scrollbar { width: 10px; height: 10px; }
.ws-content::-webkit-scrollbar-track { background: #ECF0F6; }
.ws-content::-webkit-scrollbar-thumb { background: #B8C8DE; border-radius: 5px; }
.ws-content::-webkit-scrollbar-thumb:hover { background: #9FB3CE; }

/* ── Overview surface (odb-* / fm-*) ── */
.fm-shell-page, .odb-page { padding: 14px 18px 60px; background: #E5EAF2; }
.fm-page-head, .odb-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 14px;
}
.fm-eyebrow {
  display: inline-block; font-size: 10px; font-weight: 800;
  letter-spacing: .12em; color: #2F5BAA; text-transform: uppercase;
  margin-bottom: 4px;
}
.fm-eyebrow.subtle { color: #7E92AE; }
.fm-page-head h1, .odb-head h1 {
  margin: 0; font-size: 22px; font-weight: 800; color: #16305F;
  letter-spacing: -.01em;
}
.fm-page-head p, .odb-head p { margin: 4px 0 0; color: #44546A; font-size: 13px; }
.fm-action-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fm-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; color: #1F3F7E;
  background: #E7EEFA; border: 1px solid #C9D5E6;
}
.odb-action {
  padding: 6px 12px; border: 1px solid #2F5BAA;
  background: #fff; color: #1F3F7E;
  font-weight: 600; font-size: 12px;
  border-radius: 6px; cursor: pointer;
  transition: all .12s;
}
.odb-action:hover { background: #E7EEFA; }
.odb-alert {
  margin: 0 0 12px;
  padding: 8px 12px;
  background: #FCEAD9; color: #B85E1A;
  border: 1px solid rgba(237,125,49,.3); border-radius: 5px;
  font-size: 12px;
}
.fm-panel, .odb-panel {
  background: #fff; border: 1px solid #C9D5E6;
  border-radius: 8px; padding: 14px 16px; margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(20,34,51,.04);
}
.fm-panel-head, .odb-panel-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 12px; margin-bottom: 10px;
}
.fm-panel-head h2, .odb-panel-head h2 {
  margin: 0; font-size: 14px; color: #142233; font-weight: 700;
}
.fm-badge {
  font-size: 10px; padding: 2px 8px;
  background: #E7EEFA; color: #1F3F7E;
  border-radius: 999px; font-weight: 600;
}
.odb-command-center {
  display: grid; grid-template-columns: 2fr 1fr;
  align-items: center; gap: 18px;
}
.odb-command-copy h2 { margin: 4px 0 6px; font-size: 18px; color: #16305F; }
.odb-command-copy p { margin: 0; color: #44546A; font-size: 12.5px; line-height: 1.6; }
.odb-command-gauges {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.odb-schedule-gauge {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 92px; height: 92px;
}
.odb-schedule-gauge svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.odb-schedule-gauge svg circle {
  fill: none; stroke-width: 8; cx: 60; cy: 60; r: 48;
}
.odb-schedule-gauge svg circle:first-child { stroke: #E7EEFA; }
.odb-schedule-gauge svg circle:last-child {
  stroke-linecap: round;
}
.odb-schedule-gauge--blue svg circle:last-child { stroke: #2F5BAA; }
.odb-schedule-gauge--orange svg circle:last-child { stroke: #DC7434; }
.odb-schedule-gauge strong {
  position: absolute; font-size: 18px; font-weight: 800; color: #16305F;
}
.odb-schedule-gauge span {
  position: absolute; bottom: -4px;
  font-size: 10px; color: #7E92AE; font-weight: 600;
}
.odb-command-stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 12px;
}
.odb-command-stat strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px; color: #DC7434; line-height: 1;
}
.odb-command-stat span {
  margin-top: 4px; font-size: 10.5px;
  color: #44546A; letter-spacing: .04em;
}

.fm-kpi-grid, .odb-kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.fm-kpi-card, .odb-kpi {
  background: #fff;
  border-left: 3px solid #2F5BAA;
  border-radius: 4px; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 1px 2px rgba(20,34,51,.04);
}
.fm-kpi-card span, .odb-kpi span { font-size: 11px; color: #7E92AE; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.fm-kpi-card strong, .odb-kpi strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; color: #16305F; line-height: 1.1;
}
.fm-kpi-card small, .odb-kpi small { color: #44546A; font-size: 11px; }
.odb-kpi--blue { border-left-color: #2F5BAA; }
.odb-kpi--orange { border-left-color: #DC7434; }
.odb-kpi--green { border-left-color: #4F8F3A; }
.odb-kpi--purple { border-left-color: #5E2C8C; }
.odb-kpi--red { border-left-color: #C0392B; }

.odb-grid {
  display: grid; grid-template-columns: 2fr 1fr;
  gap: 14px;
}
.odb-panel--wide { grid-column: 1 / -1; }

.odb-master-gantt {
  position: relative; padding: 8px 0;
  --today-left: 50%;
}
.odb-master-gantt-header {
  display: grid;
  grid-template-columns: 260px 1fr 100px;
  font-size: 10.5px;
  border-bottom: 1px solid #C9D5E6;
  padding: 4px 0;
  font-weight: 700; color: #1F3F7E;
}
.odb-master-gantt-months {
  position: relative; height: 18px;
  background: #F4F7FC; border-left: 1px solid #C9D5E6;
}
.odb-master-gantt-months span {
  position: absolute; top: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #44546A;
  border-right: 1px dashed #C9D5E6;
}
.odb-master-gantt-months span.is-current { color: #DC7434; font-weight: 800; }
.odb-master-gantt-row {
  display: grid; grid-template-columns: 260px 1fr 100px;
  align-items: center; gap: 0;
  border-bottom: 1px solid #ECF0F6;
}
.odb-master-gantt-task {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px;
  font-size: 12px;
  overflow: hidden;
}
.odb-task-no {
  font-family: 'JetBrains Mono', monospace;
  width: 22px; text-align: center;
  font-size: 10.5px; color: #7E92AE;
}
.odb-task-code {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1px 6px; font-size: 10px; font-weight: 800;
  border: 1px solid currentColor; border-radius: 3px;
}
.odb-master-gantt-task strong { font-size: 12.5px; color: #142233; line-height: 1.2; }
.odb-master-gantt-task small { display: block; font-size: 10.5px; color: #7E92AE; margin-top: 1px; }
.odb-master-gantt-track {
  position: relative; height: 30px;
  background: #FAFCFF;
}
.odb-master-gantt-month-bg {
  position: absolute; top: 0; bottom: 0;
  background: transparent;
}
.odb-master-gantt-month-bg.is-alt { background: rgba(231,238,250,.4); }
.odb-master-gantt-today {
  position: absolute; top: 0; bottom: 0;
  left: var(--today-left);
  width: 1.5px; background: #DC7434;
  z-index: 2;
}
.odb-master-gantt-bar {
  position: absolute; top: 4px; bottom: 4px;
  border: 1px solid; border-radius: 4px;
  display: flex; align-items: center;
  overflow: hidden;
  z-index: 1;
}
.odb-master-gantt-bar i {
  display: block; height: 100%;
  background: currentColor; border-radius: 3px;
}
.odb-master-gantt-progress {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 6px;
  font-size: 11px;
}
.odb-master-gantt-progress strong { font-size: 13px; color: #16305F; }
.odb-project-status {
  font-size: 10px; padding: 1px 6px;
  border-radius: 3px; margin-top: 2px;
}
.odb-project-status--on-track { background: #E8F3E0; color: #375623; }
.odb-project-status--at-risk { background: #FCEAD9; color: #B85E1A; }
.odb-project-status--delayed { background: #FBE6E3; color: #C0392B; }
.odb-project-status--upcoming { background: #E7EEFA; color: #1F3F7E; }

.odb-milestone-list { display: flex; flex-direction: column; gap: 8px; }
.odb-milestone {
  padding: 8px 10px;
  border-left: 3px solid #2F5BAA;
  background: #F7F9FC; border-radius: 0 4px 4px 0;
}
.odb-milestone--past { border-left-color: #7E92AE; opacity: .7; }
.odb-milestone--upcoming { border-left-color: #DC7434; }
.odb-milestone--current { border-left-color: #4F8F3A; }
.odb-milestone span { font-size: 10px; color: #7E92AE; font-weight: 700; text-transform: uppercase; }
.odb-milestone strong { display: block; font-size: 12.5px; color: #16305F; margin-top: 2px; }
.odb-milestone small { font-size: 10.5px; color: #44546A; }

.odb-category-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.odb-category-card {
  padding: 8px 10px;
  border: 1px solid #ECF0F6; border-radius: 5px;
  background: #FAFCFF;
}
.odb-category-title {
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.odb-category-title span {
  display: inline-flex; padding: 1px 6px;
  font-size: 10px; font-weight: 800;
  border: 1px solid currentColor; border-radius: 3px;
}
.odb-category-title strong {
  flex: 1; font-size: 11.5px; color: #142233;
}
.odb-category-title em {
  font-family: 'JetBrains Mono', monospace;
  font-style: normal; font-weight: 700; color: #16305F;
}
.odb-category-track {
  position: relative; height: 6px;
  background: #ECF0F6; border-radius: 3px; overflow: hidden;
  margin-bottom: 4px;
}
.odb-category-track span { display: block; height: 100%; }
.odb-category-card small { font-size: 10px; color: #7E92AE; }

.fm-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.fm-table thead th {
  background: #D6E4F7; color: #16305F;
  text-align: left; padding: 6px 10px;
  border: 1px solid #C9D5E6;
  font-size: 11.5px; font-weight: 700;
}
.fm-table tbody td {
  padding: 6px 10px; border: 1px solid #ECF0F6;
  font-size: 12px; vertical-align: middle;
}
.fm-table tbody tr:nth-child(even) td { background: #F5F8FF; }
.fm-table tbody tr:hover td { background: #DBE9F8 !important; }
.fm-code { font-family: 'JetBrains Mono', monospace; color: #1F3F7E; font-weight: 600; }
.fm-empty-cell { text-align: center; color: #7E92AE; padding: 20px !important; }
.odb-subline { display: block; font-size: 10.5px; color: #7E92AE; }
.odb-status {
  display: inline-block; padding: 1px 8px;
  font-size: 10.5px; border-radius: 3px; font-weight: 600;
}
.odb-status--completed { background: #E8F3E0; color: #375623; }
.odb-status--under-review { background: #FCEAD9; color: #B85E1A; }
.odb-status--submitted { background: #E7EEFA; color: #1F3F7E; }
.odb-status--planned { background: #F4F7FC; color: #7E92AE; }
.odb-row-actions {
  display: flex; gap: 6px; font-size: 11px;
}
.odb-row-actions a {
  color: #1F3F7E; text-decoration: none;
  padding: 2px 6px; border: 1px solid #C9D5E6;
  border-radius: 3px; background: #fff;
}
.odb-row-actions a:hover { background: #E7EEFA; }
.odb-bar-row {
  display: grid; grid-template-columns: 220px 1fr 60px;
  gap: 10px; align-items: center;
  padding: 5px 0; border-bottom: 1px solid #ECF0F6;
}
.odb-bar-label strong { display: block; font-size: 12px; color: #142233; }
.odb-bar-label span { display: block; font-size: 10.5px; color: #7E92AE; }
.odb-bar-track {
  position: relative; height: 14px;
  background: #ECF0F6; border-radius: 7px; overflow: hidden;
}
.odb-bar-fill { position: absolute; top: 0; bottom: 0; left: 0; background: #2F5BAA; }
.odb-bar-fill--green { background: rgba(79,143,58,.4); }
.odb-rate { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #16305F; font-weight: 700; text-align: right; }
.odb-month-chart {
  display: flex; align-items: flex-end; justify-content: space-between;
  height: 140px; gap: 6px;
}
.odb-month-col {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 4px;
}
.odb-month-stack {
  flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
  width: 100%; min-height: 0;
}
.odb-month-bar { display: block; width: 100%; }
.odb-month-bar--draw { background: #2F5BAA; }
.odb-month-bar--rev { background: #DC7434; }
.odb-month-col strong { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #16305F; }
.odb-month-col span { font-size: 9px; color: #7E92AE; }
.odb-empty { padding: 30px; text-align: center; color: #7E92AE; font-size: 12px; }

/* ── DrawingControlCenter (drs-* / dm-* / ddp-*) — module view ── */
.dcc-shell { background: #fff; height: 100%; display: flex; flex-direction: column; }
.dcc-body { display: flex; flex: 1; min-height: 0; overflow: hidden; }

/* Left tree (4-tier: POS/MAKER → ALL/B/F/A/M/E → 도면별) */
.dm-tree {
  flex: 0 0 280px; max-width: 280px;
  background: #F7F9FC;
  border-right: 1px solid #C9D5E6;
  overflow-y: auto;
  font-size: 12px;
}
.dm-tree-head {
  padding: 8px 12px;
  background: linear-gradient(180deg, #1F3F7E 0%, #16305F 100%);
  color: #fff;
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
}
.dm-tree-count {
  background: rgba(255,255,255,.18);
  color: #fff; padding: 1px 8px;
  border-radius: 999px; font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
}
.dm-tree-body { padding: 6px 0; }
.dm-tnode { user-select: none; }
.dm-tnode-row {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; cursor: pointer;
  border-left: 2px solid transparent;
  transition: background .1s;
}
.dm-tnode-row:hover { background: #E7EEFA; }
.dm-tnode-row.is-active {
  background: #C5D9F1; border-left-color: #2F5BAA;
  font-weight: 700; color: #16305F;
}
.dm-tnode-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; flex-shrink: 0;
  color: #7E92AE; font-size: 9px;
  transition: transform .15s;
}
.dm-tnode.is-open > .dm-tnode-row > .dm-tnode-arrow { transform: rotate(90deg); }
.dm-tnode-icon { width: 14px; height: 14px; color: #2F5BAA; flex-shrink: 0; }
.dm-tnode-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-tnode-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: #7E92AE;
  background: #ECF0F6; padding: 1px 6px;
  border-radius: 999px;
}
.dm-tnode-children { display: none; padding-left: 14px; border-left: 1px dashed #C9D5E6; margin-left: 14px; }
.dm-tnode.is-open > .dm-tnode-children { display: block; }

/* Tier-3: small drawing buttons (dropdown items) */
.dm-tnode-leaf {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 8px 3px 16px;
  font-size: 11px; color: #44546A;
  cursor: pointer; border-radius: 3px;
  margin: 1px 6px;
  transition: background .1s;
}
.dm-tnode-leaf:hover { background: #DBE9F8; color: #16305F; }
.dm-tnode-leaf.is-active { background: #2F5BAA; color: #fff; font-weight: 700; }
.dm-tnode-leaf-code {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; color: inherit;
}

/* Main grid area */
.dm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.drs-type-bar {
  display: flex; align-items: center;
  padding: 0 14px; gap: 0;
  background: linear-gradient(180deg, #1F3F7E 0%, #16305F 100%);
  border-bottom: 1px solid #0E2148;
  overflow-x: auto; scrollbar-width: none;
}
.drs-type-bar::-webkit-scrollbar { display: none; }
.drs-ttype {
  position: relative;
  padding: 7px 14px 6px;
  border: none; background: transparent;
  font-family: inherit; font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,0.7);
  cursor: pointer; white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.12s;
  display: flex; align-items: center; gap: 5px; flex-shrink: 0;
}
.drs-ttype:hover { color: #fff; background: rgba(255,255,255,0.08); }
.drs-ttype--on {
  color: #fff; border-bottom-color: #70C8FF;
  background: rgba(255,255,255,0.12); font-weight: 600;
}
.drs-ttype-cnt {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 16px; padding: 0 5px;
  border-radius: 8px;
  background: rgba(255,255,255,0.18);
  font-size: 10px; font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.9); font-weight: 700;
}
.drs-ttype--on .drs-ttype-cnt { background: #4472C4; color: #fff; }

.drs-filter-bar {
  display: flex; align-items: center;
  padding: 0 12px; gap: 0; min-height: 32px;
  background: #F0F4FA;
  border-bottom: 1px solid #C9D5E6;
  overflow-x: auto; scrollbar-width: none;
}
.drs-filter-bar::-webkit-scrollbar { display: none; }
.drs-filter-label {
  flex-shrink: 0; margin-right: 8px;
  padding: 3px 8px;
  border: 1px solid #B8CCE4; border-radius: 999px;
  background: #fff; color: #16305F;
  font-size: 11px; font-weight: 700;
}
.drs-ftab {
  padding: 4px 10px; border: none; border-radius: 6px;
  background: transparent;
  font-family: inherit; font-size: 11.5px; font-weight: 650;
  color: #44546A;
  cursor: pointer; white-space: nowrap;
  transition: all 0.12s; flex-shrink: 0;
}
.drs-ftab:hover { color: #2F5BAA; background: #E8EDF5; }
.drs-ftab-cnt {
  margin-left: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: #7E92AE;
}
.drs-ftab--on {
  color: #fff; background: #1F3864; font-weight: 800;
}
.drs-search { margin-left: auto; padding: 0; flex-shrink: 0; }
.drs-search input {
  height: 26px;
  padding: 0 10px 0 26px;
  border: 1px solid #C9D5E6; border-radius: 5px;
  font-family: inherit; font-size: 12px;
  color: #142233;
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238EA8C3' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.867-3.834zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 8px center;
  outline: none; min-width: 170px;
  transition: border-color 0.15s;
}
.drs-search input:focus { border-color: #2F5BAA; }

/* Stats bar (ov-stats — 6 cells) */
.ov-stats { display: flex; background: #fff; border-bottom: 1px solid #C9D5E6; }
.ov-s {
  flex: 1; padding: 8px 14px;
  border-right: 1px solid #C9D5E6;
  display: flex; align-items: center; gap: 10px;
}
.ov-s:last-child { border-right: none; }
.ov-s-n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; font-weight: 700; line-height: 1;
}
.ov-s-l {
  font-size: 10px; color: #7E92AE;
  text-transform: uppercase; letter-spacing: .07em; line-height: 1.3;
}
.ov-s--blue .ov-s-n { color: #2F5BAA; }
.ov-s--orange .ov-s-n { color: #DC7434; }
.ov-s--green .ov-s-n { color: #4F8F3A; }
.ov-s--purple .ov-s-n { color: #5E2C8C; }

/* Main split — table + right detail panel */
.dm-content { flex: 1; display: flex; min-height: 0; }
.dm-table-wrap {
  flex: 1; min-width: 0;
  overflow: auto;
  background: #fff;
}
.dm-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px;
}
.dm-table thead th {
  position: sticky; top: 0; z-index: 5;
  background: linear-gradient(180deg, #4472C4 0%, #2F5BAA 100%);
  color: #fff;
  text-align: left; padding: 7px 10px;
  font-size: 11.5px; font-weight: 700;
  border-right: 1px solid #1F3F7E;
  white-space: nowrap;
  user-select: none;
  position: relative;
}
.dm-table thead th .dm-th-edit {
  display: none;
  margin-left: 6px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  width: 18px; height: 18px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
}
.dm-table thead th .dm-th-edit:hover { background: rgba(255,255,255,.32); }
.dm-table.is-admin thead th .dm-th-edit { display: inline-flex; align-items: center; justify-content: center; }
.dm-table tbody td {
  padding: 5px 10px;
  border-bottom: 1px solid #ECF0F6;
  border-right: 1px solid #ECF0F6;
  font-size: 12px;
}
.dm-table tbody tr { cursor: pointer; transition: background .1s; }
.dm-table tbody tr:nth-child(even) td { background: #FAFCFF; }
.dm-table tbody tr:hover td { background: #DBE9F8; }
.dm-table tbody tr.is-selected td { background: #C5D9F1 !important; }
.dm-mono { font-family: 'JetBrains Mono', monospace; font-weight: 600; color: #1F3F7E; }
.dm-status {
  display: inline-block; padding: 1px 7px;
  font-size: 10.5px; border-radius: 3px; font-weight: 600;
}
.dm-status--NONE { background: #F5F5F5; color: #7E92AE; }
.dm-status--DRAFT { background: #E7EEFA; color: #1F3F7E; }
.dm-status--SUBMITTED { background: #FCEAD9; color: #B85E1A; }
.dm-status--PENDING { background: #FFF4E5; color: #A65C12; }
.dm-status--APPROVED { background: #E8F3E0; color: #375623; }
.dm-status--REJECTED { background: #FBE6E3; color: #C0392B; }

/* Detail panel right (ddp-*) */
.dm-right {
  flex: 0 0 360px; max-width: 360px;
  border-left: 1px solid #C9D5E6;
  background: #fff;
  overflow-y: auto;
}
.dm-right-empty {
  padding: 40px 24px; text-align: center;
  color: #7E92AE; font-size: 12.5px;
  line-height: 1.6;
}
.dm-right-empty .dre-icon {
  width: 48px; height: 48px;
  margin: 0 auto 12px;
  color: #C9D5E6;
}
.dm-right-empty .dre-icon svg { width: 100%; height: 100%; }
.dm-right-empty .dre-title strong { color: #16305F; }
.ddp-head { padding: 12px 14px 8px; border-bottom: 1px solid #C9D5E6; background: #F7F9FC; position: relative; }
.ddp-no {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; color: #16305F; font-weight: 700;
  letter-spacing: 0.04em;
}
.ddp-title { font-size: 12px; color: #142233; line-height: 1.5; margin-top: 4px; }
.ddp-close {
  position: absolute; top: 10px; right: 12px;
  width: 26px; height: 26px;
  background: rgba(255,255,255,.6); border: 1px solid #C9D5E6;
  border-radius: 5px; font-size: 16px; color: #44546A;
  cursor: pointer; padding: 0; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.ddp-close:hover { background: #FBE6E3; color: #C0392B; }
.ddp-meta {
  width: 100%; border-collapse: collapse;
  font-size: 11.5px;
  border-bottom: 1px solid #C9D5E6;
}
.ddp-meta th {
  padding: 5px 8px;
  background: #F0F4FA; color: #44546A;
  font-weight: 600; font-size: 10.5px;
  white-space: nowrap; text-align: left;
  border: 1px solid #C9D5E6;
  width: 70px;
}
.ddp-meta td {
  padding: 5px 8px;
  border: 1px solid #C9D5E6;
  color: #142233; word-break: break-all;
}
.ddp-section { border-bottom: 1px solid #ECF0F6; }
.ddp-section-title {
  padding: 9px 14px 7px;
  font-size: 11px; font-weight: 700;
  color: #16305F;
  background: linear-gradient(180deg, #F7F9FF 0%, #F0F4FA 100%);
  border-bottom: 1px solid #C9D5E6;
  letter-spacing: .02em; text-transform: uppercase;
}
.ddp-pdf-wrap { padding: 8px 12px; }
.ddp-pdf-placeholder {
  padding: 16px 12px;
  font-size: 11.5px; color: #44546A;
  text-align: center;
  background: #F9FAFB;
  line-height: 1.7;
  border: 1px dashed #C9D5E6; border-radius: 5px;
}
.ddp-pdf-actions {
  display: flex; gap: 6px; padding: 8px 12px;
  border-bottom: 1px solid #ECF0F6;
}
.ddp-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #C9D5E6; border-radius: 5px;
  color: #1F3F7E; font-size: 11.5px; font-weight: 700;
  cursor: pointer;
  transition: all .12s;
}
.ddp-btn:hover { background: #E7EEFA; border-color: #2F5BAA; }
.ddp-btn--primary {
  background: linear-gradient(180deg, #2F5BAA 0%, #1F3F7E 100%);
  color: #fff; border-color: #1F3F7E;
}
.ddp-btn--primary:hover {
  background: linear-gradient(180deg, #1F3F7E 0%, #16305F 100%) !important;
  color: #fff;
}
.ddp-btn--green {
  background: linear-gradient(180deg, #4F8F3A 0%, #3F7430 100%);
  color: #fff; border-color: #3F7430;
}
.ddp-btn--green:hover { filter: brightness(1.1); }
.ddp-btn:disabled { opacity: .45; cursor: not-allowed; }

.ddp-rev-list { padding: 6px 0; }
.ddp-rev-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  font-size: 11.5px;
  border-bottom: 1px solid #ECF0F6;
}
.ddp-rev-action {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 24px;
  background: #fff; border: 1px solid #C9D5E6; border-radius: 4px;
  color: #2F5BAA; cursor: pointer;
}
.ddp-rev-action:hover:not(:disabled) { background: #DBE9F8; border-color: #2F5BAA; }
.ddp-rev-action:disabled, .ddp-rev-action.is-locked {
  color: #94a3b8; background: #f8fafc; cursor: not-allowed;
}
.ddp-rev-label {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; color: #1F3F7E;
  min-width: 28px;
}
.ddp-rev-file {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #142233;
}
.ddp-rev-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; color: #7E92AE; white-space: nowrap;
}

/* Status bar */
.dm-statusbar {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 12px;
  background: linear-gradient(180deg, #EDF4FF 0%, #E4EFFC 100%);
  border-top: 1px solid #C9D5E6;
  font-size: 11px; color: #123B78;
  min-height: 24px;
}
.dm-spacer { flex: 1; }

/* Toast host */
.toast-host {
  position: fixed; right: 16px; bottom: 16px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9999;
}
.toast {
  padding: 10px 14px;
  background: #16305F; color: #fff;
  border-radius: 6px;
  font-size: 12.5px;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  min-width: 240px;
  animation: sgw-fadeIn .25s ease;
}
.toast.is-error { background: #C0392B; }
.toast.is-ok { background: #4F8F3A; }

/* Modal */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(15,30,58,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
  animation: sgw-fadeIn .15s ease;
}
.modal-card {
  background: #fff; border-radius: 10px;
  width: min(520px, 92vw);
  max-height: 86vh; overflow: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.modal-head {
  padding: 14px 18px;
  background: linear-gradient(180deg, #1F3F7E 0%, #16305F 100%);
  color: #fff;
  display: flex; justify-content: space-between; align-items: center;
  border-radius: 10px 10px 0 0;
}
.modal-title { font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.modal-close {
  width: 26px; height: 26px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.modal-body { padding: 16px 18px; font-size: 13px; }
.modal-foot {
  padding: 12px 18px;
  display: flex; gap: 8px; justify-content: flex-end;
  border-top: 1px solid #ECF0F6;
}

/* Utility */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(180deg, #2F5BAA 0%, #1F3F7E 100%);
  color: #fff; border: 1px solid #1F3F7E;
  border-radius: 6px; font-weight: 700;
  cursor: pointer; font-size: 12.5px;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: #fff; color: #1F3F7E;
  border: 1px solid #C9D5E6; border-radius: 6px;
  font-weight: 600; font-size: 12.5px; cursor: pointer;
}
.btn-ghost:hover { background: #E7EEFA; }

/* Page transitions */
.view-pane { display: none; }
.view-pane.is-active,
.view-pane.active { display: block; }

/* PDF Viewer modal (workspace.js → openPdfViewer) */
#pdf-modal {
  position: fixed; inset: 0;
  background: rgba(5,14,31,.82);
  z-index: 9000;
  padding: 24px;
  display: none;
}
#pdf-modal[style*="block"], #pdf-modal[style*="display: block"] { display: block; }
#pdf-modal .ddp-pdf-actions {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,.95);
  border-radius: 6px;
  padding: 4px 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  z-index: 9100;
}
#pdf-modal-frame {
  width: 100%; height: 100%;
  background: #fff;
  border: 0; border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}

/* dm-table th sticky edit button + label container */
.dm-table thead th .dm-th-label { display: inline-block; vertical-align: middle; }
.dm-table thead th { position: relative; }

/* dre-icon (right empty placeholder) compatibility for iconify-icon */
.dm-right-empty iconify-icon { font-size: 48px; color: #C9D5E6; display: block; margin: 0 auto 12px; }
.dm-right-empty p { color: #7E92AE; font-size: 12.5px; margin: 0; line-height: 1.6; }

/* fm-shell-page padding */
.fm-shell-page { padding: 16px 20px; overflow: auto; height: 100%; }
.odb-page { display: flex; flex-direction: column; gap: 14px; }
.odb-h { margin: 0 0 8px; font-size: 18px; font-weight: 800; color: #16305F; }
.odb-command-center {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 14px;
  background: #fff;
  border: 1px solid #C9D5E6; border-radius: 8px;
  padding: 14px;
}
.odb-schedule-gauge {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1F3F7E 0%, #4472C4 100%);
  color: #fff; border-radius: 8px; padding: 16px;
}
.odb-schedule-gauge--blue { background: linear-gradient(135deg, #1F3F7E 0%, #4472C4 100%); }
.odb-rate { font-size: 36px; font-weight: 900; line-height: 1; }
.odb-subline { font-size: 11px; opacity: .9; margin-top: 6px; letter-spacing: .04em; text-transform: uppercase; }

/* Toast — sgw-* / pas-* / ws-* 공통 */
.toast-host {
  position: fixed; top: 18px; right: 18px;
  z-index: 9500;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: #1F3F7E; color: #fff;
  padding: 9px 14px; border-radius: 5px;
  font-size: 12.5px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  opacity: 1; transform: translateX(0);
  transition: opacity .2s, transform .2s;
  max-width: 340px;
}
.toast.toast--out { opacity: 0; transform: translateX(20px); }
.toast.toast--warn { background: #B85E1A; }
.toast.toast--error { background: #C0392B; }
.toast--out { opacity: 0; transform: translateX(20px); }

/* Loading fallback for full-page mount */
.boot-loader {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #050e1f; color: #94a3b8; font-size: 12px;
  flex-direction: column; gap: 12px;
}

/* ============================================================
   BOM Excel Viewer  (public/static/bom.js)
   ============================================================ */
.bom-shell {
  display: flex; flex-direction: column;
  height: 100%; min-height: 520px;
  background: #f8fafc;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}
.bom-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
  border-bottom: 1px solid #d8dee9;
}
.bom-tg, .bom-tg-r { display: flex; align-items: center; gap: 6px; }
.bom-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid #cbd5e1; border-radius: 6px;
  background: #fff; color: #1f2937; font-size: 12.5px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.bom-btn iconify-icon { font-size: 16px; }
.bom-btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.bom-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.bom-btn-primary { background: #1F3F7E; color: #fff; border-color: #1F3F7E; }
.bom-btn-primary:hover { background: #2a52a8; border-color: #2a52a8; }
.bom-meta { font-size: 12px; color: #64748b; max-width: 280px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bom-search {
  border: 1px solid #cbd5e1; border-radius: 6px;
  padding: 6px 10px; font-size: 12.5px; width: 200px; outline: none;
}
.bom-search:focus { border-color: #1F3F7E; box-shadow: 0 0 0 2px rgba(31,63,126,.15); }

.bom-tabs {
  display: flex; gap: 2px; padding: 0 12px;
  background: #e2e8f0; border-bottom: 1px solid #d8dee9;
  overflow-x: auto; min-height: 30px;
}
.bom-tab {
  padding: 5px 12px; font-size: 12px; cursor: pointer;
  background: #f1f5f9; color: #475569;
  border: 1px solid #cbd5e1; border-bottom: none;
  border-radius: 4px 4px 0 0;
  white-space: nowrap;
}
.bom-tab--on { background: #fff; color: #1F3F7E; font-weight: 600; }
.bom-tab-cnt {
  display: inline-block; background: #cbd5e1; color: #1f2937;
  font-size: 10px; padding: 1px 5px; border-radius: 8px; margin-left: 4px;
}
.bom-tab--on .bom-tab-cnt { background: #1F3F7E; color: #fff; }

.bom-drop {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px; background: #f8fafc;
  border: 2px dashed #cbd5e1; margin: 12px; border-radius: 10px;
  transition: background .2s, border-color .2s;
}
.bom-drop--over { background: #eff6ff; border-color: #1F3F7E; }
.bom-drop-inner { text-align: center; max-width: 480px; }
.bom-drop-inner h3 { margin: 12px 0 4px; color: #1f2937; font-size: 16px; }
.bom-drop-inner p { color: #64748b; font-size: 12.5px; margin-bottom: 12px; }
.bom-hint { list-style: none; padding: 0; color: #94a3b8; font-size: 11.5px; line-height: 1.7; }

.bom-grid-wrap {
  flex: 1; overflow: auto; background: #fff; margin: 0 12px 12px;
  border: 1px solid #cbd5e1; border-radius: 6px;
}
.bom-grid {
  border-collapse: collapse; font-size: 12px; width: 100%;
  font-family: 'Consolas', 'Menlo', monospace;
}
.bom-grid th, .bom-grid td {
  border: 1px solid #e2e8f0; padding: 4px 8px; text-align: left;
  white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis;
}
.bom-grid thead th {
  position: sticky; top: 0; background: #f1f5f9; color: #1f2937;
  font-weight: 600; cursor: pointer; user-select: none; z-index: 1;
}
.bom-grid thead th:hover { background: #e2e8f0; }
.bom-grid tbody tr:nth-child(even) { background: #fafbfc; }
.bom-grid tbody tr:hover { background: #eff6ff; }
.bom-grid td.bom-cell-num { text-align: right; color: #1F3F7E; }
.bom-grid td.bom-cell-empty { color: #cbd5e1; }
.bom-statusbar {
  padding: 6px 14px; background: #1F3F7E; color: #cbd5e1;
  font-size: 11.5px; border-top: 1px solid #0f1d3c;
}
.bom-statusbar.bom-status--err { background: #C0392B; color: #fff; }

/* ============================================================
   Bulk Drawing Register Modal  (public/static/bulk-register.js)
   ============================================================ */
.bulk-modal {
  position: fixed; inset: 0; z-index: 9000;
}
.bulk-backdrop {
  position: absolute; inset: 0; background: rgba(5,14,31,.65);
  backdrop-filter: blur(2px);
}
.bulk-panel {
  position: absolute; top: 4vh; left: 50%; transform: translateX(-50%);
  width: min(1180px, 96vw); height: 90vh;
  background: #fff; border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  display: flex; flex-direction: column; overflow: hidden;
}
.bulk-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(180deg, #1F3F7E 0%, #173261 100%);
  color: #fff;
}
.bulk-title { display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 600; }
.bulk-title iconify-icon { font-size: 18px; }
.bulk-close {
  background: transparent; border: none; color: #cbd5e1; cursor: pointer;
  font-size: 18px; padding: 4px; border-radius: 4px;
}
.bulk-close:hover { background: rgba(255,255,255,.1); color: #fff; }

.bulk-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; background: #eef2f7;
  border-bottom: 1px solid #d8dee9;
}
.bulk-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid #cbd5e1; border-radius: 6px;
  background: #fff; color: #1f2937; font-size: 12.5px; cursor: pointer;
}
.bulk-btn iconify-icon { font-size: 16px; }
.bulk-btn:hover { background: #f1f5f9; border-color: #94a3b8; }
.bulk-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.bulk-btn-primary { background: #1F3F7E; color: #fff; border-color: #1F3F7E; }
.bulk-btn-primary:hover { background: #2a52a8; }
.bulk-btn-go { background: #15803d; color: #fff; border-color: #15803d; }
.bulk-btn-go:hover { background: #166534; }
.bulk-spacer { flex: 1; }
.bulk-meta { font-size: 12px; color: #475569; }

.bulk-drop {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px;
  margin: 16px; padding: 32px;
  border: 2px dashed #cbd5e1; border-radius: 10px;
  background: #f8fafc; transition: background .2s, border-color .2s;
}
.bulk-drop--over { background: #eff6ff; border-color: #1F3F7E; }
.bulk-drop h3 { margin: 0; color: #1f2937; font-size: 15px; }
.bulk-drop p { margin: 0; color: #64748b; font-size: 12.5px; }

.bulk-grid-wrap {
  flex: 1; overflow: auto; margin: 0 16px 8px;
  border: 1px solid #cbd5e1; border-radius: 6px; background: #fff;
}
.bulk-grid {
  border-collapse: collapse; font-size: 12px; width: 100%;
}
.bulk-grid th, .bulk-grid td {
  border: 1px solid #e2e8f0; padding: 5px 8px; text-align: left;
}
.bulk-grid thead th {
  position: sticky; top: 0; background: #f1f5f9; color: #1f2937;
  font-weight: 600; z-index: 1;
}
.bulk-grid tbody tr:nth-child(even) { background: #fafbfc; }
.bulk-grid tbody tr:hover { background: #eff6ff; }
.bulk-grid td[contenteditable="true"] {
  background: #fffbeb; outline: none; cursor: text;
}
.bulk-grid td[contenteditable="true"]:focus {
  background: #fef3c7; box-shadow: inset 0 0 0 2px #1F3F7E;
}
.bulk-th-no, .bulk-th-act { width: 36px; text-align: center; }
.bulk-row-ready td { }
.bulk-row-uploading { background: #fff7ed !important; }
.bulk-row-done { background: #f0fdf4 !important; }
.bulk-row-fail { background: #fef2f2 !important; }
.bulk-status-cell {
  font-size: 11px; padding: 2px 6px; border-radius: 10px;
  display: inline-block;
}
.bulk-status--ready { background: #e2e8f0; color: #475569; }
.bulk-status--uploading { background: #fdba74; color: #7c2d12; }
.bulk-status--done { background: #86efac; color: #14532d; }
.bulk-status--fail { background: #fca5a5; color: #7f1d1d; }

.bulk-progress {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; background: #f1f5f9; border-top: 1px solid #d8dee9;
}
.bulk-progress-bar {
  flex: 1; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden;
}
.bulk-progress-fill {
  height: 100%; background: linear-gradient(90deg, #1F3F7E, #2a52a8);
  width: 0%; transition: width .25s ease;
}
.bulk-progress-text { font-size: 11.5px; color: #475569; min-width: 60px; text-align: right; }
.bulk-statusbar {
  padding: 6px 16px; background: #1F3F7E; color: #cbd5e1;
  font-size: 11.5px;
}
.bulk-statusbar.bulk-status--err { background: #C0392B; color: #fff; }

/* ezPDF toolbar accent button for bulk register */
.ezp-tbtn--accent {
  background: linear-gradient(180deg, #2a52a8 0%, #1F3F7E 100%) !important;
  color: #fff !important;
}
.ezp-tbtn--accent:hover { background: #2a52a8 !important; }
.ezp-tg-label { font-size: 10.5px; color: #64748b; padding: 0 4px; }

/* ============================================================
   BOM Spreadsheet Pro — Excel-class grid + macros + shortcuts
   ============================================================ */
.bom-shell { outline: none; }
.bom-shell:focus { outline: 2px solid #1F3F7E; outline-offset: -2px; }

/* 메뉴바 (멀티 그룹) */
.bom-menubar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
  border-bottom: 1px solid #d8dee9;
}
.bom-menu-group { display: inline-flex; align-items: center; gap: 2px; }
.bom-menu-sep { width: 1px; height: 28px; background: #cbd5e1; margin: 0 4px; }
.bom-menu-label { font-size: 11px; color: #64748b; padding: 0 8px; font-weight: 600; }
.bom-menu-macro { background: rgba(31, 63, 126, 0.05); border-radius: 6px; padding: 2px 4px; }

.bom-mbtn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border: 1px solid #cbd5e1; border-radius: 5px;
  background: #fff; color: #1f2937; font-size: 12px; cursor: pointer;
  transition: background .12s, border-color .12s;
  position: relative;
}
.bom-mbtn iconify-icon { font-size: 15px; }
.bom-mbtn:hover { background: #f1f5f9; border-color: #94a3b8; }
.bom-mbtn:active { transform: translateY(1px); }
.bom-mbtn:disabled { opacity: 0.4; cursor: not-allowed; }
.bom-mbtn kbd {
  font-size: 9.5px; background: #475569; color: #fff;
  padding: 1px 5px; border-radius: 3px; margin-left: 4px;
  font-family: 'Consolas', monospace;
}
.bom-mbtn-primary { background: #1F3F7E; color: #fff; border-color: #1F3F7E; }
.bom-mbtn-primary:hover { background: #2a52a8; }
.bom-mbtn-macro { background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%); border-color: #f59e0b; }
.bom-mbtn-macro:hover { background: #fde68a; }
.bom-spacer { flex: 1; }

/* 수식바 */
.bom-formula-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; background: #f8fafc; border-bottom: 1px solid #d8dee9;
}
.bom-cellref {
  font-family: 'Consolas', monospace; font-size: 12px;
  background: #fff; border: 1px solid #cbd5e1;
  padding: 3px 8px; border-radius: 4px;
  min-width: 60px; text-align: center; color: #1F3F7E; font-weight: 600;
}
.bom-formula {
  flex: 1; padding: 4px 10px;
  border: 1px solid #cbd5e1; border-radius: 4px;
  font-family: 'Consolas', monospace; font-size: 12px;
}
.bom-formula:focus { border-color: #1F3F7E; outline: 0; box-shadow: 0 0 0 2px rgba(31,63,126,.15); }

/* 그리드 */
.bom-grid-scroll { flex: 1; overflow: auto; background: #fff; margin: 0; border: 1px solid #cbd5e1; }
.bom-grid {
  border-collapse: separate; border-spacing: 0;
  font-size: 12px; font-family: 'Consolas', 'Menlo', monospace;
}
.bom-grid thead th {
  position: sticky; top: 0; z-index: 2;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  color: #1f2937; font-weight: 600;
  border: 1px solid #cbd5e1; padding: 4px 8px;
  cursor: pointer; user-select: none; white-space: nowrap;
  text-align: left; min-width: 80px;
}
.bom-grid thead th:hover { background: #cbd5e1; }
.bom-th-rownum {
  background: #e2e8f0 !important; color: #475569; font-size: 11px;
  width: 42px; text-align: center !important; min-width: 42px !important;
  position: sticky; left: 0; z-index: 3;
}
.bom-th-letter { display: block; font-size: 9px; color: #64748b; font-weight: normal; }
.bom-th-arrow { float: right; color: #1F3F7E; font-size: 10px; }
.bom-grid td {
  border: 1px solid #e2e8f0; padding: 3px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 240px; height: 22px;
}
.bom-grid tbody tr:nth-child(even) td:not(.bom-th-rownum) { background: #fafbfc; }
.bom-grid tbody td.bom-th-rownum { 
  background: #f1f5f9; position: sticky; left: 0; z-index: 1;
  font-weight: 500; color: #64748b;
}
.bom-cell-num { text-align: right; color: #1F3F7E; font-variant-numeric: tabular-nums; }
.bom-cell-empty { color: #cbd5e1; }
.bom-cell--sel { background: rgba(31, 63, 126, 0.15) !important; }
.bom-cell--active {
  outline: 2px solid #1F3F7E; outline-offset: -2px;
  background: rgba(31, 63, 126, 0.25) !important; z-index: 1; position: relative;
}
.bom-cond-pos { background: #dcfce7 !important; color: #14532d; }
.bom-cond-zero { background: #fef9c3 !important; color: #713f12; }
.bom-cond-neg { background: #fee2e2 !important; color: #7f1d1d; }

/* 셀 편집 인풋 */
.bom-edit {
  width: 100%; height: 100%; border: none; outline: 2px solid #1F3F7E;
  padding: 2px 4px; font-family: inherit; font-size: 12px;
  background: #fff;
}

/* 집계 / 모달 */
.bom-modal { position: fixed; inset: 0; z-index: 9100; }
.bom-modal-backdrop { position: absolute; inset: 0; background: rgba(5,14,31,.6); }
.bom-modal-panel {
  position: absolute; top: 12vh; left: 50%; transform: translateX(-50%);
  width: min(560px, 92vw); background: #fff; border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  display: flex; flex-direction: column; max-height: 80vh;
}
.bom-modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: #1F3F7E; color: #fff;
  border-radius: 10px 10px 0 0;
  font-weight: 600;
}
.bom-modal-x {
  background: transparent; border: none; color: #cbd5e1; cursor: pointer;
  font-size: 18px; padding: 2px; border-radius: 4px;
}
.bom-modal-x:hover { background: rgba(255,255,255,.1); }
.bom-modal-body { padding: 14px; overflow: auto; max-height: 60vh; }
.bom-modal-foot { padding: 10px 14px; border-top: 1px solid #e2e8f0; display: flex; gap: 8px; justify-content: flex-end; background: #f8fafc; border-radius: 0 0 10px 10px; }
.bom-modal-note { color: #64748b; font-size: 11.5px; margin-top: 10px; }
.bom-agg { width: 100%; border-collapse: collapse; }
.bom-agg th, .bom-agg td { border: 1px solid #e2e8f0; padding: 6px 10px; font-size: 12px; }
.bom-agg th { background: #f1f5f9; text-align: left; }
.bom-find { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bom-find label { width: 70px; font-size: 12px; color: #475569; }
.bom-find input { flex: 1; padding: 5px 8px; border: 1px solid #cbd5e1; border-radius: 4px; }
.bom-find-opt { font-size: 12px; color: #475569; display: inline-flex; align-items: center; gap: 4px; }
