/* UPLOAD ZONE */
.upload-zone { border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); padding: 40px 20px; text-align: center; cursor: pointer; transition: all .2s; background: var(--bg); }
.upload-zone:hover { border-color: var(--purple-500); background: var(--purple-50); }
.upload-zone.has-file { border-style: solid; border-color: var(--teal-500); background: var(--teal-50); }
.upload-icon { width: 48px; height: 48px; background: var(--purple-100); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.upload-icon svg { width: 24px; height: 24px; stroke: var(--purple-600); fill: none; stroke-width: 1.8; }
.upload-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.upload-sub { font-size: 13px; color: var(--text-secondary); }
.upload-link { color: var(--purple-600); text-decoration: underline; cursor: pointer; }
.uploading .upload-zone { opacity:.6; pointer-events:none; }

/* PREVIEW IMAGE */
.img-preview { width: 100%; aspect-ratio: 4/3; background: var(--teal-50); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.img-preview svg { width: 64px; height: 64px; opacity: .25; }
.preview-badge { position: absolute; top: 10px; right: 10px; background: var(--teal-500); color: white; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 99px; }

/* STATS & TABLES */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-box { background: var(--bg); border-radius: var(--radius); padding: 12px; }
.stat-val { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.stat-lbl { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.param-table { width: 100%; border-collapse: collapse; }
.param-table td { padding: 7px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.param-table td:first-child { color: var(--text-secondary); }
.param-table td:last-child { text-align: right; font-weight: 600; color: var(--text-primary); }
.param-table tr:last-child td { border-bottom: none; }

/* PROGRESS BAR (TRACK) */
.pb-wrap { margin-top: 8px; }
.pb-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.pb-track { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.pb-fill { height: 100%; border-radius: 99px; transition: width .5s ease; }

/* VISUALISASI CNN */
.fmap-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 620px; overflow-y: auto; padding-right: 4px; }
.fmap-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; align-self: start; }
.fmap-header { padding: 8px 10px; border-bottom: 1px solid var(--border); background: var(--bg); display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.fmap-name { font-size: 11px; font-weight: 600; color: var(--text-primary); }
.fmap-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 99px; flex-shrink: 0; }
.fmap-grid { display: grid; gap: 2px; padding: 6px; }
.fmap-grid.g8 { grid-template-columns: repeat(8, 1fr); }
.fmap-cell { aspect-ratio: 1; border-radius: 2px; }

/* Kartu filter bisa diklik -> tampilkan bobot kernel 3×3 */
.fmap-clickable { cursor: pointer; transition: box-shadow .15s ease, border-color .15s ease; }
.fmap-clickable:hover { border-color: var(--purple-500, #3C3489); box-shadow: 0 0 0 1px var(--purple-500, #3C3489) inset; }
.fmap-clickable.expanded { border-color: var(--purple-500, #3C3489); box-shadow: 0 0 0 1px var(--purple-500, #3C3489) inset; }
.fmap-click-hint { font-size: 9px; color: var(--text-muted); text-align: center; padding: 3px 0 6px; user-select: none; }
.fmap-kernel-panel { display: none; padding: 8px 10px 10px; border-top: 1px dashed var(--border); background: var(--bg); animation: fmapPanelIn .15s ease; }
.fmap-clickable.expanded .fmap-kernel-panel { display: block; }
@keyframes fmapPanelIn { from { opacity: 0; } to { opacity: 1; } }
.fmap-kernel-title { font-size: 10px; font-weight: 700; color: var(--text-muted); text-align: center; margin-bottom: 6px; letter-spacing: .02em; text-transform: uppercase; }
.fmap-kernel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; width: 96px; margin: 0 auto; }
.fmap-kernel-cell { aspect-ratio: 1; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.fmap-kernel-note { font-size: 10px; color: var(--text-muted); text-align: center; line-height: 1.5; padding: 0 4px; }

.conv-demo { display: grid; grid-template-columns: auto 24px auto 24px auto; align-items: center; gap: 6px; }
.conv-mini { display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; width: 108px; }
.conv-cell { aspect-ratio: 1; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; font-family: system-ui, -apple-system, sans-serif; letter-spacing: -0.02em; }
.conv-op { font-size: 18px; text-align: center; color: var(--text-muted); }

.relu-formula { font-family: 'Georgia', serif; font-size: 20px; font-weight: 700; text-align: center; color: var(--text-primary); padding: 16px; background: var(--bg); border-radius: var(--radius); margin-bottom: 12px; }
.relu-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.relu-box { border-radius: var(--radius); padding: 10px 12px; text-align: center; }
.relu-val { font-size: 17px; font-weight: 700; margin-top: 4px; }

.pool-vis { display: grid; gap: 2px; padding: 6px; border-radius: var(--radius); }
.pool-cell { aspect-ratio: 1; border-radius: 2px; }

.flat-3d { display: flex; gap: 4px; align-items: flex-end; height: 80px; }
.flat-3d-layer { flex: 1; border-radius: 4px; }
.vec-vis { display: flex; align-items: flex-end; gap: 2px; height: 60px; }
.vec-bar { flex: 1; border-radius: 2px 2px 0 0; }

.neuron-grid { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; }
.neuron-dot { aspect-ratio: 1; border-radius: 2px; }

.weight-bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.weight-label { font-size: 11px; color: var(--text-secondary); width: 56px; flex-shrink: 0; }
.weight-track { flex: 1; height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.weight-fill { height: 100%; border-radius: 99px; background: var(--purple-500); }
.weight-val { font-size: 11px; font-weight: 600; color: var(--text-primary); min-width: 32px; text-align: right; }

.chart-wrap { position: relative; height: 200px; }

/* OUTPUT */
.result-banner { border-radius: var(--radius-lg); padding: 16px 20px; display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.result-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.result-icon svg { width: 24px; height: 24px; stroke: white; fill: none; stroke-width: 2.5; }
.result-title { font-size: 16px; font-weight: 700; }
.result-sub { font-size: 13px; margin-top: 2px; }
.confidence-big { text-align: center; padding: 20px; background: var(--purple-50); border: 1.5px solid var(--purple-100); border-radius: var(--radius-lg); margin-bottom: 14px; }
.confidence-num { font-size: 48px; font-weight: 800; color: var(--purple-600); line-height: 1; }
.confidence-lbl { font-size: 12px; color: var(--purple-500); margin-top: 4px; }
.confidence-class { font-size: 18px; font-weight: 700; color: var(--purple-700); margin-top: 8px; }
.reco-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius); margin-bottom: 8px; }
.reco-icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.reco-icon svg { width: 15px; height: 15px; }
.reco-text { font-size: 13px; line-height: 1.5; color: var(--text-primary); }