:root {
  --nu-teal: #004d40;
  --nu-brass: #a97c43;
  --nu-brass-soft: #f6efe4;
  --nu-ink: #1b2b27;
  --nu-mute: #6b7a76;
  --nu-line: #e3e8e6;
  --nu-error: #b3261e;
}

.nu-gate {
  border: 1px solid var(--nu-line);
  border-radius: 16px;
  padding: 22px 18px;
  text-align: center;
  background: #fff;
  color: var(--nu-ink);
}
.nu-gate h3 { margin: 6px 0 6px; font-size: 1.15rem; }
.nu-gate p { margin: 0 0 10px; line-height: 1.5; color: var(--nu-mute); font-size: 0.92rem; }
.nu-gate p strong { color: var(--nu-ink); }

.nu-icon {
  width: 46px; height: 46px; margin: 0 auto 8px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--nu-brass-soft); color: var(--nu-brass);
}

.nu-meter { display: flex; justify-content: center; gap: 6px; margin: 4px 0 8px; }
.nu-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--nu-brass); background: transparent; }
.nu-dot.is-full { background: var(--nu-brass); }

.nu-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 14px 0 6px; }
.nu-btn {
  appearance: none; border: 1.5px solid var(--nu-teal); border-radius: 12px;
  padding: 12px 18px; font: inherit; font-weight: 600; cursor: pointer;
  min-height: 46px; transition: transform .12s ease, opacity .12s ease;
}
.nu-btn:active { transform: scale(.98); }
.nu-btn:disabled { opacity: .55; cursor: default; }
.nu-btn-primary { background: var(--nu-teal); color: #fff; }
.nu-btn-ghost { background: transparent; color: var(--nu-teal); }

.nu-foot { margin: 8px 0 0; font-size: 0.78rem; color: var(--nu-mute); }
.nu-sub { font-size: 0.85rem; color: var(--nu-mute); }
.nu-note { font-size: 0.85rem; color: var(--nu-mute); min-height: 1.2em; }
.nu-note.nu-error { color: var(--nu-error); }

.nu-modal-backdrop {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(10, 25, 22, .55);
  display: flex; align-items: flex-end; justify-content: center;
}
.nu-modal {
  position: relative; width: 100%; max-width: 460px; background: #fff; color: var(--nu-ink);
  border-radius: 20px 20px 0 0; padding: 24px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  max-height: 92vh; overflow-y: auto;
}
.nu-modal h3 { margin: 0 0 6px; font-size: 1.2rem; }
.nu-modal-close {
  position: absolute; top: 10px; right: 12px; width: 36px; height: 36px;
  border: 0; background: transparent; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--nu-mute);
}
.nu-balance { margin: 4px 0 12px; font-size: 0.9rem; }
.nu-packs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nu-pack {
  appearance: none; display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  text-align: left; padding: 14px; border: 1.5px solid var(--nu-line); border-radius: 14px;
  background: #fff; font: inherit; color: inherit; cursor: pointer;
}
.nu-pack strong { font-size: 1rem; }
.nu-pack span { color: var(--nu-teal); font-weight: 700; }
.nu-pack small { color: var(--nu-mute); font-size: 0.76rem; }
.nu-pack.is-rec { border-color: var(--nu-brass); background: var(--nu-brass-soft); }
.nu-pack:disabled { opacity: .6; cursor: default; }

@media (min-width: 640px) {
  .nu-modal-backdrop { align-items: center; }
  .nu-modal { border-radius: 20px; padding-bottom: 24px; }
}

.nu-wallet {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px; border-radius: 16px; background: var(--nu-teal); color: #fff; margin-bottom: 14px;
}
.nu-wallet-balance { display: flex; flex-direction: column; }
.nu-wallet-balance .nu-eyebrow { font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.nu-wallet-balance strong { font-size: 2rem; line-height: 1.1; }
.nu-wallet .nu-btn { background: var(--nu-brass); border-color: var(--nu-brass); color: #fff; }

.nu-allowance { border: 1px solid var(--nu-line); border-radius: 16px; background: #fff; padding: 6px 16px; margin-bottom: 10px; }
.nu-allow-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; }
.nu-allow-row + .nu-allow-row { border-top: 1px solid var(--nu-line); }
.nu-allow-row .nu-meter { margin: 0; }
.nu-allow-label { font-weight: 600; }
.nu-allow-label small { display: block; font-weight: 400; color: var(--nu-mute); }
.nu-rule { font-size: 0.82rem; color: var(--nu-mute); margin: 0 0 18px; }

.nu-history-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--nu-line); border-radius: 14px; background: #fff;
  margin-bottom: 8px; text-decoration: none; color: var(--nu-ink);
}
.nu-history-item strong { display: block; font-size: 0.95rem; }
.nu-history-item small { color: var(--nu-mute); }
.nu-chip { font-size: 0.72rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--nu-brass-soft); color: var(--nu-brass); white-space: nowrap; }
.nu-chip.is-free { background: #e4f1ee; color: var(--nu-teal); }

.nu-btn:focus-visible,
.nu-pack:focus-visible,
.nu-back:focus-visible,
.nu-modal-close:focus-visible,
.nu-pill:focus-visible {
  outline: 3px solid var(--nu-brass);
  outline-offset: 2px;
}
.nu-modal:focus { outline: none; }

.nu-back {
  appearance: none; border: 0; background: none; padding: 4px 0; margin: 0 0 6px;
  font: inherit; font-weight: 600; color: var(--nu-teal); cursor: pointer;
}
.nu-back:disabled { opacity: .5; cursor: default; }

.nu-summary {
  margin: 14px 0 8px; padding: 2px 14px;
  border: 1px solid var(--nu-line); border-radius: 14px; background: #fff;
}
.nu-summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; }
.nu-summary > div + div { border-top: 1px solid var(--nu-line); }
.nu-summary dt { color: var(--nu-mute); font-size: 0.92rem; }
.nu-summary dd { margin: 0; font-weight: 600; }
.nu-summary .nu-total dt { color: var(--nu-ink); font-weight: 700; }
.nu-summary .nu-total dd { font-size: 1.2rem; color: var(--nu-teal); }

.nu-modal .nu-actions { justify-content: stretch; }
.nu-modal .nu-actions .nu-btn { flex: 1; }

.nu-pill {
  appearance: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--nu-line); background: #fff; color: var(--nu-teal);
  font: inherit; font-weight: 700; font-size: 0.88rem; cursor: pointer;
}
.nu-pill svg { color: var(--nu-brass); }

.nu-strip {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 16px; margin: 0 0 14px;
  border: 1px solid var(--nu-line); border-radius: 16px; background: #fff;
}
.nu-strip-stat { display: flex; flex-direction: column; min-width: 0; }
.nu-strip-stat strong { font-size: 1.05rem; line-height: 1.2; color: var(--nu-ink); }
.nu-strip-stat span { font-size: 0.74rem; color: var(--nu-mute); }
.nu-strip .nu-btn { margin-left: auto; min-height: 40px; padding: 8px 14px; background: var(--nu-brass); border-color: var(--nu-brass); color: #fff; }

.landlord-access, .nu-access { margin: 6px 0 0; font-size: 0.82rem; color: var(--nu-mute); }

@media (prefers-reduced-motion: reduce) {
  .nu-btn { transition: none; }
}

.nu-strip[hidden] { display: none; }
.nu-chip.is-off { background: #eceeed; color: var(--nu-mute); }
