/* AICS FONT: Naver Barun Gothic / NanumBarunGothic preferred */
:root {
  --navy: #0f1b2d;
  --navy-soft: #1b2a41;
  --blue: #2458dc;
  --teal: #0f8f86;
  --bg: #f4f7fb;
  --line: #dfe6ef;
  --text: #182235;
  --muted: #6b778c;
  --card: #ffffff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "NanumBarunGothic", "Nanum Barun Gothic", "Naver Barun Gothic", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.page-shell { min-height: 100vh; display: flex; }
.sidebar {
  width: 270px;
  background: #101827;
  color: #fff;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
  overflow-y: auto;
}
.nav { display: flex; flex-direction: column; gap: 7px; }
.nav a {
  padding: 12px 13px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
}
.nav a:hover,
.nav a.active {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}
.side-box {
  margin-top: 28px;
  padding: 15px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  line-height: 1.5;
  color: #dbeafe;
}
.side-box b { color: #fff; font-size: 13px; }
.main { flex: 1; min-width: 0; padding: 28px; }
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, #1d4ed8, #0f172a);
  color: #fff;
  border-radius: 26px;
  padding: 32px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}
.eyebrow { margin: 0 0 5px; color: #bfdbfe; font-size: 12px; font-weight: 900; letter-spacing: 0; }
h1 { margin: 0; font-size: 34px; letter-spacing: 0; }
.page-head p:not(.eyebrow) { margin: 9px 0 0; color: #dbeafe; line-height: 1.65; }
.page-head .primary-btn { background: #fff; color: var(--blue); }
.primary-btn, .ghost-btn, .filters button { border: 0; border-radius: 10px; padding: 10px 15px; cursor: pointer; font-weight: 800; }
.primary-btn { background: var(--blue); color: #fff; }
.ghost-btn, .filters button { border: 1px solid var(--line); background: #fff; color: #344055; text-decoration: none; }
.disabled { pointer-events: none; opacity: .45; }
.hidden { display: none !important; }
.category-grid { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 13px; margin: 26px 0 18px; }
.category-card { min-height: 118px; padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: #fff; text-align: left; cursor: pointer; box-shadow: 0 8px 22px rgba(20, 39, 70, .05); }
.category-card span { display: block; color: #2d3c55; font-weight: 900; }
.category-card strong { display: block; margin: 8px 0 3px; font-size: 30px; }
.category-card small { color: var(--muted); }
.category-card.active { outline: 3px solid rgba(36, 88, 220, .17); border-color: var(--blue); }
.category-card.web strong { color: #2563eb; }
.category-card.db strong { color: #8b5cf6; }
.category-card.om strong { color: #0f8f86; }
.category-card.adm strong { color: #e26a20; }
.filters { display: grid; grid-template-columns: minmax(260px, 1fr) 190px 190px auto; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.filters input, .filters select { width: 100%; border: 1px solid #ccd6e4; border-radius: 9px; padding: 10px 12px; background: #fff; }
.workspace { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.report-list-panel, .report-detail-panel { border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(20, 39, 70, .05); }
.report-list-panel { overflow: hidden; }
.panel-title { display: flex; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel-title span { color: var(--muted); font-size: 13px; }
.report-list { max-height: calc(100vh - 335px); min-height: 420px; overflow-y: auto; padding: 10px; }
.report-item { width: 100%; padding: 14px; border: 1px solid transparent; border-radius: 13px; background: transparent; text-align: left; cursor: pointer; }
.report-item:hover { background: #f5f8fd; }
.report-item.active { border-color: #aac0f4; background: #edf3ff; }
.report-item .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.report-item .id { color: #53627a; font-size: 12px; font-weight: 800; }
.report-item h3 { margin: 7px 0 6px; font-size: 15px; line-height: 1.45; }
.report-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.report-item + .report-item { margin-top: 5px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 900; }
.badge.critical { background: #fee2e2; color: #b91c1c; }
.badge.high { background: #ffedd5; color: #c2410c; }
.badge.medium { background: #fef3c7; color: #a16207; }
.badge.low { background: #dcfce7; color: #15803d; }
.report-detail-panel { min-height: 650px; padding: 22px; overflow: hidden; }
.detail-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.detail-toolbar h2 { margin: 0; font-size: 23px; }
.detail-toolbar p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-row { display: flex; gap: 7px; flex-wrap: wrap; margin: 16px 0; }
.tag { border-radius: 999px; padding: 5px 9px; background: #edf2f8; color: #526076; font-size: 12px; font-weight: 800; }
.tag.web { background: #dbeafe; color: #1d4ed8; }
.tag.db { background: #ede9fe; color: #6d28d9; }
.tag.om { background: #ccfbf1; color: #0f766e; }
.tag.adm { background: #ffedd5; color: #c2410c; }
.markdown-body { line-height: 1.72; font-size: 15px; overflow-wrap: anywhere; }
.markdown-body h1 { margin: 24px 0 14px; font-size: 29px; }
.markdown-body h2 { margin: 30px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 22px; }
.markdown-body h3 { margin: 23px 0 10px; font-size: 18px; }
.markdown-body p { margin: 10px 0; }
.markdown-body ul, .markdown-body ol { padding-left: 23px; }
.markdown-body li { margin: 6px 0; }
.markdown-body code { border-radius: 5px; padding: 2px 5px; background: #eef2f7; color: #c0264a; }
.markdown-body pre { padding: 16px; border-radius: 13px; background: #101827; color: #e5edf8; overflow-x: auto; }
.markdown-body pre code { background: transparent; color: inherit; padding: 0; }
.markdown-body table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.markdown-body th, .markdown-body td { border: 1px solid #dce4ef; padding: 9px 10px; text-align: left; vertical-align: top; }
.markdown-body th { background: #f1f5f9; }
.markdown-body blockquote { margin: 14px 0; padding: 10px 14px; border-left: 4px solid #91a9d9; background: #f5f8fd; color: #526076; }
.md-editor { width: 100%; min-height: 650px; padding: 17px; border: 1px solid #b9c8dc; border-radius: 12px; resize: vertical; font: 14px/1.65 Consolas, "Noto Sans Mono", monospace; }
.empty { padding: 30px 18px; color: var(--muted); text-align: center; }
footer { display: flex; justify-content: space-between; gap: 15px; margin-top: 18px; color: var(--muted); font-size: 12px; }
@media (max-width: 1150px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .workspace { grid-template-columns: 330px minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .page-shell { display: block; }
  .sidebar { position: relative; width: 100%; height: auto; }
  .main { padding: 18px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .filters, .workspace { grid-template-columns: 1fr; }
  .report-list { max-height: 360px; min-height: 250px; }
}

.tag.related { background: #f8fafc; color: #64748b; border: 1px dashed #b9c5d5; }
.tag.related.web, .tag.related.db, .tag.related.om, .tag.related.adm { background: #f8fafc; color: #64748b; }


/* AICS dual home links */
.aics-dual-home {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 13px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.aics-home-btn {
  min-height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  color: #fff;
  font-weight: 900;
  line-height: 1.05;
}

.aics-home-cs { background: #2458dc; }
.aics-home-new { background: #0f8f86; }
.aics-home-main { font-size: 13px; }
.aics-home-sub { font-size: 12px; opacity: 0.96; }
