/* RealShopTransfer — App Market inspired, layout-stable */

:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted-bg: #fafafa;
  --muted: #71717a;
  --muted-2: #52525b;
  --line: #e4e4e7;
  --line-soft: #f4f4f5;
  --green: #22c55e;
  --green-dark: #16a34a;
  --green-text: #15803d;
  --green-soft: #dcfce7;
  --black: #09090b;
  --card: #ffffff;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --nav-h: 64px;
  --banner-h: 36px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 650;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wrap {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* Banner */
.top-banner {
  min-height: var(--banner-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(90deg, #059669, #22c55e, #059669);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
}

.top-banner .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
  flex-shrink: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: var(--nav-h);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  justify-self: start;
  min-width: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #22c55e, #059669);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

.brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  flex-wrap: nowrap;
}

.nav-links a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-2);
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--green-text);
  background: var(--green-soft);
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  min-width: 0;
}

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  place-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 40px;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-black {
  background: #000;
  color: #fff;
}

.btn-black:hover {
  background: #27272a;
}

.btn-green {
  background: var(--green);
  color: #fff;
}

.btn-green:hover {
  background: var(--green-dark);
}

.btn-gray {
  background: var(--line-soft);
  color: var(--fg);
}

.btn-gray:hover {
  background: var(--line);
}

.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--fg);
}

.btn-outline:hover {
  background: var(--line-soft);
}

.btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-lg {
  height: 48px;
  padding: 0 1.5rem;
  font-size: 1rem;
}

.btn-sm {
  height: 36px;
  padding: 0 0.9rem;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
  text-align: center;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 35%, #000 15%, transparent 70%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.55;
}

.hero-glow-a {
  top: 10%;
  left: 15%;
  background: rgba(34, 197, 94, 0.25);
}

.hero-glow-b {
  bottom: 5%;
  right: 12%;
  background: rgba(16, 185, 129, 0.2);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-text);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--black);
  margin-bottom: 1rem;
}

.hero h1 .grad {
  background: linear-gradient(90deg, #16a34a, #10b981, #14b8a6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--muted-2);
  max-width: 34em;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1.25rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.hero-meta .sep {
  width: 1px;
  height: 14px;
  background: var(--line);
}

/* Stats */
.stats {
  background: var(--muted-bg);
  border-block: 1px solid var(--line);
  padding: 2.5rem 0;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.stats-row strong {
  display: block;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  color: var(--black);
}

.stats-row span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

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

.section-dark {
  background: #000;
  color: #fff;
}

.section-head {
  margin-bottom: 2rem;
}

.section-head.center {
  text-align: center;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  color: var(--black);
  margin-bottom: 0.4rem;
}

.section-dark .section-head h2 {
  color: #fff;
}

.section-head p {
  color: var(--muted);
  font-size: 1rem;
}

.section-dark .section-head p {
  color: #a1a1aa;
}

.section-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-top .section-head {
  margin-bottom: 0;
}

.link-green {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--green-text);
  font-weight: 600;
  font-size: 0.95rem;
}

.link-green:hover {
  text-decoration: underline;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.chip {
  height: 36px;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted-2);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.chip:hover,
.chip.active {
  border-color: transparent;
  background: var(--green-soft);
  color: var(--green-text);
}

.filter-count {
  margin-left: auto;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Listings */
.listings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.card:hover {
  border-color: #d4d4d8;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #ecfdf5, #f4f4f5);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-tags {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  max-width: calc(100% - 1.3rem);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.95);
  color: var(--muted-2);
  border: 1px solid var(--line);
}

.badge-green {
  background: var(--green-soft);
  color: var(--green-text);
  border-color: transparent;
}

.card-body {
  padding: 1rem 1.05rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}

.card-body h3 {
  font-size: 1rem;
  color: var(--black);
  overflow-wrap: anywhere;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.card-blurb {
  font-size: 0.875rem;
  color: var(--muted-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-soft);
}

.price {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
}

.price small {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
}

/* Categories */
.cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.cat {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  text-align: left;
  padding: 1.1rem 1.15rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.cat:hover {
  border-color: var(--green);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.08);
  transform: translateY(-2px);
}

.cat-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-text);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.cat h3 {
  font-size: 0.98rem;
  color: var(--black);
}

.cat p {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.step {
  text-align: center;
}

.step-ico {
  position: relative;
  display: inline-flex;
  margin-bottom: 1.25rem;
}

.step-box {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(135deg, #22c55e, #059669);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.25);
}

.step-n {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.step h3 {
  font-size: 1.05rem;
  color: var(--black);
  margin-bottom: 0.4rem;
}

.step p {
  color: var(--muted-2);
  font-size: 0.92rem;
  max-width: 16rem;
  margin-inline: auto;
}

/* Features dark */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.feature {
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: #18181b;
  border: 1px solid #27272a;
  min-width: 0;
}

.feature:hover {
  border-color: rgba(34, 197, 94, 0.4);
}

.feature-ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 1.15rem;
}

.feature h3 {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.feature p {
  color: #a1a1aa;
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Escrow */
.escrow {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

.checklist {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.checklist li {
  display: flex;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted-2);
  font-size: 0.95rem;
}

.checklist li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.panel h3 {
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}

.timeline {
  display: grid;
}

.timeline div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.9rem;
}

.timeline div:last-child {
  border-bottom: 0;
}

.timeline span {
  color: var(--muted);
}

.timeline strong {
  text-align: right;
  font-weight: 650;
}

.panel .note {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
  align-items: start;
}

.form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
}

.field {
  margin-bottom: 0.9rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 44px;
  padding: 0 0.9rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--line-soft);
  outline: none;
}

.field textarea {
  height: auto;
  min-height: 110px;
  padding: 0.75rem 0.9rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  background: #fff;
  box-shadow: 0 0 0 2px var(--green);
}

.form-note {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* CTA */
.cta {
  padding: 4rem 0;
  background: linear-gradient(135deg, #052e16, #14532d 55%, #052e16);
  color: #fff;
  text-align: center;
}

.cta h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  margin-bottom: 0.6rem;
}

.cta p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 30rem;
  margin: 0 auto 1.5rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.cta .btn-black {
  background: #fff;
  color: #000;
}

/* Footer */
.footer {
  background: #000;
  color: #a1a1aa;
  padding: 3rem 0 1.5rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.75rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.footer-grid p {
  max-width: 28ch;
  line-height: 1.7;
}

.footer-grid h4 {
  margin: 0 0 0.75rem;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 650;
}

.footer-grid a {
  display: block;
  padding: 0.25rem 0;
  color: #a1a1aa;
}

.footer-grid a:hover {
  color: #4ade80;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #27272a;
  font-size: 0.8rem;
  color: #71717a;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--muted-bg);
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: #000;
  color: #fff;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  transition: 0.25s ease;
  pointer-events: none;
  max-width: min(90vw, 360px);
  text-align: center;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .listings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .features,
  .cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav-links a {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 860px) {
  .nav {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: calc(var(--banner-h) + var(--nav-h));
    left: 0;
    right: 0;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.85rem 1rem 1rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
  }

  .menu-btn {
    display: grid;
  }

  .nav-actions .btn-gray {
    display: none;
  }
}

@media (max-width: 640px) {
  .listings,
  .features,
  .cats,
  .steps,
  .stats-row,
  .escrow,
  .contact,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .hero-meta .sep {
    display: none;
  }

  .filter-count {
    width: 100%;
    margin-left: 0;
  }

  .section {
    padding: 3.25rem 0;
  }

  .top-banner {
    font-size: 0.75rem;
  }
}

/* ========== CMS / Portal shell ========== */
.auth-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 40%);
}
.auth-card {
  width: min(100%, 440px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 0.35rem; }
.auth-card .sub { color: var(--muted); margin-bottom: 1.5rem; font-size: 0.95rem; }
.auth-card .foot { margin-top: 1.25rem; font-size: 0.9rem; color: var(--muted); text-align: center; }
.auth-card .foot a { color: var(--green-text); font-weight: 600; }
.form-error { color: #dc2626; font-size: 0.875rem; margin: 0.5rem 0; min-height: 1.2em; }
.btn-block { width: 100%; }

.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100dvh - var(--nav-h));
}
.side {
  border-right: 1px solid var(--line);
  background: var(--muted-bg);
  padding: 1.25rem 0.85rem;
  position: sticky;
  top: var(--nav-h);
  height: calc(100dvh - var(--nav-h));
  overflow: auto;
}
.side-brand {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.35rem 0.75rem 1rem;
}
.side a, .side .tab-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  color: var(--muted-2);
  font-size: 0.92rem;
  font-weight: 500;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.side a:hover, .side .tab-link:hover { background: #fff; color: var(--fg); }
.side a.active, .side .tab-link.active {
  background: var(--green-soft);
  color: var(--green-text);
  font-weight: 600;
}
.app-main { padding: 1.5rem 1.75rem 3rem; max-width: 1100px; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.stat-card .lbl { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.35rem; }
.stat-card .num { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; }
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data th, table.data td {
  text-align: left;
  padding: 0.75rem 0.65rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
.badge-sm {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--line-soft);
}
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-active, .badge-approved, .badge-funded, .badge-released, .badge-verified { background: var(--green-soft); color: var(--green-text); }
.badge-rejected, .badge-cancelled, .badge-refunded, .badge-suspended { background: #fee2e2; color: #991b1b; }
.badge-created, .badge-transfer_in_progress { background: #e0e7ff; color: #3730a3; }
.badge-disputed { background: #ffedd5; color: #9a3412; }
.hide { display: none !important; }
.muted { color: var(--muted); }
.btn-sm { height: 32px; padding: 0 0.75rem; font-size: 0.8rem; }
.btn-danger { background: #fee2e2; color: #991b1b; }
.btn-danger:hover { background: #fecaca; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.portal-nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
}
.portal-nav .wrap {
  display: flex; justify-content: space-between; align-items: center;
  width: min(100% - 32px, 1200px); margin-inline: auto;
}
.empty-state {
  padding: 2rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px;
}
.select-sm {
  height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 0 0.4rem; font-size: 0.8rem;
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .side { position: relative; top: 0; height: auto; display: flex; flex-wrap: wrap; gap: 0.25rem; }
  .side-brand { width: 100%; padding-bottom: 0.5rem; }
  .app-main { padding: 1rem; }
}
