:root {
  --bg: #FAF7F1;
  --bg-outer: #EFE9DC;
  --card: #F3EEE2;
  --line: #E4DDCD;
  --ink: #1E1B16;
  --muted: #5B5346;
  --muted-2: #8A8172;
  --green: #14532D;
  --green-2: #1C6B3A;
  --gold: #C08A2E;
  --gold-ink: #96691F;
  --gold-bg: #FBF0DC;
  --red: #B3261E;
  --red-bg: #FBEAEA;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Noto Sans Bengali', system-ui, -apple-system, sans-serif;
  background: var(--bg-outer);
  color: var(--ink);
}

.app-shell {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.app-inner {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100vh;
}

.topbar {
  padding: 22px 20px 10px;
}

.topbar .brand {
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.02em;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 16px;
}

.hero {
  border-radius: 18px;
  padding: 20px;
  color: white;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  margin-bottom: 18px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  opacity: 0.9;
}

.pill {
  font-size: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
}

.hero-label {
  font-size: 12px;
  opacity: 0.8;
  margin: 0 0 2px;
}

.hero-amount {
  font-size: 30px;
  font-weight: 700;
  margin: 0;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  opacity: 0.9;
}

h2.section-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: white;
  margin-bottom: 8px;
}

.card.muted-bg { background: var(--card); }

.task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.task-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.task-title {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-sub {
  font-size: 11px;
  color: var(--muted-2);
  margin: 2px 0 0;
}

.btn {
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  cursor: pointer;
}

.btn-primary { background: var(--green); color: white; }
.btn-gold { background: var(--gold); color: white; }
.btn-outline-gold { background: transparent; border: 1px solid var(--gold); color: var(--gold-ink); }
.btn-outline-green { background: transparent; border: 1px solid var(--green); color: var(--green); }
.btn-block { width: 100%; padding: 12px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-file {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.btn-file input { display: none; }

.status-pending {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-ink);
  background: var(--gold-bg);
  border-radius: 8px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-approved {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

input[type="text"], input[type="email"], input[type="password"], input[type="tel"] {
  width: 100%;
  font-size: 13px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  outline: none;
  margin-bottom: 10px;
  background: white;
  color: var(--ink);
  font-family: inherit;
}

.callout {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border-radius: 12px;
  padding: 12px;
  background: var(--gold-bg);
  font-size: 12px;
  color: #7A5A1E;
  margin-top: 14px;
}

.callout.error { background: var(--red-bg); color: #8A2A22; }
.callout.info { background: var(--card); color: var(--muted); }

.bottom-nav {
  display: flex;
  border-top: 1px solid var(--line);
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 500;
  font-family: inherit;
}
.nav-btn.active { color: var(--green); }
.nav-btn svg { stroke: currentColor; }

.hidden { display: none !important; }

.center-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.center-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.uid-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--muted-2);
  font-family: monospace;
}

h1.screen-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 6px;
}

p.screen-sub {
  font-size: 13px;
  text-align: center;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.5;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}
.kv-row span:first-child { color: var(--muted); }
.kv-row span:last-child { font-weight: 600; }

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--card);
  font-family: monospace;
  font-size: 13px;
  margin-bottom: 14px;
}

.thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.method-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.method-toggle button {
  flex: 1;
  padding: 9px 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}
.method-toggle button.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

/* ---- Admin panel ---- */
.admin-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 18px 60px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.admin-tabs button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
}
.admin-tabs button.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: white;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-card .info p { margin: 2px 0; font-size: 13px; }
.admin-card .info p.label { color: var(--muted-2); font-size: 11px; margin-bottom: 4px; }
.admin-card .actions { display: flex; gap: 8px; }

.login-box {
  max-width: 360px;
  margin: 80px auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.empty-note {
  color: var(--muted-2);
  font-size: 13px;
  padding: 20px 0;
  text-align: center;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30,27,22,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}
.modal-box {
  width: 100%;
  max-width: 440px;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 20px;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.modal-header h3 { margin: 0; font-size: 16px; }
.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--muted-2);
  padding: 4px 8px;
}
.modal-reward {
  font-size: 12px;
  color: var(--muted-2);
  margin: 0 0 12px;
}
.modal-instructions {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}
.task-card-clickable { cursor: pointer; }
