/* === Base === */
* { font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif; }

body { -webkit-font-smoothing: antialiased; }

/* === Navigation === */
.nav-btn {
  color: #cbd5e1;
}
.nav-btn:hover {
  background-color: rgba(255,255,255,0.06);
  color: #ffffff;
}
.nav-active {
  background-color: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37,99,235,0.4);
}

/* === KPI cards hover === */
.kpi-card { transition: all .2s ease; }
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15,23,42,0.08);
}

/* === Article card === */
.article-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.1rem;
  transition: all .2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.article-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 22px rgba(37,99,235,0.10);
  transform: translateY(-2px);
}
.article-card .card-title {
  font-weight: 600;
  color: #0f172a;
  font-size: .95rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.article-card .card-summary {
  font-size: .8rem;
  color: #64748b;
  line-height: 1.55;
  margin-top: .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === Badges === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-high { background:#fee2e2; color:#b91c1c; }
.badge-medium { background:#fef3c7; color:#b45309; }
.badge-low { background:#dbeafe; color:#1d4ed8; }

.badge-cat { background:#eef2ff; color:#4338ca; }
.badge-status-미검토 { background:#f1f5f9; color:#475569; }
.badge-status-검토중 { background:#fef3c7; color:#b45309; }
.badge-status-검토완료 { background:#d1fae5; color:#065f46; }
.badge-status-보류 { background:#e5e7eb; color:#374151; }
.badge-status-채택 { background:#dcfce7; color:#15803d; }

.badge-maturity { background:#f3e8ff; color:#6b21a8; }

/* === Score bar === */
.score-bar {
  height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.score-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
}
.score-relevance { background: linear-gradient(90deg,#3b82f6,#06b6d4); }
.score-impact { background: linear-gradient(90deg,#10b981,#84cc16); }

/* Priority strip on card */
.priority-strip {
  position:absolute;
  left:0; top:0; bottom:0;
  width: 4px;
}
.strip-High { background:#ef4444; }
.strip-Medium { background:#f59e0b; }
.strip-Low { background:#3b82f6; }

/* Keyword cloud chips */
.keyword-chip {
  display:inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  transition: all .2s;
  cursor: default;
}
.keyword-chip:hover { transform: scale(1.08); }

/* Matrix cell */
#matrix-table th, #matrix-table td {
  padding: 8px 10px;
  text-align: center;
  border: 1px solid #e2e8f0;
}
#matrix-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
  font-size: .75rem;
}
#matrix-table td.matrix-row-header {
  background:#f8fafc;
  font-weight:600;
  text-align:left;
  color:#334155;
  font-size: .8rem;
}
.matrix-cell {
  font-weight: 600;
  border-radius: 4px;
}

/* Modal */
#detail-modal.show, #form-modal.show { display:flex; }

/* Toast */
#toast.show { display:block; animation: toastIn .3s ease; }
@keyframes toastIn { from { opacity:0; transform: translateY(10px);} to {opacity:1; transform:translateY(0);} }

/* Detail modal styles */
.detail-section {
  background: #f8fafc;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 14px;
}
.detail-section h4 {
  font-size: .8rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
