:root {
  --cream: #f3ede3;
  --ink: #1c1612;
  --gold: #c4a35a;
  --gold-deep: #9a7a32;
  --white: #fffbfa;
  --muted: #7a7168;
  --line: #e6ddd0;
  --paid: #3f6b4e;
  --due: #b85c38;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "DM Sans", sans-serif;
  background: var(--cream);
  color: var(--ink);
}
.hidden { display: none !important; }
h1, h2 { font-family: "Playfair Display", serif; margin: 0; }
.kicker { letter-spacing: .22em; text-transform: uppercase; font-size: 11px; color: var(--gold-deep); margin: 0 0 6px; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, #3a2d22, var(--ink));
  padding: 24px;
}
.login .card {
  width: min(400px, 100%);
  background: #241c17;
  border: 1px solid rgba(196,163,90,.3);
  border-radius: 24px;
  padding: 28px;
  color: white;
}
.login h1 { font-size: 34px; }
.sub { color: #e8d7a8; line-height: 1.45; }
.login label { display: block; margin: 14px 0 6px; font-size: 12px; color: #e8d7a8; }
.login input {
  width: 100%; height: 48px; border-radius: 12px; border: 1px solid #3d332b;
  background: #1c1612; color: white; padding: 0 14px;
}
.login button {
  width: 100%; margin-top: 18px; height: 50px; border: 0; border-radius: 12px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  color: white; font-weight: 700; cursor: pointer;
}
.hint, .staff-link { display: block; text-align: center; margin-top: 14px; font-size: 12px; color: #a39a90; }
.staff-link { color: var(--gold); text-decoration: none; }
.error { color: #e08a72; min-height: 18px; font-size: 13px; }

.app { max-width: 480px; margin: 0 auto; padding: 18px 16px 40px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ghost {
  border: 1px solid var(--line); background: white; border-radius: 10px;
  padding: 8px 12px; cursor: pointer;
}
.tabs { display: flex; gap: 8px; margin: 16px 0; }
.tab {
  flex: 1; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: white; font-weight: 600; cursor: pointer;
}
.tab.on { background: var(--ink); color: white; border-color: var(--ink); }

.run {
  background: white; border-radius: 18px; padding: 14px; margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(28,22,18,.06); cursor: pointer;
}
.run b { display: block; font-size: 16px; }
.run p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.amt { font-weight: 700; color: var(--gold-deep); }
.pill {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px;
}
.pill.paid { background: #dce8df; color: var(--paid); }
.pill.due { background: #f6e0d6; color: var(--due); }
.pill.way { background: #e3d7f3; color: #5b3d86; }

.sheet {
  position: fixed; inset: 0; background: rgba(28,22,18,.5);
  display: grid; align-items: end; z-index: 10;
}
.sheet-card {
  background: var(--cream); border-radius: 24px 24px 0 0;
  padding: 20px 18px 28px; max-height: 92vh; overflow: auto;
}
.pay-box {
  background: white; border-radius: 16px; padding: 14px; margin: 12px 0;
  text-align: center;
}
.pay-box.ok { border: 1px solid #cfe0d4; }
.pay-box.due { border: 1px solid #f0cfc4; }
.qr { width: 200px; height: 200px; border-radius: 12px; background: white; margin: 10px auto; display: block; }
.upi { font-weight: 700; word-break: break-all; }
.actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.btn {
  height: 48px; border: 0; border-radius: 12px; font-weight: 700; cursor: pointer;
  background: var(--ink); color: white;
}
.btn.gold { background: linear-gradient(90deg, var(--gold), var(--gold-deep)); }
.btn.soft { background: white; color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: .45; }
.items { background: white; border-radius: 14px; padding: 10px 14px; }
.item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.toast {
  position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 448px; margin: auto;
  background: var(--ink); color: white; padding: 12px 14px; border-radius: 12px; z-index: 20;
  text-align: center;
}
