/* =====================================================================
   SupplyScan Admin — Design System
   minjekim-ui branch · Bootstrap 4 / SB Admin 2 기반 · 신규 라이브러리 없음
   ===================================================================== */

/* ── SUIT Variable 폰트 (오프라인 지원) ─────────────────────────────── */
@font-face {
  font-family: 'SUIT';
  src: url('../fonts/SUIT-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── 전역 폰트 오버라이드 ────────────────────────────────────────────── */
body, h1, h2, h3, h4, h5, h6,
.btn, input, select, textarea,
.nav-link, .sidebar-brand-text,
.card, .card-header, .card-body {
  font-family: 'SUIT', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif !important;
}

/* ── 1. Design Tokens (CSS Custom Properties) ─────────────────────── */
:root {
  /* Brand — Navy */
  --color-primary:        #1e40af;   /* Tailwind blue-800 (네이비 베이스) */
  --color-primary-dark:   #1e3a8a;   /* Tailwind blue-900 (hover 시 더 진한 네이비) */
  --color-primary-light:  #dbeafe;   /* Tailwind blue-100 (연한 배경) */
  --color-primary-rgb:    30, 64, 175;

  /* Sidebar */
  --sidebar-bg:           #0f172a;
  --sidebar-brand-bg:     #0a0f1e;
  --sidebar-width:        16rem;
  --sidebar-item-hover:   rgba(255, 255, 255, .06);
  --sidebar-item-active:  rgba(30, 64, 175, .22);
  --sidebar-text:         #94a3b8;
  --sidebar-text-active:  #ffffff;
  --sidebar-section:      #475569;

  /* Surface */
  --color-bg:             #f1f5f9;
  --color-surface:        #ffffff;
  --color-border:         #e2e8f0;
  --color-border-light:   #f1f5f9;

  /* Text */
  --color-text-primary:   #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted:     #94a3b8;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .04);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .10);

  /* Radius */
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   8px;
  --radius-pill: 999px;

  /* Status */
  --color-success:      #16a34a;
  --color-success-bg:   #f0fdf4;
  --color-danger:       #dc2626;
  --color-danger-bg:    #fef2f2;
  --color-warning:      #d97706;
  --color-warning-bg:   #fffbeb;
  --color-info:         #0284c7;
  --color-info-bg:      #e0f2fe;
  --color-neutral-bg:   #f8fafc;
  --color-neutral-text: #64748b;

  /* Severity scale — SupplyScan Design System */
  --sev-critical: #dc2626;   /* CVSS 9.0–10   */
  --sev-high:     #e67e22;   /* CVSS 7.0–8.9  */
  --sev-medium:   #d97706;   /* CVSS 4.0–6.9  */
  --sev-low:      #0284c7;   /* CVSS 0.1–3.9  */
  --sev-unknown:  #94a3b8;   /* unscored      */

  /* Chart categorical palette */
  --chart-1: #1e40af; --chart-2: #7c3aed; --chart-3: #0891b2; --chart-4: #059669;
  --chart-5: #d97706; --chart-6: #dc2626; --chart-7: #db2777; --chart-8: #4f46e5;
}


/* ── 2. Base & Typography ─────────────────────────────────────────── */
body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-size: 0.875rem;
  line-height: 1.6;
}

h1, h2, h3, .h1, .h2, .h3 {
  color: var(--color-text-primary);
  font-weight: 700;
}
h1.h3, .h3 { font-size: 1.15rem; }

/* 페이지 제목 영역 */
header h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 0.15rem !important;
}
header p.mb-4 {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem !important;
}

a { color: var(--color-primary); }
a:hover { color: var(--color-primary-dark); text-decoration: none; }

.container-fluid {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}


/* ── 3. Sidebar ───────────────────────────────────────────────────── */
/* SB Admin 그라디언트 → flat dark */
.bg-gradient-primary {
  background-color: var(--sidebar-bg) !important;
  background-image: none !important;
  background-size: unset;
}

/* 로그인 페이지용 예외 */
.bg-gradient-primary.login {
  background-color: #f6f7fa !important;
  background-image: linear-gradient(180deg, #f6f7fa 10%, #dfe0e3 100%) !important;
  border-right: 1px solid #abbacc;
}

.sidebar {
  width: var(--sidebar-width) !important;
  box-shadow: 2px 0 12px rgba(0, 0, 0, .18);
}

/* Brand area */
.sidebar-brand {
  background-color: var(--sidebar-brand-bg) !important;
  padding: 1.1rem 1rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.sidebar-brand-text {
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.sidebar-brand-icon img { width: 24px; height: auto; opacity: 0.9; }

/* Divider */
.sidebar .sidebar-divider {
  border-top: 1px solid rgba(255, 255, 255, .07);
  margin: 0.5rem 0;
}

/* Section heading label
   — sb-admin-2.css는 .sidebar .sidebar-heading (specificity: 0,2,0)
     이쪽도 동일 specificity, 로드 순서상 style_new.css가 이기므로 동작 */
.sidebar .sidebar-heading {
  color: var(--sidebar-section);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 1rem 0.15rem;
  margin-top: 0.15rem;
}

/* Nav items */
.sidebar-dark .nav-item .nav-link {
  color: var(--sidebar-text);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  margin: 0.22rem 0.5rem;
  width: calc(100% - 1rem);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.sidebar-dark .nav-item .nav-link i {
  opacity: 0.65;
  font-size: 0.82rem;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
  transition: opacity 0.12s ease;
}
.sidebar-dark .nav-item .nav-link:hover {
  background-color: var(--sidebar-item-hover);
  color: #fff;
  text-decoration: none;
}
.sidebar-dark .nav-item .nav-link:hover i { opacity: 1; }

/* Active */
.sidebar-dark .nav-item.active > .nav-link {
  background-color: var(--sidebar-item-active);
  color: var(--sidebar-text-active) !important;
  font-weight: 600;
  border-left: 3px solid var(--color-primary);
  padding-left: calc(0.85rem - 3px);
}
.sidebar-dark .nav-item.active > .nav-link i { opacity: 1 !important; }

/* 레거시 .on 클래스 호환 */
.sidebar-dark .nav-item .nav-link.on { color: #fff !important; }
.sidebar-dark .nav-item .nav-link i.on { opacity: 1 !important; color: #fff !important; }
.sidebar .nav-item .nav-link.on span { font-weight: bold; }

/* Collapse 서브메뉴 */
.sidebar .collapse-inner {
  background: rgba(255, 255, 255, .04) !important;
  border-radius: var(--radius-md);
  margin: 0 0.5rem 0.25rem;
  padding: 0.2rem 0;
}
.sidebar .collapse-header {
  color: var(--sidebar-section) !important;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.45rem 1rem 0.2rem;
}
.sidebar .collapse-item {
  color: var(--sidebar-text) !important;
  font-size: 0.8rem;
  padding: 0.38rem 1rem;
  border-radius: var(--radius-sm);
  transition: background 0.1s;
  display: block;
}
.sidebar .collapse-item:hover {
  background-color: rgba(255, 255, 255, .07) !important;
  color: #fff !important;
  text-decoration: none;
}

/* Collapse 화살표 — FA 아이콘으로 대체 */
.sidebar .nav-item .nav-link[data-toggle=collapse]::after {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f078";
  font-size: 0.58rem;
  margin-left: auto;
  opacity: 0.5;
  transition: transform 0.2s ease;
}
.sidebar .nav-item .nav-link[data-toggle=collapse].collapsed::after {
  content: "\f078";
  transform: none;
}
.sidebar .nav-item .nav-link[data-toggle=collapse]:not(.collapsed)::after {
  transform: rotate(-180deg);
}

/* Sidebar toggle button — 마지막 메뉴 아래 약간의 여백 두고 배치 */
.sidebar > .text-center {
  margin-top: 0.75rem;
}

.sidebar #sidebarToggle {
  background-color: rgba(255, 255, 255, .1);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  margin-bottom: 0.5rem;
  transition: background 0.12s;
}
.sidebar #sidebarToggle:hover { background-color: rgba(255, 255, 255, .18); }
.sidebar #sidebarToggle:after,
.sidebar.toggled #sidebarToggle::after { content: none; }

/* ── 3-a-1-b. content-wrapper flex 기본값 (sb-admin-2.css의 width:100% override) */
/* flex-basis:0%으로 설정해 width:100%를 무력화, 사이드바 옆 남은 공간을 flex-grow로 채움 */
#content-wrapper {
  flex: 1 1 0% !important;
  min-width: 0 !important;
}

/* ── 3-a-2. Collapsed sidebar ────────────────────────────────────── */
/* body.sidebar-toggled: JS 토글 / .sidebar.toggled: 세션 기반 서버 렌더링 */

body.sidebar-toggled .sidebar,
.sidebar.toggled {
  width: 6.5rem !important;
  overflow: visible !important;
}

/* 콘텐츠 영역: flex:1로 남은 공간 전부 차지 */
body.sidebar-toggled #content-wrapper,
.sidebar.toggled ~ #content-wrapper {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  margin-left: 0 !important;
}

/* 브랜드: 아이콘만, 텍스트 숨김 */
body.sidebar-toggled .sidebar .sidebar-brand-text,
.sidebar.toggled .sidebar-brand-text { display: none !important; }

body.sidebar-toggled .sidebar .sidebar-brand,
.sidebar.toggled .sidebar-brand {
  padding: .85rem .5rem !important;
  justify-content: center !important;
}

/* 접힘 시 brand 아래(Dashboard 위) 구분선 제거 — 불필요 */
body.sidebar-toggled .sidebar hr.sidebar-divider.my-0,
.sidebar.toggled hr.sidebar-divider.my-0 { display: none !important; }

/* 섹션 레이블 완전 숨김: 빈 칸 제거 (접힘 시) */
body.sidebar-toggled .sidebar .sidebar-heading,
.sidebar.toggled .sidebar-heading { display: none !important; }

/* 그룹 구분선 여백 확대: 헤딩이 차지하던 높이를 여백으로 전환 → 빈 칸 없이 토글 위치 유지 */
body.sidebar-toggled .sidebar .sidebar-divider,
.sidebar.toggled .sidebar-divider { margin: 1.05rem 0 !important; }

/* 메뉴: 아이콘 중앙 정렬, 텍스트 숨김 */
body.sidebar-toggled .sidebar .nav-item .nav-link,
.sidebar.toggled .nav-item .nav-link {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: .65rem .5rem !important;
  text-align: center;
  position: relative;
  /* 접힌 너비(6.5rem)에 맞춰 자동 조정 — 펼친 상태 calc(100% - 1rem) 상속으로 인한 삐져나옴 방지 */
  width: auto !important;
  box-sizing: border-box !important;
  /* 아이콘 간 세로 간격 균등화 */
  margin: 0.2rem 0.5rem !important;
}
body.sidebar-toggled .sidebar .nav-item .nav-link span,
.sidebar.toggled .nav-item .nav-link span { display: none !important; }

body.sidebar-toggled .sidebar .nav-item .nav-link i,
.sidebar.toggled .nav-item .nav-link i {
  font-size: 1.1rem !important;
  margin: 0 !important;
  width: auto !important;
}

/* active 표시: 접힌 상태에서는 border-left 제거 (overflow:visible 때문에 삐져나옴), 배경색으로만 표시 */
body.sidebar-toggled .sidebar .nav-item.active > .nav-link,
.sidebar.toggled .nav-item.active > .nav-link {
  border-left: none !important;
  padding-left: .5rem !important;
}

/* active 좌측 레일 유지 (.on 클래스 호환) */
body.sidebar-toggled .sidebar .nav-item .nav-link.on,
.sidebar.toggled .nav-item .nav-link.on {
  border-left: none !important;
}

/* 접힌 상태 옆으로 뜨는 서브메뉴 팝업: 불투명 다크 배경으로 가시성 확보 (기본 rgba(255,255,255,.04) 거의 투명) */
body.sidebar-toggled .sidebar .nav-item .collapse .collapse-inner,
.sidebar.toggled .nav-item .collapse .collapse-inner {
  background: #1e293b !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45) !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
}

/* hover 툴팁 */
body.sidebar-toggled .sidebar .nav-item,
.sidebar.toggled .nav-item { position: relative; }

body.sidebar-toggled .sidebar .nav-item .nav-link::after,
.sidebar.toggled .nav-item .nav-link::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: #1e293b;
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  padding: .35em .75em;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
  z-index: 9999;
}
body.sidebar-toggled .sidebar .nav-item:hover .nav-link::after,
.sidebar.toggled .nav-item:hover .nav-link::after { opacity: 1; }


/* ── 3-b. Content area top padding ───────────────────────────────── */
/* 탑바와 본문 사이 여백 */
#content > .container-fluid {
  padding-top: 1.75rem;
}

/* ── 4. Topbar ────────────────────────────────────────────────────── */

/* ── 탑바 다크 스타일 ── */
.navbar.lala {
  background-color: var(--sidebar-bg) !important;  /* #0f172a — 사이드바와 동일 */
  border-bottom: 1px solid rgba(255,255,255,.06) !important;
  box-shadow: 0 1px 8px rgba(0,0,0,.25) !important;
  min-height: 52px;
  padding: 0 1.5rem;
}

/* 탑바 사용자 블록 (이름 + 역할 세로 배치) */
.topbar-user-trigger {
  padding: 0.3rem 0.6rem !important;
  border-radius: var(--radius-md);
  transition: background 0.12s;
}
.topbar-user-trigger:hover {
  background: rgba(255,255,255,.08) !important;
}

.topbar-user-block { text-align: right; line-height: 1.35; }

.topbar-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
}
.topbar-user-role {
  font-size: 0.67rem;
  color: var(--sidebar-text);  /* #94a3b8 */
  font-weight: 400;
}

/* 드롭다운 화살표 색상 (다크 배경에서 흰색) */
.navbar.lala .nav-link.dropdown-toggle::after {
  border-top-color: rgba(255,255,255,.5);
}

/* 모바일 햄버거 */
.navbar.lala #sidebarToggleTop { color: rgba(255,255,255,.7); }

.topbar-divider {
  border-right: 1px solid var(--color-border);
  height: 1.75rem;
  margin: 0 0.75rem;
}

span.lala  { color: var(--color-text-muted) !important; font-size: 0.8rem; }
span.white { color: var(--color-text-secondary) !important; font-size: 0.8rem; }

/* User dropdown trigger */
.navbar .nav-link.dropdown-toggle {
  font-size: 0.82rem;
  color: var(--color-text-secondary) !important;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-md);
  transition: background 0.12s;
}
.navbar .nav-link.dropdown-toggle:hover { background: var(--color-border-light); }

.dropdown-menu {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.4rem;
  font-size: 0.83rem;
  min-width: 160px;
}
.dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  color: var(--color-text-secondary);
  transition: background 0.1s;
}
.dropdown-item:hover {
  background: var(--color-border-light);
  color: var(--color-text-primary);
}


/* ── 5. Modal ─────────────────────────────────────────────────────── */

/* 전체 모달 컨테이너 */
.modal-content {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* 헤더 — 색상 클래스 무관하게 흰 배경으로 통일 */
.modal-header {
  background: var(--color-surface) !important;
  border-bottom: 1px solid var(--color-border);
  padding: 0.9rem 1.25rem;
}
.modal-header .modal-title,
.modal-header h5.modal-title,
.modal-header h6.modal-title,
.modal-header .font-weight-bold {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text-primary) !important;
}

/* bg-primary / bg-danger 등 레거시 컬러 헤더 → 흰색으로 강제 override */
.modal-header[class*="bg-"] {
  background: var(--color-surface) !important;
  color: var(--color-text-primary) !important;
}
.modal-header[class*="bg-"] .modal-title,
.modal-header[class*="bg-"] h5,
.modal-header[class*="bg-"] h6,
.modal-header[class*="bg-"] .font-weight-bold {
  color: var(--color-text-primary) !important;
}

/* 닫기(×) 버튼 통일 */
.modal-header .close {
  color: var(--color-text-muted) !important;
  text-shadow: none;
  opacity: 0.65;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: opacity 0.12s, background 0.12s;
  margin: -0.25rem -0.5rem -0.25rem auto;
}
.modal-header .close:hover {
  opacity: 1;
  background: var(--color-border-light);
  color: var(--color-text-primary) !important;
}
/* Bootstrap 4 기본 ×가 float:right인 경우에도 동작 */
.modal-header .close:focus { outline: none; }

/* 바디 */
.modal-body {
  padding: 1.25rem;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

/* 풋터 */
.modal-footer {
  border-top: 1px solid var(--color-border);
  padding: 0.75rem 1.25rem;
  background: var(--color-surface);
}
.modal-footer .btn + .btn { margin-left: 0.4rem; }

/* ── 모달 내 테이블 — bg-light/table-bordered 완전 override ───────── */
/* 리빌드 없이 즉시 적용: table-bordered/bg-light/table-hover 구식 스타일 교체 */

.modal-body .table,
.modal-body table {
  font-size: 0.83rem;
  border-collapse: collapse;
  width: 100%;
}

/* 헤더 — lala_board와 동일 패턴 */
.modal-body .table thead th,
.modal-body table thead th {
  background: var(--color-neutral-bg) !important;
  color: var(--color-text-muted) !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.85rem;
  border-top: 2px solid var(--color-primary) !important;
  border-bottom: 1px solid var(--color-border) !important;
  border-right: 0 !important;
  border-left: 0 !important;
  white-space: nowrap;
  vertical-align: middle;
}

/* 데이터 행 */
.modal-body .table td,
.modal-body table td {
  padding: 0.55rem 0.85rem;
  vertical-align: middle;
  color: var(--color-text-secondary);
  font-size: 0.83rem;
  border-right: 0 !important;
  border-left: 0 !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--color-border-light) !important;
}

/* hover */
.modal-body .table tbody tr:hover,
.modal-body table tbody tr:hover {
  background: rgba(var(--color-primary-rgb), .04);
}

/* table-bordered 외곽선 제거 */
.modal-body .table-bordered,
.modal-body table.table-bordered {
  border: 0 !important;
}

/* 모달 내 lala_board 헤더/데이터 가운데 정렬 */
.modal-body .lala_board thead th { text-align: center; }
.modal-body .lala_board td      { text-align: center; }

/* 기존 lala_board 참조 유지 */
.modal .table-responsive .table { font-size: 0.83rem; }
.modal .table thead th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: var(--color-neutral-bg);
  border-bottom: 2px solid var(--color-primary);
}


/* ── 6. Cards ─────────────────────────────────────────────────────── */
.card {
  border: 1px solid #edf0f5;
  border-radius: 13px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  background: var(--color-surface);
  transition: box-shadow 0.15s ease;
}
.card:hover { box-shadow: 0 4px 14px rgba(16, 24, 40, .07); }

.card-header {
  background: var(--color-surface);
  border-bottom: 1px solid #eef1f5;
  padding: 0.85rem 1.25rem;
  border-radius: 13px 13px 0 0 !important;
}
.card-header h6 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: 0.01em;
  margin: 0;
}
.card-body { padding: 1.1rem 1.25rem; }

/* Stat 카드 left border */
.border-left-primary   { border-left: 4px solid var(--color-primary) !important; }
.border-left-success   { border-left: 4px solid var(--color-success) !important; }
.border-left-warning   { border-left: 4px solid var(--color-warning) !important; }
.border-left-danger    { border-left: 4px solid var(--color-danger)  !important; }
.border-left-info      { border-left: 4px solid var(--color-info)    !important; }
.border-left-secondary { border-left: 4px solid #94a3b8              !important; }

.stat-card-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.1;
}
.stat-card-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}


/* ── 6. Table (.lala_board) ───────────────────────────────────────── */
.lala_board {
  font-size: 0.82rem;
  border: 0 !important;
  border-collapse: collapse;
  width: 100%;
}
.lala_board thead th {
  background: #ffffff;
  color: #8a94a6;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.005em;
  padding: 0.7rem 0.95rem;
  border-top: 0;
  border-bottom: 1px solid #eef1f5;
  border-right: 0;
  border-left: 0;
  white-space: nowrap;
  vertical-align: middle;
}
.lala_board tbody tr {
  transition: background 0.12s;
}
.lala_board tbody tr:hover {
  background: #f8fafc;
}
.lala_board tbody tr.clickable-row { cursor: pointer; }
.lala_board tbody tr.clickable-row:hover {
  background: #f4f7fb;
}
.lala_board tbody tr:last-child td { border-bottom: 0; }
.lala_board td {
  padding: 0.72rem 0.95rem;
  vertical-align: middle;
  color: #475569;
  font-size: 0.83rem;
  border-right: 0;
  border-left: 0;
  border-top: 0;
  border-bottom: 1px solid #f3f5f8;
}
.lala_board .aleft_txt { text-align: left; }
.lala_board th { border: 0; }
.box_2set.lala_board {
  border: 0;
  border-bottom: 1px solid #eef1f5;
}

/* 테이블 내 이름 셀 */
.lala_board .td-name,
.lala_board .console-name { font-weight: 600; color: #0f172a; }

/* 테이블 내 취약점 인라인 뱃지 */
.badge-vuln-inline {
  display: inline-block;
  margin-left: 6px;
  padding: 0.12em 0.5em;
  font-size: 0.66rem;
  font-weight: 700;
  border-radius: 999px;
  background: #fbf0f0;
  color: #c0504d;
  vertical-align: middle;
}

/* tit_width truncate */
.lala_board td.tit_width p {
  width: 360px; text-overflow: ellipsis;
  overflow: hidden; white-space: nowrap;
  display: inline-block; margin-bottom: 0;
}
.lala_board td.tit_width_2 p {
  width: 200px; text-overflow: ellipsis;
  overflow: hidden; white-space: nowrap;
  display: inline-block; margin-bottom: 0;
}
.lala_board td.tit_width a {
  width: 220px; text-overflow: ellipsis;
  overflow: hidden; white-space: nowrap;
  display: inline-block;
}


/* ── 6-b. Severity text labels (버튼/배지 → 텍스트 컬러만) ─────────── */
/* 기존 badge/btn 방식을 대체. background 없이 텍스트 색상+굵기만 */
.sev-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.sev-critical { color: var(--sev-critical); }
.sev-high     { color: var(--sev-high); }
.sev-medium   { color: var(--sev-medium); }
.sev-low      { color: var(--sev-low); }
.sev-unknown,
.sev-none     { color: var(--sev-unknown); }
.sev-handling { color: var(--color-success); }
.sev-safe     { color: var(--color-success); }
.sev-safe     { color: var(--color-success); }

/* ── 7. Status Badges ─────────────────────────────────────────────── */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
  padding: 0.18em 0.6em;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.5;
}
/* 앞점 (•) */
.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.badge-active   { background: #f0fdf4; color: #16a34a; }
.badge-inactive { background: #f1f5f9; color: #64748b; }
.badge-vuln     { background: #fef2f2; color: #dc2626; }
.badge-safe     { background: #f0fdf4; color: #16a34a; }
.badge-warning  { background: #fffbeb; color: #d97706; }
.badge-critical { background: #fef2f2; color: #dc2626; font-weight: 800; }
.badge-info     { background: #e0f2fe; color: #0284c7; }
.badge-normal   { background: #f0fdf4; color: #16a34a; }
.badge-caution  { background: #fffbeb; color: #d97706; }
.badge-danger   { background: #fef2f2; color: #dc2626; }


/* ── 8. Buttons ───────────────────────────────────────────────────── */

/* Base */
.btn {
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  letter-spacing: 0.02em;
  line-height: 1.4;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-sm {
  padding: 0.28rem 0.75rem;
  font-size: 0.76rem;
  border-radius: 7px;
}

/* ── Primary ── */
.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  box-shadow: 0 4px 10px rgba(var(--color-primary-rgb), .32);
  transform: translateY(-1px);
  color: #fff;
}
.btn-primary:focus { box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .25); }
.btn-primary:disabled, .btn-primary.disabled { background-color: #7fb8d8; border-color: #7fb8d8; }
.btn-primary:not(:disabled):not(.disabled):active { background-color: var(--color-primary-dark); }

/* ── Danger ── */
.btn-danger {
  background-color: var(--color-danger);
  border-color: var(--color-danger);
  color: #fff;
}
.btn-danger:hover:not(:disabled) {
  background-color: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
  box-shadow: 0 4px 10px rgba(220,38,38,.28);
  transform: translateY(-1px);
}

/* ── Secondary — slate 중립 색 (탁한 Bootstrap 회색 대체) ── */
.btn-secondary {
  background-color: #64748b;
  border-color: #64748b;
  color: #fff;
}
.btn-secondary:hover:not(:disabled) {
  background-color: #475569;
  border-color: #475569;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(71,85,105,.28);
}
.btn-secondary:focus { color: #fff; }
.btn-secondary:not(:disabled):not(.disabled):active { background-color: #475569; color: #fff; }

/* ── Success ── */
.btn-success:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(22,163,74,.28); }

/* ── Outline 버튼 — hover 시 꽉 채움 대신 연한 bg로 교체 ── */
.btn-outline-primary {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: transparent;
}
.btn-outline-primary:hover:not(:disabled) {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: none;
  transform: none;
}
.btn-outline-primary:focus { box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .15); }

.btn-outline-secondary {
  color: #64748b;
  border-color: #cbd5e1;
  background: transparent;
}
.btn-outline-secondary:hover:not(:disabled) {
  background: #f1f5f9;
  color: #475569;
  border-color: #94a3b8;
  box-shadow: none;
}

.btn-outline-danger {
  color: var(--color-danger);
  border-color: var(--color-danger);
  background: transparent;
}
.btn-outline-danger:hover:not(:disabled) {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: var(--color-danger);
  box-shadow: none;
  transform: none;
}

.btn-outline-warning {
  color: var(--color-warning);
  border-color: var(--color-warning);
  background: transparent;
}
.btn-outline-warning:hover:not(:disabled) {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border-color: var(--color-warning);
  box-shadow: none;
  transform: none;
}

.btn-outline-info {
  color: var(--color-info);
  border-color: var(--color-info);
  background: transparent;
}
.btn-outline-info:hover:not(:disabled) {
  background: var(--color-info-bg);
  color: var(--color-info);
  border-color: var(--color-info);
  box-shadow: none;
  transform: none;
}

/* ── 검색 버튼 — 텍스트 제거, 돋보기 아이콘만 표시 ─────────────────── */
/* JSP 파일 변경 없이 CSS만으로 모든 search_mi 버튼을 아이콘 전용으로 통일 */
a.search_mi,
button.search_mi {
  background-image: none !important;   /* 기존 bg 이미지 (Q아이콘) 제거 */
  font-size: 0 !important;             /* 텍스트 "검색" 숨김 */
  width: 34px !important;
  min-width: 34px !important;
  height: 30px !important;             /* 높이 고정 (asset/list 아이콘 버튼과 통일) */
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
a.search_mi::after,
button.search_mi::after {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f002";     /* fa-search 돋보기 */
  font-size: 0.82rem;
  color: #fff;
  line-height: 1;
  display: block;
}

/* ── btn_area (폼 하단 버튼 그룹) ── */
.btn_area { text-align: center; padding-top: 0.25rem; }
.btn_area.right_area { text-align: right; }
.btn_area .btn { min-width: 72px; }
.btn_area .btn + .btn { margin-left: 0.5rem; }

/* 레거시 버튼 사이즈 — width 고정 제거, min-width + padding으로 텍스트 짤림 방지 */
.btn_s_l  { min-width: 70px;  height: 30px; padding: 0 10px; font-size: 0.77rem; }
.btn_s_l2 { min-width: 100px; height: 30px; padding: 0 14px; font-size: 0.77rem; }
.btn_s_ss { width: 40px;      height: 30px; padding: 0;       font-size: 0.77rem; }
.btn_s_l.search_mi {
  padding-left: 20px;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  background-image: url(../img/bg_zoom_w.png);
  background-repeat: no-repeat;
  background-size: 14px auto;
  background-position: 18% center;
}

/* lala_btn 레거시 */
.btn-primary.lala_btn  { background-color: #e74a3b; border-color: #e74a3b; }
.lala_btn:hover:not(:disabled)  { background-color: #c0392b; border-color: #c0392b; }
.btn-primary.lala_btn2          { background-color: #64748b; border-color: #64748b; }
.lala_btn2:hover:not(:disabled) { background-color: #475569; border-color: #475569; }
.btn-primary.lala_btn3          { background-color: var(--color-primary); border-color: var(--color-primary); }
.lala_btn3:hover:not(:disabled) { background-color: var(--color-primary-dark); border-color: var(--color-primary-dark); }


/* ── 9. Form & Inputs ─────────────────────────────────────────────── */
.form-control, .custom-select {
  border-color: var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.83rem;
  color: var(--color-text-primary);
  background-color: var(--color-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus, .custom-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .12);
  background-color: var(--color-surface);
}
.form-control-sm {
  background: var(--color-neutral-bg);
  font-size: 0.8rem;
}

/* 커스텀 입력 박스 공통 */
.mem_input_boxbg.set2_bg,
.mem_input_boxbg_nomal.set2_bg,
.mem_input_boxbg_nomal.input_sel.set2_bg {
  color: var(--color-text-secondary);
  padding: .25rem .5rem;
  font-size: .83rem;
  line-height: 1.5;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-neutral-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mem_input_boxbg.set2_bg:focus,
.mem_input_boxbg_nomal.set2_bg:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .12);
  background: var(--color-surface);
  outline: none;
}
.mem_input_boxbg.set2_bg.gray_in { background: #ebecef; }

.full_in { width: 100%; }
.box_2set .mem_input_boxbg.set2_bg.full_in { width: 100%; }
.box_2set .mem_input_boxbg_nomal.full_in    { width: 100%; }

/* textbox4 */
.textbox4 {
  color: var(--color-text-secondary);
  padding: .25rem .5rem;
  font-size: .83rem;
  line-height: 1.5;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-neutral-bg);
}


/* ── 10. Form Layout (.soft_detail / .set2_box) ───────────────────── */
.soft_detail {
  border-top: 2px solid var(--color-primary);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.soft_detail ul {
  width: 50%;
  display: table-cell;
  list-style: none;
  padding: 0;
  vertical-align: top;
}
.soft_detail ul:after { content: ''; display: block; clear: both; height: 0; }
.soft_detail ul li {
  float: left;
  width: 70%;
  display: block;
  padding: 0.6rem 0.85rem;
  font-size: 0.83rem;
  min-height: 48px;
}
.soft_detail ul li:nth-child(2n-1) {
  width: 30%;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--color-neutral-bg);
  display: flex;
  align-items: center;
}
.soft_detail ul li .mem_input_boxbg.set2_bg { width: 100%; float: right; }
.soft_detail ul li.tit_jin:nth-child(2n-1) { background: var(--color-neutral-bg); }
.soft_detail.cell100 ul { width: 100%; }
.soft_detail.cell100 ul li { width: 80%; }
.soft_detail.cell100 ul li:nth-child(2n-1) { width: 20%; }
.soft_detail.cell100.s_detail { border: 1px solid var(--color-border); }

.set2_box {
  border-top: 2px solid var(--color-primary);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.set2_box:after { content: ''; display: block; clear: both; height: 0; }
.set2_box ul { width: 50%; float: left; list-style: none; padding: 0; vertical-align: top; }
.set2_box ul:after { content: ''; display: block; clear: both; height: 0; }
.set2_box ul li {
  float: left;
  width: 70%;
  display: block;
  padding: 0.6rem 0.85rem;
  font-size: 0.83rem;
  min-height: 48px;
}
.set2_box ul li:nth-child(2n-1) {
  width: 30%;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}


/* ── 11. .box_2set (2컬럼 테이블형 폼) ───────────────────────────── */
.membership_box {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.membership_box th, .membership_box td {
  padding: 0.6rem 0.85rem;
  font-size: 0.83rem;
}
.membership_box th {
  width: 20%;
  background: var(--color-neutral-bg);
  text-align: center;
  color: var(--color-text-muted);
  font-weight: 600;
}
.membership_box td { height: 45px; }
.membership_box .mem_input_boxbg_nomal.input_sel.set2_bg,
.membership_box .mem_input_boxbg_nomal,
.mem_input_boxbg { width: 50%; }

.box_2set {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.box_2set th, .box_2set td {
  padding: 0.6rem 0.85rem;
  font-size: 0.83rem;
}
.box_2set th {
  width: 15%;
  background: var(--color-neutral-bg);
  text-align: center;
  color: var(--color-text-muted);
  font-weight: 600;
}
.box_2set th.tit_jin { /* inherit */ }
.box_2set td { width: 30%; }
.box_2set .box_s_font { font-size: 0.75rem; }
.box_2set .mem_input_boxbg_nomal,
.box_2set .mem_input_boxbg.set2_bg {
  color: var(--color-text-secondary);
  padding: .25rem .5rem;
  font-size: .83rem;
  line-height: 1.5;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-neutral-bg);
  width: 85%;
}


/* ── 12. Tab Navigation ───────────────────────────────────────────── */
.tab_area {
  margin-left: 0;
  margin-top: 1.25rem;
  margin-bottom: 0;
}
.tab_area .navi_tab { position: relative; list-style: none; padding: 0; }
.tab_area .navi_tab:after { content: ''; display: block; clear: both; }
.tab_area .navi_tab:before {
  content: '';
  width: 100%;
  left: 0;
  height: 1px;
  background: var(--color-border);
  display: block;
  position: absolute;
  top: 100%;
  margin-top: -1px;
}
.navi_tab li {
  z-index: 99;
  position: relative;
  float: left;
  width: 16%;
  min-height: 100%;
  display: block;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.navi_tab li a {
  display: block;
  width: 100%;
  text-decoration: none;
  color: var(--color-text-muted);
  height: 100%;
  padding: 0.6rem 0.5rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.12s;
}
.navi_tab li a:hover { color: var(--color-primary); text-decoration: none; }
.navi_tab li.on {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-surface);
}
.navi_tab li.on a { color: var(--color-primary); font-weight: 700; }
.navi_tab li.on a:hover { color: var(--color-primary); }
.navi_tab li.on:after {
  content: '';
  width: 100%;
  left: 0;
  height: 3px;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  background: var(--color-primary);
  display: block;
  position: absolute;
  top: 0;
}

/* navi_tab_box 변형 */
.tab_area .navi_tab.navi_tab_box li { width: 20%; }
.tab_area .navi_tab.navi_tab_box:before { display: none; }
.tab_area .navi_tab.navi_tab_box.type2 li {
  width: calc(20% - 2px);
  border-radius: 0;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-right: 2px;
}
.tab_area .navi_tab.navi_tab_box.type2 li:last-child { margin-right: 0; }
.tab_area .navi_tab.navi_tab_box.type2 li.on { background: var(--color-primary); }
.tab_area .navi_tab.navi_tab_box.type2 li.on a { color: #fff; font-weight: 700; }
.tab_area .navi_tab.navi_tab_box.type2 li.on a:hover { color: #fff; }
.tab_area .navi_tab.navi_tab_box.type2 li.on:after { display: none; }
.tab_area .navi_tab.navi_tab_box.type2.w4 li { width: calc(25% - 2px); }

/* page 위치 강조 — .on a 색상은 710-714라인에서 처리 */


/* ── 13. Cursor-Paging Buttons ────────────────────────────────────── */
.page-num-btn {
  border: none !important;
  background: none !important;
  color: var(--color-text-muted) !important;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0 2px;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  transition: all 0.12s ease;
  cursor: pointer;
  line-height: 1.5;
}
.page-num-btn:hover {
  color: var(--color-primary) !important;
  background: var(--color-primary-light) !important;
  text-decoration: none;
}
.page-num-btn.active {
  color: var(--color-primary) !important;
  background: transparent !important;
  font-weight: 800 !important;
  font-size: 0.92rem !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Paging nav 버튼 — substring 매칭으로 모든 prefix 패턴 커버
   (bmBtnGoFirst, cvBtnGoFirst, astCvBtnGoFirst, btnGoFirst 등) */
[id*="BtnGoFirst"], [id*="BtnPrevBlock"],
[id*="BtnNextBlock"], [id*="BtnGoLast"],
#btnGoFirst, #btnPrevBlock,
#btnNextBlock, #btnGoLast {
  border: none;
  background: transparent;
  color: var(--color-primary);
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  transition: background 0.12s ease;
  cursor: pointer;
}
[id*="BtnGoFirst"]:hover, [id*="BtnPrevBlock"]:hover,
[id*="BtnNextBlock"]:hover, [id*="BtnGoLast"]:hover,
#btnGoFirst:hover, #btnPrevBlock:hover,
#btnNextBlock:hover, #btnGoLast:hover {
  background: var(--color-primary-light);
}
[id*="BtnGoFirst"]:disabled, [id*="BtnPrevBlock"]:disabled,
[id*="BtnNextBlock"]:disabled, [id*="BtnGoLast"]:disabled,
#btnGoFirst:disabled, #btnPrevBlock:disabled,
#btnNextBlock:disabled, #btnGoLast:disabled {
  color: var(--color-border) !important;
  cursor: not-allowed;
  background: transparent;
}


/* ── 13-0. Period selector popup ─────────────────────────────────── */

/* 기간 선택 팝업 컨테이너 */
#period-select-popup {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 1rem;
  z-index: 1050;
  width: 280px;
}
#period-select-popup h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 0.75rem;
}

/* 기간 옵션 버튼 */
.period-option {
  font-size: 0.77rem !important;
  padding: 0.28rem 0.7rem !important;
  border-radius: var(--radius-sm) !important;
  background: var(--color-neutral-bg) !important;
  border: 1px solid var(--color-border) !important;
  color: var(--color-text-secondary) !important;
  cursor: pointer !important;
  transition: all 0.12s !important;
  transform: none !important;
  box-shadow: none !important;
}
.period-option:hover:not(.active) {
  background: var(--color-border-light) !important;
  color: var(--color-text-primary) !important;
}
.period-option.active {
  background: var(--color-primary) !important;
  color: #fff !important;
  border-color: var(--color-primary) !important;
}

/* 커스텀 날짜 입력 */
#period-start, #period-end {
  font-size: 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.3rem 0.5rem;
  width: 100%;
  color: var(--color-text-primary);
  background: var(--color-neutral-bg);
}
#apply-custom-period {
  background: var(--color-primary) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  font-size: 0.78rem !important;
  width: 100%;
  padding: 0.38rem !important;
  cursor: pointer !important;
  transition: background 0.12s !important;
  transform: none !important;
  box-shadow: none !important;
}
#apply-custom-period:hover { background: var(--color-primary-dark) !important; }

/* ── 13-a. Modern component additions ────────────────────────────── */

/* 에이전트 카드 — 상태별 top-border */
.agent-card { border-top: 3px solid #94a3b8 !important; }        /* 기본: 회색 */
.agent-card.status-normal  { border-top-color: var(--color-success) !important; }
.agent-card.status-warning { border-top-color: var(--color-danger)  !important; }

/* 에이전트 카드 info row */
.agent-info-row {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  padding: 0.22rem 0;
}
.agent-info-row i { color: var(--color-text-muted); min-width: 18px; }
.agent-info-row .val-primary { color: var(--color-text-primary); font-weight: 600; }
.agent-info-row .val-danger  { color: var(--color-danger); font-weight: 600; }

/* 에이전트 카드 헤더 이름 */
.agent-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* 차트 섹션 토글 */
.chart-toggle-section { transition: all 0.2s ease; }
.chart-collapse-btn {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background 0.12s;
}
.chart-collapse-btn:hover { background: var(--color-border-light); color: var(--color-text-secondary); }

/* segment-control (차트 토글 버튼 그룹) */
.segment-control {
  display: inline-flex;
  background: var(--color-neutral-bg);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--color-border);
}
.segment-control .btn {
  border-radius: 6px !important;
  border: none !important;
  background: transparent !important;
  color: var(--color-text-muted) !important;
  font-size: 0.75rem;
  padding: 0.22rem 0.65rem !important;
  font-weight: 500;
  box-shadow: none !important;
  transform: none !important;
  transition: all 0.12s !important;
}
.segment-control .btn.active {
  background: var(--color-surface) !important;
  color: var(--color-text-primary) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.12) !important;
  font-weight: 600 !important;
  transform: none !important;
}
.segment-control .btn:hover:not(:disabled):not(.active) {
  background: rgba(255,255,255,.5) !important;
  color: var(--color-text-secondary) !important;
  box-shadow: none !important;
  transform: none !important;
}

/* 소프트웨어 명 + 제조사 통합 셀 */
.sw-name { font-weight: 600; color: var(--color-text-primary); font-size: 0.83rem; }
.sw-vendor { font-size: 0.72rem; color: var(--color-text-muted); margin-top: 1px; }

/* 빈 상태 (empty state) */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
}
.empty-state .empty-icon {
  font-size: 2.5rem;
  opacity: 0.25;
  margin-bottom: 0.75rem;
}
.empty-state p { font-size: 0.85rem; margin: 0.25rem 0 0; }

/* 섹션 헤더 (폼 내 소제목) */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--color-primary);
}
.section-title i { color: var(--color-primary); font-size: 0.9rem; }

/* 폼 라벨 색상 — text-primary 대신 muted 계열 */
.soft_detail ul li:nth-child(2n-1),
.set2_box ul li:nth-child(2n-1) {
  color: var(--color-text-muted) !important;
}

/* 폼 버튼 우측 정렬 */
.btn_area.text-right { text-align: right !important; }

/* ── 13-b. policy_list.jsp pl-btn* 패턴 (pl-btnGoFirst 등 소문자 b) ── */
[id^="pl-btn"] {
  border: none;
  background: transparent;
  color: var(--color-primary);
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  transition: background 0.12s ease;
  cursor: pointer;
}
[id^="pl-btn"]:hover  { background: var(--color-primary-light); }
[id^="pl-btn"]:disabled {
  color: var(--color-border) !important;
  cursor: not-allowed;
  background: transparent;
}

/* pl-clickable-row (policy_list.jsp) */
.pl-clickable-row { cursor: pointer; }
.pl-clickable-row:hover { background-color: rgba(28, 143, 202, .07) !important; }

/* .page-nav-btn (software_list.jsp 모달 페이징) */
.page-nav-btn {
  border: none !important;
  background: transparent !important;
  color: var(--color-primary) !important;
  font-weight: 700 !important;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity 0.15s;
}
.page-nav-btn:hover:not(:disabled) { opacity: 0.7; }
.page-nav-btn:disabled {
  color: var(--color-border) !important;
  cursor: not-allowed;
}

/* ── 13-c. Modern List Page 전용 ─────────────────────────────────── */

/* 테이블 툴바 (card-header 안) */
.list-toolbar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0.55rem 1.1rem;
  gap: 0.5rem;
}
/* 툴바 내 검색 영역 요소 간격 — select, input, button 붙음 방지 */
.list-toolbar .d-flex > select,
.list-toolbar .d-flex > input,
.list-toolbar .d-flex > a,
.list-toolbar .d-flex > button { margin-right: 6px; }
.list-toolbar .d-flex > *:last-child { margin-right: 0; }
.list-toolbar .form-control,
.list-toolbar .form-control-sm {
  height: 30px;
  font-size: 0.8rem;
  border-radius: var(--radius-md);
}

/* 카드 하단 페이징 footer */
.card-footer.list-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
}

/* 자산이름 등 테이블 내 primary link */
.table-link {
  color: var(--color-text-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.12s;
}
.table-link:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* IP / MAC 등 monospace 컬럼 */
.text-mono {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.77rem;
  letter-spacing: -0.01em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* 테이블 내 날짜 */
.text-date {
  font-size: 0.77rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* 테이블 내 번호 */
.td-no {
  color: var(--color-text-muted);
  font-size: 0.77rem;
  text-align: center;
  white-space: nowrap;
  width: 48px;
}

/* 테이블 내 상태/배지 셀 — 항상 가운데 정렬 */
.td-status, .td-badge {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

/* 테이블 내 숫자 셀 */
.td-num {
  text-align: right;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 테이블 내 코드성 텍스트 (유형, 구분 등) — 소형 uppercase */
.td-code {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* 긴 텍스트 컬럼 — 최대 폭 지정 후 ellipsis */
.td-name-truncate {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 심각도 텍스트 셀 — 가운데 정렬 */
.lala_board td:has(.sev-label),
.td-sev { text-align: center; }

/* 풀폭 테이블 (card-header + table + card-footer 패턴) */
.card > .table-responsive > .table.lala_board {
  margin-bottom: 0;
}
.card > .table-responsive > .table.lala_board td:first-child,
.card > .table-responsive > .table.lala_board th:first-child {
  padding-left: 1.1rem;
}
.card > .table-responsive > .table.lala_board td:last-child,
.card > .table-responsive > .table.lala_board th:last-child {
  padding-right: 1.1rem;
}

/* 테이블 빈 상태 */
.table-empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.table-empty-state .empty-title {
  color: var(--color-text-primary);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.table-empty-state .empty-desc {
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

/* Software management tables */
.software-list-table tbody tr.software-row {
  cursor: pointer;
}

.software-list-table tbody tr.software-row:hover .sw-row-action {
  color: var(--color-primary);
  opacity: 1;
  transform: translateX(2px);
}

.software-list-table .sw-main-cell {
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
}

.sw-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 0.75rem;
}

.sw-name-row .sw-name {
  min-width: 0;
  max-width: 560px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sw-row-action {
  color: var(--color-text-muted);
  flex: 0 0 auto;
  font-size: 0.8rem;
  opacity: 0.65;
  transition: color 0.12s ease, opacity 0.12s ease, transform 0.12s ease;
}

.sw-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin-top: 0.25rem;
  color: var(--color-text-muted);
  font-size: 0.76rem;
}

.sw-meta-row span {
  position: relative;
  line-height: 1.35;
}

.sw-meta-row span + span::before {
  content: "";
  position: absolute;
  left: -0.38rem;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-border);
  transform: translateY(-50%);
}

.sw-meta-row .sw-vendor {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.software-version-table .td-version {
  text-align: left;
}

.software-version-table .td-num,
.software-version-table .td-action {
  text-align: center;
  white-space: nowrap;
}

.sw-count-chip {
  display: inline-flex;
  align-items: center;
  min-width: 42px;
  justify-content: center;
  border-radius: 999px;
  background: var(--color-neutral-bg);
  color: var(--color-text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
}

.software-detail-table th,
.software-detail-table td {
  text-align: left;
}

.software-detail-table .td-sev,
.software-detail-table .td-agent,
.software-detail-table .td-code {
  text-align: center;
}

.software-detail-table .td-name-truncate {
  max-width: 180px;
}

/* Console-style data tables */
.console-table tbody tr.console-row {
  cursor: pointer;
}

.console-table tbody tr.console-row:hover .console-row-action {
  color: var(--color-primary);
  opacity: 1;
  transform: translateX(2px);
}

.console-main-cell {
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
}

.console-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 0.75rem;
}

.console-name-row .console-name {
  min-width: 0;
  max-width: 560px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console-row-action {
  color: var(--color-text-muted);
  flex: 0 0 auto;
  font-size: 0.8rem;
  opacity: 0.65;
  transition: color 0.12s ease, opacity 0.12s ease, transform 0.12s ease;
}

.console-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin-top: 0.25rem;
  color: var(--color-text-muted);
  font-size: 0.76rem;
}

.console-meta-row span {
  position: relative;
  line-height: 1.35;
}

.console-meta-row span + span::before {
  content: "";
  position: absolute;
  left: -0.38rem;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-border);
  transform: translateY(-50%);
}

.console-chip {
  display: inline-flex;
  align-items: center;
  min-width: 42px;
  justify-content: center;
  border-radius: 999px;
  background: var(--color-neutral-bg);
  color: var(--color-text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  white-space: nowrap;
}

/* ── 14. DataTables / Search area ────────────────────────────────── */
div.dataTables_wrapper div.table_right { float: right; }
div.dataTables_wrapper div.dataTables_filter {
  text-align: right;
  margin-left: 0.5em;
  float: left;
  margin-bottom: .5rem;
}
div.dataTables_wrapper div.dataTables_filter.mi_input input {
  margin-left: 0;
  display: inline-block;
  width: auto;
}
div.dataTables_wrapper div.dataTables_filter.datapick {
  margin-right: 0.3em;
  margin-left: 0;
}

div.table_set { width: 100%; text-align: right; }

.custom-select.select_ss {
  width: 75px;
  background-image: url(../img/view_arrow.png);
  background-repeat: no-repeat;
  background-size: 10px auto;
  background-position: 90% center;
}
.custom-select.select_ss option { background: var(--color-surface); }

.mr_9 { margin-right: 9px; }


/* ── 15. Datepicker ───────────────────────────────────────────────── */
.domFixed {
  position: fixed; width: 100%; height: 100%;
  overflow: hidden; -webkit-overflow-scrolling: touch;
}
.date_pick { position: relative; }
.date_pick input {
  width: 1px; height: 1px;
  border: 0; padding: 0; margin: 0;
  position: absolute; left: 0; top: 0;
  background: #eee;
}
.date_pick h4 {
  display: block; width: 100%;
  line-height: 20px; margin-bottom: 0;
  font-size: 13px; padding-left: 20px;
  text-align: left;
}
.date_range.scan { width: 85%; }
.date_range.scan.w100 { width: 100%; }
.date_range.scan .date_pick {
  width: 100%;
  color: var(--color-text-secondary);
  padding: .25rem .5rem;
  font-size: .83rem;
  line-height: 1.5;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-neutral-bg);
}
.date_range.scan .date_pick:last-child { margin-left: 0; }
.date_range.scan .date_pick h4 { padding-left: 0; }


/* ── 16. Bootstrap pagination override ───────────────────────────── */
.page-item.active .page-link {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}


/* ── 17. Login page ───────────────────────────────────────────────── */
.lala_logo { color: #fff; padding-top: 10px; }
.login_top_area {
  background-color: var(--sidebar-bg) !important;
  border-bottom: 4px solid var(--color-primary);
  box-shadow: 0 2px 4px rgba(0,0,0,.15) !important;
  height: 50px;
}


/* ── 18. Misc / Utilities ─────────────────────────────────────────── */
.clearfix_30 { display: block; margin-bottom: 1.5rem; }
.clearfix_50 { display: block; margin-bottom: 2.5rem; }
.line_red { border: 1px solid red; }
.clickable-row { cursor: pointer; }
.text-truncate-cell {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

/* Loading animation */
@keyframes spinCircle {
  from { transform: translate(-50%, -50%) rotate(0); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes spinY {
  from { transform: translate(-50%, -50%) rotateY(0); }
  to   { transform: translate(-50%, -50%) rotateY(360deg); }
}

/* Scroll to top */
.scroll-to-top {
  background: var(--color-primary);
  border-radius: 50%;
}


/* ── 19. Sidebar icon overrides (레거시 이미지 아이콘) ─────────────── */
.fa-laugh-wink.mi_logo { content: url("../img/logo_metsa.png"); margin-left: -7px; }
.fa-laugh-wink.mi_logo::before { content: url("../img/logo_metsa.png"); }
.rotate-n-0   { transform: rotate(0deg); }
.rotate-n-180 { transform: rotateY(180deg); }
.sidebar .sidebar-brand .sidebar-brand-text.brand_hana { text-align: left; }


/* ── 20. Responsive ───────────────────────────────────────────────── */
@media (min-width: 768px) {
  .sidebar { width: var(--sidebar-width) !important; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-6.new_box { flex: 0 0 50%; max-width: 33.2%; }
  div.table_set { width: 100%; text-align: right; }
}

@media (min-width: 1310px) {
  .col-md-6 { flex: 0 0 50%; max-width: 25%; }
  .col-md-6.new_box { flex: 0 0 50%; max-width: 33.2%; }
  div.table_set { width: 75%; text-align: right; }
}

@media only screen and (max-width: 1130px) {
  .navi_tab li { width: 20%; }
  .navi_tab.box_w_4 li { width: 25%; }
  .tab_area .navi_tab:before { display: none; }
  .tab_area .navi_tab.navi_tab_box:before { display: none; }
}

@media only screen and (max-width: 1040px) {
  .soft_detail ul, .set2_box ul { width: 100%; display: block; }
  .box_2set .mem_input_boxbg_nomal,
  .box_2set .mem_input_boxbg.set2_bg { width: 100%; }
  .date_range.scan { width: 100%; }
}

@media only screen and (max-width: 1000px) {
  .tab_area .navi_tab li { min-height: 70px; }
}

@media only screen and (max-width: 900px) {
  .soft_detail ul li, .set2_box ul li {
    width: 100%; padding: 5px; min-height: 100%;
  }
  .soft_detail.cell100.s_detail ul li { width: 100%; }
}

@media only screen and (max-width: 650px) {
  .tab_area .navi_tab li { min-height: 94px; }
}
