/* NFC Crypto kit, showcase build: the phone apps' look in HTML (black metal, white primary, card first).
   Colours are the apps' own (apps/nfc_crypto/lib/brand/brand_config.dart, cryptocard_wallet, nfc_recovery).
   No fonts, images or anything else from the network. */
:root {
  --bg: #000; --bg2: #0a0a0b; --surface: #141415; --raised: #1c1c1e; --active: #2a2a2d;
  --border: #222224; --outline: #2c2c2e; --text: #fff; --muted: #8e8e93; --faint: #48484a;
  --success: #30d158; --danger: #ff453a; --warning: #ffb340;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", Menlo, "Roboto Mono", monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.35 var(--sans);
  -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 8px; }
input { font: inherit; color: inherit; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.muted { color: var(--muted); }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.s { width: 16px; height: 16px; }

/* layout */
.app { position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.pad { padding: 4px 20px 28px; }
.appbar { flex: none; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 12px 0 20px; }
.appbar h1 { flex: 1; margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar.sub { padding-left: 6px; }
.appbar.sub h1 { font-size: 17px; font-weight: 600; text-align: center; }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.iconbtn:hover { background: var(--raised); }
.iconbtn.box { border: 1px solid var(--outline); background: var(--surface); }

/* tabs */
.tabbar { flex: none; display: flex; padding: 8px 8px 22px; border-top: 1px solid var(--border); background: var(--bg); }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: var(--faint); font-size: 10.5px; font-weight: 600; }
.tabbar button[aria-current="page"] { color: var(--text); }

/* section labels, panels, hairline groups */
.label { display: flex; align-items: center; gap: 8px; margin: 24px 0 8px; font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.label .sp { flex: 1; }
.label button { font: 600 13px/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; }
.group { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 0 16px; }
.group > * + * { border-top: 1px solid var(--border); }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 0; width: 100%; text-align: left; }
.row .t { font-weight: 600; font-size: 15px; }
.row .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.row .s.mono { font-size: 11.5px; }
.row .grow { flex: 1; min-width: 0; }
.row .chev { color: var(--faint); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 14px; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { text-align: right; font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }

/* tags and pills */
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font: 700 10.5px/1 var(--mono); letter-spacing: .08em;
  text-transform: uppercase; border: 1px solid var(--outline); color: var(--text); white-space: nowrap; }
.tag.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.tag.off { color: var(--muted); }
.tag.warn { color: var(--warning); border-color: rgba(255, 179, 64, .4); }
.tag.sample { color: #000; background: #fff; border-color: #fff; }
.pill { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 54px; border-radius: 999px;
  background: #fff; color: #000; font-weight: 700; font-size: 16px; }
.pill.ghost { background: transparent; color: var(--text); border: 1px solid var(--outline); }
.pill.dark { background: var(--raised); color: var(--text); }
.pill + .pill { margin-top: 10px; }
.chipbtn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 999px; border: 1px solid var(--outline);
  font-size: 13px; font-weight: 600; background: var(--surface); }
.chipbtn.hot { border-color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* switch */
.sw { position: relative; width: 50px; height: 30px; border-radius: 999px; background: var(--active); flex: none; transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.sw[aria-checked="true"] { background: var(--success); }
.sw[aria-checked="true"]::after { transform: translateX(20px); }

/* meters */
.meter { height: 4px; border-radius: 2px; background: var(--active); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: #fff; border-radius: 2px; transition: width .5s; }
.meter.over i { background: var(--warning); }

/* the card (NfcCardArt): metal finishes from nfc_card_art.dart */
.card { position: relative; aspect-ratio: 1.586; border-radius: 6.5%/10.3%; overflow: hidden; color: #fff; user-select: none;
  border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 18px 40px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .12); container-type: inline-size; }
.card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .09) 45%, transparent 60%); }
.card .b { position: absolute; left: 7%; top: 9%; font-weight: 700; font-size: 7.5cqw; letter-spacing: .2px; }
.card .w { position: absolute; right: 6.5%; top: 8%; width: 11cqw; height: 11cqw; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: #000; }
.card .w svg { width: 62%; height: 62%; }
.card .chip { position: absolute; left: 7%; top: 38%; width: 13cqw; height: 10cqw; border-radius: 1.6cqw; background: linear-gradient(135deg, #f3d98b, #c9a54a);
  box-shadow: inset 0 0 0 .4cqw rgba(140, 106, 47, .55); }
.card .chip::after { content: ""; position: absolute; inset: 30% 0; border-top: .4cqw solid rgba(140, 106, 47, .55); border-bottom: .4cqw solid rgba(140, 106, 47, .55); }
.card .l { position: absolute; left: 7%; bottom: 11%; font-weight: 600; font-size: 5.5cqw; letter-spacing: 1.2px; text-transform: uppercase; }
.card .r { position: absolute; left: 7%; bottom: 23%; font: 700 4cqw/1 var(--mono); letter-spacing: 1.4px; padding: 1cqw 2cqw; border-radius: 99px; border: 1px solid currentColor; opacity: .8; }
.card .id { position: absolute; right: 7%; bottom: 11%; font: 500 4cqw/1 var(--mono); letter-spacing: .8px; opacity: .75; }
.card.graphite { background: linear-gradient(135deg, #3a3a3c, #1c1c1e 55%, #111112); }
.card.midnight { background: linear-gradient(135deg, #1a1a1c, #050505 55%, #000); }
.card.carbon { background: linear-gradient(135deg, #2b2b2e, #18181a 50%, #2b2b2e); }
.card.silver { background: linear-gradient(135deg, #f2f2f7, #c7c7cc 55%, #8e8e93); color: #111112; }
.card.gold { background: linear-gradient(135deg, #f5e3b3, #d4af6a 55%, #8c6a2f); color: #1c1408; }
.card.aurora { background: linear-gradient(135deg, #30d158, #0a84ff 55%, #5e5ce6); }
.card.silver .w, .card.gold .w { background: rgba(0, 0, 0, .85); color: #fff; }
.thumb { width: 44px; height: 28px; border-radius: 5px; flex: none; position: relative; border: 1px solid rgba(255, 255, 255, .14); }
.thumb::after { content: ""; position: absolute; right: 4px; top: 4px; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid currentColor; border-left-color: transparent; border-bottom-color: transparent; transform: rotate(45deg); opacity: .8; }
.thumb.graphite { background: linear-gradient(135deg, #3a3a3c, #111112); }
.thumb.midnight { background: linear-gradient(135deg, #1a1a1c, #000); }
.thumb.silver { background: linear-gradient(135deg, #f2f2f7, #8e8e93); color: #111; }
.thumb.gold { background: linear-gradient(135deg, #f5e3b3, #8c6a2f); color: #1c1408; }
.thumb.carbon { background: linear-gradient(135deg, #2b2b2e, #18181a); }
.thumb.aurora { background: linear-gradient(135deg, #30d158, #5e5ce6); }

/* tap animation (NfcTapAnimation): a card with waves; waiting, scanning, success, rejected */
.tap { position: relative; width: 190px; height: 150px; margin: 0 auto; display: grid; place-items: center; }
.tap .card { width: 120px; z-index: 1; transition: transform .35s; }
.tap .ring { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .25); opacity: 0; }
.tap.scanning .ring { animation: ring 1.8s ease-out infinite; }
.tap.scanning .ring:nth-child(2) { animation-delay: .6s; }
.tap.scanning .ring:nth-child(3) { animation-delay: 1.2s; }
.tap.scanning .card { transform: translateY(-4px) rotate(-4deg); }
@keyframes ring { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.tap .badge { position: absolute; z-index: 2; right: 26px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; display: none; place-items: center; color: #000; }
.tap.success .badge { display: grid; background: var(--success); animation: pop .35s; }
.tap.rejected .badge { display: grid; background: var(--danger); color: #fff; animation: pop .35s; }
.tap.rejected .card { animation: shake .4s; }
@keyframes pop { from { transform: scale(.3); } to { transform: scale(1); } }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* bottom sheets, dialogs, toasts */
.scrim { position: absolute; inset: 0; z-index: 30; background: rgba(0, 0, 0, .62); display: flex; align-items: flex-end; animation: fade .2s; }
.scrim.center { align-items: center; padding: 24px; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-height: 92%; overflow-y: auto; background: var(--bg2); border: 1px solid var(--border); border-bottom: 0; border-radius: 26px 26px 0 0;
  padding: 10px 24px 30px; animation: up .28s cubic-bezier(.2, .8, .2, 1); scrollbar-width: none; }
.sheet .grab { width: 36px; height: 4px; border-radius: 2px; background: var(--active); margin: 0 auto 12px; }
.sheet h2 { margin: 6px 0 6px; text-align: center; font-size: 19px; }
.sheet .reason { text-align: center; color: var(--muted); font: 13px/1.45 var(--mono); }
.sheet .msg { margin-top: 12px; text-align: center; color: var(--warning); font-weight: 600; font-size: 14px; }
.sheet .foot { margin-top: 10px; text-align: center; color: var(--muted); font-size: 12px; }
@keyframes up { from { transform: translateY(100%); } }
.dialog { width: 100%; background: var(--raised); border-radius: 22px; padding: 22px; animation: fade .2s; }
.dialog h3 { margin: 0 0 8px; font-size: 18px; }
.dialog p { margin: 0 0 6px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.dialog .acts { display: flex; justify-content: flex-end; gap: 6px; margin-top: 14px; }
.dialog .acts button { padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.dialog .acts button:hover { background: var(--active); }
.dialog .acts .danger { color: var(--danger); }
.toast { position: absolute; z-index: 50; left: 14px; right: 14px; bottom: 92px; padding: 13px 16px; border-radius: 14px; background: #2c2c2e; color: #fff; font-size: 13.5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: fade .2s; }

/* simulated tap: the only demo-only control inside the apps, always labelled */
.simtap { margin-top: 16px; padding: 12px; border-radius: 16px; border: 1px dashed rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .03); }
.simtap .h { display: flex; align-items: center; gap: 8px; font: 700 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.simtap .h::before { content: "DEMO"; padding: 3px 6px; border-radius: 4px; background: #fff; color: #000; letter-spacing: .08em; }
.simtap .opts { display: grid; gap: 8px; }
.simtap button { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--outline); text-align: left; font-size: 14px; font-weight: 600; }
.simtap button:hover { border-color: #fff; }
.simtap button small { display: block; color: var(--muted); font: 500 11px/1.3 var(--mono); }
.simtap .thumb { width: 36px; height: 23px; }

/* sample chip, keypad */
.sample-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--outline);
  font: 600 11px/1 var(--mono); color: var(--muted); letter-spacing: .04em; }
.sample-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
.keypad button { height: 54px; border-radius: 14px; font: 500 24px/1 var(--mono); }
.keypad button:hover { background: var(--surface); }
.note { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 10px; }
