/* ============================================================
   FlashWallet — Utilities Layer
   Tailwind-equivalent kept for template readability.
   Replaces the Tailwind Play CDN (Phase 2.1).
   Tokens stay in app.css; this file only handles layout/utility.
   ============================================================ */

/* ---------- Display ---------- */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.table { display: table; }
.hidden { display: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Position ---------- */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.static { position: static; }

.top-0 { top: 0; }
.top-0\.5 { top: 2px; }
.top-1\/2 { top: 50%; }
.top-14 { top: 56px; }
.-top-12 { top: -48px; }

.left-0\.5 { left: 2px; }
.right-3 { right: 12px; }
.-right-12 { right: -48px; }
.inset-0 { inset: 0; }
.inset-x-0 { left: 0; right: 0; }
.bottom-0 { bottom: 0; }

.-translate-y-1\/2 { transform: translateY(-50%); }
.translate-x-5 { transform: translateX(20px); }

.z-10 { z-index: 10; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }

/* ---------- Flex / Grid ---------- */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }

.items-baseline { align-items: baseline; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }

.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }

.gap-0\.5 { gap: 2px; }
.gap-1 { gap: 4px; }
.gap-1\.5 { gap: 6px; }
.gap-2 { gap: 8px; }
.gap-2\.5 { gap: 10px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

/* Margin-top cascades (space-y) */
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 4px; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 8px; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 12px; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 16px; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 20px; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 24px; }
.space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 32px; }

/* ---------- Sizing ---------- */
.w-1\.5 { width: 6px; }
.w-4 { width: 16px; }
.w-5 { width: 20px; }
.w-7 { width: 28px; }
.w-10 { width: 40px; }
.w-11 { width: 44px; }
.w-16 { width: 64px; }
.w-20 { width: 80px; }
.w-24 { width: 96px; }
.w-32 { width: 128px; }
.w-40 { width: 160px; }
.w-full { width: 100%; }

.h-1 { height: 4px; }
.h-1\.5 { height: 6px; }
.h-4 { height: 16px; }
.h-5 { height: 20px; }
.h-6 { height: 24px; }
.h-7 { height: 28px; }
.h-10 { height: 40px; }
.h-14 { height: 56px; }
.h-16 { height: 64px; }
.h-20 { height: 80px; }
.h-32 { height: 128px; }
.h-40 { height: 160px; }
.h-px { height: 1px; }

.min-w-0 { min-width: 0; }
.min-w-\[180px\] { min-width: 180px; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }
.min-h-screen { min-height: 100vh; }
.min-h-\[36px\] { min-height: 36px; }
.min-h-\[40px\] { min-height: 40px; }
.min-h-\[calc\(100vh-3\.5rem\)\] { min-height: calc(100vh - 3.5rem); }

/* ---------- Padding ---------- */
.p-1 { padding: 4px; }
.p-4 { padding: 16px; }
.py-0\.5 { padding-top: 2px; padding-bottom: 2px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-1\.5 { padding-top: 6px; padding-bottom: 6px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-2\.5 { padding-top: 10px; padding-bottom: 10px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-5 { padding-top: 20px; padding-bottom: 20px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.pt-2 { padding-top: 8px; }
.py-12 { padding-top: 48px; padding-bottom: 48px; }
.py-20 { padding-top: 80px; padding-bottom: 80px; }
.px-1 { padding-left: 4px; padding-right: 4px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.pr-16 { padding-right: 64px; }
.pb-20 { padding-bottom: 80px; }
.pb-24 { padding-bottom: 96px; }
.pt-6 { padding-top: 24px; }
.pt-12 { padding-top: 48px; }
.first\:pt-0:first-child { padding-top: 0; }
.last\:pb-0:last-child { padding-bottom: 0; }

/* ---------- Margin ---------- */
.mt-0\.5 { margin-top: 2px; }
.mt-1 { margin-top: 4px; }
.mt-1\.5 { margin-top: 6px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-10 { margin-top: 40px; }
.mt-16 { margin-top: 64px; }
.mb-1 { margin-bottom: 4px; }
.mb-1\.5 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mb-12 { margin-bottom: 48px; }
.mr-1 { margin-right: 4px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-0 { margin-top: 0; margin-bottom: 0; }
.my-4 { margin-top: 16px; margin-bottom: 16px; }
.-mx-3 { margin-left: -12px; margin-right: -12px; }

/* ---------- Borders ---------- */
.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-y { border-top-width: 1px; border-bottom-width: 1px; border-style: solid; }

.border-border-subtle { border-color: var(--border-subtle); }
.border-brand-500 { border-color: var(--brand-500); }
.border-error { border-color: var(--danger); }
.border-danger { border-color: var(--danger); }
.border-warning { border-color: var(--warning); }

.rounded { border-radius: 4px; }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.divide-border-subtle > :not([hidden]) ~ :not([hidden]) { border-color: var(--border-subtle); }
.divide-y > :not([hidden]) ~ :not([hidden]) { border-top-width: 1px; border-top-style: solid; }

/* ---------- Backgrounds (incl. opacity via color-mix) ---------- */
.bg-bg-base { background-color: var(--bg-base); }
.bg-bg-surface { background-color: var(--bg-surface); }
.bg-bg-elevated { background-color: var(--bg-elevated); }
.bg-bg-overlay { background-color: var(--bg-overlay); }
.bg-border-subtle { background-color: var(--border-subtle); }
.bg-brand-500 { background-color: var(--brand-500); }
.bg-success { background-color: var(--success); }
.bg-warning { background-color: var(--warning); }
.bg-danger { background-color: var(--danger); }
.bg-white { background-color: #fff; }
.bg-net-bep20 { background-color: var(--network-bep20); }
.bg-net-erc20 { background-color: var(--network-eth); }
.bg-net-trc20 { background-color: var(--network-trc20); }

.bg-bg-base\/80  { background-color: color-mix(in srgb, var(--bg-base) 80%, transparent); }
.bg-bg-base\/90  { background-color: color-mix(in srgb, var(--bg-base) 90%, transparent); }
.bg-bg-surface\/30 { background-color: color-mix(in srgb, var(--bg-surface) 30%, transparent); }
.bg-bg-surface\/50 { background-color: color-mix(in srgb, var(--bg-surface) 50%, transparent); }
.bg-bg-overlay\/30 { background-color: color-mix(in srgb, var(--bg-overlay) 30%, transparent); }
.bg-bg-overlay\/50 { background-color: color-mix(in srgb, var(--bg-overlay) 50%, transparent); }
.bg-brand-500\/10 { background-color: color-mix(in srgb, var(--brand-500) 10%, transparent); }
.bg-brand-500\/20 { background-color: color-mix(in srgb, var(--brand-500) 20%, transparent); }
.bg-net-bep20\/10 { background-color: color-mix(in srgb, var(--network-bep20) 10%, transparent); }
.bg-net-erc20\/10 { background-color: color-mix(in srgb, var(--network-eth) 10%, transparent); }
.bg-net-trc20\/10 { background-color: color-mix(in srgb, var(--network-trc20) 10%, transparent); }
.bg-success\/10   { background-color: color-mix(in srgb, var(--success) 10%, transparent); }
.bg-success\/20   { background-color: color-mix(in srgb, var(--success) 20%, transparent); }
.bg-danger\/10    { background-color: color-mix(in srgb, var(--danger) 10%, transparent); }
.bg-warning\/10   { background-color: color-mix(in srgb, var(--warning) 10%, transparent); }

.border-brand-500\/30 { border-color: color-mix(in srgb, var(--brand-500) 30%, transparent); }
.border-brand-500\/50 { border-color: color-mix(in srgb, var(--brand-500) 50%, transparent); }
.border-danger\/30    { border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.border-warning\/30   { border-color: color-mix(in srgb, var(--warning) 30%, transparent); }

/* ---------- Text colors ---------- */
.text-fg-primary { color: var(--text-primary); }
.text-fg-secondary { color: var(--text-secondary); }
.text-fg-tertiary { color: var(--text-tertiary); }
.text-brand-500 { color: var(--brand-500); }
.text-brand-400 { color: var(--brand-400); }
.text-warning { color: var(--warning); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-error { color: var(--danger); }
.text-net-bep20 { color: var(--network-bep20); }
.text-net-erc20 { color: var(--network-eth); }
.text-net-trc20 { color: var(--network-trc20); }

.accent-brand-500 { accent-color: var(--brand-500); }

/* ---------- Typography ---------- */
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-black { font-weight: 900; }

.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.text-balance { text-wrap: balance; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.uppercase { text-transform: uppercase; }
.break-all { word-break: break-all; }
.list-none { list-style: none; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

.text-\[10px\] { font-size: 10px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-1\/3 { width: 33.333333%; }
.w-2\/3 { width: 66.666667%; }
.shadow-e3 { box-shadow: var(--e3); }
.shadow-xl { box-shadow: var(--e4); }

/* ---------- Effects / Filter ---------- */
.opacity-40 { opacity: .4; }
.opacity-50 { opacity: .5; }
.opacity-60 { opacity: .6; }
.opacity-80 { opacity: .8; }
.opacity-90 { opacity: .9; }
.blur-3xl { filter: blur(64px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.backdrop-blur-md { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.overflow-hidden { overflow: hidden; }

/* ---------- Cursor / Pointer ---------- */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.pointer-events-auto { pointer-events: auto; }
.pointer-events-none { pointer-events: none; }

/* ---------- Transitions / Animation ---------- */
.transition-all { transition-property: all; transition-duration: var(--duration-fast); transition-timing-function: var(--ease-out); }
.transition-colors { transition-property: color, background-color, border-color, fill, stroke; transition-duration: var(--duration-fast); transition-timing-function: var(--ease-out); }
.transition-transform { transition-property: transform; transition-duration: var(--duration-fast); transition-timing-function: var(--ease-out); }
.duration-normal { transition-duration: var(--duration-normal); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}
.animate-pulse { animation: pulse 2s var(--ease-in-out) infinite; }

/* ---------- Group / Peer modifiers ---------- */
details.group[open] .group-open\:rotate-180,
.group[open] .group-open\:rotate-180 { transform: rotate(180deg); }

.peer:checked ~ .peer-checked\:bg-brand-500 { background-color: var(--brand-500); }
.peer:checked ~ .peer-checked\:translate-x-5 { transform: translateX(20px); }

/* ---------- Hover state variants ---------- */
.hover\:bg-bg-elevated:hover { background-color: var(--bg-elevated); }
.hover\:bg-bg-overlay:hover { background-color: var(--bg-overlay); }
.hover\:bg-bg-overlay\/30:hover { background-color: color-mix(in srgb, var(--bg-overlay) 30%, transparent); }
.hover\:bg-bg-overlay\/50:hover { background-color: color-mix(in srgb, var(--bg-overlay) 50%, transparent); }
.hover\:border-brand-500:hover { border-color: var(--brand-500); }
.hover\:border-brand-500\/50:hover { border-color: color-mix(in srgb, var(--brand-500) 50%, transparent); }
.hover\:text-brand-400:hover { color: var(--brand-400); }
.hover\:text-brand-500:hover { color: var(--brand-500); }
.hover\:text-fg-primary:hover { color: var(--text-primary); }

/* ---------- Responsive: sm: (>=640px) ---------- */
@media (min-width: 640px) {
  .sm\:hidden { display: none; }
  .sm\:flex { display: flex; }
  .sm\:inline { display: inline; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sm\:px-6 { padding-left: 24px; padding-right: 24px; }
  .sm\:pt-32 { padding-top: 128px; }
  .sm\:pb-40 { padding-bottom: 160px; }
  .sm\:text-h3 { font-size: 16px; line-height: 24px; }
  .sm\:text-\[64px\] { font-size: 64px; }
  .sm\:leading-\[72px\] { line-height: 72px; }
}

/* ---------- !important modifiers ---------- */
.\!min-h-\[36px\] { min-height: 36px !important; }
.\!min-h-\[40px\] { min-height: 40px !important; }
.\!min-h-\[calc\(100vh-3\.5rem\)\] { min-height: calc(100vh - 3.5rem) !important; }
.\!w-14 { width: 56px !important; }
.\!w-auto { width: auto !important; }
.\!h-14 { height: 56px !important; }
.\!my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
.\!px-3 { padding-left: 12px !important; padding-right: 12px !important; }
.\!py-1 { padding-top: 4px !important; padding-bottom: 4px !important; }
.\!py-2 { padding-top: 8px !important; padding-bottom: 8px !important; }
.\!text-body-sm { font-size: 13px !important; line-height: 18px !important; }
