@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #f4f8ff;
  --surface: #ffffff;
  --surface-soft: #f1f6ff;
  --text: #14243f;
  --muted: #667794;
  --blue: #0a66c8;
  --blue-deep: #084a92;
  --amedzon-magenta: #a30562;
  --amedzon-magenta-dark: #7a0349;
  --amedzon-magenta-soft: #f5d8e8;
  --yellow: #ffd84d;
  --magenta: #bf1a82;
  --magenta-soft: #ffe1f5;
  --ok: #14a267;
  --danger: #d84f6a;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 14px 36px rgba(15, 43, 82, 0.12);
  --shadow-soft: 0 8px 24px rgba(15, 43, 82, 0.08);
  --line: #d7e1f1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background:
    radial-gradient(circle at 100% -10%, rgba(191, 26, 130, 0.08), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(10, 102, 200, 0.08), transparent 36%),
    var(--bg);
  min-height: 100vh;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 20px 12px;
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(170deg, var(--blue-deep), var(--blue) 68%, var(--magenta));
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--blue-deep);
  background: linear-gradient(135deg, var(--yellow), #ffe895);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.brand p,
.brand h1 {
  margin: 0;
}

.brand p {
  font-size: 0.68rem;
  opacity: 0.92;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand h1 {
  font-size: 1.04rem;
  letter-spacing: 0.01em;
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-link {
  text-decoration: none;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 10px 10px;
  transition: all 0.22s ease;
  font-size: 0.92rem;
}

.nav-link i {
  font-size: 1.2rem;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255, 255, 255, 0.14);
}

.content {
  padding: 28px 30px;
  position: relative;
}

.content > section + section,
.content > section + div,
.content > div + section {
  margin-top: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 10px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title {
  margin: 0;
  font-size: clamp(1.24rem, 1.8vw, 1.6rem);
  letter-spacing: -0.02em;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.btn,
button,
select,
input {
  font-family: inherit;
  border-radius: 12px;
}

.btn {
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 13px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(140deg, #0e74df, #0a5cb5 50%, var(--amedzon-magenta));
  box-shadow: 0 8px 16px rgba(27, 73, 141, 0.24);
}

.btn-primary:hover {
  filter: brightness(1.04);
}

.btn-soft {
  color: var(--blue);
  background: var(--surface-soft);
}

.btn-back {
  min-width: 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(140deg, #0e74df, #0a5cb5);
  box-shadow: 0 8px 16px rgba(15, 92, 182, 0.24);
}

.hero {
  position: relative;
  isolation: isolate;
  border-radius: 18px;
  color: #fff;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  background: linear-gradient(145deg, #0e78e3, #0753a5 55%, var(--amedzon-magenta));
}

.hero h2 {
  margin-bottom: 2px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -20% -70% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.26), transparent 72%);
  pointer-events: none;
}

.hero h2,
.hero p {
  margin: 0;
  position: relative;
  z-index: 1;
}

.hero h2 {
  margin-top: 8px;
  font-size: clamp(1.2rem, 1.9vw, 1.5rem);
  letter-spacing: -0.02em;
}

.hero p {
  margin-top: 8px;
  opacity: 0.94;
  max-width: 60ch;
  font-size: 0.95rem;
}

.chip {
  display: inline-block;
  background: rgba(255, 255, 255, 0.19);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.grid-2,
.grid-3,
.grid-4 {
  margin-top: 18px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.card {
  position: relative;
  border-radius: var(--radius-sm);
  padding: 18px;
  background: linear-gradient(180deg, #fff 0%, #fcfdff 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.card h4 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 22px 40px rgba(14, 35, 76, 0.24);
}

a.card {
  color: inherit;
  text-decoration: none;
}

.card h3,
.card h4,
.card p {
  margin-top: 0;
}

.card p {
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.icon-btn {
  position: relative;
  overflow: hidden;
  height: 96px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-size: 1.8rem;
  color: var(--blue);
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(16, 40, 70, 0.14);
}

.icon-btn.magenta {
  color: var(--amedzon-magenta);
  background: linear-gradient(180deg, #fff, var(--amedzon-magenta-soft));
}

.icon-btn span {
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.015em;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin: 14px 0;
}

select,
input {
  border: 1px solid var(--line);
  background: #fff;
  padding: 11px 12px;
  color: var(--text);
  outline: none;
  font-size: 0.92rem;
}

select:focus,
input:focus {
  border-color: #9ab3dd;
  box-shadow: 0 0 0 3px rgba(0, 86, 168, 0.12);
}

.full-map {
  height: 54vh;
  min-height: 360px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #cfdaef;
  box-shadow: var(--shadow-soft);
}

.result-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.result-list .card strong {
  display: block;
  margin-bottom: 4px;
}

.chatbot-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 18, 38, 0.72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.chatbot-shell {
  width: min(1040px, 100%);
  height: min(88vh, 800px);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #d5dded;
  box-shadow: 0 24px 52px rgba(4, 14, 29, 0.42);
  animation: modalIn 0.25s ease;
}

.chatbot-head {
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: linear-gradient(140deg, var(--blue), var(--amedzon-magenta));
}

.chatbot-head h3 {
  margin: 0;
  font-size: 1rem;
}

.chatbot-head button {
  border: none;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
}

.chatbot-shell iframe {
  width: 100%;
  height: calc(100% - 56px);
  border: none;
}

.marketplace-mobile-shell {
  width: min(400px, 96vw);
  height: min(860px, 92vh);
  border-radius: 28px;
  border: 8px solid #0f172a;
  box-shadow: 0 28px 56px rgba(2, 8, 23, 0.45);
  background: #fff;
  overflow: hidden;
  animation: modalIn 0.25s ease;
}

.marketplace-mobile-shell .chatbot-head {
  padding: 10px 12px;
}

.marketplace-mobile-shell iframe {
  width: 100%;
  height: calc(100% - 56px);
  border: none;
  background: #fff;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .content {
    padding: 16px 14px;
    max-width: 100%;
  }
}

@media (max-width: 780px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-left {
    width: 100%;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions .btn {
    flex: 1;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .icon-btn {
    height: 88px;
    font-size: 1.65rem;
  }

  .icon-btn span {
    font-size: 0.68rem;
  }

  .full-map {
    min-height: 300px;
    height: 46vh;
  }
}

/* Mobile fintech dashboard style */
.wallet-screen {
  min-height: 100vh;
  background: #f5f7fa;
  display: grid;
  place-items: center;
  padding: 22px 12px;
}

.phone-frame {
  width: min(393px, 100%);
  min-height: 830px;
  background: #ffffff;
  border-radius: 36px;
  padding: 18px 16px 94px;
  box-shadow: 0 24px 60px rgba(17, 39, 75, 0.18);
  position: relative;
  border: 1px solid #e8eef8;
}

.wallet-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.wallet-brand-block {
  flex: 1;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 12px;
  background: #f3f7ff;
  border: 1px solid #e3ecfa;
  margin-bottom: 8px;
}

.brand-lockup-copy {
  display: flex;
  flex-direction: column;
}

.brand-eyebrow {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6c7c95;
  font-weight: 700;
}

.brand-lockup-copy h2 {
  margin: 1px 0 0;
  font-size: 0.88rem;
  color: #0f2f5f;
  line-height: 1.1;
}

.wallet-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallet-icon-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: #eef4ff;
  color: #007aff;
  font-size: 1.1rem;
}

.wallet-greeting {
  margin: 0;
  color: #6b7a94;
  font-size: 0.82rem;
}

.wallet-top h1 {
  margin: 3px 0 0;
  font-size: 1.34rem;
  color: #111827;
  line-height: 1.18;
}

.brand-top-logo {
  width: 52px;
  height: auto;
  display: block;
}

.powered-by-inline {
  margin: 6px 0 0;
  font-size: 0.64rem;
  color: #71839f;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.powered-by-inline span {
  font-weight: 600;
}

.powered-by-inline img {
  height: 13px;
  width: auto;
}

.wallet-avatar {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: #eef4ff;
  color: #007aff;
  font-size: 1.2rem;
}

.balance-card {
  border-radius: 20px;
  background: linear-gradient(140deg, #007aff, #005ac6 55%, var(--amedzon-magenta));
  color: #fff;
  padding: 16px;
  box-shadow: 0 12px 24px rgba(0, 122, 255, 0.28);
}

.balance-card p,
.balance-card h2,
.balance-card small {
  margin: 0;
}

.balance-card p {
  opacity: 0.9;
  font-size: 0.82rem;
}

.balance-card h2 {
  margin-top: 6px;
  font-size: 1.9rem;
  letter-spacing: 0.01em;
}

.balance-card small {
  display: block;
  margin-top: 4px;
  opacity: 0.84;
}

.hero-health-card .health-stats {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.hero-health-card .health-stats article {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 8px;
}

.hero-health-card .health-stats strong {
  display: block;
  font-size: 1rem;
}

.hero-health-card .health-stats span {
  font-size: 0.68rem;
  opacity: 0.9;
}

.hero-cta {
  margin-top: 10px;
  border: none;
  border-radius: 10px;
  background: #fff;
  color: #0d66ca;
  padding: 8px 12px;
  font-weight: 700;
}

.quick-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.quick-actions button {
  border: none;
  border-radius: 14px;
  background: #f3f7ff;
  color: #1f3658;
  height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 1.05rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-actions button span {
  font-size: 0.74rem;
  font-weight: 600;
}

.quick-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(17, 39, 75, 0.1);
}

.quick-actions .scan-main {
  background: linear-gradient(140deg, #007aff, #005ac6 58%, var(--amedzon-magenta));
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 122, 255, 0.3);
}

.action-grid-six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-strip {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid #dcebff;
  background: #f2f8ff;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ai-strip p,
.ai-strip h3 {
  margin: 0;
}

.ai-strip p {
  color: var(--amedzon-magenta);
  font-size: 0.74rem;
  font-weight: 700;
}

.ai-strip h3 {
  margin-top: 4px;
  font-size: 0.84rem;
}

.ai-strip button {
  border: none;
  border-radius: 10px;
  background: linear-gradient(140deg, #0a66c8, var(--amedzon-magenta));
  color: #fff;
  padding: 8px 10px;
  font-weight: 700;
}

.services-panel,
.transactions-panel {
  margin-top: 14px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-head h3 {
  margin: 0;
  font-size: 1.03rem;
  color: #111827;
}

.panel-head a {
  color: #007aff;
  text-decoration: none;
  font-size: 0.78rem;
}

.service-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 8px;
}

.service-grid a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #111827;
  transition: transform 0.18s ease;
}

.service-grid i {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  background: #f1f6ff;
  color: #007aff;
  box-shadow: 0 4px 10px rgba(10, 102, 200, 0.14);
}

.service-grid a:hover {
  transform: translateY(-2px);
}

.service-grid span {
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
}

.scroll-services .service-grid {
  overflow-x: auto;
}

.promo-banner {
  margin-top: 14px;
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(140deg, #1887ff, #007aff 48%, var(--amedzon-magenta) 78%, #f9b21c);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.promo-banner p,
.promo-banner h3 {
  margin: 0;
}

.promo-banner p {
  font-size: 0.78rem;
  opacity: 0.9;
}

.promo-banner h3 {
  margin-top: 4px;
  font-size: 1rem;
}

.promo-banner button {
  border: none;
  border-radius: 10px;
  background: #fff;
  color: #0d66ca;
  padding: 8px 12px;
  font-weight: 700;
}

.tx-row {
  margin-top: 10px;
  border: 1px solid #edf2fa;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.tx-row:hover {
  border-color: #cddcf5;
  box-shadow: 0 8px 16px rgba(16, 40, 70, 0.08);
}

.tx-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #edf5ff;
  color: #007aff;
}

.tx-icon.success {
  background: #ebfff5;
  color: #0f9d61;
}

.tx-main strong {
  display: block;
  font-size: 0.9rem;
}

.tx-main small {
  color: #7a8ba5;
  font-size: 0.77rem;
}

.tx-amount {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #111827;
}

.tx-amount.plus {
  color: #0f9d61;
}

.marketplace-preview {
  margin-top: 14px;
}

.market-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.market-grid article {
  border: 1px solid #edf2fa;
  border-radius: 12px;
  padding: 10px;
}

.market-grid p {
  margin: 0;
  font-size: 0.74rem;
  min-height: 32px;
}

.market-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 0.84rem;
}

.market-grid button {
  margin-top: 8px;
  width: 100%;
  border: none;
  border-radius: 8px;
  background: linear-gradient(140deg, #0a66c8, var(--amedzon-magenta));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 7px 8px;
}

.wallet-bottom-nav {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 26px rgba(10, 30, 58, 0.16);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 8px 4px;
}

.wallet-bottom-nav a {
  text-decoration: none;
  color: #6b7a94;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 1.05rem;
  padding: 4px 0;
  border-radius: 10px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.wallet-bottom-nav span {
  font-size: 0.66rem;
  font-weight: 600;
}

.wallet-bottom-nav .active,
.wallet-bottom-nav .scan-tab {
  color: #007aff;
}

.wallet-bottom-nav a:hover {
  background: #f1f6ff;
}

/* Force mobile-first layout for all non-home pages */
body:has(.layout) {
  background: #f5f7fa;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px 10px;
}

body:has(.layout) .layout {
  display: block;
  width: min(393px, 100%);
  min-height: 830px;
  background: #fff;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(17, 39, 75, 0.18);
  position: relative;
}

body:has(.layout) .sidebar {
  display: none;
}

body:has(.layout) .content {
  max-width: 393px;
  margin: 0 auto;
  padding: 14px 12px 94px;
}

body:has(.layout) .hero {
  padding: 14px;
  border-radius: 14px;
}

body:has(.layout) .hero h2 {
  font-size: 1.1rem;
}

body:has(.layout) .topbar {
  margin-bottom: 14px;
}

body:has(.layout) .page-title {
  font-size: 1.08rem;
}

body:has(.layout) .grid-2,
body:has(.layout) .grid-3 {
  grid-template-columns: 1fr;
  gap: 10px;
}

body:has(.layout) .filters {
  grid-template-columns: 1fr;
}

body:has(.layout) .card {
  padding: 14px;
}

.app-bottom-nav {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 26px rgba(10, 30, 58, 0.16);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 8px 4px;
  z-index: 20;
}

.app-bottom-nav a {
  text-decoration: none;
  color: #6b7a94;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 1.05rem;
  padding: 4px 0;
  border-radius: 10px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.app-bottom-nav span {
  font-size: 0.66rem;
  font-weight: 600;
}

.app-bottom-nav a.active {
  color: #007aff;
}

.app-bottom-nav a:hover {
  background: #f1f6ff;
}

/* Tablet responsiveness */
@media (min-width: 768px) and (max-width: 1100px) {
  .wallet-screen {
    padding: 24px 18px;
  }

  .phone-frame {
    width: min(520px, 100%);
    min-height: 860px;
    padding: 20px 20px 96px;
  }

  .action-grid-six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body:has(.layout) {
    padding: 18px;
  }

  body:has(.layout) .layout {
    width: min(520px, 100%);
    min-height: 860px;
  }

  body:has(.layout) .content {
    padding: 18px 16px 98px;
  }
}

/* Small mobile safety */
@media (max-width: 430px) {
  .wallet-screen {
    padding: 8px 0;
  }

  .phone-frame {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    padding: 12px 12px 92px;
  }

  .wallet-top h1 {
    font-size: 1.18rem;
  }

  .brand-lockup {
    padding: 5px 8px;
    gap: 8px;
  }

  .brand-top-logo {
    width: 46px;
  }

  .quick-actions button {
    height: 68px;
    font-size: 1rem;
  }

  .quick-actions button span {
    font-size: 0.68rem;
  }

  .service-grid {
    gap: 8px 6px;
  }

  .service-grid i {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .service-grid span {
    font-size: 0.66rem;
  }

  .market-grid {
    grid-template-columns: 1fr;
  }

  .wallet-bottom-nav {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  body:has(.layout) {
    padding: 0;
  }

  body:has(.layout) .layout {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
    border: 0;
  }

  body:has(.layout) .content {
    max-width: 100%;
    padding: 12px 12px 90px;
  }

  .app-bottom-nav {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
}

.brand-powered-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.brand-powered-strip .left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.brand-powered-strip .left img {
  width: 56px;
  height: auto;
}

.brand-powered-strip .left span {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f2f5f;
}

.brand-powered-strip .right {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  color: #71839f;
}

.brand-powered-strip .right img {
  height: 12px;
  width: auto;
}

.marketplace-products {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shop-card {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e8eef9;
  box-shadow: 0 8px 20px rgba(16, 40, 70, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(16, 40, 70, 0.14);
}

.shop-card img {
  width: 100%;
  height: 144px;
  object-fit: cover;
  display: block;
}

@media (max-width: 380px) {
  .marketplace-products {
    grid-template-columns: 1fr;
  }
}

.shop-body {
  padding: 12px;
}

.shop-body h3 {
  margin: 0;
  font-size: 0.98rem;
}

.shop-body p {
  margin: 6px 0 10px;
  color: #667794;
  font-size: 0.84rem;
  line-height: 1.45;
}

.shop-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#activityFeed .card {
  margin-top: 10px;
}

.shop-meta strong {
  color: #0a66c8;
  font-size: 0.95rem;
}
