/* EVE Industry — dark theme, built for iPhone first */
:root {
  --bg: #0B1016; --surface: #121A23; --line: #1F2A36; --nav: #0E151D;
  --text: #E6EDF3; --soft: #B5C1CE; --muted: #8B9AAB;
  --accent: #4CC2E6; --accent-hi: #8ADCF3; --accent-bg: #12313D;
  --good: #6EE7A8; --good-bg: #0F2A22; --bad: #FF9966; --bad-bg: #3A2116;
  --warn: #FFB27A; --warn-bg: #2A1E14;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 15px; line-height: 1.35; -webkit-text-size-adjust: 100%;
}
#app {
  max-width: 560px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 8px) 16px calc(env(safe-area-inset-bottom) + 96px);
}
a { color: var(--accent); }
h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.01em; }
h2 { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }

.head { padding: 12px 4px 10px; display: flex; flex-direction: column; gap: 6px; }
.toprow { display: flex; justify-content: space-between; align-items: center; }
.kicker { font-size: 12px; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.status { font-size: 13px; color: var(--muted); }
.back { display: flex; align-items: center; gap: 4px; min-height: 44px; text-decoration: none; font-weight: 600; }

.iconbtn {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer;
}

.card {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin: 0 0 10px; color: var(--text); text-decoration: none;
}
.card.small { font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.card p { margin: 0 0 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 13px; }
.grid2 b { text-align: right; }

.controls { display: flex; justify-content: space-between; gap: 8px; margin: 4px 0 10px; flex-wrap: wrap; }
.pills { display: flex; gap: 8px; }
.pill {
  min-height: 36px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 13px; font-family: inherit;
  border: 1px solid var(--line); background: var(--surface); color: var(--soft); cursor: pointer;
}
.pill.on { border-color: var(--accent); background: var(--accent-bg); color: var(--accent-hi); }
.pill.on.good { border-color: var(--good); background: var(--good-bg); color: var(--good); }

.list { display: flex; flex-direction: column; gap: 6px; }
.row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px;
  color: var(--text); text-decoration: none;
}
.row.muted { opacity: 0.75; }
.col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.col.end { align-items: flex-end; flex: none; }
.name { font-size: 16px; font-weight: 600; }
.sub { font-size: 12px; color: var(--muted); }
.profit { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.profit.hit, .good { color: var(--good); }
.profit.below, .bad { color: var(--bad); }
.profit.none { color: var(--muted); }
.tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.tag.hit { background: var(--good-bg); color: var(--good); }
.tag.below { background: var(--bad-bg); color: var(--bad); }
.tag.none { background: var(--line); color: var(--muted); }

.hero {
  display: flex; justify-content: space-between; align-items: center; margin: 6px 0 10px; padding: 14px 16px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--soft);
}
.hero.hit { background: var(--good-bg); border-color: #1E4A3B; }
.hero.below { background: var(--bad-bg); border-color: #5A3424; }
.hero .label { font-size: 12px; font-weight: 600; color: var(--soft); }
.hero .big { font-size: 30px; font-weight: 700; }
.hero.hit .big { color: var(--good); }
.hero.below .big { color: var(--bad); }

.line {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; padding: 4px 0;
}
.line .val { font-variant-numeric: tabular-nums; flex: none; }
.line.soft { color: var(--soft); }
.line.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-weight: 700; font-size: 15px; }
.qty { color: var(--muted); font-size: 12px; }
.mbrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.tip { font-size: 12px; font-weight: 600; }
.tip.good { color: var(--good); }
.tip.bad { color: var(--warn); }

.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex: none; }
.seg button {
  min-width: 56px; min-height: 36px; border: none; background: var(--nav); color: var(--soft);
  font-weight: 600; font-size: 13px; font-family: inherit; cursor: pointer;
}
.seg button.on { background: var(--accent); color: #06222C; }

.warn { font-size: 13px; color: var(--warn); background: var(--warn-bg); border-radius: 10px; padding: 8px 10px; margin: 0 0 10px; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0; }
.center { text-align: center; }

.fields { display: flex; flex-direction: column; gap: 10px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--soft); }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--text); background: var(--nav); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%;
}
textarea { resize: vertical; margin: 6px 0; }
label.add { margin-top: 10px; }

.stepper-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--nav);
  color: var(--text); font-size: 20px; cursor: pointer;
}
.stepper span { min-width: 32px; text-align: center; font-size: 18px; font-weight: 700; }

.meter { margin: 6px 0; }
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 2px 0 6px; }
.bar div { height: 100%; border-radius: 999px; background: var(--accent); }
.bar div.grey { background: var(--muted); }

.primary, .secondary {
  width: 100%; min-height: 50px; border-radius: 14px; font-weight: 700; font-size: 16px; font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 10px;
}
.primary { border: none; background: var(--accent); color: #06222C; }
.secondary { border: 1px solid var(--line); background: var(--nav); color: var(--text); font-weight: 600; font-size: 15px; margin-top: 6px; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around;
  border-top: 1px solid var(--line); background: rgba(14, 21, 29, 0.96);
  padding: 8px 0 calc(env(safe-area-inset-bottom) + 8px); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tab {
  text-decoration: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; min-width: 64px; min-height: 44px; justify-content: center;
}
.tab.on { color: var(--accent); }
