:root {
  color-scheme: dark;
  --bg: #0e1116;
  --panel: #171b22;
  --panel-2: #1f252e;
  --text: #eef2f6;
  --muted: #9aa7b7;
  --line: #2d3542;
  --accent: #35c3a6;
  --accent-2: #f0b84a;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
}

.app-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 16px 14px 28px;
}

.topbar,
.profile-band,
.section-head,
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar {
  min-height: 54px;
}

.eyebrow,
.label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.profile-band {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.profile-name {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 700;
}

.balance-box {
  min-width: 112px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--panel-2);
  text-align: right;
}

.balance-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.balance-box strong {
  display: block;
  margin-top: 2px;
  font-size: 17px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 16px 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  background: var(--accent);
  color: #061411;
  font-weight: 700;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-card {
  min-height: 128px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-card h3 {
  margin: 0;
  font-size: 17px;
}

.service-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.service-card button,
.primary-button,
.secondary-button {
  min-height: 40px;
  border-radius: 8px;
  border: 0;
  padding: 0 14px;
  font-weight: 700;
}

.service-card button,
.primary-button {
  background: var(--accent);
  color: #061411;
}

.secondary-button {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
}

.muted-list,
.settings-list {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
}

.setting-row + .setting-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.setting-row strong {
  color: var(--text);
  text-align: right;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(0, 0, 0, .56);
}

.modal.hidden,
.toast.hidden {
  display: none;
}

.modal-panel {
  width: min(520px, 100%);
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.modal-panel p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 30;
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
}

@media (min-width: 720px) {
  .service-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
