/* ===== GRAFIK PAGE ===== */
.g-info-bar{background:#f0f9ff;border:1px solid #bae6fd;border-radius:8px;padding:10px 14px;margin-bottom:16px;font-size:12px;color:#0369a1;display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.g-info-bar svg{flex-shrink:0;}
.g-dot-indo{display:inline-block;width:10px;height:10px;border-radius:50%;background:#2563eb;margin-right:4px;}
.g-dot-alfa{display:inline-block;width:10px;height:10px;border-radius:50%;background:#dc2626;margin-right:4px;}

.g-controls{background:white;border:1px solid #e2e8f0;border-radius:10px;padding:12px 14px;margin-bottom:14px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.g-controls label{font-size:12px;color:#475569;font-weight:500;}
.g-controls select,.g-controls input{padding:5px 9px;border:1px solid #cbd5e1;border-radius:6px;font-size:12px;background:white;}
.g-controls input{width:180px;}

.g-grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-bottom:14px;}
.g-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px;}
.g-grid-1{margin-bottom:14px;}
.g-card{background:white;border:1px solid #e2e8f0;border-radius:10px;padding:16px;}
.g-card .gc-title{font-size:12px;font-weight:700;color:#1e293b;margin-bottom:2px;}
.g-card .gc-sub{font-size:11px;color:#94a3b8;margin-bottom:12px;}

/* Stat mini cards */
.g-stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px;}
.g-stat{background:white;border:1px solid #e2e8f0;border-radius:10px;padding:12px 14px;}
.g-stat .gs-lbl{font-size:10px;color:#94a3b8;margin-bottom:4px;font-weight:500;text-transform:uppercase;letter-spacing:.4px;}
.g-stat .gs-val{font-size:18px;font-weight:700;color:#1e293b;}
.g-stat .gs-sub{font-size:11px;color:#94a3b8;margin-top:2px;}
.g-stat .gs-chg{font-size:11px;font-weight:600;margin-top:3px;}

.g-empty{text-align:center;padding:60px 20px;color:#94a3b8;}
.g-empty .ico{font-size:40px;margin-bottom:12px;}
.g-empty p{font-size:13px;line-height:1.8;}

.trend-tbl{background:white;border:1px solid #e2e8f0;border-radius:10px;overflow:auto;margin-bottom:14px;max-height:400px;}
.trend-tbl table{min-width:600px;}
.g-up{color:#b91c1c;font-weight:600;}.g-dn{color:#15803d;font-weight:600;}.g-eq{color:#94a3b8;}

/* ===== FENOMENA PAGE ===== */
.fenomena-search-btn{
  padding:5px 14px;
  border:1px solid #cbd5e1;
  border-radius:6px;
  background:white;
  font-size:12px;
  color:#475569;
  cursor:pointer;
}
.fenomena-search-btn:hover{background:#f1f5f9;}

.btn-danger{
  padding:5px 14px;
  background:#ef4444;
  color:white;
  border:none;
  border-radius:6px;
  font-size:12px;
  cursor:pointer;
  font-weight:500;
}
.btn-danger:hover{background:#dc2626;}

#fenomena-table-sec table{
  table-layout:auto;
}
#fenomena-table-sec thead th{
  background:#fef9c3;
  color:#854d0e;
  white-space:nowrap;
}
#fenomena-table-sec tbody td{
  white-space:normal;
  word-break:break-word;
}
/* Container untuk Kartu Berita */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

/* Desain Kartu */
.news-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: default;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.news-headline {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Potong teks jika lebih dari 3 baris */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.news-date {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-link {
    font-size: 12px;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
    padding: 6px 12px;
    background: #eff6ff;
    border-radius: 6px;
}

.news-link:hover {
    background: #dbeafe;
}

/* ===== FENOMENA v2 STYLES ===== */

/* Upload Grid - 3 kartu */
.fen-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 14px 0 18px;
}
@media (max-width: 768px) { .fen-upload-grid { grid-template-columns: 1fr; } }

.fen-upload-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow .2s;
}
.fen-upload-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.fen-card-miskin  { border-top: 4px solid #ef4444; }
.fen-card-nganggur{ border-top: 4px solid #f97316; }
.fen-card-ekonomi { border-top: 4px solid #22c55e; }

.fen-upload-icon  { font-size: 28px; }
.fen-upload-title { font-size: 15px; font-weight: 700; color: #1e293b; }
.fen-upload-desc  { font-size: 12px; color: #94a3b8; line-height: 1.5; }

.fen-file-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  background: #f8fafc; border: 1.5px dashed #cbd5e1; border-radius: 8px;
  cursor: pointer; font-size: 12px; color: #64748b;
  transition: all .2s;
}
.fen-file-btn:hover { border-color: #3b82f6; background: #eff6ff; color:#3b82f6; }
.fen-file-btn.loaded { border-style: solid; border-color: #22c55e; background: #f0fdf4; color:#15803d; }
.fen-file-btn input { display: none; }
.fen-file-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; flex-shrink: 0;
}
.fen-file-dot.loaded { background: #22c55e; }
.fen-status { font-size: 11px; color: #64748b; min-height: 16px; }

/* Tab Bar */
.fen-tab-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: white; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 8px 10px; margin-bottom: 16px;
}
.fen-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px; border: 1px solid transparent; border-radius: 7px;
  background: #f8fafc; font-size: 13px; font-weight: 600; color: #64748b;
  cursor: pointer; transition: all .2s; position: relative;
}
.fen-tab:hover { background: #f1f5f9; color: #334155; }
.fen-tab.active { background: #1e293b; color: white; border-color: #1e293b; }
.fen-tab-badge {
  background: #ef4444; color: white; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 99px; min-width: 18px; text-align: center;
}
.fen-tab.active .fen-tab-badge { background: #f97316; }
.fen-search {
  padding: 7px 12px; border: 1px solid #e2e8f0; border-radius: 7px;
  font-size: 12px; width: 200px; outline: none;
}
.fen-search:focus { border-color: #3b82f6; }

/* Summary Row */
.fen-summary-row {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 16px;
}
@media (max-width: 600px) { .fen-summary-row { grid-template-columns: repeat(2,1fr); } }

.fen-stat-card {
  background: white; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 14px 16px; text-align: center;
}
.fen-stat-naik  { border-top: 3px solid #ef4444; }
.fen-stat-turun { border-top: 3px solid #22c55e; }
.fen-stat-total { border-top: 3px solid #3b82f6; }
.fen-stat-cat   { border-top: 3px solid #f97316; }
.fen-stat-ico   { font-size: 20px; margin-bottom: 4px; }
.fen-stat-num   { font-size: 26px; font-weight: 800; color: #1e293b; line-height: 1; }
.fen-stat-lbl   { font-size: 11px; color: #94a3b8; margin-top: 4px; font-weight: 500; }

/* Viz Row - 2 charts side by side */
.fen-viz-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px;
}
@media (max-width: 700px) { .fen-viz-row { grid-template-columns: 1fr; } }

.fen-chart-card {
  background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px;
  overflow: hidden;
}
.fen-chart-title { font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 12px; }

/* Section Labels */
.fen-section-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; padding: 10px 14px;
  border-radius: 8px; margin: 6px 0 12px;
}
.fen-label-naik  { background: #fef2f2; color: #b91c1c; border-left: 4px solid #ef4444; }
.fen-label-turun { background: #f0fdf4; color: #15803d; border-left: 4px solid #22c55e; }

/* Group Section */
.fen-group-section { margin-bottom: 20px; }
.fen-group-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; border-radius: 7px; margin-bottom: 10px;
  font-size: 13px; font-weight: 700;
}
.fen-gh-naik  { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.fen-gh-turun { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.fen-gh-name  { font-size: 13px; }
.fen-gh-count { font-size: 11px; font-weight: 600; opacity: .8; }

/* Cards Row */
.fen-cards-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px;
}
.fen-news-card {
  background: white; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 14px; display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .2s, box-shadow .2s;
  border-left: 3px solid transparent;
}
.fen-news-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.fen-card-type-naik  { border-left-color: #ef4444; }
.fen-card-type-turun { border-left-color: #22c55e; }
.fen-card-body { flex: 1; }
.fen-card-title {
  font-size: 13px; font-weight: 600; color: #1e293b; line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.fen-card-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.fen-card-date { font-size: 11px; color: #94a3b8; }
.fen-sheet-badge {
  font-size: 10px; font-weight: 600; padding: 2px 7px;
  background: #f1f5f9; color: #475569; border-radius: 99px;
}
.fen-card-foot {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid #f1f5f9;
  display: flex; justify-content: flex-end;
}
.fen-read-link {
  font-size: 12px; font-weight: 600; color: #3b82f6;
  text-decoration: none; padding: 5px 11px; background: #eff6ff; border-radius: 6px;
}
.fen-read-link:hover { background: #dbeafe; }
.fen-no-link  { font-size: 11px; color: #cbd5e1; }
.fen-no-data  { color: #94a3b8; font-size: 13px; padding: 20px 0; text-align: center; }

/* ===== FENOMENA v3 — Periode & Perbandingan ===== */

/* Mode Bar */
.fen-mode-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: white; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 16px;
}
.fen-mode-left { display: flex; align-items: center; gap: 6px; }
.fen-mode-label { font-size: 12px; font-weight: 600; color: #64748b; white-space: nowrap; }

.fen-mode-btn {
  padding: 6px 14px; border: 1.5px solid #e2e8f0; border-radius: 7px;
  background: #f8fafc; font-size: 12px; font-weight: 600; color: #64748b;
  cursor: pointer; transition: all .15s;
}
.fen-mode-btn:hover { border-color: #94a3b8; color: #334155; }
.fen-mode-btn.active { background: #1e293b; color: white; border-color: #1e293b; }

/* Periode Pills */
.fen-periode-sel { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fen-tw-pills    { display: flex; gap: 6px; flex-wrap: wrap; }
.fen-tw-pill {
  padding: 5px 13px; border: 1.5px solid #e2e8f0; border-radius: 99px;
  background: #f8fafc; font-size: 12px; font-weight: 600; color: #64748b;
  cursor: pointer; transition: all .15s;
}
.fen-tw-pill:hover { border-color: #3b82f6; color: #3b82f6; }
.fen-tw-pill.active { background: #3b82f6; color: white; border-color: #3b82f6; }

/* Compare Selects */
.fen-compare-sel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fen-tw-select {
  padding: 6px 10px; border: 1.5px solid #e2e8f0; border-radius: 7px;
  font-size: 12px; font-weight: 600; color: #334155; background: white;
  cursor: pointer; outline: none;
}
.fen-tw-select:focus { border-color: #3b82f6; }

/* Compare Header */
.fen-compare-header {
  margin-bottom: 14px;
}
.fen-compare-title {
  font-size: 15px; font-weight: 700; color: #1e293b;
}
.fen-cmp-tw {
  display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 700;
}
.fen-cmp-a { background: #dbeafe; color: #1d4ed8; }
.fen-cmp-b { background: #fef9c3; color: #92400e; }

/* Compare Stats */
.fen-compare-stats {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 18px;
}
@media (max-width: 600px) { .fen-compare-stats { grid-template-columns: 1fr; } }

.fen-cmp-stat-card {
  background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px;
}
.fen-cmp-stat-label { font-size: 12px; font-weight: 700; color: #64748b; margin-bottom: 10px; }
.fen-cmp-stat-row   { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fen-cmp-stat-val   { text-align: center; }
.fen-cmp-a-val      { color: #1d4ed8; }
.fen-cmp-b-val      { color: #92400e; }
.fen-cmp-stat-val .fen-cmp-tw-lbl { display: block; font-size: 10px; font-weight: 600; opacity:.7; margin-bottom:2px; }
.fen-cmp-stat-val   { font-size: 22px; font-weight: 800; }
.fen-cmp-diff       { font-size: 16px; font-weight: 800; padding: 4px 10px; border-radius: 7px; }
.fen-cmp-up         { background: #fef2f2; color: #b91c1c; }
.fen-cmp-dn         { background: #f0fdf4; color: #15803d; }
.fen-cmp-eq         { background: #f1f5f9; color: #94a3b8; }

/* Compare Two-Col Cards */
.fen-compare-two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px;
}
@media (max-width: 700px) { .fen-compare-two-col { grid-template-columns: 1fr; } }

.fen-compare-col { background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; }
.fen-compare-col-a { border-top: 4px solid #3b82f6; }
.fen-compare-col-b { border-top: 4px solid #f59e0b; }
.fen-compare-col-title {
  font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid #f1f5f9;
}

/* Chart wrap responsive */
.fen-chart-wrap { position: relative; width: 100%; min-height: 180px; }

/* fen-cards-grid alias for fen-cards-row container */
.fen-cards-grid {
  margin-bottom: 8px;
}
.fen-panel { display: block; }

/* ===== TOPIC FILTER BAR ===== */
.fen-topic-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 10px 0 14px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.fen-topic-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding-top: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.fen-topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.fen-topic-pill {
  padding: 4px 11px;
  border: 1.5px solid #cbd5e1;
  border-radius: 20px;
  background: white;
  font-size: 11px;
  color: #475569;
  cursor: pointer;
  transition: all .15s;
  font-weight: 500;
  white-space: nowrap;
}
.fen-topic-pill:hover {
  border-color: #6366f1;
  color: #6366f1;
  background: #eef2ff;
}
.fen-topic-pill.active {
  background: #6366f1;
  color: white;
  border-color: #6366f1;
}
.fen-topic-pill.fen-pill-all {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #475569;
}
.fen-topic-pill.fen-pill-all.active {
  background: #1e293b;
  color: white;
  border-color: #1e293b;
}
.fen-topic-reset {
  font-size: 11px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: white;
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.fen-topic-reset:hover { background: #fef2f2; color: #ef4444; border-color: #fca5a5; }
.fen-topic-bar[style*="display:none"], .fen-topic-bar[style*="display: none"] { display: none !important; }

/* ===== FENOMENA v3 — Mockup Baru (satu file, multi-sheet, filter periode+sumber+topik) ===== */

/* CARD UPLOAD */
.fen2-card {
  background: #fff;
  border: 0.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.fen2-card-title {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1rem;
}

/* UPLOAD ZONE */
.fen2-upload-zone {
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.fen2-upload-zone:hover { border-color: #94a3b8; background: #f8fafc; }
.fen2-upload-zone.ok {
  border-style: solid;
  border-color: #1D9E75;
  background: #E1F5EE;
}
.fen2-uz-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fen2-upload-zone.ok .fen2-uz-icon { background: #E1F5EE; }
.fen2-uz-main { font-size: 14px; font-weight: 500; color: #1e293b; }
.fen2-upload-zone.ok .fen2-uz-main { color: #085041; }
.fen2-uz-sub { font-size: 11px; color: #94a3b8; margin-top: 3px; }
.fen2-upload-zone.ok .fen2-uz-sub { color: #0F6E56; }

/* SHEET CHIPS */
.fen2-sheet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 0.5px solid #9FE1CB;
}
.fen2-sc-lbl { font-size: 11px; color: #0F6E56; display: flex; align-items: center; }
.fen2-sch {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 0.5px solid #9FE1CB;
  background: #fff;
  color: #085041;
  display: flex;
  align-items: center;
  gap: 4px;
}
.fen2-sch-x {
  border-color: #e2e8f0;
  color: #94a3b8;
  background: #f8fafc;
}
.fen2-sch-cnt { font-size: 10px; color: #0F6E56; margin-left: 2px; }
.fen2-sch-x .fen2-sch-cnt { color: #94a3b8; }

/* INFO ROW */
.fen2-info-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.fen2-info-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f8fafc;
  color: #64748b;
  border: 0.5px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* FILTER BAR */
.fen2-fbar {
  background: #fff;
  border: 0.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.fen2-frow {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.fen2-frow + .fen2-frow {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 0.5px solid #e2e8f0;
}
.fen2-flabel {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  min-width: 88px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.fen2-pill-row { display: flex; flex-wrap: wrap; gap: 5px; }
.fen2-pill {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 0.5px solid #cbd5e1;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.fen2-pill:hover { background: #f1f5f9; }
.fen2-pill.on { background: #185FA5; color: #E6F1FB; border-color: #185FA5; }
.fen2-pill.on-g { background: #3B6D11; color: #EAF3DE; border-color: #3B6D11; }
.fen2-pill.src { border-left-width: 3px; }
.fen2-srch {
  flex: 1;
  min-width: 150px;
  padding: 6px 12px;
  border: 0.5px solid #cbd5e1;
  border-radius: 20px;
  font-size: 12px;
  background: #f8fafc;
  color: #1e293b;
  outline: none;
}
.fen2-srch:focus { border-color: #185FA5; }
.fen2-period-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fen2-period-input {
  padding: 6px 10px;
  border: 0.5px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  font-size: 12px;
  min-width: 190px;
}
.fen2-period-input:focus {
  outline: none;
  border-color: #185FA5;
}
.fen2-qdiv { width: 0.5px; height: 18px; background: #e2e8f0; }
.fen2-note { font-size: 11px; color: #94a3b8; margin-left: 4px; font-style: italic; }

/* TABS */
.fen2-tabs {
  display: flex;
  border-bottom: 0.5px solid #e2e8f0;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.fen2-tab {
  padding: 8px 16px;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -0.5px;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.fen2-tab:hover { color: #1e293b; }
.fen2-tab.on { color: #185FA5; border-bottom-color: #185FA5; font-weight: 500; }
.fen2-tbdg {
  font-size: 10px;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 20px;
  padding: 1px 6px;
  margin-left: 4px;
}
.fen2-tab.on .fen2-tbdg { background: #E6F1FB; color: #0C447C; }

/* STATS */
.fen2-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
}
@media(max-width:700px) { .fen2-stats { grid-template-columns: repeat(2,1fr); } }
.fen2-stat {
  background: #f8fafc;
  border-radius: 8px;
  padding: 11px 14px;
  border: 0.5px solid #e2e8f0;
}
.fen2-stn { font-size: 20px; font-weight: 500; color: #1e293b; }
.fen2-stl { font-size: 11px; color: #64748b; margin-top: 3px; }
.fen2-stat.red .fen2-stn { color: #A32D2D; }
.fen2-stat.grn .fen2-stn { color: #3B6D11; }

/* TWO COL */
.fen2-two-col {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 12px;
  margin-bottom: 1rem;
}
@media(max-width:700px) { .fen2-two-col { grid-template-columns: 1fr; } }
.fen2-col-hd { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.fen2-col-hd-lbl { font-size: 13px; font-weight: 500; }
.fen2-red { color: #A32D2D; }
.fen2-grn { color: #3B6D11; }

/* NEWS GROUPS */
.fen2-ngrp { margin-bottom: 10px; }
.fen2-grp-hd {
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px 6px 0 0;
  display: flex;
  justify-content: space-between;
}
.fen2-grp-hd.red { background: #F7C1C1; color: #791F1F; }
.fen2-grp-hd.grn { background: #C0DD97; color: #27500A; }
.fen2-ncard {
  background: #fff;
  border: 0.5px solid #e2e8f0;
  border-left: 3px solid #e2e8f0;
  padding: 9px 12px;
  margin-bottom: 3px;
  cursor: default;
  transition: background .15s;
}
.fen2-ncard:last-child { border-radius: 0 0 6px 6px; }
.fen2-ncard:hover { background: #f8fafc; }
.fen2-ncard.src-0 { border-left-color: #378ADD; }
.fen2-ncard.src-1 { border-left-color: #BA7517; }
.fen2-ncard.src-2 { border-left-color: #D4537E; }
.fen2-ncard.src-3 { border-left-color: #1D9E75; }
.fen2-ncard.src-4 { border-left-color: #7C3AED; }
.fen2-ncard.src-5 { border-left-color: #0891B2; }
.fen2-ntitle { font-size: 12px; color: #1e293b; line-height: 1.45; margin-bottom: 5px; }
.fen2-nmeta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fen2-nsrc {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
}
.fen2-nsrc.src-0 { background: #E6F1FB; color: #0C447C; }
.fen2-nsrc.src-1 { background: #FAEEDA; color: #633806; }
.fen2-nsrc.src-2 { background: #FBEAF0; color: #72243E; }
.fen2-nsrc.src-3 { background: #E1F5EE; color: #085041; }
.fen2-nsrc.src-4 { background: #EDE9FE; color: #4C1D95; }
.fen2-nsrc.src-5 { background: #E0F2F1; color: #004D40; }
.fen2-ndate { font-size: 10px; color: #94a3b8; }
.fen2-nperiod {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  border: 0.5px solid #e2e8f0;
}
.fen2-nlink { font-size: 10px; color: #185FA5; margin-left: auto; text-decoration: none; }
.fen2-nlink:hover { text-decoration: underline; }
.fen2-no-data { font-size: 12px; color: #94a3b8; padding: 12px 0; text-align: center; }

/* CHART PANEL */
.fen2-cpanel {
  background: #fff;
  border: 0.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  margin-top: 1rem;
}
.fen2-cp-title {
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fen2-cgrid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 12px;
}
@media(max-width:600px) { .fen2-cgrid { grid-template-columns: 1fr; } }
.fen2-chd {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px 6px 0 0;
}
.fen2-chd-red { background: #FCEBEB; color: #791F1F; }
.fen2-chd-grn { background: #EAF3DE; color: #27500A; }
.fen2-br { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 0.5px solid #f1f5f9; }
.fen2-bl { font-size: 11px; color: #64748b; width: 130px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fen2-bt { flex: 1; background: #f1f5f9; border-radius: 4px; height: 7px; overflow: hidden; }
.fen2-bf { height: 100%; border-radius: 4px; transition: width .4s ease; }
.fen2-bf.red { background: #E24B4A; }
.fen2-bf.grn { background: #639922; }
.fen2-bc { font-size: 11px; color: #64748b; min-width: 24px; text-align: right; }


/* ============================================================
   #TOPIK-DROPDOWN — Dropdown select filter topik
   ============================================================ */
.fen2-topik-dd {
  padding: 5px 10px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
  color: #1e293b;
  background: #fff;
  cursor: pointer;
  min-width: 160px;
  outline: none;
  transition: border-color .2s;
}
.fen2-topik-dd:hover,
.fen2-topik-dd:focus { border-color: #3B6D11; box-shadow: 0 0 0 2px #EAF3DE; }

/* Row topik — wrap ke baris baru di layar kecil */
.fen2-frow-topik { flex-wrap: wrap; gap: 6px; }


/* ============================================================
   #INSIGHT-PANEL — Panel analisis otomatis per topik
   ============================================================ */
#fen2-insight-panel {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  animation: fen2FadeIn .25s ease;
}

/* Animasi muncul */
@keyframes fen2FadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header panel insight */
.fen2-insight-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}
.fen2-insight-icon { font-size: 26px; line-height: 1; flex-shrink: 0; }
.fen2-insight-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
}
.fen2-insight-sub {
  font-size: 12px;
  color: #64748b;
}
.fen2-insight-sub.trend-naik  { color: #A32D2D; font-weight: 500; }
.fen2-insight-sub.trend-turun { color: #3B6D11; font-weight: 500; }
.fen2-insight-sub.trend-netral{ color: #7C3AED; font-weight: 500; }

/* Bagian naik/turun di dalam insight */
.fen2-insight-section {
  padding: 10px 13px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.fen2-insight-section.red { background: #FEF5F5; border-left: 3px solid #E24B4A; }
.fen2-insight-section.grn { background: #F0F7E8; border-left: 3px solid #639922; }

.fen2-insight-sec-title {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}
.fen2-insight-item {
  font-size: 12px;
  color: #334155;
  line-height: 1.6;
  padding: 1px 0;
}
/* Highlight data nyata dari berita */
.fen2-insight-data {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(255,255,255,.7);
  border-radius: 6px;
  font-size: 11px;
  color: #475569;
  border: 1px dashed #cbd5e1;
}

/* --- Style untuk Tombol Link Berita Fenomena Pasar --- */
.fen2-news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Pastikan card Anda memiliki padding bawah yang cukup */
  padding-bottom: 14px; 
}

.fen2-card-action {
  margin-top: 12px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.fen2-btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #f0fdf4; /* Warna hijau soft */
  color: #16a34a; /* Teks hijau gelap */
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid #dcfce7;
}

/* Efek ketika tombol di-hover (disorot mouse) */
.fen2-btn-link:hover {
  background-color: #16a34a;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(22, 163, 74, 0.2);
  transform: translateY(-1px);
}

/* Jika berita tersebut adalah penyebab Kenaikan Harga, kita bisa buat tombolnya agak kemerahan */
.fen2-col-hd-lbl.fen2-red ~ #fen2-col-naik .fen2-btn-link {
  background-color: #fef2f2; /* Merah soft */
  color: #dc2626;
  border-color: #fee2e2;
}

.fen2-col-hd-lbl.fen2-red ~ #fen2-col-naik .fen2-btn-link:hover {
  background-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}