/* ============================================================
   Steel ML Research Platform — Main Stylesheet
   Theme: Industrial Dark — inspired by steel & data
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Syne:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --bg:          #0c0e12;
  --bg2:         #141720;
  --bg3:         #1a1e27;
  --bg4:         #222634;
  --border:      #2a2f3d;
  --border2:     #353c52;
  --text:        #e8eaf0;
  --text2:       #9ba3b8;
  --text3:       #5d657a;
  --accent:      #4f8ef7;
  --accent2:     #2563eb;
  --accent-glow: rgba(79,142,247,0.18);
  --steel:       #7c92b5;
  --success:     #22c55e;
  --warning:     #f59e0b;
  --danger:      #ef4444;
  --gold:        #d4a853;
  --radius:      8px;
  --radius-lg:   14px;
  --shadow:      0 4px 24px rgba(0,0,0,0.5);
  --font-head:   'Syne', sans-serif;
  --font-body:   'DM Sans', sans-serif;
  --font-mono:   'DM Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ── SIDEBAR ── */
#sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 240px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width .25s;
}

#sidebar-logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}

#sidebar-logo .logo-mark {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  letter-spacing: -.02em;
  line-height: 1;
}

#sidebar-logo .logo-mark span { color: var(--accent); }

#sidebar-logo .logo-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
  letter-spacing: .08em;
  margin-top: 4px;
  text-transform: uppercase;
}

#sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.nav-section {
  padding: 16px 18px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  transition: all .15s;
  position: relative;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}

.nav-item:hover { background: var(--bg3); color: var(--text); }

.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 500;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-item .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: .7;
}

.nav-item.active .nav-icon { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 20px;
  font-weight: 500;
}

.nav-badge.done { background: var(--success); }
.nav-badge.warn { background: var(--warning); color: #000; }

/* ── MAIN CONTENT ── */
#main {
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOPBAR ── */
#topbar {
  position: sticky;
  top: 0;
  background: rgba(12,14,18,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
}

#topbar .page-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}

#topbar .topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--border);
  color: var(--text2);
  background: var(--bg3);
}

.status-chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.status-chip.success { border-color: var(--success); color: var(--success); background: rgba(34,197,94,.1); }
.status-chip.warning { border-color: var(--warning); color: var(--warning); background: rgba(245,158,11,.1); }

/* ── PAGE CONTENT ── */
#page-content {
  flex: 1;
  padding: 28px;
}

/* ── SECTION PANELS ── */
.page-section {
  display: none;
}
.page-section.active {
  display: block;
  animation: fadeUp .3s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── CARDS ── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 18px;
}

.card-title {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .card-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-secondary:hover { background: var(--bg4); border-color: var(--border2); }

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover { opacity: .88; }

.btn-danger {
  background: rgba(239,68,68,.15);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,.3);
}
.btn-danger:hover { background: rgba(239,68,68,.25); }

.btn-gold {
  background: linear-gradient(135deg, #d4a853, #b8860b);
  color: #fff;
}
.btn-gold:hover { opacity: .9; transform: translateY(-1px); }

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
}

.btn-icon { width: 15px; height: 15px; flex-shrink: 0; }

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-family: var(--font-mono);
}

.form-control {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}

.form-control:focus { border-color: var(--accent); }
.form-control option { background: var(--bg3); }

select.form-control { cursor: pointer; }

/* ── UPLOAD ZONE ── */
.upload-zone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius-lg);
  padding: 52px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  background: var(--bg3);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin: 0 auto 14px;
}

.upload-title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.upload-sub { color: var(--text2); font-size: 13px; }

.upload-formats {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.format-pill {
  background: var(--bg4);
  border: 1px solid var(--border2);
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text2);
}

/* ── TABLES ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

thead th {
  background: var(--bg3);
  color: var(--text2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg3); }

tbody td {
  padding: 9px 14px;
  color: var(--text);
  font-family: var(--font-mono);
}

.cell-num { text-align: right; }
.cell-highlight { color: var(--gold); font-weight: 500; }
.cell-best { color: var(--success); font-weight: 500; }
.cell-worst { color: var(--danger); }
.cell-company {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  color: var(--accent);
}
.cell-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-family: var(--font-mono);
}
.badge-idr { background: rgba(34,197,94,.15); color: var(--success); border: 1px solid rgba(34,197,94,.3); }
.badge-usd { background: rgba(79,142,247,.15); color: var(--accent); border: 1px solid rgba(79,142,247,.3); }
.badge-missing { background: rgba(239,68,68,.15); color: var(--danger); border: 1px solid rgba(239,68,68,.3); }
.badge-ok { background: rgba(34,197,94,.1); color: var(--success); border: 1px solid rgba(34,197,94,.2); }

/* ── PROGRESS STEP ── */
.step-flow {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  position: relative;
}

.step-node::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 18px;
  width: calc(100% - 36px);
  height: 2px;
  background: var(--border);
  transform: translateX(18px);
  z-index: 0;
}

.step-node:last-child::after { display: none; }

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text3);
  position: relative;
  z-index: 1;
  transition: all .3s;
}

.step-node.done .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.step-node.active .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(79,142,247,.2);
}
.step-node.done::after { background: var(--success); }

.step-label {
  font-size: 10px;
  color: var(--text3);
  margin-top: 6px;
  text-align: center;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.step-node.active .step-label { color: var(--accent); }
.step-node.done .step-label { color: var(--success); }

/* ── GRID SYSTEM ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  #sidebar { width: 60px; }
  #sidebar .nav-item span, #sidebar-logo .logo-sub,
  #sidebar-logo .logo-mark-text, #sidebar .nav-section,
  #sidebar .nav-badge { display: none; }
  #main { margin-left: 60px; }
}

/* ── STAT CARDS ── */
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.stat-card.accent { border-color: rgba(79,142,247,.35); background: rgba(79,142,247,.06); }
.stat-card.success { border-color: rgba(34,197,94,.3); background: rgba(34,197,94,.05); }
.stat-card.warning { border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.05); }
.stat-card.danger { border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.05); }

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 6px;
}
.stat-value {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.stat-card.accent .stat-value { color: var(--accent); }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.warning .stat-value { color: var(--warning); }
.stat-card.danger .stat-value { color: var(--danger); }
.stat-sub { font-size: 11px; color: var(--text3); margin-top: 5px; }

/* ── MAPPING TABLE ── */
.mapping-row {
  display: grid;
  grid-template-columns: 1fr 40px 1fr 80px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  background: var(--bg3);
}

.mapping-original {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
}
.mapping-arrow { color: var(--text3); text-align: center; }
.mapping-target select { width: 100%; }
.mapping-conf {
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: right;
  padding: 3px 8px;
  border-radius: 4px;
}
.conf-high { background: rgba(34,197,94,.15); color: var(--success); }
.conf-med  { background: rgba(245,158,11,.15); color: var(--warning); }
.conf-low  { background: rgba(239,68,68,.15); color: var(--danger); }

/* ── PROGRESS BAR ── */
.progress-wrap {
  background: var(--bg4);
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
  margin: 8px 0;
}
.progress-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #7ab3ff);
  transition: width .4s ease;
  position: relative;
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* ── MODEL CARD ── */
.model-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.model-card:hover { border-color: var(--border2); background: var(--bg4); }
.model-card.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.model-card.selected::after {
  content: '✓';
  position: absolute;
  top: 10px; right: 12px;
  color: var(--accent);
  font-weight: bold;
  font-size: 14px;
}
.model-name {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.model-desc { font-size: 11px; color: var(--text3); line-height: 1.5; }
.model-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  margin-top: 6px;
}
.tag-journal { background: rgba(212,168,83,.15); color: var(--gold); border: 1px solid rgba(212,168,83,.3); }
.tag-modern  { background: rgba(79,142,247,.15); color: var(--accent); border: 1px solid rgba(79,142,247,.3); }

/* ── TUNING OPTIONS ── */
.tuning-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.tuning-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
}
.tuning-card:hover { border-color: var(--border2); }
.tuning-card.selected { border-color: var(--accent); background: var(--accent-glow); }
.tuning-icon { font-size: 26px; margin-bottom: 8px; }
.tuning-name { font-family: var(--font-head); font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.tuning-desc { font-size: 11px; color: var(--text2); line-height: 1.5; }

/* ── TABS ── */
.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  gap: 2px;
  overflow-x: auto;
}
.tab-btn {
  padding: 9px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text3);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text2); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeUp .2s ease; }

/* ── CHART CONTAINER ── */
.chart-wrap {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
  position: relative;
}
.chart-title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 11px;
}
.chart-canvas-wrap { position: relative; height: 280px; }

/* ── ALERT / TOAST ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 14px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 3px solid;
}
.alert-info    { background: rgba(79,142,247,.1);  border-color: var(--accent); color: #c0d4fb; }
.alert-success { background: rgba(34,197,94,.1);   border-color: var(--success); color: #a7f3c0; }
.alert-warning { background: rgba(245,158,11,.1);  border-color: var(--warning); color: #fde68a; }
.alert-danger  { background: rgba(239,68,68,.1);   border-color: var(--danger); color: #fca5a5; }

#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--bg4);
  border: 1px solid var(--border2);
  box-shadow: var(--shadow);
  animation: slideIn .25s ease;
  max-width: 340px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error   { border-color: var(--danger); color: var(--danger); }
.toast.info    { border-color: var(--accent); color: var(--accent); }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── ARTICLE PREVIEW ── */
#article-preview {
  background: #fff;
  color: #111;
  border-radius: var(--radius-lg);
  padding: 48px 52px;
  font-family: 'Georgia', serif;
  font-size: 13.5px;
  line-height: 1.75;
}
#article-preview h1 {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  line-height: 1.3;
}
#article-preview h2 {
  font-size: 14px;
  font-weight: 700;
  margin-top: 22px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
#article-preview .authors {
  text-align: center;
  font-size: 13px;
  color: #444;
  margin-bottom: 20px;
}
#article-preview .abstract-box {
  background: #f8f9fa;
  border-left: 3px solid #333;
  padding: 14px 16px;
  margin: 16px 0 24px;
  font-size: 12.5px;
}
#article-preview table {
  font-size: 12px;
  color: #111;
}
#article-preview thead th { background: #eee; color: #333; font-family: 'Georgia', serif; }
#article-preview tbody td { color: #111; font-family: 'Georgia', serif; }

/* ── LOADING OVERLAY ── */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12,14,18,.85);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
#loading-overlay.show { display: flex; }
.spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-msg {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text2);
}

/* ── MISC ── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-16  { margin-bottom: 16px; }
.text-muted { color: var(--text2); }
.text-xs { font-size: 11px; }
.text-mono { font-family: var(--font-mono); }
.text-head { font-family: var(--font-head); }
.fw-600 { font-weight: 600; }
.hidden { display: none !important; }

hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── SECTION HEADER ── */
.section-header {
  margin-bottom: 22px;
}
.section-header h2 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 4px;
}
.section-header p { color: var(--text2); font-size: 13px; }

/* ── INLINE CODE ── */
code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--bg4);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--gold);
}

/* ── CLEAN/RATIO SUMMARY ── */
.cleaning-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}
.cleaning-stat .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.model-results-table { margin-top: 0; }

.best-model-banner {
  background: linear-gradient(135deg, rgba(212,168,83,.12), rgba(212,168,83,.05));
  border: 1px solid rgba(212,168,83,.35);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.best-trophy { font-size: 28px; }
.best-model-info .best-label { font-family: var(--font-mono); font-size: 10px; color: var(--text3); text-transform: uppercase; }
.best-model-info .best-name { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--gold); }
.best-model-info .best-score { font-family: var(--font-mono); font-size: 12px; color: var(--text2); }

/* ── HEATMAP ── */
.heatmap-container {
  overflow-x: auto;
}
.heatmap-cell {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10px;
  border-radius: 4px;
  cursor: default;
}

/* ── ARTICLE SECTION TABS ── */
.article-section-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
}
.article-section-btn {
  padding: 8px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: all .15s;
  font-family: var(--font-body);
}
.article-section-btn:hover { background: var(--bg4); color: var(--text); }
.article-section-btn.active { background: var(--accent-glow); border-color: var(--accent); color: var(--accent); }

.article-section-content { display: none; }
.article-section-content.active { display: block; }

/* ============================================================
   ARTICLE PREVIEW — Journal Style (Kayakus 2023 / MDPI)
   ============================================================ */

#article-preview {
  background: #fff;
  color: #111;
  border-radius: var(--radius-lg);
  padding: 48px 52px;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 12.5px;
  line-height: 1.75;
  max-height: 760px;
  overflow-y: auto;
  border: 1px solid #ddd;
}

.journal-header { display:flex; gap:12px; align-items:center; margin-bottom:12px; }
.journal-badge {
  background: #2e7d32; color:#fff; padding:3px 10px; border-radius:4px;
  font-family: 'Helvetica Neue', sans-serif; font-size: 12px; font-style:italic; font-weight:bold;
}
.article-type { font-style:italic; font-size:11px; color:#555; }

.art-title { font-size:19px; font-weight:700; line-height:1.3; margin:12px 0 10px; color:#111; }
.art-authors { font-size:11.5px; margin-bottom:4px; color:#333; }
.art-affiliations { font-size:10.5px; color:#555; margin-bottom:8px; line-height:1.5; }
.art-meta-bar { display:flex; gap:20px; font-size:10px; color:#777; margin-bottom:14px; padding-bottom:10px; border-bottom:1px solid #ddd; }

.art-abstract-box {
  background: #f9f9f9; border-left: 3px solid #333;
  padding: 14px 16px; margin: 14px 0; border-radius:0 4px 4px 0;
}
.art-section-label { font-weight:700; font-size:11.5px; margin-bottom:6px; font-family:'Helvetica Neue',sans-serif; }
.art-keywords { margin-top:8px; font-size:11px; color:#333; }

.art-hr { border:none; border-top:1px solid #ccc; margin:20px 0; }

.art-h2 { font-size:13.5px; font-weight:700; margin:20px 0 8px; font-family:'Helvetica Neue',sans-serif; color:#111; }
.art-h3 { font-size:12.5px; font-weight:700; margin:14px 0 6px; font-style:italic; color:#222; }
.art-body p, .art-p { font-size:12px; line-height:1.75; margin-bottom:8px; text-align:justify; }

/* Tables */
.art-table-caption {
  font-size:11px; font-weight:700; font-family:'Helvetica Neue',sans-serif;
  margin:16px 0 5px; color:#111;
}
.art-table {
  width:100%; border-collapse:collapse; font-size:11px; margin-bottom:14px;
  font-family:'Helvetica Neue',sans-serif;
}
.art-table thead th {
  background:#fff; color:#111; font-weight:700; padding:5px 8px;
  border-top:2px solid #111; border-bottom:1px solid #555;
  text-align:center; font-size:11px;
}
.art-table tbody td { padding:4px 8px; border-bottom:1px solid #ddd; text-align:center; color:#111; }
.art-table tbody tr:nth-child(even) { background:#f8f8f8; }
.art-result-table thead th { font-size:10px; }
.art-result-table tbody td { font-size:10.5px; }
.art-avg-row td { font-weight:700; background:#f0f0f0 !important; border-top:1px solid #888; }

/* Figures */
.art-figure { text-align:center; margin:18px auto; max-width:520px; }
.art-figure-img { border:1px solid #ddd; padding:12px; border-radius:4px; background:#fff; }
.art-figure-caption { font-size:11px; color:#444; margin-top:6px; font-family:'Helvetica Neue',sans-serif; text-align:center; }

/* Equations */
.art-equations { margin:14px 0 18px; padding:12px 16px; background:#fafafa; border:1px solid #eee; border-radius:4px; }
.art-eq-row { display:flex; gap:16px; align-items:center; padding:3px 0; }
.eq-label { font-family:'Helvetica Neue',sans-serif; font-weight:700; color:#555; font-size:11px; min-width:24px; }
.eq-body { font-family:'Times New Roman',serif; font-size:13px; }

/* References */
.art-references { padding:0; }
.art-ref { font-size:11px; line-height:1.6; margin-bottom:5px; padding-left:22px; text-indent:-22px; color:#222; }

/* ── ARTICLE JOURNAL STYLE ─────────────────────────────────── */
#article-preview {
  background:#fff; color:#111; border-radius:var(--radius-lg);
  padding:40px 48px; font-family:'Georgia','Times New Roman',serif;
  font-size:12px; line-height:1.75; max-height:740px; overflow-y:auto;
  border:1px solid #ccc;
}
.art-journal-header { display:flex; gap:10px; align-items:center; margin-bottom:10px; }
.art-journal-badge { background:#2e7d32; color:#fff; padding:2px 10px; border-radius:3px; font-size:11px; font-style:italic; font-weight:bold; font-family:sans-serif; }
.art-type { font-style:italic; font-size:11px; color:#666; }
.art-title { font-size:18px; font-weight:700; line-height:1.3; margin:10px 0 8px; }
.art-authors-line { font-size:11px; color:#333; margin-bottom:3px; }
.art-affil { font-size:10px; color:#666; margin-bottom:8px; line-height:1.4; }
.art-metabar { font-size:10px; color:#888; margin-bottom:12px; padding-bottom:8px; border-bottom:1px solid #ddd; }
.art-abstract-box { background:#f8f8f8; border-left:3px solid #444; padding:12px 14px; margin:12px 0; }
.art-abstract-label { font-weight:700; font-size:11px; font-family:sans-serif; margin-bottom:5px; }
.art-keywords { font-size:11px; margin-top:7px; }
.art-hr { border:none; border-top:1px solid #ccc; margin:16px 0; }
.art-h2 { font-size:13px; font-weight:700; margin:18px 0 6px; font-family:sans-serif; }
.art-h3 { font-size:12px; font-weight:700; font-style:italic; margin:12px 0 5px; }
.art-p { font-size:11.5px; line-height:1.75; margin-bottom:7px; text-align:justify; }
.art-table-caption { font-weight:700; font-size:11px; font-family:sans-serif; margin:14px 0 4px; }
.art-tbl { width:100%; border-collapse:collapse; font-size:10.5px; font-family:sans-serif; margin-bottom:12px; }
.art-tbl thead th { background:#fff; border-top:2px solid #111; border-bottom:1px solid #555; padding:4px 7px; font-weight:700; text-align:center; font-size:10px; }
.art-tbl tbody td { padding:3px 7px; border-bottom:1px solid #ddd; text-align:center; }
.art-tbl tbody tr:nth-child(even) { background:#f8f8f8; }
.art-avg-row td { font-weight:700; background:#efefef !important; border-top:1px solid #888; }
.art-figure { text-align:center; margin:16px auto; }
.art-figure-img { border:1px solid #ddd; padding:10px; background:#fff; display:inline-block; }
.art-figure-caption { font-size:10.5px; color:#444; margin-top:5px; font-family:sans-serif; }
.art-eq-block { margin:8px 0 10px; padding-left:2cm; }
.art-eq-row { display:flex; gap:14px; align-items:baseline; padding:2px 0; }
.art-eq-num { font-family:sans-serif; font-size:10px; color:#666; min-width:24px; text-align:right; }
.art-eq-body { font-size:13px; font-family:'Times New Roman',serif; }
.art-ref-item { font-size:10.5px; line-height:1.6; margin-bottom:4px; padding-left:22px; text-indent:-22px; }
.art-result-tbl { font-size:9.5px; }
.art-result-tbl thead th { font-size:9px; }
.art-section-scroll-btn { padding:6px 10px; background:var(--bg3); border:1px solid var(--border); border-radius:var(--radius); color:var(--text2); font-size:11px; cursor:pointer; text-align:left; transition:all .15s; font-family:var(--font-body); width:100%; }
.art-section-scroll-btn:hover { background:var(--bg4); color:var(--text); }
.art-section-scroll-btn.active { background:var(--accent-glow); border-color:var(--accent); color:var(--accent); }

/* ── MODE CARD (separate from model-card to avoid JS conflict) ── */
.mode-card {
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  user-select: none;
}
.mode-card:hover {
  border-color: var(--accent);
  background: var(--bg4);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(79,142,247,0.15);
}
.mode-card.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 0 3px rgba(79,142,247,0.15);
}
.mode-card.selected::after {
  content: '✓ Dipilih';
  position: absolute;
  top: 10px; right: 14px;
  color: var(--accent);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
}
