:root {
  --bg: #0f1419;
  --panel: #1a2129;
  --line: #2b3742;
  --text: #e6edf3;
  --muted: #8b98a5;
  --accent: #4ea1ff;
  --good: #3fb950;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 16px;
}

header h1 { font-size: 18px; margin: 0; }
.mode { color: var(--muted); font-size: 13px; margin: 0; }
.cloud-bar { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.cloud-status { color: var(--muted); font-size: 13px; }

main { padding: 24px; max-width: 1100px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; }
h2 { font-size: 15px; color: var(--muted); font-weight: 600; }

button {
  background: var(--accent);
  color: #04121f;
  border: 0;
  border-radius: 6px;
  padding: 7px 12px;
  font-weight: 600;
  cursor: pointer;
}
button.remove { background: transparent; color: var(--muted); padding: 4px 8px; }
button.remove:hover { color: #ff7b72; }

table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
th, td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--line); }
th:first-child, th:nth-child(2), td:first-child, td:nth-child(2) { text-align: left; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

input {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 5px;
  padding: 5px 7px;
  width: 100%;
}
input[type="number"] { text-align: right; }
td.derived { color: var(--good); font-variant-numeric: tabular-nums; }

.controls { margin: 8px 0 20px; color: var(--muted); }
.controls input { width: 90px; display: inline-block; }

.totals {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 6px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
  width: max-content;
}
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.totals .grand dd, .totals .grand dt { font-weight: 700; color: var(--accent); }
