:root {
  --pine: #1e3a34;
  --pine-deep: #142823;
  --pine-mid: #3f6b5a;
  --cream: #f6f1e6;
  --cream-dark: #ece4d2;
  --sand: #d7c4a8;
  --text: #142823;
  --muted: #5a6b64;
  --line: #d9d0bf;
  --white: #fffdf8;
  --ok: #1f6b45;
  --ok-bg: #e4f3ea;
  --wait: #8a5a12;
  --wait-bg: #f8ecd4;
  --tab-h: 64px;
  --banner-h: 36px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--cream-dark);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100%;
}

body {
  max-width: 430px;
  margin: 0 auto;
  background: var(--cream);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }

.banner {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--wait-bg);
  color: var(--wait);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-bottom: 1px solid #ead7b0;
}

.company {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine-mid);
  padding: 10px 20px 0;
}

.appbar { padding: 8px 20px 12px; }
.appbar .hello { font-size: 13px; color: var(--muted); }
.appbar h1 { font-size: 22px; font-weight: 700; line-height: 1.2; }
.appbar .addr { font-size: 13px; color: var(--muted); margin-top: 2px; }
.back {
  display: inline-block;
  font-size: 13px;
  color: var(--pine-mid);
  font-weight: 600;
  margin-bottom: 6px;
}

.content {
  flex: 1;
  padding: 8px 16px calc(var(--tab-h) + 16px);
}

.card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 12px;
}

.balance-card {
  background: var(--pine);
  color: var(--cream);
  border: 0;
}
.balance-card .kicker {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
  font-weight: 600;
}
.amount {
  font-size: 40px;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 4px 0 2px;
}
.due { font-size: 14px; opacity: 0.9; }
.split {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(246, 241, 230, 0.25);
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.92;
}

.pay, .primary {
  display: block;
  width: 100%;
  margin-top: 14px;
  background: var(--cream);
  color: var(--pine-deep);
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  padding: 14px 12px;
  border-radius: 14px;
  letter-spacing: -0.01em;
}
.primary { background: var(--pine); color: var(--cream); margin-top: 0; margin-bottom: 12px; }

.list-card .title, .title { font-weight: 700; font-size: 15px; }
.list-card .meta, .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.wait { background: var(--wait-bg); color: var(--wait); }

.notice { font-size: 13.5px; line-height: 1.4; }
.fine { font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 8px; }
.coming {
  text-align: center;
  padding: 28px 12px 8px;
}
.coming h2 { font-size: 20px; margin-bottom: 8px; }
.coming p { color: var(--muted); font-size: 14px; line-height: 1.45; }

.line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  padding: 8px 0;
}
.line + .line { border-top: 1px solid var(--line); }
.muted { color: var(--muted); }

.menu {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 12px;
}
.menu a, .menu button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 15px 16px;
  font-size: 15.5px;
  font-weight: 600;
  text-align: left;
  border-top: 1px solid var(--line);
}
.menu a:first-child, .menu button:first-child { border-top: 0; }
.menu .count {
  background: var(--pine);
  color: var(--cream);
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  text-align: center;
  line-height: 20px;
  padding: 0 6px;
}
.chev { color: var(--sand); font-weight: 500; }

.doc { padding: 10px 0; }
.doc + .doc { border-top: 1px solid var(--line); }
.doc span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }

.tabs {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 430px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: var(--white);
  padding: 8px 4px calc(10px + env(safe-area-inset-bottom));
  z-index: 15;
}
.tab {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
  padding: 4px 0;
}
.tab .ico { display: block; font-size: 18px; margin-bottom: 2px; }
.tab.on, .tab[aria-current="page"] { color: var(--pine); }

.hidden { display: none !important; }
.err { color: var(--clay, #8d4329); font-size: 14px; padding: 16px; }

.appbar { padding-left: 4px; padding-right: 4px; }
.kicker-plain {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.amount-dark { color: var(--pine); }
.history-heading { margin: 4px 4px 10px; }
.docs-heading { margin-bottom: 4px; }
.msg-body { margin-top: 8px; font-size: 14px; line-height: 1.45; }
.line.plain { border-top: 0; padding-top: 0; }
.retry { color: inherit; text-decoration: underline; }
