/* ============================================
   IMMVERSO — Main stylesheet
   Edit this file for all visual/layout changes
   ============================================ */

:root {
  --bg:           #fafaf8;
  --surface:      #fff;
  --border:       #e4e2da;
  --text:         #16160f;
  --text-muted:   #6b6a62;
  --accent:       #185fa5;
  --accent-bg:    #e6f1fb;
  --accent-hover: #124d8a;
  --green:        #1baf7a;
  --green-bg:     #e6f7f2;
  --amber:        #d97706;
  --amber-bg:     #fef3c7;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
}

/* ---- Top navigation bar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.3px;
}

.logo span {
  color: var(--text);
}

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

.profile-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--accent-bg);
  color: var(--accent);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s ease;
}

.back-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-bg);
}

/* ---- Page wrapper ---- */
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
}

.sub {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 24px;
}

/* ---- Panels ---- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 14px;
}

/* ---- Sliders ---- */
.sliders {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
}

.slider-row label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.slider-row input[type=range] {
  width: 100%;
}

.out {
  font-weight: 600;
  color: var(--text);
}

/* ---- Data quality tags ---- */
.real-tag {
  font-size: 10px;
  background: var(--green-bg);
  color: var(--green);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 600;
}

.est-tag {
  font-size: 10px;
  background: var(--amber-bg);
  color: var(--amber);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 600;
}

/* ---- Legend ---- */
.legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  margin-top: 16px;
  color: var(--text-muted);
}

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

/* ---- Results table ---- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

tr.top td {
  background: var(--accent-bg);
}

.score {
  font-weight: 600;
  font-size: 16px;
}

.bar-bg {
  height: 6px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
  width: 80px;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
}

.badge {
  display: inline-block;
  font-size: 11px;
  background: var(--accent-bg);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 6px;
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
  .sliders { grid-template-columns: 1fr; }
  .topbar  { padding: 10px 16px; }
}
