/* ── LG ES Pro v3.0 Styles ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --lg-red: #A50034;
  --lg-red-hover: #BE0D3E;
  --bg-main: #F0ECE4;
  --bg-sidebar: #F0ECE4;
  --bg-sidebar-sub: #E8E4DC;
  --bg-elevated: #fff;
  --bg-header: #181c22;
  --text-primary: #212121;
  --text-secondary: #616161;
  --text-light: #f0f2f5;
  --text-muted: #9ca3af;
  --accent-pink: #CC3366;
  --accent-pink-light: #DD829F;
  --accent-pink-bg: #FEEBF1;
  --border: #CCD2D8;
  --green: #16A34A;
  --red: #DC2626;
  --sidebar-w: 260px;
  --topbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-y: scroll; scrollbar-gutter: stable; }
body { font-family: 'Inter', sans-serif; background: var(--bg-main); color: var(--text-primary); min-height: 100vh; scrollbar-gutter: stable; }

/* ── Top Bar ── */
.app-top-bar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  display: flex; z-index: 2000;
}
.gnb-logo {
  width: var(--sidebar-w); background: var(--bg-sidebar); display: flex;
  align-items: center; padding: 0 20px; gap: 10px; border-bottom: 1px solid var(--border);
}
.gnb-logo img { height: 32px; }
.gnb-logo span { font-size: 11px; color: var(--text-secondary); }
.page-header {
  flex: 1; background: var(--bg-header); display: flex; align-items: center;
  justify-content: space-between; padding: 0 28px; color: var(--text-light);
}
.page-header h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.page-header .meta { font-size: 11px; color: #fff; text-align: right; }

/* ── Sidebar ── */
.gnb-sidebar {
  position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
  width: var(--sidebar-w); background: var(--bg-sidebar);
  border-right: 1px solid var(--border); overflow-y: auto;
  display: flex; flex-direction: column;
  z-index: 1500; /* Sidebar above content, below top bar */
}
.gnb-nav { flex: 1; }
.gnb-lv1 {
  width: 100%;
  padding: 15px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  appearance: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background .15s;
  text-align: left;
}
.gnb-lv1:hover { background: var(--accent-pink-bg); }
.gnb-lv1.active { background: var(--lg-red); color: #fff; }
.gnb-lv1:focus-visible {
  outline: 2px solid #1D4ED8;
  outline-offset: 2px;
}

/* ── Sidebar User Area ── */
.gnb-user-area {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg-sidebar-sub);
}
.gnb-user-email {
  font-size: 12px; color: var(--text-secondary); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.gnb-user-logout {
  padding: 5px 12px; background: #F9D5E5; color: #A50034; border: none;
  border-radius: 4px; font-size: 11px; font-weight: 600; cursor: pointer;
  transition: background .15s; white-space: nowrap;
}
.gnb-user-logout:hover { background: #F4BDD4; }

/* ── Main ── */
.app-body { padding-top: var(--topbar-h); padding-left: var(--sidebar-w); }
.app-main { padding: 0; }
.main-content { max-width: 1440px; margin: 0 auto; padding-bottom: 60px; }
.content-section { display: none; }
.content-section.active { display: block; }

/* ── Sub Tab Bar ── */
.sub-tab-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px; background: var(--bg-elevated); border-bottom: 1px solid var(--border);
  position: sticky; top: var(--topbar-h); z-index: 1100;
}
.sub-tabs { display: flex; gap: 0; }
.sub-tab {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-primary);
  transition: .15s;
  appearance: none;
}
.sub-tab:first-child { border-radius: 6px 0 0 6px; }
.sub-tab:last-child { border-radius: 0 6px 6px 0; }
.sub-tab.active { background: var(--lg-red); color: #fff; border-color: var(--lg-red); }
.sub-tab:focus-visible {
  outline: 2px solid #1D4ED8;
  outline-offset: 2px;
  position: relative;
  z-index: 1;
}
.date-selectors { display: flex; gap: 16px; align-items: center; font-size: 12px; }
.date-selectors label { color: var(--text-secondary); font-weight: 500; }
.date-selectors select {
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 12px; background: #fff;
}

/* ── Dashboard Panels ── */
.panel-padding { padding: 24px; }
.summary-body { display: flex; gap: 24px; margin-bottom: 24px; }
.summary-left, .summary-right { flex: 1; background: var(--bg-elevated); border-radius: 8px; padding: 20px; }
.panel-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.panel-note { font-size: 11px; color: var(--text-secondary); margin: 0 0 12px; }
.chart-wrap { position: relative; width: 100%; min-height: 320px; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; }

/* ── Score Analysis Table ── */
.score-analysis-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.score-analysis-table th {
  background: #F3F4F6; padding: 10px 8px; text-align: center; font-weight: 600;
  border-bottom: 2px solid var(--border); font-size: 11px; height: 38px; box-sizing: border-box; vertical-align: middle;
}
.score-analysis-table td { padding: 10px 12px; text-align: center; border-bottom: 1px solid #E5E7EB; }
.score-analysis-table .badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: #1E3A5F;
  color: #fff; font-size: 10px; font-weight: 700; margin-right: 4px; vertical-align: middle;
}

/* ── Filter Card (Region/Country) ── */
.filter-card {
  background: #F8F9FA; border: 1px solid #E5E7EB; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 16px;
}
.filter-row {
  display: flex; align-items: center; gap: 12px; min-height: 32px;
}
.filter-row + .filter-row { margin-top: 8px; }
.filter-label {
  font-size: 11px; font-weight: 700; color: #374151;
  min-width: 64px; text-transform: uppercase; flex-shrink: 0;
}
.filter-placeholder {
  font-size: 12px; color: var(--text-muted); font-style: italic;
}
.summary-filter-selector { margin-bottom: 12px; }

/* ── Table Toolbar (All/Bottom30 + Download) ── */
.table-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}

/* ── Score Summary Section ── */
.score-summary-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.filter-tabs { display: flex; gap: 0; }
.filter-tab {
  padding: 6px 18px; font-size: 12px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border); background: #E5E7EB; color: #333;
}
.filter-tab:first-child { border-radius: 4px 0 0 4px; }
.filter-tab:last-child { border-radius: 0 4px 4px 0; }
.filter-tab.active { background: var(--lg-red); color: #fff; border-color: var(--lg-red); }
.dl-btns { display: flex; gap: 8px; }
.dl-btn {
  padding: 6px 14px; font-size: 11px; border: 1px solid var(--border);
  border-radius: 4px; background: #fff; cursor: pointer; transition: .15s;
}
.dl-btn:hover { background: #f5f5f5; }
.filter-dropdowns { display: flex; gap: 8px; align-items: center; }
.filter-dropdowns select {
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 12px;
}
.btn-download {
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 4px;
  background: #fff; font-size: 11px; color: #374151; cursor: pointer;
  white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn-download:hover { background: #F3F4F6; border-color: #9CA3AF; }

/* ── Table Card Wrapper ── */
.table-card {
  background: #fff; border-radius: 8px; padding: 16px;
  border: 1px solid #E5E7EB;
  overflow: visible !important; /* Restore globally for window sticky headers */
}
.nc-scroll-wrapper {
  overflow-x: auto;
  overflow-y: visible;
}

/* ── Data Table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
#b2cScoreSummaryTable, #b2bScoreSummaryTable {
  table-layout: fixed;
}
#b2cScoreSummaryTable th:nth-child(1), #b2bScoreSummaryTable th:nth-child(1) { width: 8%; }
#b2cScoreSummaryTable th:nth-child(2), #b2bScoreSummaryTable th:nth-child(2) { width: 10%; }
#b2cScoreSummaryTable th:nth-child(3), #b2bScoreSummaryTable th:nth-child(3) { width: 5%; }
#b2cScoreSummaryTable th:nth-child(n+4), #b2bScoreSummaryTable th:nth-child(n+4) { width: auto; }
.data-table th {
  background: #F3F4F6; padding: 10px 8px; text-align: center; font-weight: 600;
  border-bottom: 2px solid var(--border); cursor: pointer; white-space: nowrap;
  font-size: 11px; user-select: none; height: 38px; box-sizing: border-box; vertical-align: middle;
}
.data-table th:hover { background: #E5E7EB; }

.bg-light-gray { background: #F3F4F6 !important; }
.data-table tbody tr:hover td.bg-light-gray { background: var(--accent-pink-bg) !important; }

/* Global Sticky Header for all data tables */
.data-table thead th, .country-table thead th, .sortable-table thead th {
  position: sticky !important;
  top: 121px !important; 
  z-index: 1000 !important;
  background: #F3F4F6 !important;
  box-shadow: inset 0 -2px 0 var(--border);
  border-bottom: 1px solid var(--border) !important;
  vertical-align: middle;
}

/* Sticky Total for Summary Tables */
.row-total td {
  position: sticky !important;
  top: 154px !important; 
  z-index: 90 !important;
  background: #F3F4F6 !important;
  box-shadow: inset 0 1px 0 var(--border), inset 0 -2px 0 var(--border);
  border-bottom: 1px solid var(--border) !important;
}

/* GNB Structure Table Vertical Line (Removed middle line) */
#b2bGSBody td.gs-divider,
#b2bGnbStructure thead th.gs-divider {
  border-left: none !important;
}

.sortable-table th[data-sort] { position: sticky; padding-right: 14px; }

.data-table td {
  padding: 10px 8px; text-align: center; border-bottom: 1px solid #E5E7EB;
  font-variant-numeric: tabular-nums;
}
.data-table td.text-left { text-align: left; }
.data-table tr:hover td { background: var(--accent-pink-bg); }
.data-table .pf-pass { color: var(--green); font-weight: 600; }
.data-table .pf-fail { color: var(--red); font-weight: 600; }
.data-table .status-normal { color: var(--green); }
.data-table .status-fail { color: var(--red); }
.data-table a { color: #2563EB; text-decoration: none; word-break: break-all; }
.data-table a:hover { text-decoration: underline; }
.td-total-score {
  font-weight: 700; color: var(--lg-red); background: #FFF1F2;
}
td.blog-guide-left {
  border-left: 1px solid #9CA3AF !important;
  background: #FAFAFA;
}
td.blog-guide-right {
  border-right: 1px solid #9CA3AF !important;
  background: #FAFAFA;
}
td.gs-link-left {
  border-left: 2px solid #9CA3AF !important;
  font-size: 11px; max-width: 260px; word-break: break-all;
  background: #FAFAFA;
}
td.gs-link-right {
  border-right: 2px solid #9CA3AF !important;
  font-size: 11px; max-width: 260px; word-break: break-all;
  background: #FAFAFA;
}
.gs-pf-header,
.fc-pf-header {
  white-space: nowrap;
}
.gs-pf-header span,
.fc-pf-header span { display: block; margin-bottom: 4px; }
.pf-toggle-group {
  display: inline-flex; border-radius: 4px; overflow: hidden;
  border: 1px solid #D1D5DB; background: #F3F4F6;
}
.pf-toggle-btn {
  font-size: 10px; font-weight: 500; padding: 2px 8px; border: none; background: transparent;
  color: #6B7280; cursor: pointer; transition: all .15s ease; line-height: 1.4;
}
.pf-toggle-btn:not(:last-child) { border-right: 1px solid #D1D5DB; }
.pf-toggle-btn:hover { background: #E5E7EB; color: #374151; }
.pf-toggle-btn.active { background: #A50034; color: #fff; font-weight: 600; }
.color-green { color: var(--green); }
.color-red { color: var(--red); }

.blog-status-table th, .blog-status-table td { padding: 8px 5px; font-size: 11px; }
.blog-status-table th:nth-child(n+4) { min-width: 32px; }
.blog-status-table td:nth-child(3) { max-width: 220px; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.feature-card-table { table-layout: fixed; }
.feature-card-table th:nth-child(1), .feature-card-table td:nth-child(1) { width: 8%; }
.feature-card-table th:nth-child(2), .feature-card-table td:nth-child(2) { width: 9%; }
.feature-card-table th:nth-child(3), .feature-card-table td:nth-child(3) { width: 30%; }
.feature-card-table th:nth-child(4), .feature-card-table td:nth-child(4) { width: 31%; }
.feature-card-table th:nth-child(5), .feature-card-table td:nth-child(5) { width: 10%; }
.feature-card-table th:nth-child(6), .feature-card-table td:nth-child(6) { width: 12%; }
.feature-card-table .fc-url-cell a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.feature-card-table .fc-src-cell {
  font-size: 11px;
  white-space: normal;
  word-break: break-all;
}
.table-more-wrap { display: flex; justify-content: center; margin: 16px 0 24px; }
.btn-view-more, .btn-fold {
  border: 1px solid #D1D5DB; background: #fff; color: #4B5563; font-size: 12px; font-weight: 600;
  cursor: pointer; padding: 8px 24px; border-radius: 20px; transition: all .15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); margin: 0 4px;
}
.btn-view-more:hover, .btn-fold:hover { color: var(--lg-red); border-color: var(--lg-red); background: #FDF2F5; transform: translateY(-1px); }

/* Highlighting */
.bg-highlight-red { background-color: #FEE2E2 !important; }
.data-table tbody tr:hover td.bg-highlight-red { background-color: #FECACA !important; }

.qna-file-custom { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.btn-board-sub { 
  background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 4px; padding: 6px 12px; 
  font-size: 11px; cursor: pointer; color: #374151; font-weight: 600;
}
.btn-board-sub:hover { background: #e5e7eb; }
.qna-file-name { font-size: 11px; color: #6b7280; }
.qna-attachment-link { 
  display: inline-flex; align-items: center; background: #f9fafb; 
  border: 1px solid #e5e7eb; padding: 4px 8px; border-radius: 4px; 
  font-size: 12px; margin-top: 8px; color: var(--lg-red); font-weight: 500;
  text-decoration: none; transition: all 0.2s;
}
.qna-attachment-link::before { content: '📎'; margin-right: 4px; }
.qna-attachment-link:hover { background: #fee2e2; border-color: #fca5a5; }

.nc-table {
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
}
.nc-table .nc-check-col { width: 36px; min-width: 36px; text-align: center; }
.nc-table .nc-check-col input { cursor: pointer; }
.nc-table th:nth-child(2), .nc-table td:nth-child(2) { width: 280px; min-width: 280px; text-align: left; }
.nc-table th:nth-child(3), .nc-table td:nth-child(3) { width: 110px; min-width: 110px; white-space: nowrap; }
.nc-table th:nth-child(4), .nc-table td:nth-child(4) { width: 120px; min-width: 120px; white-space: nowrap; }
.nc-table thead th {
  top: 0 !important; /* Force all headers to start at table top, preventing mid-table floating */
}
.nc-table th:nth-child(1),
.nc-table td:nth-child(1),
.nc-table th:nth-child(2),
.nc-table td:nth-child(2),
.nc-table th:nth-child(3),
.nc-table td:nth-child(3),
.nc-table th:nth-child(4),
.nc-table td:nth-child(4) {
  position: sticky;
  background-clip: padding-box;
}
.nc-table thead {
  position: relative;
  z-index: 1060;
  will-change: transform; /* Support JS sync scroll */
}
.nc-table th:nth-child(1),
.nc-table th:nth-child(2),
.nc-table th:nth-child(3),
.nc-table th:nth-child(4) {
  background: #F3F4F6 !important;
  z-index: 1060 !important;
  top: 0 !important; /* Reset to 0 so JS transform handles the window-scroll sync */
  border-bottom: 1px solid var(--border) !important; /* Lighter standard border */
}
.nc-table td:nth-child(1),
.nc-table td:nth-child(2),
.nc-table td:nth-child(3),
.nc-table td:nth-child(4) {
  background: #fff !important;
  z-index: 4;
  border-bottom: 1px solid #E5E7EB !important; /* Fix missing line under Dam link and others */
}
.nc-table th:nth-child(1), .nc-table td:nth-child(1) { left: 0; }
.nc-table th:nth-child(2), .nc-table td:nth-child(2) { left: 36px; }
.nc-table th:nth-child(3), .nc-table td:nth-child(3) { left: 316px; }
.nc-table th:nth-child(4), .nc-table td:nth-child(4) {
  left: 426px;
}
.nc-table tbody tr:hover td:nth-child(1),
.nc-table tbody tr:hover td:nth-child(2),
.nc-table tbody tr:hover td:nth-child(3),
.nc-table tbody tr:hover td:nth-child(4) {
  background: var(--accent-pink-bg) !important;
}
.nc-table td:first-child { text-align: center; }
.nc-locale-col { min-width: 64px; text-align: center; font-size: 11px; }
.nc-locale-val { font-size: 11px; text-align: center; }
.nc-locale-val.nc-o { color: var(--green); font-weight: 600; }
.nc-locale-val.nc-x { color: var(--red); font-weight: 600; }
.nc-dam-link { font-size: 11px; color: #2563EB; cursor: pointer; text-decoration: underline; }
.nc-dam-link:hover { color: var(--lg-red); }
.nc-title-link { color: var(--text-primary); text-decoration: none; position: relative; }
.nc-title-link:hover { color: var(--lg-red); text-decoration: underline; }
.nc-title-link:hover::after {
  content: attr(title); position: absolute; left: 0; top: 100%;
  background: #1e293b; color: #fff; font-size: 11px; padding: 4px 8px;
  border-radius: 4px; white-space: nowrap; z-index: 100; pointer-events: none;
  max-width: 400px; overflow: hidden; text-overflow: ellipsis;
}
.panel-subtitle { font-size: 14px; font-weight: 700; color: var(--text-primary); margin: 0 0 8px; }

/* ── Score by Country ── */
.score-country-body { display: flex; gap: 20px; }
.score-country-left { min-width: 200px; }
.score-country-right { flex: 1; }

/* ── Score Bottom Row (Chart left + Table right) ── */
.score-bottom-row { display: flex; gap: 24px; margin-top: 8px; align-items: flex-start; }
.score-bottom-left { flex: 1; min-width: 0; background: var(--bg-elevated); border-radius: 8px; padding: 20px; }
.score-bottom-right { flex: 1; min-width: 0; background: var(--bg-elevated); border-radius: 8px; padding: 20px; }

/* ── Region/Country Buttons ── */
.region-btn {
  padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 500;
  cursor: pointer; text-align: center; transition: .15s;
  background: #fff; color: #374151; border: 1px solid var(--border);
}
.region-btn.active { background: #1E293B; color: #fff; font-weight: 700; border-color: #1E293B; }
.region-btn:hover:not(.active) { background: #F3F4F6; }

/* ── KPI Cards ── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.kpi-card {
  padding: 10px 6px; border-radius: 8px; text-align: center; font-size: 11px;
  position: relative;
}
.kpi-card.achieved { background: #E5E7EB; color: var(--text-primary); }
.kpi-card.need-improvement { background: var(--lg-red); color: #fff; }
.kpi-card .kpi-item { font-weight: 700; font-size: 11px; margin-bottom: 2px; }
.kpi-card .kpi-score { font-size: 15px; font-weight: 700; }
.kpi-card .kpi-detail { font-size: 9px; margin-top: 2px; opacity: .8; }
.kpi-legend { display: flex; gap: 16px; justify-content: flex-end; margin-bottom: 12px; font-size: 11px; }
.kpi-legend span::before {
  content: ''; display: inline-block; width: 12px; height: 12px;
  border-radius: 2px; margin-right: 4px; vertical-align: middle;
  border: 1px solid rgba(0,0,0,0.05); /* Added slight border for visibility */
}
.kpi-legend .need::before { background: var(--lg-red); }
.kpi-legend .achieved-l::before { background: #E5E7EB; }

/* ── Country Table (Score by Country) ── */
.country-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 0; background: #fff; }
.country-table th { background: #F3F4F6; padding: 10px 8px; font-size: 11px; height: 38px; box-sizing: border-box; vertical-align: middle; text-align: center; font-weight: 600; border-bottom: 2px solid var(--border); }
.country-table td { padding: 8px 12px; text-align: center; border-bottom: 1px solid #E5E7EB; }
.country-table tr:hover td { background: var(--accent-pink-bg); }
.country-table tr.highlight { background: var(--accent-pink-bg); }

/* ── Loading / Empty ── */
.loading { text-align: center; padding: 60px; color: var(--text-muted); font-size: 14px; }
.empty-state { text-align: center; padding: 60px; color: var(--text-muted); }

/* ── Admin Inline Panel ── */
.gnb-admin-menu { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; }
.admin-panel-inline { padding: 20px; background: #fff; }
.admin-inline-section { margin-bottom: 24px; }

/* ── Sync Status Cards ── */
.sync-status-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.sync-card {
  background: #F8F9FA; border: 1px solid #E5E7EB; border-radius: 8px; padding: 16px; text-align: center;
}
.sync-card .sync-card-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 6px; }
.sync-card .sync-card-value { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.sync-card .sync-card-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.sync-card.ok { border-left: 4px solid var(--green); }
.sync-card.fail { border-left: 4px solid var(--red); }
.sync-card.warn { border-left: 4px solid #F59E0B; }

/* ── Log Tabs ── */
.log-tabs { display: flex; gap: 0; margin-bottom: 16px; }
.log-tab {
  padding: 8px 18px; font-size: 12px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--border); background: #E5E7EB; color: #333;
}
.log-tab:first-child { border-radius: 4px 0 0 4px; }
.log-tab:last-child { border-radius: 0 4px 4px 0; }
.log-tab.active { background: #1E293B; color: #fff; border-color: #1E293B; }

/* ── Method / Level Badges ── */
.badge-method {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px;
  font-weight: 700; letter-spacing: 0.5px; color: #fff;
}
.badge-method.get { background: #3B82F6; }
.badge-method.post { background: #10B981; }
.badge-method.patch { background: #F59E0B; color: #333; }
.badge-method.delete { background: #EF4444; }
.badge-level {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700;
}
.badge-level.warn { background: #FEF3C7; color: #92400E; }
.badge-level.error { background: #FEE2E2; color: #991B1B; }
.badge-level.critical { background: #991B1B; color: #fff; }
.badge-dl-type {
  display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600;
  background: #E0E7FF; color: #3730A3;
}
.badge-status-ok { color: var(--green); font-weight: 600; }
.badge-status-fail { color: var(--red); font-weight: 600; }
.admin-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.admin-toolbar select {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 12px;
}
.admin-activity-toolbar {
  margin-bottom: 10px;
  justify-content: flex-end;
}
.admin-activity-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-activity-right input,
.admin-activity-right select {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  background: #fff;
}
.admin-activity-right input { min-width: 220px; }
.admin-activity-right select { min-width: 140px; }
.admin-activity-table th:first-child,
.admin-activity-table td:first-child {
  width: 34px;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}
.admin-activity-row-check,
#adminActivityCheckAll {
  cursor: pointer;
}
.admin-activity-table th:nth-child(2),
.admin-activity-table td:nth-child(2) { white-space: nowrap; }
.admin-activity-table th:nth-child(4),
.admin-activity-table td:nth-child(4) { min-width: 120px; }
.admin-activity-table th:nth-child(5),
.admin-activity-table td:nth-child(5) { min-width: 320px; }
.admin-activity-summary {
  display: inline-block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}
.admin-activity-view-btn {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
}
.admin-activity-view-btn:hover { background: #F3F4F6; border-color: #9CA3AF; }
.admin-activity-modal { width: 640px; }
.admin-activity-detail-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 14px;
  margin-top: 4px;
}
.admin-activity-detail-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  padding-top: 2px;
}
.admin-activity-detail-value {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  word-break: break-word;
}
.admin-activity-detail-raw {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  background: #F8F9FA;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 12px 14px;
  min-height: 72px;
}
.admin-users-toolbar {
  align-items: flex-start;
  gap: 10px;
}
.admin-users-left,
.admin-users-add-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-users-left input,
.admin-users-add-form input,
.admin-users-add-form select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  background: #fff;
}
.admin-users-left input { min-width: 220px; }
.admin-users-add-form input { min-width: 220px; }
.admin-users-add-form select { min-width: 96px; }
.admin-bulk-card {
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #FAFAFA;
  padding: 16px;
}
.admin-bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-bulk-actions input[type="file"] {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 8px;
  background: #fff;
  font-size: 12px;
}
.admin-bulk-result { margin-top: 12px; }
.admin-bulk-summary {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}
.admin-bulk-errors {
  margin: 0;
  padding-left: 18px;
  color: #B91C1C;
  font-size: 12px;
  line-height: 1.6;
}
.admin-action-btn {
  padding: 7px 16px; background: var(--lg-red); color: #fff; border: none;
  border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.admin-action-btn:hover { background: var(--lg-red-hover); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th {
  background: #F3F4F6; padding: 10px 8px; text-align: left; font-weight: 600;
  border-bottom: 2px solid var(--border); font-size: 11px; white-space: nowrap; height: 38px; box-sizing: border-box; vertical-align: middle;
}
.admin-table td { padding: 10px 12px; border-bottom: 1px solid #E5E7EB; text-align: left; }
.admin-table tr:hover { background: #FAFAFA; }
.admin-table .badge-active {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
  background: #DEF7EC; color: #03543F;
}
.admin-table .badge-pending {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
  background: #FEF3C7; color: #92400E;
}
.admin-table .badge-admin {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
  background: #E0E7FF; color: #3730A3;
}
.admin-table .badge-user {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
  background: #F3F4F6; color: #374151;
}
.admin-table .act-btn {
  padding: 3px 8px; font-size: 11px; border: 1px solid var(--border); border-radius: 4px;
  background: #fff; cursor: pointer; margin-right: 4px; transition: .1s;
}
.admin-table .act-btn:hover { background: #F3F4F6; }
.admin-table .act-btn.danger { color: var(--red); border-color: var(--red); }
.admin-table .act-btn.danger:hover { background: #FEF2F2; }

/* ── Board (Notice / Q&A) ── */
.board-list-wrap, .qna-list-wrap { margin-top: 1rem; }
.board-table .th-num { width: 4rem; text-align: center; }
.board-table .th-title { min-width: 10rem; text-align: left !important; }
.board-table .th-date { width: 6.5rem; text-align: center; }
.board-table .th-author { width: 6rem; text-align: center; }
.board-table .th-status { width: 4rem; text-align: center; }
.board-empty { padding: 1.5rem; text-align: center; color: var(--text-secondary); font-size: 0.875rem; margin: 0; }
.board-detail-wrap { 
  margin-top: 2.5rem; 
  padding: 40px 48px; 
  background: #fff; 
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.04);
  border: 1px solid #F1F3F5;
}
.board-detail-header { 
  display: flex; 
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 2px solid #111;
  padding-bottom: 28px;
  margin-bottom: 32px;
}
.board-detail-title {
  font-size: 24px;
  font-weight: 800;
  color: #111;
  margin: 0;
  line-height: 1.3;
}
.board-detail-date {
  font-size: 14px;
  color: #94A3B8;
  font-weight: 500;
}
.board-detail-body {
  font-size: 16px;
  line-height: 1.8;
  color: #1E293B;
  min-height: 300px;
  margin-bottom: 48px;
  white-space: pre-wrap;
  word-break: break-all;
}
.board-detail-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid #F1F3F5;
}
.board-subtitle { margin: 0 0 0.75rem; font-size: 0.9375rem; font-weight: 600; }
.board-desc { color: var(--text-secondary); font-size: 0.875rem; margin: 0 0 1rem; }
.board-card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.board-form .form-row { margin-bottom: 0.75rem; }
.board-form .form-row label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.25rem; }
.board-form .form-row input,
.board-form .form-row textarea {
  width: 100%; max-width: 480px; padding: 0.5rem 0.65rem;
  border: 1px solid var(--border); border-radius: 6px; font-size: 0.875rem;  background: #fff; color: var(--text-primary);
  font-family: inherit;
}
.board-form .form-row textarea { min-height: 100px; resize: vertical; }
.board-form .form-row input::placeholder,
.board-form .form-row textarea::placeholder {
  font-family: inherit;
  font-size: 0.875rem;
  color: #9CA3AF;
}
.board-error { color: var(--red); font-size: 0.875rem; margin: 0.5rem 0 0; }
.board-success { color: var(--green); font-size: 0.875rem; margin: 0.5rem 0 0; }
.qna-write-wrap { 
  margin-bottom: 3rem; 
  padding: 24px; 
  background: #fdfdfd; 
  border: 1px solid var(--border); 
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.board-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.board-form .form-row.full { grid-column: 1 / -1; }
.board-form .form-row label { display: block; font-size: 11px; font-weight: 700; color: #6B7280; margin-bottom: 6px; text-transform: uppercase; }
.board-form input, .board-form textarea {
  width: 100%; padding: 10px 14px; border: 1px solid #D1D5DB; border-radius: 8px;
  font-size: 14px; background: #fff; transition: border-color .2s;
}
.board-form input:focus, .board-form textarea:focus { border-color: var(--lg-red); outline: none; }
.qna-form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.qna-private-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #4B5563;
  cursor: pointer;
}
.qna-private-mark {
  color: #A50034;
  font-weight: 700;
  font-size: 0.75rem;
}
.qna-status-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.qna-reply-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}
.qna-reply-badge.pending { background: #F3F4F6; color: #6B7280; }
.qna-reply-badge.answered { background: #ECFDF5; color: #059669; }
.qna-admin-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  justify-content: center;
}
.qna-admin-btn {
  border: 1px solid #D1D5DB;
  background: #fff;
  color: #374151;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.qna-admin-btn:hover { background: #F9FAFB; border-color: #9CA3AF; color: var(--lg-red); }
.qna-admin-btn.qna-reply-btn { background: #1E293B; color: #fff; border-color: #1E293B; }
.qna-admin-btn.qna-reply-btn:hover { background: var(--lg-red); border-color: var(--lg-red); color: #fff; }
.qna-admin-btn.danger { color: var(--lg-red); }
.qna-admin-btn.danger:hover { background: var(--lg-red); border-color: var(--lg-red); color: #fff; }

.qna-detail-box {
  padding: 32px;
  background: #FFFFFF;
  border-radius: 12px;
  margin: 16px 24px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.qna-content-section { margin-bottom: 28px; }
.qna-content-label { 
  font-size: 10px; 
  font-weight: 800; 
  color: #94A3B8; 
  margin-bottom: 8px; 
  text-transform: uppercase; 
  letter-spacing: 0.05em;
}
.qna-content-body { font-size: 15px; color: #1E293B; line-height: 1.7; }

.qna-answer-section {
  padding-left: 20px;
  border-left: 3px solid var(--lg-red);
  margin-top: 16px;
  background: #fff;
  padding: 16px 20px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: relative;
}
.qna-answer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.qna-answer-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: var(--lg-red);
  padding: 2px 8px;
  border-radius: 4px;
}
.qna-admin-edit-actions {
  display: flex;
  gap: 8px;
}
.qna-answer-body { font-size: 13px; color: #374151; line-height: 1.6; }
.qna-answer-meta { font-size: 11px; color: #9CA3AF; margin-top: 8px; }

.qna-reply-form-wrap {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed #D1D5DB;
}
.qna-reply-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  min-height: 100px;
  margin-bottom: 12px;
}
.qna-reply-actions { display: flex; justify-content: flex-end; }
.btn-secondary {
  padding: 0.45rem 0.9rem; border-radius: 6px; font-size: 0.8125rem; font-weight: 600;
  cursor: pointer; background: #E5E7EB; color: var(--text-primary); border: 1px solid var(--border);
}
.btn-secondary:hover { background: #D1D5DB; }
.btn-danger {
  background: var(--lg-red); color: #fff; border: 1px solid var(--lg-red);
  padding: 0.45rem 1.2rem; border-radius: 6px; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover { background: var(--lg-red-hover); border-color: var(--lg-red-hover); box-shadow: 0 2px 8px rgba(165,0,52,0.2); }
.notice-modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 1000; align-items: center; justify-content: center;
}
.notice-modal-overlay.show { display: flex; }
.notice-modal {
  background: #fff; border: none; border-radius: 16px;
  padding: 2rem; min-width: 400px; max-width: 90vw; width: 540px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.notice-modal h3 { 
  margin: 0 0 1.5rem; 
  font-size: 1.25rem; 
  font-weight: 800; 
  border-bottom: 1px solid #eee; 
  padding-bottom: 1rem;
}
.notice-modal .form-row { margin-bottom: 0.75rem; }
.notice-modal .form-row label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.25rem; }
.notice-modal .form-row input,
.notice-modal .form-row textarea {
  width: 100%; padding: 0.5rem 0.65rem; border: 1px solid var(--border);
  border-radius: 6px; font-size: 0.875rem; box-sizing: border-box; background: #fff; color: var(--text-primary);
}
.notice-modal .form-row textarea { min-height: 120px; resize: vertical; }
.notice-modal-actions { margin-top: 1rem; display: flex; gap: 0.5rem; justify-content: flex-end; }

/* ── FAQ Accordion ── */
.faq-cat-bar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.faq-cat-btn {
  padding: 6px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--text-secondary); transition: all .15s;
}
.faq-cat-btn:hover { border-color: var(--lg-red); color: var(--lg-red); }
.faq-cat-btn.active { background: var(--lg-red); color: #fff; border-color: var(--lg-red); }

.faq-qa-group { margin-bottom: 24px; }
.faq-group-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary); margin: 0 0 12px;
  padding: 8px 12px; background: #F8F9FA; border: 1px solid var(--border); border-radius: 6px;
}
.faq-qa-item { border-bottom: 1px solid var(--border); }
.faq-qa-item:last-child { border-bottom: none; }
.faq-q {
  display: flex; align-items: center; gap: 8px; padding: 14px 12px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--text-primary); transition: background .15s;
}
.faq-q:hover { background: #F8F9FA; }
.faq-q-label { color: var(--lg-red); font-weight: 700; flex-shrink: 0; }
.faq-toggle { margin-left: auto; font-size: 11px; color: var(--text-secondary); transition: transform .2s; }
.faq-qa-item.open .faq-toggle { transform: rotate(180deg); }

.faq-a {
  display: none; padding: 0 12px 14px 32px; font-size: 13px; line-height: 1.7;
  color: var(--text-secondary);
}
.faq-a-label { color: var(--text-secondary); font-weight: 600; margin-right: 6px; }
.faq-qa-item.open .faq-a { display: block; }
.faq-dict-wrap {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: #FAFAFA;
}
.faq-dict-title {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 10px;
}
.faq-dict-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 8px 10px;
}
.faq-dict-btn {
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  color: #111827;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 10px;
  cursor: pointer;
  transition: all .15s ease;
}
.faq-dict-btn:hover {
  border-color: #9CA3AF;
  background: #F3F4F6;
}

.faq-formula {
  margin: 12px 0;
  padding: 10px 16px;
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  color: var(--lg-red);
  font-size: 14px;
  display: inline-block;
}
.faq-img-wrap { 
  margin: 20px 0; 
  display: flex;
  justify-content: flex-start;
  width: 100%;
}
.faq-img-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 20px; 
  margin: 20px 0;
  width: 100%;
}
.faq-img-grid.gap-sm {
  gap: 15px;
  grid-template-columns: 1fr 1fr;
}
.faq-img-item { 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
  padding: 15px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  width: 100%;
}
.faq-img-item.sm {
  max-width: 650px;
}
.faq-img-item.left {
  margin-left: 0;
  margin-right: auto;
}
.faq-img-label { font-size: 13px; font-weight: 700; color: #475569; }
.faq-img-desc { font-size: 12px; color: #64748b; margin-top: 4px; line-height: 1.4; }
.faq-ui-img { 
  width: 100%;
  max-width: 100%;
  height: 400px;
  object-fit: contain;
  background: #F8FAFC;
  border-radius: 8px; 
  border: 1px solid #EDF2F7;
}
.faq-ui-img-sm {
  height: 280px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  background: #F8FAFC;
  border-radius: 8px;
  border: 1px solid #EDF2F7;
}
.faq-ui-img-process {
  height: 220px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  background: #F8FAFC;
  border-radius: 8px;
  border: 1px solid #EDF2F7;
}

.faq-contact {
  margin-top: 32px; padding: 24px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.faq-contact-title { margin: 0 0 20px; font-size: 16px; font-weight: 800; color: #111; }
.faq-contact-grid { display: flex; flex-direction: column; gap: 16px; }
.faq-contact-item { 
  display: grid; 
  grid-template-columns: 180px 1fr; 
  gap: 12px; 
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f3f5;
}
.faq-contact-item:last-child { border-bottom: none; padding-bottom: 0; }
.faq-contact-label { font-size: 13px; font-weight: 700; color: #64748b; }
.faq-contact-value { font-size: 14px; color: #1e293b; line-height: 1.6; }
.faq-contact-value a { color: var(--lg-red); text-decoration: none; font-weight: 600; }
.faq-contact-value a:hover { text-decoration: underline; }

/* ── Monitoring Item ── */
.mi-panel-toolbar {
  display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px;
}
.mi-panel-toolbar .mi-note { margin-bottom: 0; }
.mi-note p { margin-bottom: 4px; }
.mi-note p:last-child { margin-bottom: 0; }
.mi-tabs { display: flex; gap: 0; }
.mi-tab {
  padding: 10px 28px; font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--text-primary); transition: .15s;
}
.mi-tab:first-child { border-radius: 6px 0 0 6px; }
.mi-tab:last-child { border-radius: 0 6px 6px 0; }
.mi-tab.active { background: var(--lg-red); color: #fff; border-color: var(--lg-red); }
.mi-view-all { font-size: 12px; }
.mi-body { background: #fff; }
.mi-note { font-size: 13px; color: #374151; margin-bottom: 8px; font-weight: 500; }
.mi-seo-guide { font-size: 13px; color: #374151; margin: 0 0 16px 0; padding-left: 0; font-weight: 500; }


.mi-accordion { border: 1px solid #E5E7EB; border-radius: 12px; margin-bottom: 10px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.mi-accordion-header {
  display: flex; align-items: center; padding: 18px 24px; cursor: pointer;
  background: #F8F9FA; transition: background .15s; user-select: none;
}
.mi-accordion-header:hover { background: #F0F1F3; }
.mi-accordion-header.open { background: #EEF0F2; border-bottom: 1px solid #E5E7EB; }
.mi-cat {
  font-size: 11px; font-weight: 700; color: var(--lg-red); text-transform: uppercase;
  min-width: 80px; flex-shrink: 0;
}
.mi-cat.cat-seo { color: #008000; }
.mi-cat.cat-upload { color: #0066cc; }
.mi-cat.cat-gnb { color: #8B4513; }
.mi-title { flex: 1; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.mi-toggle { font-size: 12px; color: var(--text-muted); transition: transform .2s; }
.mi-accordion-header.open .mi-toggle { transform: rotate(180deg); }

.mi-accordion-body {
  display: none; padding: 30px; background: #fff;
}
.mi-accordion-body.open { display: block; }

.mi-seo-note {
  font-size: 12px; color: #2563EB; margin-bottom: 12px; font-style: italic;
}
.mi-detail { display: flex; gap: 30px; align-items: stretch; justify-content: space-between; }
.mi-detail-img { 
  flex: 0 0 30%; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff; border: 1px solid #E5E7EB; border-radius: 10px;
  padding: 20px; gap: 20px;
  position: relative; /* For zoom btn positioning */
}
.mi-detail-img img { 
  width: auto; max-width: 100%; 
  height: auto; 
  object-fit: contain; 
}
.mi-detail-info { flex: 0 0 calc(70% - 30px); min-width: 0; display: flex; flex-direction: column; }

.mi-table { 
  width: 100%; height: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; table-layout: fixed; 
  border: 1px solid #E5E7EB; border-radius: 10px; overflow: hidden; background: #fff;
}
.mi-table th {
  background: #6B7280; color: #fff; padding: 12px; text-align: center;
  font-weight: 600; font-size: 12px;
}
.mi-table.mi-col-3 th:nth-child(1) { width: 33.33%; }
.mi-table.mi-col-3 th:nth-child(2) { width: 16.67%; }
.mi-table.mi-col-3 th:nth-child(3) { width: 50%; }
.mi-table.mi-col-4 th:nth-child(1) { width: 14.28%; }
.mi-table.mi-col-4 th:nth-child(2) { width: 28.57%; }
.mi-table.mi-col-4 th:nth-child(3) { width: 14.28%; }
.mi-table.mi-col-4 th:nth-child(4) { width: 42.87%; }
.mi-table td { padding: 12px; border-bottom: 1px solid #E5E7EB; vertical-align: middle; line-height: 1.6; }
.mi-table tr:last-child td { border-bottom: none; }
.mi-table td.mi-score { text-align: center; font-size: 18px; font-weight: 700; color: var(--text-primary); vertical-align: middle; }
.mi-exception { font-size: 11px; color: #2563EB; margin-top: 10px; line-height: 1.5; }
.mi-sub-note { font-size: 12px; color: #6B7280; line-height: 1.6; margin: 0 0 14px 0; }
.mi-sub-block { margin-bottom: 20px; }
.mi-sub-block:last-child { margin-bottom: 0; }
.mi-sub-label {
  display: inline-block; font-size: 13px; font-weight: 700; color: #7C3AED;
  background: #F3F0FF; padding: 4px 14px; border-radius: 4px; margin-bottom: 10px;
}

.mi-seo-link { color: #2563EB; text-decoration: underline; cursor: pointer; font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .summary-body { flex-direction: column; }
  .score-bottom-row { flex-direction: column; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .mi-detail { flex-direction: column; }
  .mi-detail-img { flex: none; max-width: 100%; }
}

/* Toast notifications */
.toast { position:fixed; bottom:24px; right:24px; padding:12px 20px; border-radius:8px; font-size:13px; color:#fff; z-index:9999; opacity:0; transform:translateY(20px); transition:opacity .3s,transform .3s; max-width:400px; box-shadow:0 4px 12px rgba(0,0,0,.15); }
.toast.show { opacity:1; transform:translateY(0); }
.toast-error { background:#dc2626; }
.toast-info { background:#2563eb; }
.toast-success { background:#16a34a; }

/* Chart Toggles */
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.chart-toggle-group { display: flex; gap: 4px; background: #EEEDEA; padding: 4px; border-radius: 8px; border: 1px solid #D1D5DB; }
.chart-toggle-btn { 
  border: none; background: transparent; padding: 6px 14px; font-size: 12px; font-weight: 600; 
  color: #6B7280; cursor: pointer; border-radius: 6px; transition: all 0.2s;
}
.chart-toggle-btn.active { background: #fff; color: #111827; box-shadow: 0 1px 3px rgba(0,0,0,0.1); border: 1px solid #D1D5DB; }
.chart-toggle-btn:hover:not(.active) { color: #111827; background: rgba(0,0,0,0.03); }

/* ── Image Zoom Modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85);
  z-index: 5000; align-items: center; justify-content: center; cursor: zoom-out;
  backdrop-filter: blur(4px);
}
.modal-overlay.show { display: flex; }
.modal-content-wrap {
  width: 95vw; height: 95vh; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.modal-content-wrap img {
  max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  background: #fff; transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.show img { transform: scale(1); }
.modal-close {
  position: absolute; top: 20px; right: 20px; color: #fff; font-size: 32px;
  cursor: pointer; font-weight: 700; user-select: none;
}
.mi-detail-img img { cursor: zoom-in; transition: transform 0.2s; }
.mi-detail-img img:hover { transform: scale(1.02); }

.mi-zoom-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}
.mi-zoom-btn:hover {
  background: #fff;
  border-color: var(--lg-red);
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.mi-zoom-btn img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: 0.8;
}
.mi-zoom-btn:hover img {
  opacity: 1;
}
