/* ============================================
   OCIO 금융시장 동향 대시보드
   미래에셋자산운용 투자플랫폼사업본부
   ============================================ */

:root {
  /* 미래에셋 브랜드 컬러 */
  --ma-orange: #F37321;
  --ma-orange-light: #F9A825;
  --ma-orange-dark: #E55B00;
  --ma-blue: #003B7B;
  --ma-blue-light: #0D5BA6;
  --ma-blue-dark: #002856;
  --ma-navy: #1A2332;

  /* UI 컬러 */
  --bg-primary: #F5F7FA;
  --bg-card: #FFFFFF;
  --bg-dark: #1A2332;
  --text-primary: #2C3E50;
  --text-secondary: #7F8C8D;
  --text-light: #BDC3C7;
  --border: #E8ECF0;
  --shadow: 0 2px 12px rgba(0, 59, 123, 0.08);
  --shadow-hover: 0 4px 20px rgba(0, 59, 123, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* ============================================
   Header
   ============================================ */
.header {
  background: linear-gradient(135deg, var(--ma-blue-dark) 0%, var(--ma-blue) 60%, var(--ma-blue-light) 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 24px rgba(0, 40, 86, 0.35);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 36px;
}

.header-brand {
  display: flex;
  align-items: center;
}

/* 미래에셋자산운용 CI */
.header-ci {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ci-main-row {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.ci-text-mirae {
  font-family: 'Georgia', 'Times New Roman', 'Noto Serif', serif;
  font-size: 30px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2px;
  line-height: 1;
  text-decoration: underline;
  text-decoration-thickness: 2.5px;
  text-underline-offset: 4px;
}

.ci-swoosh {
  width: 16px;
  height: 28px;
  flex-shrink: 0;
  margin-bottom: 2px;
  margin-left: 2px;
}

.ci-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 1px;
}

.ci-text-korean {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 1px;
}

.ci-divider {
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
  font-weight: 300;
}

.ci-text-dept {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-date {
  font-size: 14px;
  opacity: 0.9;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.header-actions {
  display: flex;
  gap: 10px;
}

.btn-header {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-header:hover {
  background: rgba(255, 255, 255, 0.25);
}

.btn-header.primary {
  background: var(--ma-orange);
  border-color: var(--ma-orange);
}

.btn-header.primary:hover {
  background: var(--ma-orange-dark);
}

/* ============================================
   Tab Navigation
   ============================================ */
.tab-nav {
  display: flex;
  gap: 0;
  background: rgba(0, 0, 0, 0.15);
  padding: 0 32px;
}

.tab-btn {
  padding: 12px 24px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: white;
  border-bottom-color: var(--ma-orange);
  background: rgba(255, 255, 255, 0.08);
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 32px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================================
   핵심 기사 하이라이트 섹션
   ============================================ */
.highlights-section {
  margin-bottom: 28px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ma-blue);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .icon {
  color: var(--ma-orange);
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.highlight-card {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--ma-orange);
  transition: all 0.2s;
  cursor: pointer;
}

.highlight-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.highlight-card .card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.highlight-card .card-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--ma-orange), var(--ma-orange-light));
  color: white;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.highlight-card .card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.highlight-card .card-summary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.highlight-card .card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-light);
}

/* OCIO 사업연관성 배지 (상/중/하) */
.relevance-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.relevance-badge.grade-상 { background: #e8f5e9; color: #2e7d32; }
.relevance-badge.grade-중 { background: #fff8e1; color: #e65100; }
.relevance-badge.grade-하 { background: #f5f5f5; color: #9e9e9e; }

.relevance-mini {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  margin-right: 6px;
  flex-shrink: 0;
  vertical-align: middle;
}

.relevance-mini.grade-상 { background: #2e7d32; color: white; }
.relevance-mini.grade-중 { background: #e65100; color: white; }
.relevance-mini.grade-하 { background: #bdbdbd; color: white; }

/* OCIO 사업연관성 범례 */
.relevance-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-light);
  padding: 6px 12px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.relevance-legend-title {
  font-weight: 700;
  color: var(--text-secondary);
  margin-right: 4px;
}

.relevance-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.relevance-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.relevance-legend-dot.dot-상 { background: #2e7d32; }
.relevance-legend-dot.dot-중 { background: #e65100; }
.relevance-legend-dot.dot-하 { background: #bdbdbd; }

@media (max-width: 1024px) {
  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .highlights-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   뉴스 카테고리 섹션
   ============================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.news-category {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.category-header {
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.category-header.ocio { background: linear-gradient(135deg, #E3F2FD, #BBDEFB); color: var(--ma-blue-dark); }
.category-header.mirae { background: linear-gradient(135deg, #FFF3E0, #FFE0B2); color: var(--ma-orange-dark); }
.category-header.pension { background: linear-gradient(135deg, #E8F5E9, #C8E6C9); color: #2E7D32; }
.category-header.competitor { background: linear-gradient(135deg, #F3E5F5, #E1BEE7); color: #6A1B9A; }
.category-header.govt { background: linear-gradient(135deg, #ECEFF1, #CFD8DC); color: #37474F; }
.category-header.nps { background: linear-gradient(135deg, #E0F7FA, #B2EBF2); color: #006064; }
.category-header.alt { background: linear-gradient(135deg, #FBE9E7, #FFCCBC); color: #BF360C; }
.category-header.realestate { background: linear-gradient(135deg, #F1F8E9, #DCEDC8); color: #33691E; }
.category-header.infra { background: linear-gradient(135deg, #E8EAF6, #C5CAE9); color: #283593; }

/* 카테고리 키워드 태그 (편집 가능) */
.cat-keywords {
  padding: 6px 10px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  font-size: 11px;
}

.cat-kw-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 11px;
  color: var(--text-secondary);
  transition: border-color 0.15s;
}

.cat-kw-tag:hover {
  border-color: var(--ma-blue-light);
}

.cat-kw-tag .kw-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: none;
  background: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 10px;
  border-radius: 50%;
  padding: 0;
  line-height: 1;
  opacity: 0.5;
  transition: all 0.15s;
}

.cat-kw-tag .kw-remove:hover {
  opacity: 1;
  background: #fee;
  color: #c00;
}

.cat-kw-add {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.cat-kw-add input {
  width: 80px;
  padding: 2px 6px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 11px;
  background: white;
  outline: none;
  transition: border-color 0.15s, width 0.15s;
}

.cat-kw-add input:focus {
  border-color: var(--ma-blue-light);
  width: 120px;
}

.cat-kw-add input::placeholder {
  color: var(--text-light);
}

.cat-kw-add button {
  padding: 2px 8px;
  border: 1px solid var(--ma-blue-light);
  border-radius: 10px;
  background: var(--ma-blue);
  color: white;
  font-size: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.cat-kw-add button:hover {
  background: var(--ma-blue-dark, #1a3a6e);
}

/* 키워드 관리 탭 - 카테고리별 */
.kw-category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kw-cat-item {
  padding: 12px 14px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.kw-cat-item-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.kw-cat-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.news-list {
  list-style: none;
  max-height: 360px;
  overflow-y: auto;
}

.news-list::-webkit-scrollbar {
  width: 4px;
}

.news-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.news-item {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: pointer;
}

.news-item:last-child {
  border-bottom: none;
}

.news-item:hover {
  background: var(--bg-primary);
}

.news-item .title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 4px;
  color: var(--text-primary);
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.news-item .title a {
  color: inherit;
  text-decoration: none;
}

.news-item .title a:hover {
  color: var(--ma-blue);
}

.news-item .meta {
  font-size: 11px;
  color: var(--text-light);
  display: flex;
  gap: 12px;
}

.news-item .source {
  color: var(--ma-blue-light);
  font-weight: 500;
}

/* ============================================
   AI 요약 섹션
   ============================================ */
/* ============================================
   TradingView 위젯
   ============================================ */
.tradingview-ticker-wrap {
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--ma-orange);
}

.tradingview-ticker-wrap .tradingview-widget-container {
  height: 50px;
}

.tradingview-overview-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.tradingview-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tv-widget-box {
  height: 200px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fafbfc;
}

.tv-widget-box .tradingview-widget-container {
  width: 100%;
  height: 100%;
}

@media (max-width: 1200px) {
  .tradingview-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .tradingview-overview-grid {
    grid-template-columns: 1fr;
  }
  .tv-widget-box {
    height: 170px;
  }
}

/* ============================================
   마켓 브리핑 (5꼭지)
   ============================================ */
.market-briefing {
  background: linear-gradient(135deg, #0a1628 0%, #162544 50%, #1a3260 100%);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 20, 60, 0.25);
  padding: 20px 24px;
  margin-bottom: 24px;
  color: #e8edf5;
}

.market-briefing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.market-briefing-header .section-title {
  color: white;
  font-size: 16px;
}

.market-briefing-header .ai-badge {
  background: linear-gradient(135deg, var(--ma-orange), var(--ma-orange-light));
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.briefing-timestamp {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

.market-briefing-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.briefing-topic {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  align-items: flex-start;
}

.briefing-topic:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.briefing-topic:first-child {
  padding-top: 0;
}

.briefing-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  margin-top: 2px;
}

.briefing-tag.geo { background: rgba(239, 83, 80, 0.2); color: #ef9a9a; border: 1px solid rgba(239, 83, 80, 0.3); }
.briefing-tag.rate { background: rgba(66, 165, 245, 0.2); color: #90caf9; border: 1px solid rgba(66, 165, 245, 0.3); }
.briefing-tag.stock { background: rgba(102, 187, 106, 0.2); color: #a5d6a7; border: 1px solid rgba(102, 187, 106, 0.3); }
.briefing-tag.commodity { background: rgba(255, 183, 77, 0.2); color: #ffe082; border: 1px solid rgba(255, 183, 77, 0.3); }
.briefing-tag.tech { background: rgba(171, 71, 188, 0.2); color: #ce93d8; border: 1px solid rgba(171, 71, 188, 0.3); }
.briefing-tag.policy { background: rgba(77, 182, 172, 0.2); color: #80cbc4; border: 1px solid rgba(77, 182, 172, 0.3); }
.briefing-tag.realestate { background: rgba(141, 110, 99, 0.2); color: #bcaaa4; border: 1px solid rgba(141, 110, 99, 0.3); }

.briefing-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.briefing-headline {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.briefing-summary {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255,255,255,0.65);
}

.briefing-sources {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.briefing-source-link {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  padding: 1px 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s;
}

.briefing-source-link:hover {
  color: rgba(255,255,255,0.8);
}

.briefing-source-link::before {
  content: '\203A ';
  margin-right: 4px;
}

.briefing-source-meta {
  color: rgba(255,255,255,0.3);
  font-size: 10px;
  margin-left: 6px;
}

.briefing-empty {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255,255,255,0.5);
  font-size: 14px;
}

@media (max-width: 768px) {
  .briefing-topic {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .market-briefing {
    padding: 20px 16px;
  }
}

.ai-summary {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
}

.ai-summary-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.ai-badge {
  background: linear-gradient(135deg, var(--ma-blue), var(--ma-blue-light));
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.ai-summary-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
}

.ai-summary-content ul {
  padding-left: 20px;
  margin-top: 8px;
}

.ai-summary-content li {
  margin-bottom: 6px;
}

/* ============================================
   공고/입찰 섹션
   ============================================ */
.bidding-section {
  margin-bottom: 28px;
}

.bidding-grid-large {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.bidding-card-large {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.bidding-card-header-lg {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--ma-blue-dark), var(--ma-blue));
  color: white;
}

.bid-logo-img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: contain;
  background: white;
  padding: 6px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.bid-org-name {
  font-size: 20px;
  font-weight: 800;
}

.bid-org-desc {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 2px;
}

.bid-site-btn {
  margin-left: auto;
  padding: 10px 20px;
  background: var(--ma-orange);
  color: white;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s;
}

.bid-site-btn:hover {
  background: var(--ma-orange-dark);
}

.bid-search-info {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
}

.bid-search-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bid-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bid-kw-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ma-blue);
}

.bid-notice {
  padding: 16px 28px;
  background: var(--bg-primary);
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}

.bidding-list {
  list-style: none;
  max-height: 400px;
  overflow-y: auto;
}

.bidding-item {
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.bidding-item:hover {
  background: var(--bg-primary);
}

.bidding-item .bid-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  flex: 1;
}

.bidding-item .bid-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.bidding-item .bid-title a:hover {
  color: var(--ma-blue);
}

.bidding-item .bid-date {
  font-size: 11px;
  color: var(--text-light);
  white-space: nowrap;
}

.bid-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.bid-status.open { background: #E8F5E9; color: #2E7D32; }
.bid-status.closed { background: #FFEBEE; color: #C62828; }
.bid-status.upcoming { background: #FFF8E1; color: #F57F17; }

/* ============================================
   정부 보도자료 섹션
   ============================================ */
.govt-section {
  margin-bottom: 28px;
}

/* 기관 사이트 카드 그리드 (큰 카드) */
.govt-site-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.govt-site-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  text-decoration: none;
  color: var(--text-primary);
  border-left: 5px solid;
  transition: all 0.2s;
  min-height: 160px;
}

.govt-site-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.govt-site-card.fss { border-left-color: #1565C0; }
.govt-site-card.fsc { border-left-color: #2E7D32; }
.govt-site-card.mohw { border-left-color: #7B1FA2; }
.govt-site-card.moel { border-left-color: #E65100; }

.govt-logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.govt-logo-img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: contain;
  background: white;
  padding: 4px;
  border: 1px solid var(--border);
}

.govt-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.govt-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.govt-link-arrow {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ma-blue);
}

.govt-site-card:hover .govt-link-arrow {
  color: var(--ma-orange);
}

/* 검색 결과 */
.govt-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.govt-result-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.govt-result-header {
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 2px solid;
}

.govt-result-header.fss { border-color: #1565C0; color: #1565C0; }
.govt-result-header.fsc { border-color: #2E7D32; color: #2E7D32; }
.govt-result-header.mohw { border-color: #7B1FA2; color: #7B1FA2; }
.govt-result-header.moel { border-color: #E65100; color: #E65100; }

/* ============================================
   Loading & Status
   ============================================ */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-secondary);
  gap: 12px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--ma-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.last-updated {
  font-size: 12px;
  color: var(--text-light);
  text-align: right;
  margin-top: 12px;
}

/* ============================================
   Settings Modal
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: white;
  border-radius: var(--radius);
  width: 90%;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 16px;
  color: var(--ma-blue);
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--ma-blue);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--ma-orange);
  color: white;
}

.btn-primary:hover {
  background: var(--ma-orange-dark);
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* ============================================
   키워드 관리 섹션
   ============================================ */
.keyword-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
}

.keyword-section {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.keyword-section-header {
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--ma-blue-dark), var(--ma-blue));
  color: white;
}

.keyword-section-header h4 {
  font-size: 14px;
  font-weight: 700;
}

.keyword-defaults {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex: 1;
}

.keyword-defaults .kw-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: block;
}

.keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  margin: 3px 4px 3px 0;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

.keyword-tag.default {
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: default;
  position: relative;
}

.keyword-tag.custom {
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
  color: var(--ma-orange-dark);
  border: 1px solid #FFE0B2;
}

.keyword-tag.custom {
  cursor: default;
  position: relative;
}

.keyword-tag .kw-text {
  cursor: pointer;
}

.keyword-tag .kw-text:hover {
  text-decoration: underline dotted;
}

.keyword-tag .remove-btn {
  background: rgba(229, 57, 53, 0.1);
  border: none;
  cursor: pointer;
  color: #E53935;
  font-size: 13px;
  font-weight: 700;
  padding: 1px 5px;
  line-height: 1;
  border-radius: 50%;
  margin-left: 2px;
  transition: all 0.15s;
}

.keyword-tag .remove-btn:hover {
  color: white;
  background: #E53935;
}

.keyword-custom-area {
  padding: 14px 18px;
}

.keyword-custom-area h5 {
  font-size: 12px;
  font-weight: 600;
  color: var(--ma-orange);
  margin-bottom: 8px;
}

.keyword-tag-list {
  min-height: 30px;
  margin-bottom: 10px;
}

.keyword-add-form {
  display: flex;
  gap: 8px;
}

.keyword-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: border-color 0.2s;
}

.keyword-input:focus {
  outline: none;
  border-color: var(--ma-orange);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12px;
}

/* ============================================
   KCMI 리포트 섹션
   ============================================ */
.kcmi-reports-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.kcmi-report-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--ma-blue);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.kcmi-report-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.report-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kcmi-report-card .report-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--ma-blue), var(--ma-blue-light));
  color: white;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.kcmi-report-card .report-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.kcmi-report-card .report-date {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.kcmi-report-card .report-category {
  font-size: 11px;
  color: var(--ma-blue-light);
  font-weight: 500;
}

.kcmi-report-card .report-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.kcmi-report-card .report-title a {
  color: inherit;
  text-decoration: none;
}

.kcmi-report-card .report-title a:hover {
  color: var(--ma-blue);
  text-decoration: underline;
}

.kcmi-report-card .report-author {
  font-size: 13px;
  color: var(--ma-blue-light);
  font-weight: 500;
  margin-bottom: 10px;
}

.kcmi-report-card .report-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.report-hashtag {
  display: inline-block;
  padding: 3px 8px;
  background: #E3F2FD;
  color: var(--ma-blue);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.kcmi-report-card .report-summary {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.report-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.report-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ma-blue);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}

.report-btn:hover {
  background: var(--ma-blue);
  color: white;
  border-color: var(--ma-blue);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
  }

  .tab-nav {
    padding: 0 12px;
    overflow-x: auto;
  }

  .main-content {
    padding: 16px;
  }

  .highlights-grid,
  .news-grid,
  .bidding-grid-large,
  .govt-site-grid,
  .govt-results-grid,
  .keyword-sections,
  .kcmi-reports-grid {
    grid-template-columns: 1fr;
  }

  .ci-text-mirae {
    font-size: 22px;
  }

  .ci-swoosh {
    width: 12px;
    height: 20px;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
  }
}
