/* BingwaCast portal — clean, light, green design system.
   Mobile-first; centers on larger screens. */
:root {
  --green: #1f9d57;
  --green-dark: #0f7a43;
  --green-050: #eef7f1;
  --green-100: #e2f1e8;
  --ink: #0f1b14;
  --body: #5c6b61;
  --muted: #8a978d;
  --line: #e7ece8;
  --bg: #ffffff;
  --card: #ffffff;
  --danger: #dc2626;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16,27,20,.04), 0 6px 20px rgba(16,27,20,.05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-dark); text-decoration: none; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.error { color: var(--danger); font-size: .92rem; margin: 10px 0; }

/* Brand wordmark: Bingwa (ink) + Cast (green) */
.brand { font-size: 1.35rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.brand b { color: var(--green); font-weight: 800; }

/* Top app bar */
.appbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.appbar .right { margin-left: auto; }
.appbar a.action { color: var(--body); font-weight: 600; font-size: .95rem; }
.appbar a.action:hover { color: var(--green-dark); }

/* Layout */
.wrap { max-width: 760px; margin: 0 auto; padding: 18px 16px 48px; }
.stack > * + * { margin-top: 16px; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.card > h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.card > .sub { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }

/* Hero (wallet) — green gradient like the brand site */
.hero {
  border-radius: 20px; padding: 22px;
  background: linear-gradient(135deg, var(--green-dark) 0%, #28b268 100%);
  color: #fff; box-shadow: 0 10px 30px rgba(15,122,67,.25);
}
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .72rem;
  font-weight: 700; color: rgba(255,255,255,.82); margin: 0 0 10px;
}
.hero .amount { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.hero .amount small { font-size: 1rem; font-weight: 700; opacity: .85; margin-right: 4px; }
.hero .meta { margin: 10px 0 0; color: rgba(255,255,255,.9); font-size: .92rem; }
.hero .paybill {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,.14); font-size: .9rem; color: #fff;
}
.hero .paybill strong { font-weight: 800; }
.chip {
  display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px;
  background: rgba(255,255,255,.9); color: var(--danger); font-size: .72rem; font-weight: 700;
}

/* Forms */
label { display: block; font-weight: 700; color: var(--ink); font-size: .92rem; margin-bottom: 6px; }
label.field { margin-bottom: 14px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #aab4ac; }
input:focus, select:focus, textarea:focus {
  border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,157,87,.15);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--green); color: #fff; font-weight: 700; font-size: .98rem;
  border: 0; border-radius: var(--radius-sm); padding: 12px 18px; cursor: pointer;
  transition: background .15s, transform .02s; text-align: center;
}
.btn:hover { background: var(--green-dark); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-ghost { background: var(--green-050); color: var(--green-dark); }
.btn-ghost:hover { background: var(--green-100); }
button.link {
  background: none; border: 0; color: var(--green-dark); font-weight: 700;
  padding: 0; cursor: pointer; font-size: .9rem;
}

/* Inline action rows */
.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.inline input { flex: 1; min-width: 140px; }
.inline .btn { white-space: nowrap; }
.form + .form { margin-top: 12px; }

/* Lists / tables */
.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .name { color: var(--ink); font-weight: 700; }
.row .desc { color: var(--muted); font-size: .85rem; }
.amt { color: var(--ink); font-weight: 700; white-space: nowrap; }
.amt.neg { color: var(--danger); }

/* Status pills */
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; line-height: 1.4;
}
.pill-on { background: var(--green-050); color: var(--green-dark); }
.pill-off { background: #f1f3f2; color: #8a978d; }
.pill-warn { background: #fff4e5; color: #b26a00; }
.tag { background: var(--ink); color: #fff; border-radius: 6px; padding: 1px 7px; font-size: .7rem; font-weight: 700; }

.empty { color: var(--muted); padding: 18px 0; text-align: center; }

/* Auth pages */
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth {
  width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow);
}
.auth .brand { font-size: 1.6rem; display: block; margin-bottom: 2px; }
.auth .tagline { color: var(--muted); margin: 0 0 20px; font-size: .92rem; }
.auth .btn { margin-top: 6px; }
.auth .foot { margin: 16px 0 0; font-size: .88rem; }
.code-input { text-align: center; letter-spacing: .4em; font-size: 1.4rem; font-weight: 700; }

/* Viewer */
.viewer { max-width: 440px; margin: 0 auto; padding: 14px 16px 40px; }
.viewer video {
  width: 100%; display: block; background: #000; border-radius: 14px;
  touch-action: none; aspect-ratio: 9/16;
}
.controls { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.controls .btn { flex: 1; min-width: 72px; background: var(--green-050); color: var(--green-dark); }
.controls .btn:hover { background: var(--green-100); }

@media (max-width: 480px) {
  .hero .amount { font-size: 2rem; }
  .card { padding: 16px; }
}
