/* ==========================================================================
   ISCO MARKET - NEOBRUTALISM + RETRO GAME THEME
   Strict Neobrutalism Rules:
   - 100% Solid Single Colors (ZERO Gradients)
   - Solid Black Borders (2.5px - 3.5px solid #000)
   - Hard Offset Black Shadows (no blur: 3px 3px 0px #000 & 5px 5px 0px #000)
   - High Contrast, Chunky Retro Arcade Typography
   - Ergonomic E-Commerce Layout (Tokopedia / Shopee / Lazada inspired)
   - Comfortable on Mobile (iOS / Android) & Desktop
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

:root {
  /* Solid Color Palette (No Gradients!) */
  --retro-yellow: #FFD166;
  --retro-pink: #FF6B9A;
  --retro-cyan: #63D5E5;
  --retro-green: #83D9A5;
  --retro-purple: #A78BFA;
  --retro-orange: #FF9B71;
  --retro-red: #E94B62;
  --retro-black: #201B31;
  --retro-white: #FFF8EB;
  --retro-cream: #F1E9FF;
  --retro-dark: #211A35;
  --retro-gray: #E4D9F3;
  --retro-dark-gray: #49445B;

  /* Neobrutalist Borders & Shadows */
  --border-thick: 2.5px solid #201B31;
  --border-extra: 3.5px solid #201B31;
  --shadow-sm: 2px 2px 0px #201B31;
  --shadow-md: 4px 4px 0px #201B31;
  --shadow-lg: 6px 6px 0px #201B31;
  --shadow-hover: 5px 5px 0px #201B31;
  --shadow-active: 1px 1px 0px #201B31;

  /* Typography */
  --font-retro: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==================== GLOBAL STYLES ==================== */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--retro-cream);
  color: var(--retro-black);
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--retro-black);
  letter-spacing: -0.02em;
  margin-top: 0;
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
h5 { font-size: 14px; }
h6 { font-size: 13px; }

.font-retro {
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  letter-spacing: 0px !important;
}

a {
  color: var(--retro-black);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
  opacity: 0.9;
}

/* ==================== RETRO GAME TICKER MARQUEE ==================== */
.retro-marquee {
  background-color: var(--retro-black);
  color: var(--retro-yellow);
  font-family: var(--font-retro);
  font-size: 10px;
  padding: 5px 8px;
  border-bottom: 2px solid #000;
  overflow: hidden;
  white-space: nowrap;
}

.retro-marquee span {
  display: inline-block;
  animation: marqueeAnimation 28s linear infinite;
}

@keyframes marqueeAnimation {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ==================== E-COMMERCE NAVBAR & HEADER ==================== */
.retro-navbar {
  background-color: var(--retro-yellow);
  border-bottom: var(--border-extra);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 3px 0px #000;
}

.retro-navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.shop-navbar {
  padding: 9px 0 0;
  background-color: var(--retro-white);
}

.shop-navbar-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-navbar-main {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.shop-search {
  display: flex;
  min-width: 0;
  height: 44px;
  border: 2px solid #000;
  background: #fff;
}

.shop-search .form-control {
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.shop-search .btn {
  min-width: 84px;
  border: 0;
  border-left: 2px solid #000;
  border-radius: 0;
  font-weight: 700;
}

.shop-navbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.shop-action-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 5px 7px;
  border: 0;
  background: transparent;
  color: #111;
  font: 700 13px var(--font-body);
  text-decoration: none;
  white-space: nowrap;
}

.shop-action-link:hover,
.shop-action-link:focus-visible {
  color: #111;
  text-decoration: underline;
}

.chat-nav-link,
.chat-nav-link:hover,
.chat-nav-link:focus-visible {
  text-decoration: none !important;
}

.shop-navbar-links > .chat-nav-link,
.shop-navbar-links > .chat-nav-link:hover,
.shop-navbar-links > .chat-nav-link:focus-visible,
.shop-navbar-links > .chat-nav-link.active {
  border-bottom-color: transparent !important;
}

.chat-count-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1.5px solid #201b31;
  border-radius: 999px;
  background-color: #FF6B9A;
  color: #201b31;
  box-shadow: 1px 1px 0 #201b31;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  z-index: 1;
}

.chat-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-count-badge[hidden] {
  display: none !important;
}

.shop-action-link > i,
.cart-icon-wrap > i {
  font-size: 19px;
}

.cart-icon-wrap {
  position: relative;
  display: inline-flex;
}

.cart-count {
  position: absolute;
  top: -9px;
  right: -11px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 4px;
  border: 1.5px solid #000;
  border-radius: 999px;
  background: var(--retro-yellow);
  color: #000;
  font-size: 10px;
  line-height: 1;
}

.shop-account-menu {
  z-index: 1040;
  min-width: 220px;
  padding: 8px;
  border: 2px solid #000;
  border-radius: 0;
  box-shadow: 4px 4px 0 #000;
}

.shop-account-menu .dropdown-item {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 0;
  font-weight: 700;
}

.shop-account-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 10px 12px;
  margin-bottom: 5px;
  border-bottom: 1px solid #ddd;
}

.shop-account-summary small {
  flex-basis: 100%;
  color: #16783b;
  font-weight: 700;
}

.shop-navbar-links {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 42px;
  border-top: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  -ms-overflow-style: none;
}

.shop-navbar-links::-webkit-scrollbar {
  display: none;
}

.shop-navbar-links > a,
.shop-navbar-links > button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 3px 1px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #333;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.shop-navbar-links > a:hover,
.shop-navbar-links > button:hover,
.shop-navbar-links > .active {
  border-bottom-color: #000;
  color: #000;
}

.admin-navbar {
  background-color: var(--retro-pink);
}

.admin-navbar .shop-navbar-links {
  border-top-color: rgba(0, 0, 0, .2);
  flex-wrap: wrap;
  gap: 0 20px;
  overflow: visible;
}

.admin-navbar .shop-navbar-links > a,
.admin-navbar .shop-navbar-links > button {
  color: #fff;
}

.admin-navbar .shop-navbar-links > a:hover,
.admin-navbar .shop-navbar-links > button:hover,
.admin-navbar .shop-navbar-links > .active {
  border-bottom-color: #fff;
  color: #fff;
}

.nav-main-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.nav-main-actions .btn {
  white-space: nowrap;
}

.retro-brand {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 800;
  color: var(--retro-black);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
}

.brand-logo {
  width: 36px;
  height: 36px;
  padding: 2px;
  object-fit: contain;
  flex: 0 0 auto;
  border: 1.5px solid #000;
  background-color: var(--retro-white);
}

.retro-brand-tag {
  background-color: var(--retro-black);
  color: var(--retro-yellow);
  font-size: 8px;
  padding: 2px 5px;
  border: 1.5px solid #000;
}

/* Tokopedia / Shopee Style Search Box */
.ecommerce-search-box {
  display: flex;
  width: 100%;
  max-width: 460px;
}

.ecommerce-search-input {
  border: 2px solid #000 !important;
  border-right: none !important;
  border-radius: 0 !important;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none !important;
  background-color: #fff;
}

.ecommerce-search-btn {
  border: 2px solid #000 !important;
  border-radius: 0 !important;
  background-color: var(--retro-black) !important;
  color: var(--retro-yellow) !important;
  padding: 7px 14px;
  font-weight: 800;
  font-size: 13px;
}

/* Profile Header Widget (Positioned at Right) */
.profile-header-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--retro-white);
  border: 2px solid #000;
  padding: 4px 8px;
  box-shadow: 2px 2px 0px #000;
  position: relative;
  margin-left: auto;
}

.app-notifications {
  position: fixed;
  z-index: 1090;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: grid;
  gap: 10px;
  width: min(390px, calc(100vw - 32px));
  pointer-events: none;
}

.app-notification {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #000;
  color: #000;
  font-weight: 700;
  white-space: pre-line;
  overflow-wrap: anywhere;
  animation: notification-enter 180ms ease-out;
  pointer-events: auto;
}

.app-notification-success { background: var(--retro-green); }
.app-notification-error { background: var(--retro-red); color: #fff; }
.app-notification-warning { background: var(--retro-yellow); }
.app-notification-info { background: var(--retro-cyan); }
.app-notification i { margin-top: 2px; }
.app-notification.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity 180ms, transform 180ms; }

@keyframes notification-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.badge-role-mini {
  font-size: 8px;
  font-weight: 800;
  padding: 1px 5px;
  border: 1.5px solid #000;
  text-transform: uppercase;
  display: inline-block;
  line-height: 1.2;
}

.badge-role-mini.role-buyer { background-color: var(--retro-green); color: #000; }
.badge-role-mini.role-seller { background-color: var(--retro-cyan); color: #000; }
.badge-role-mini.role-admin { background-color: var(--retro-pink); color: #fff; }

.profile-dashboard-header {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px;
  border: var(--border-thick);
  background-color: var(--retro-cream);
}

.profile-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid #000;
  background-color: var(--retro-cyan);
  box-shadow: var(--shadow-sm);
  font-size: 22px;
}

.profile-stat-card {
  min-height: 100px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: 10px;
  border: 2px solid #000;
  box-shadow: var(--shadow-sm);
}

.profile-stat-card > span {
  font-size: 11px;
  font-weight: 700;
}

.profile-stat-card > strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.profile-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #aaa;
}

.profile-list-row:last-child {
  border-bottom: 0;
}

/* Sub-navbar / Quick Categories */
.quick-category-bar {
  background-color: var(--retro-white);
  border-bottom: 2px solid #000;
  padding: 8px 0;
  overflow-x: auto;
  white-space: nowrap;
}

.category-chip-btn {
  border: 1.5px solid #000;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  background-color: #FAFAF5;
  box-shadow: 1.5px 1.5px 0px #000;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.1s ease;
}

.category-chip-btn:hover {
  background-color: var(--retro-yellow);
  transform: translate(-1px, -1px);
}

.category-chip-btn.active {
  background-color: var(--retro-yellow);
  box-shadow: 1px 1px 0px #000;
  transform: translate(1px, 1px);
}

/* ==================== NEOBRUTALISM CARDS ==================== */
.card, .retro-card {
  background-color: var(--retro-white);
  border: var(--border-thick) !important;
  border-radius: 0px !important;
  box-shadow: var(--shadow-sm) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.card-header-neo {
  padding: 8px 12px;
  border-bottom: var(--border-thick);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
}

.bg-yellow { background-color: var(--retro-yellow) !important; color: #000 !important; }
.bg-pink   { background-color: var(--retro-pink) !important; color: #fff !important; }
.bg-cyan   { background-color: var(--retro-cyan) !important; color: #000 !important; }
.bg-green  { background-color: var(--retro-green) !important; color: #000 !important; }
.bg-purple { background-color: var(--retro-purple) !important; color: #fff !important; }
.bg-orange { background-color: var(--retro-orange) !important; color: #fff !important; }
.bg-black  { background-color: var(--retro-black) !important; color: #fff !important; }
.bg-white  { background-color: var(--retro-white) !important; color: #000 !important; }
.bg-gray   { background-color: var(--retro-gray) !important; color: #000 !important; }

/* Product Cards (Fixed Badge Bug & Ergonomic Proportion) */
.product-card-neo {
  position: relative;
  border: var(--border-thick);
  background-color: var(--retro-white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card-neo:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
}

/* BUG FIX: contained properly inside card without popping out */
.product-badge-corner {
  border: 1.5px solid #000;
  box-shadow: 1.5px 1.5px 0px #000;
  font-family: var(--font-retro);
  font-size: 7px;
  padding: 2px 5px;
  font-weight: 700;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}

.product-price-tag {
  font-size: 16px;
  font-weight: 900;
  border: 2px solid #000;
  padding: 4px 8px;
  display: inline-block;
  box-shadow: 2px 2px 0px #000;
}

/* ==================== BUTTONS (TACTILE PUSH) ==================== */
.btn {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  border: var(--border-thick) !important;
  border-radius: 0px !important;
  box-shadow: var(--shadow-sm);
  padding: 6px 14px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  transition: transform 0.1s ease, box-shadow 0.1s ease !important;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 11.5px;
}

.btn:hover {
  transform: translate(-1.5px, -1.5px);
  box-shadow: var(--shadow-hover);
}

.btn:active, .btn.active {
  transform: translate(1.5px, 1.5px) !important;
  box-shadow: var(--shadow-active) !important;
}

.btn-primary {
  background-color: var(--retro-yellow) !important;
  color: var(--retro-black) !important;
  border-color: #000 !important;
}

.btn-secondary {
  background-color: var(--retro-gray) !important;
  color: var(--retro-black) !important;
  border-color: #000 !important;
}

.btn-success {
  background-color: var(--retro-green) !important;
  color: var(--retro-black) !important;
  border-color: #000 !important;
}

.btn-danger {
  background-color: var(--retro-pink) !important;
  color: var(--retro-white) !important;
  border-color: #000 !important;
}

.btn-warning {
  background-color: var(--retro-orange) !important;
  color: var(--retro-white) !important;
  border-color: #000 !important;
}

.btn-info {
  background-color: var(--retro-cyan) !important;
  color: var(--retro-black) !important;
  border-color: #000 !important;
}

.btn-dark {
  background-color: var(--retro-black) !important;
  color: var(--retro-white) !important;
  border-color: #000 !important;
}

/* ==================== BADGES & TAGS ==================== */
.badge {
  font-family: var(--font-body);
  font-weight: 700;
  border: 1.5px solid #000;
  border-radius: 0px;
  padding: 3px 6px;
  text-transform: uppercase;
  color: #000;
  font-size: 11px;
}

.badge-retro {
  font-family: var(--font-body);
  font-size: 8.5px;
  font-weight: 700;
  padding: 3px 5px;
  border: 1.5px solid #000;
  box-shadow: 1.5px 1.5px 0px #000;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==================== FORMS & INPUTS ==================== */
.form-control, .form-select {
  border: var(--border-thick) !important;
  border-radius: 0px !important;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  background-color: var(--retro-white);
  color: var(--retro-black);
  box-shadow: 2px 2px 0px #000;
}

.form-control:focus, .form-select:focus {
  outline: none;
  box-shadow: 3px 3px 0px var(--retro-pink) !important;
  border-color: #000 !important;
}

.sell-game-guide {
  display: grid;
  gap: 3px;
  padding: 9px 11px;
  border: 2px solid #000;
  background-color: var(--retro-cyan);
  box-shadow: var(--shadow-sm);
  animation: sell-guide-enter 160ms ease-out;
}

.sell-game-guide strong {
  font-size: 13px;
}

.sell-game-guide span {
  font-size: 12px;
}

@keyframes sell-guide-enter {
  from { opacity: .65; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.input-group-text {
  border: var(--border-thick);
  border-radius: 0px;
  background-color: var(--retro-yellow);
  font-weight: 800;
  color: #000;
  font-size: 13px;
}

/* ==================== MODALS ==================== */
.modal-content {
  border: var(--border-extra) !important;
  border-radius: 0px !important;
  box-shadow: var(--shadow-lg) !important;
  background-color: var(--retro-white);
}

.modal-header {
  border-bottom: var(--border-thick);
  border-radius: 0px;
  padding: 10px 16px;
  background-color: var(--retro-yellow);
}

.modal-footer {
  border-top: var(--border-thick);
  border-radius: 0px;
  padding: 10px 16px;
  background-color: var(--retro-gray);
}

/* ==================== TABLES ==================== */
.table {
  border: var(--border-thick);
  color: #000;
  margin-bottom: 0;
  font-size: 13px;
}

.table th {
  border: var(--border-thick);
  background-color: var(--retro-yellow);
  color: #000;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 11px;
  padding: 8px 10px;
}

.table td {
  border: var(--border-thick);
  padding: 8px 10px;
  vertical-align: middle;
  background-color: var(--retro-white);
}

/* ==================== PAYMENT GATEWAY MOCK UI ==================== */
.payment-method-tile {
  border: 2px solid #000;
  padding: 10px 14px;
  background-color: var(--retro-white);
  cursor: pointer;
  box-shadow: 2px 2px 0px #000;
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.payment-method-tile:hover {
  background-color: #FAFAF0;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px #000;
}

.payment-method-tile.selected {
  background-color: var(--retro-yellow) !important;
  box-shadow: 1px 1px 0px #000;
  transform: translate(1px, 1px);
}

.qris-box {
  background-color: #fff;
  border: 2.5px solid #000;
  padding: 14px;
  display: inline-block;
  box-shadow: 3px 3px 0px #000;
  text-align: center;
}

.qris-qr-sim {
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border: 3px solid #000;
  background: 
    repeating-linear-gradient(0deg, #000 0px, #000 10px, #fff 10px, #fff 20px),
    repeating-linear-gradient(90deg, #000 0px, #000 10px, #fff 10px, #fff 20px);
  background-blend-mode: difference;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.va-number-box {
  background-color: var(--retro-yellow);
  border: 2px solid #000;
  padding: 10px 14px;
  font-family: monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==================== LOGIN / SWITCH DEMO ACCOUNT ==================== */
.demo-account-card {
  border: 2px solid #000;
  padding: 10px 12px;
  background-color: var(--retro-white);
  box-shadow: 2px 2px 0px #000;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  color: #000;
  font: inherit;
}

.demo-account-card:hover {
  background-color: var(--retro-yellow);
  transform: translate(-1.5px, -1.5px);
  box-shadow: 3.5px 3.5px 0px #000;
}

.demo-account-card.active {
  border-width: 2.5px;
  background-color: var(--retro-yellow);
  box-shadow: 1px 1px 0px #000;
  transform: translate(1px, 1px);
}

.demo-account-card:focus-visible,
.payment-method-tile:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--retro-purple);
  outline-offset: 3px;
}

.gateway-summary {
  border: 2px solid #000;
  background-color: var(--retro-cream);
  padding: 12px;
}

.gateway-qr-placeholder {
  width: 144px;
  height: 144px;
  margin: 0 auto;
  border: 3px solid #000;
  background-color: var(--retro-white);
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--font-retro);
  font-size: 10px;
  box-shadow: 3px 3px 0 #000;
}

/* ==================== VIEW MODE SWITCHER (TRANSAKSI VS HISTORY) ==================== */
.view-mode-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 991.98px) {
  .shop-navbar-main {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .shop-navbar-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .shop-search {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .shop-navbar {
    padding-top: 8px;
  }

  .shop-navbar-actions {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .shop-action-link {
    min-width: 0;
    padding: 6px 4px;
    gap: 5px;
    font-size: 11.5px;
  }

  .shop-action-link span:not(.cart-icon-wrap):not(.chat-icon-wrap):not(.nav-label):not(.cart-count) {
    display: none;
  }

  .shop-navbar-links {
    gap: 16px;
    padding-bottom: 2px;
  }

  .shop-search .btn {
    min-width: 48px;
  }

  .nav-label {
    display: none;
  }

  .shop-navbar-links > a,
  .shop-navbar-links > button {
    font-size: 11.5px;
  }

  .view-mode-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .shop-navbar-actions {
    justify-content: space-between;
  }

  .shop-action-link {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
  }

  .shop-account-dropdown {
    flex: 1 1 auto;
  }

  .audio-toggle-btn {
    min-width: 42px;
  }
}

.view-mode-btn {
  border: var(--border-extra);
  padding: 12px 16px;
  background-color: var(--retro-white);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none !important;
  color: #000;
  transition: all 0.12s ease;
}

.view-mode-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hover);
}

.view-mode-btn.active {
  box-shadow: var(--shadow-active);
  transform: translate(1px, 1px);
}

.view-mode-btn.active.mode-active {
  background-color: var(--retro-yellow);
}

.view-mode-btn.active.mode-history {
  background-color: var(--retro-cyan);
}

/* Escrow Step Track */
.escrow-step-track {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.escrow-step-pill {
  border: 1.5px solid #000;
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 800;
  background-color: var(--retro-gray);
  box-shadow: 1.5px 1.5px 0px #000;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.escrow-step-pill.done {
  background-color: var(--retro-green);
  color: #000;
}

.escrow-step-pill.current {
  background-color: var(--retro-yellow);
  color: #000;
  box-shadow: 2px 2px 0px #000;
}

.escrow-step-pill.disputed {
  background-color: var(--retro-pink);
  color: #fff;
}

/* History Receipt Card */
.history-receipt-card {
  border: var(--border-extra);
  background-color: var(--retro-white);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  position: relative;
}

.receipt-header {
  border-bottom: 2px dashed #000;
  padding: 10px 14px;
  background-color: #FAFAF5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.receipt-financial-box {
  background-color: #F3EFE6;
  border: 1.5px solid #000;
  padding: 10px 14px;
  font-size: 13px;
}

/* Credentials Box */
.secret-credentials-card {
  border: var(--border-extra);
  background-color: var(--retro-cyan);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  margin: 12px 0;
}

.credential-field {
  background-color: var(--retro-white);
  border: 2px solid #000;
  padding: 6px 10px;
  font-family: monospace;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

/* Chat System */
.chat-container {
  border: var(--border-thick);
  background-color: var(--retro-white);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 360px;
}

.chat-header {
  border-bottom: var(--border-thick);
  padding: 8px 12px;
  background-color: var(--retro-cyan);
  font-weight: 800;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background-color: #FAFAF7;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-bubble {
  max-width: 85%;
  padding: 8px 12px;
  border: 2px solid #000;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 2px 2px 0px #000;
  word-break: break-word;
  white-space: pre-line;
}

.chat-bubble.own {
  align-self: flex-end;
  background-color: var(--retro-yellow);
}

.chat-bubble.other {
  align-self: flex-start;
  background-color: var(--retro-white);
}

.chat-bubble.system {
  align-self: center;
  background-color: var(--retro-black);
  color: var(--retro-yellow);
  font-family: var(--font-retro);
  font-size: 9px;
  max-width: 95%;
  text-align: center;
}

.chat-input-bar {
  border-top: var(--border-thick);
  padding: 8px;
  background-color: var(--retro-white);
  display: flex;
  gap: 6px;
}

/* Floating NPC Chatbot */
#chatbot-floating-trigger {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1040;
  border: var(--border-thick);
  background-color: var(--retro-pink);
  color: var(--retro-white);
  font-family: var(--font-retro);
  font-size: 10px;
  padding: 10px 14px;
  box-shadow: 4px 4px 0px #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

#chatbot-dialogue-modal {
  display: none;
  position: fixed;
  bottom: 75px;
  right: 20px;
  width: 340px;
  max-width: 92vw;
  height: 440px;
  z-index: 1045;
  border: var(--border-extra);
  background-color: var(--retro-white);
  box-shadow: var(--shadow-lg);
  flex-direction: column;
}

.npc-dialogue-header {
  background-color: var(--retro-black);
  color: var(--retro-yellow);
  padding: 8px 12px;
  border-bottom: var(--border-thick);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-retro);
  font-size: 10px;
}

.npc-dialogue-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background-color: #F0ECE1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.npc-avatar-box {
  width: 32px;
  height: 32px;
  border: 1.5px solid #000;
  background-color: var(--retro-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.npc-quick-prompts {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 6px 10px;
  border-top: 1.5px dashed #000;
  background-color: var(--retro-cream);
}

.npc-prompt-chip {
  font-size: 9.5px;
  font-weight: 700;
  border: 1.5px solid #000;
  background-color: var(--retro-yellow);
  padding: 2px 6px;
  cursor: pointer;
  box-shadow: 1.5px 1.5px 0px #000;
}

/* Audio Master Toggle Button */
.audio-toggle-btn {
  border: 1.5px solid #000;
  background-color: var(--retro-black);
  color: var(--retro-yellow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 1.5px 1.5px 0px #000;
}

.chat-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: var(--border-thick);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.chat-inbox-panel {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  min-height: 570px;
  border: var(--border-extra);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.chat-conversation-list {
  min-width: 0;
  border-right: var(--border-thick);
}

.chat-list-heading {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-bottom: 1.5px solid #ddd;
}

.chat-conversation-items {
  max-height: 620px;
  overflow-y: auto;
}

.chat-conversation-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 0;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
  color: #111;
  text-align: left;
}

.chat-conversation-item:hover,
.chat-conversation-item.active {
  background: #fff9c2;
}

.chat-conversation-item.active {
  box-shadow: inset 4px 0 0 #000;
}

.chat-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1.5px solid #000;
  background: var(--retro-cyan);
  color: #000;
}

.chat-conversation-copy {
  min-width: 0;
  flex: 1;
}

.chat-conversation-copy strong,
.chat-conversation-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-conversation-copy small {
  margin-top: 3px;
  color: #666;
}

.chat-conversation-view {
  display: flex;
  min-width: 0;
  min-height: 0;
}

.chat-empty-state {
  display: grid;
  align-content: center;
  justify-items: center;
  width: 100%;
  padding: 32px;
  color: #666;
  text-align: center;
}

.chat-empty-state > i {
  margin-bottom: 14px;
  color: #888;
  font-size: 42px;
}

.chat-active-panel {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.chat-active-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 16px;
  border-bottom: 1.5px solid #ddd;
}

.chat-message-list {
  display: flex;
  min-height: 320px;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
  overflow-y: auto;
  background: #f7f7f7;
}

.chat-message-list .chat-bubble {
  max-width: min(78%, 560px);
}

.chat-message-list .chat-bubble.own {
  align-self: flex-end;
}

.chat-compose {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1.5px solid #ddd;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.chat-compose .form-control {
  min-width: 0;
  min-height: 44px;
}

.chat-compose .btn {
  min-width: 48px;
}

/* Mobile Responsiveness (iOS / Android Ergonomics) */
@media (max-width: 768px) {
  body {
    font-size: 13px;
  }
  h1 { font-size: 19px; }
  h2 { font-size: 17px; }
  h3 { font-size: 15px; }
  .retro-brand { font-size: 14px; }
  .brand-logo { width: 30px; height: 30px; }
  .ecommerce-search-box { max-width: 100%; margin: 6px 0; }
  .profile-header-widget { padding: 3px 6px; font-size: 12px; }
  .btn { font-size: 11.5px; padding: 7px 10px; min-height: 40px; }
  .view-mode-btn { padding: 10px 12px; }
  .product-price-tag { font-size: 14px; padding: 3px 6px; }
  .retro-navbar-inner { align-items: stretch; flex-direction: column; }
  .retro-brand { align-self: flex-start; }
  .nav-main-actions {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    justify-content: stretch;
    gap: 6px;
    width: 100%;
  }
  .nav-main-actions > .profile-header-widget { grid-column: 1 / -1; justify-content: center; margin-left: 0; }
  .nav-main-actions > .btn { min-width: 0; padding: 6px; white-space: normal; }
  .nav-main-actions .nav-label { display: none; }
  .nav-main-actions > .btn i { margin: 0; }
  .modal-dialog { margin: 10px; }
  .modal-body { padding: 12px !important; }
  .gateway-qr-placeholder { width: 120px; height: 120px; }
  .profile-dashboard-header { align-items: flex-start; }
  .profile-dashboard-header > .d-flex { width: 100%; }
  .profile-stat-card { min-height: 88px; padding: 8px; }
  .profile-stat-card > strong { font-size: 13px; }
  .profile-list-row { align-items: flex-start; }
  #chatbot-floating-trigger { bottom: 12px; right: 12px; }
}

@media (max-width: 991.98px) {
  .shop-navbar-main {
    grid-template-columns: auto minmax(140px, 1fr) auto;
    gap: 8px 12px;
  }
  .shop-navbar-actions {
    gap: 5px;
  }
  .shop-navbar-actions > .shop-action-link > span:not(.cart-icon-wrap):not(.chat-icon-wrap):not(.nav-label):not(.cart-count) {
    display: none;
  }
  .shop-search {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 767.98px) {
  .shop-navbar { padding-top: 7px; }
  .shop-navbar-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .shop-navbar-actions { gap: 7px; }
  .shop-action-link {
    min-width: 42px;
    padding: 5px;
    font-size: 12px;
  }
  .shop-action-link > i,
  .cart-icon-wrap > i { font-size: 17px; }
  .shop-navbar-links { gap: 18px; }
  .shop-navbar-links > a,
  .shop-navbar-links > button { font-size: 12px; }
  .shop-search {
    grid-column: auto;
    grid-row: auto;
    height: 38px;
  }
  .chat-page-heading { align-items: flex-start; flex-direction: column; }
  .chat-inbox-panel {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
  .chat-conversation-list {
    border-right: 0;
    border-bottom: var(--border-thick);
  }
  .chat-conversation-items {
    display: flex;
    max-height: 206px;
    overflow: auto;
  }
  .chat-conversation-item {
    min-width: min(78vw, 290px);
    border-right: 1px solid #e5e5e5;
    border-bottom: 0;
  }
  .chat-conversation-item.active { box-shadow: inset 0 -4px 0 #000; }
  .chat-conversation-view { min-height: 430px; }
  .chat-message-list { min-height: 280px; max-height: 52vh; }
}

@media (max-width: 420px) {
  .shop-brand { font-size: 12px; gap: 5px; }
  .shop-brand .brand-logo { width: 28px; height: 28px; }
  .shop-action-link > span:not(.cart-icon-wrap) { font-size: 10px; }
  .shop-account-dropdown .shop-action-link > span { max-width: 66px; overflow: hidden; text-overflow: ellipsis; }
  .chat-active-header { gap: 8px; padding: 10px; }
  .chat-active-header .btn { padding: 6px 8px; }
  .chat-message-list { padding: 10px; }
}

@media (max-width: 380px) {
  .nav-main-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .catalog-section-title { flex-wrap: wrap; }
}

/* Pastel arcade surfaces echo the standalone error screens. */
body {
  min-height: 100vh;
  color: #201b31;
  background-color: #F4F0E8;
  background-image: radial-gradient(#d8cce8 1px, transparent 1px);
  background-size: 22px 22px;
}

.retro-marquee {
  border-bottom-color: #201b31;
}

.shop-navbar {
  top: 0;
  width: 100%;
  margin: 0 auto 24px;
  padding: 9px 0 0;
  border: 0;
  border-bottom: 3px solid #201b31;
  border-radius: 0 0 16px 16px;
  background-color: #FFD166;
  box-shadow: 0 5px 0 #201b31;
}

.shop-navbar-links {
  border-top-color: rgba(32, 27, 49, .18);
}

.quick-category-bar {
  margin-bottom: 18px;
  border: 2px solid #201b31;
  border-radius: 16px;
  background-color: #D8C8FF;
  box-shadow: 4px 4px 0 #201b31;
}

.card,
.retro-card,
.product-card-neo,
.chat-page-heading,
.chat-inbox-panel,
.history-receipt-card,
.view-mode-btn,
.modal-content {
  border-color: #201b31 !important;
  border-radius: 18px !important;
  box-shadow: 6px 6px 0 #201b31 !important;
}

.card.bg-white,
#filters {
  background-color: #FFF0D7 !important;
}

.product-card-neo {
  overflow: hidden;
  border-width: 2.5px;
  border-radius: 18px;
  background-color: #FFF4DC;
}

#products-grid > div:nth-child(4n + 2) .product-card-neo {
  background-color: #E2F7F1;
}

#products-grid > div:nth-child(4n + 3) .product-card-neo {
  background-color: #FFE3ED;
}

#products-grid > div:nth-child(4n) .product-card-neo {
  background-color: #E8E2FF;
}

#filters .category-filter-btn:nth-child(1) { background-color: #FFD166 !important; }
#filters .category-filter-btn:nth-child(2) { background-color: #83D9A5 !important; }
#filters .category-filter-btn:nth-child(3) { background-color: #63D5E5 !important; }
#filters .category-filter-btn:nth-child(4) { background-color: #FF9B71 !important; }
#filters .category-filter-btn:nth-child(5) { background-color: #C6B4FF !important; }
#filters .category-filter-btn:nth-child(6) { background-color: #FFB7CF !important; }
#filters .category-filter-btn:nth-child(7) { background-color: #A7E9DE !important; }

.btn,
.form-control,
.form-select,
.shop-search,
.shop-account-menu,
.payment-method-tile,
.demo-account-card,
.chat-container,
.chat-conversation-item,
.app-notification {
  border-color: #201b31 !important;
  border-radius: 12px !important;
}

.shop-search {
  overflow: hidden;
  border-color: #201b31;
  border-radius: 14px;
  background: #FFF4DC;
}

.form-control,
.form-select,
.shop-search .form-control {
  background-color: #FFF9EF;
}

.btn,
.badge,
.badge-retro,
.product-price-tag,
.category-chip-btn,
.chat-avatar,
.profile-avatar,
.payment-method-tile,
.demo-account-card {
  border-color: #201b31 !important;
}

.btn,
.product-price-tag,
.category-chip-btn,
.payment-method-tile,
.demo-account-card {
  box-shadow: 3px 3px 0 #201b31;
}

.btn:hover,
.category-chip-btn:hover,
.payment-method-tile:hover,
.demo-account-card:hover {
  box-shadow: 5px 5px 0 #201b31;
}

.btn:active,
.btn.active {
  box-shadow: 1px 1px 0 #201b31 !important;
}

.shop-action-link,
.shop-navbar-links > a,
.shop-navbar-links > button {
  color: #201b31;
}

.retro-brand,
.shop-brand {
  color: #201b31;
}

.brand-logo {
  border-color: #201b31;
  border-radius: 10px;
  box-shadow: 2px 2px 0 #201b31;
}

.chat-page-heading,
.chat-inbox-panel {
  border-color: #201b31;
  border-radius: 20px;
  background-color: #D8C8FF;
  box-shadow: 6px 6px 0 #201b31;
}

.chat-conversation-list {
  border-color: #201b31;
}

.chat-list-heading,
.chat-active-header,
.chat-compose {
  border-color: rgba(32, 27, 49, .22);
}

.chat-list-heading,
.chat-active-header,
.chat-list-heading h2,
.chat-active-header h2,
.chat-conversation-copy strong {
  color: #201b31;
}

.chat-message-list {
  background-color: #F4EDFF;
}

.chat-bubble {
  border-color: #201b31;
  border-radius: 14px;
  box-shadow: 3px 3px 0 #201b31;
}

.chat-inbox-panel .chat-bubble.other {
  background-color: #FFF4DC;
}

.history-receipt-card,
.view-mode-btn {
  border-color: #201b31;
}

.history-receipt-card {
  border-radius: 18px;
  overflow: hidden;
}

.receipt-header {
  background-color: #EDE5FF;
}

.receipt-financial-box {
  border-color: #201b31;
  border-radius: 12px;
}

.profile-dashboard-header,
.profile-stat-card,
.gateway-summary,
.chat-container {
  border-color: #201b31;
  border-radius: 16px;
  box-shadow: 4px 4px 0 #201b31;
}

.profile-dashboard-header {
  background-color: #D8C8FF;
}

.profile-stat-card:nth-child(3n + 1) { background-color: #FFF0D7; }
.profile-stat-card:nth-child(3n + 2) { background-color: #DFF5EB; }
.profile-stat-card:nth-child(3n) { background-color: #FFE3ED; }

.retro-hud-stat {
  border-color: #201b31 !important;
  border-radius: 16px;
  box-shadow: 5px 5px 0 #201b31;
}

.modal-content {
  overflow: hidden;
}

.modal-header,
.modal-footer {
  border-color: #201b31;
}

.table,
.table th,
.table td {
  border-color: #201b31;
}

.table td {
  background-color: #FFF8EB;
}

.shop-account-menu {
  border-color: #201b31;
  border-radius: 14px !important;
  box-shadow: 5px 5px 0 #201b31;
}

.shop-account-menu .dropdown-item {
  border-radius: 9px;
}

.shop-account-menu .dropdown-item:hover {
  background-color: #E8DEFF;
}

.sort-dropdown {
  width: 100%;
  max-width: 210px;
}

.sort-dropdown-toggle {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border: 2px solid #201b31;
  border-radius: 12px;
  background-color: #FFF9EF;
  color: #201b31;
  box-shadow: 3px 3px 0 #201b31;
  font: 600 14px/1.2 var(--font-body);
  text-align: left;
}

.sort-dropdown-toggle:hover,
.sort-dropdown-toggle[aria-expanded="true"] {
  background-color: #D8C8FF;
}

.sort-dropdown-toggle:focus-visible,
.sort-option:focus-visible {
  outline: 3px solid rgba(32, 27, 49, .3);
  outline-offset: 2px;
}

.sort-chevron {
  font-size: 11px;
  transition: transform .15s ease;
}

.sort-dropdown-toggle[aria-expanded="true"] .sort-chevron {
  transform: rotate(180deg);
}

.sort-dropdown-menu {
  width: 100%;
  min-width: 210px;
  padding: 6px;
  border: 2px solid #201b31;
  border-radius: 14px;
  background-color: #FFF9EF;
  box-shadow: 5px 5px 0 #201b31;
}

.sort-dropdown-menu .sort-option {
  display: grid;
  grid-template-columns: 20px 1fr 16px;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: 3px 0;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #201b31;
  font-size: 14px;
  font-weight: 700;
}

.sort-dropdown-menu .sort-option:nth-child(1) { background-color: #FFF0C2; }
.sort-dropdown-menu .sort-option:nth-child(2) { background-color: #D9F3E2; }
.sort-dropdown-menu .sort-option:nth-child(3) { background-color: #FCE0EA; }

.sort-dropdown-menu .sort-option:hover,
.sort-dropdown-menu .sort-option.active {
  border-color: #201b31;
  box-shadow: 2px 2px 0 #201b31;
}

.sort-option-check {
  visibility: hidden;
}

.sort-option.active .sort-option-check {
  visibility: visible;
}

.app-notification {
  border-color: #201b31;
  border-radius: 14px;
  box-shadow: 5px 5px 0 #201b31;
}

.chat-inbox-panel,
.chat-page-heading {
  background-color: #D8C8FF;
}

.chat-conversation-item {
  margin: 5px;
  width: calc(100% - 10px);
  border: 1px solid rgba(32, 27, 49, .2);
  border-radius: 12px;
  background-color: #FFF4DC;
}

.chat-conversation-item:hover,
.chat-conversation-item.active {
  background-color: #FFD166;
}

@media (max-width: 767.98px) {
  .shop-navbar {
    top: 0;
    width: 100%;
    margin: 0 auto 18px;
    border-radius: 0 0 14px 14px;
  }

  .chat-conversation-item {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card-neo,
  .btn,
  .category-chip-btn,
  .payment-method-tile,
  .demo-account-card {
    transition-duration: .01ms !important;
  }
}

.shop-search {
  height: 42px;
  border-radius: 12px;
}

.shop-search .form-control {
  padding: 4px 10px;
  font-size: 15px;
}

.shop-search,
.shop-search .form-control {
  background: transparent !important;
  background-color: transparent !important;
}

.shop-search .btn {
  min-width: 70px;
  padding: 4px 10px;
  font-size: 13px;
}

.audio-toggle-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-color: #201b31;
  border-radius: 10px;
  box-shadow: 3px 3px 0 #201b31;
  font-size: 13px;
}

@media (max-width: 767.98px) {
  .shop-search {
    height: 40px;
  }

  .shop-search .btn {
    min-width: 42px;
    padding: 4px 8px;
  }

  .audio-toggle-btn {
    width: 32px;
    min-width: 32px;
    height: 32px;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .audio-toggle-btn {
    min-width: 32px;
  }
}

.shop-search {
  gap: 8px;
  align-items: center;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

.shop-search .btn {
  height: 38px;
  min-height: 38px;
  line-height: 1.2;
  border: 2px solid #201b31 !important;
  border-radius: 10px !important;
}

.shop-search .form-control,
.shop-search .form-control:focus {
  min-height: 38px;
  border: 2px solid #201b31 !important;
  border-radius: 10px !important;
  background: #fff9ef !important;
  box-shadow: none !important;
}

.shop-search .form-control:focus-visible {
  outline: 3px solid rgba(32, 27, 49, .24);
  outline-offset: 1px;
}

#products-grid .cart-add-button {
  background-color: var(--retro-cyan) !important;
  color: #201b31 !important;
}

#products-grid .cart-add-button:not(:disabled) i {
  color: inherit;
}

#products-grid .cart-add-button:disabled {
  background-color: #d6d3dc !important;
  color: #77727f !important;
  cursor: not-allowed;
  box-shadow: none;
}

@media (min-width: 1400px) {
  .container {
    max-width: 1360px;
  }
}

@media (min-width: 1400px) {
  #products-grid > .col-xl-4 {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

body {
  font-size: 15px;
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .shop-navbar-main {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand actions";
    gap: 10px 16px;
  }

  .shop-brand { grid-area: brand; }
  .shop-navbar-actions {
    grid-area: actions;
    width: auto;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .marketplace-navbar .shop-navbar-main {
    grid-template-areas: "brand actions" "search search";
  }

  .marketplace-navbar .shop-search {
    grid-area: search;
  }

  .shop-navbar-links {
    gap: 22px;
  }
}

@media (max-width: 767.98px) {
  #products-grid {
    --bs-gutter-x: 12px;
    --bs-gutter-y: 12px;
  }

  #products-grid > .col-xl-4 {
    flex: 0 0 50%;
    max-width: 50%;
    margin-bottom: 0 !important;
  }

  .retro-marquee {
    font-size: 9px;
    padding-block: 4px;
  }

  .shop-navbar {
    margin-bottom: 16px;
    padding-top: 8px;
  }

  .shop-navbar-main {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand actions";
    gap: 10px;
  }

  .shop-brand { grid-area: brand; }
  .shop-navbar-actions {
    grid-area: actions;
    width: auto;
    flex-wrap: nowrap;
    gap: 5px;
  }

  .marketplace-navbar .shop-navbar-main {
    grid-template-areas: "brand actions" "search search";
  }

  .marketplace-navbar .shop-search {
    grid-area: search;
    width: 100%;
    height: 44px;
  }

  .shop-navbar-actions .shop-action-link {
    min-width: 40px;
    min-height: 42px;
    padding: 5px;
  }

  .shop-navbar-actions .shop-action-link > span:not(.cart-icon-wrap):not(.chat-icon-wrap):not(.nav-label):not(.cart-count) {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .shop-navbar-links {
    justify-content: flex-start;
    gap: 20px;
    min-height: 44px;
    margin-inline: -4px;
    padding: 0 4px 4px;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .shop-navbar-links::-webkit-scrollbar,
  .chat-conversation-items::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  .chat-conversation-items {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .shop-navbar-links > a,
  .shop-navbar-links > button {
    min-height: 42px;
    font-size: 13px;
  }

  .container.my-4 {
    margin-top: 16px !important;
    margin-bottom: 20px !important;
  }

  .card,
  .retro-card,
  .product-card-neo,
  .chat-page-heading,
  .chat-inbox-panel,
  .history-receipt-card,
  .view-mode-btn,
  .modal-content {
    box-shadow: 3px 3px 0 #201b31 !important;
  }

  .chat-page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .chat-page-heading > .btn {
    width: 100%;
  }

  .chat-inbox-panel {
    min-height: 0;
  }

  .chat-conversation-list {
    min-width: 0;
  }

  .chat-conversation-items {
    max-height: 164px;
    padding: 0 4px 6px;
    overscroll-behavior-x: contain;
  }

  .chat-conversation-item {
    min-width: min(76vw, 280px);
    min-height: 66px;
  }

  .chat-conversation-view {
    min-height: 58vh;
  }

  .chat-message-list {
    min-height: 240px;
    max-height: 55vh;
  }

  .chat-active-header {
    flex-wrap: wrap;
  }

  .chat-active-header .btn {
    margin-left: auto;
  }

  .chat-compose {
    padding: 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .form-control,
  .form-select {
    min-height: 44px;
    font-size: 15px;
  }

  .btn {
    min-height: 42px;
  }

  .table-responsive {
    border-radius: 12px;
  }
}

@media (max-width: 575.98px) {
  .retro-marquee {
    display: none;
  }

  .shop-navbar {
    border-radius: 0 0 12px 12px;
    box-shadow: 0 3px 0 #201b31;
  }

  .shop-navbar-main {
    gap: 9px 6px;
  }

  .shop-brand {
    gap: 7px;
    font-size: 14px;
  }

  .shop-brand .brand-logo {
    width: 34px;
    height: 34px;
  }

  .shop-navbar-actions {
    gap: 2px;
  }

  .shop-navbar-actions .shop-action-link {
    min-width: 38px;
    padding-inline: 3px;
  }

  .shop-navbar-actions .audio-toggle-btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
  }

  .container {
    padding-right: 14px;
    padding-left: 14px;
  }

  .container.my-4 {
    margin-top: 14px !important;
  }

  .marketplace-navbar .shop-search {
    height: 44px;
  }

  #products-grid {
    --bs-gutter-x: 10px;
    --bs-gutter-y: 10px;
  }

  .product-card-neo .card-header-neo {
    gap: 5px !important;
    padding: 7px;
  }

  .product-card-neo .card-header-neo > .d-flex {
    gap: 4px !important;
  }

  .product-card-neo .p-3 {
    padding: 10px !important;
  }

  .product-card-neo h5 {
    min-height: 3.2em !important;
    font-size: 14px !important;
  }

  .product-card-neo .p-3 > p {
    font-size: 12.5px !important;
  }

  .product-card-neo .product-price-tag {
    max-width: 100%;
    padding: 4px 5px;
    font-size: 13px;
    white-space: nowrap;
  }

  .product-card-neo .p-3 > .d-flex.justify-content-between.align-items-center.pt-1.gap-2 {
    align-items: stretch !important;
    flex-direction: column;
    gap: 8px !important;
  }

  .product-card-actions {
    flex-wrap: nowrap !important;
    justify-content: stretch !important;
    width: 100%;
    gap: 4px !important;
  }

  .product-card-actions .btn {
    flex: 1 1 0;
    min-width: 34px;
    min-height: 38px;
    padding: 5px 7px !important;
  }

  .product-buy-label {
    display: none;
  }

  .catalog-section-title {
    align-items: flex-start !important;
    gap: 8px;
  }

  .catalog-section-title h3 {
    font-size: 15px !important;
  }

  .product-card-neo .badge,
  .product-card-neo .badge-retro,
  .product-card-neo .product-badge-corner {
    font-size: 10px;
  }

  .sort-dropdown {
    max-width: none;
  }

  .view-mode-container {
    gap: 10px;
  }

  .view-mode-btn {
    gap: 10px;
    padding: 12px;
  }

  .view-mode-btn h4 {
    font-size: 14px !important;
  }

  #chatbot-floating-trigger {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  #chatbot-dialogue-modal {
    right: 10px;
    bottom: 66px;
    width: calc(100vw - 20px);
    max-width: 420px;
    height: min(70dvh, 520px);
  }
}

@media (max-width: 360px) {
  .shop-brand {
    gap: 5px;
    font-size: 12px;
  }

  .shop-brand .brand-logo {
    width: 30px;
    height: 30px;
  }

  .shop-navbar-actions .shop-action-link {
    min-width: 34px;
  }

  #products-grid {
    --bs-gutter-x: 8px;
  }

  .product-card-neo .p-3 {
    padding: 8px !important;
  }

  .product-card-actions .btn {
    min-width: 30px;
    padding-inline: 5px !important;
  }
}

.product-action-label {
  display: none;
}

@media (max-width: 575.98px) {
  body {
    font-size: 16px;
    line-height: 1.5;
  }

  h1 { font-size: 23px; }
  h2 { font-size: 20px; }
  h3 { font-size: 17px; }

  .container {
    padding-right: 12px;
    padding-left: 12px;
  }

  .container.my-4 {
    margin-top: 12px !important;
    margin-bottom: 24px !important;
  }

  .btn {
    min-height: 46px;
    padding: 9px 13px;
    font-size: 14px;
  }

  .btn-sm {
    min-height: 42px;
    padding: 7px 11px;
    font-size: 13px;
  }

  .form-control,
  .form-select {
    min-height: 48px;
    font-size: 16px;
  }

  .marketplace-navbar .shop-navbar-main {
    gap: 8px;
  }

  .marketplace-navbar .shop-search {
    height: 48px;
  }

  .marketplace-navbar .shop-search .form-control {
    padding-inline: 12px;
    font-size: 16px;
  }

  .marketplace-navbar .shop-search .btn {
    min-width: 52px;
  }

  #filters {
    padding: 12px !important;
  }

  #filters > .row {
    gap: 8px 0;
  }

  #filters .row > .col-md-9 {
    flex: 0 0 100%;
    max-width: 100%;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding-bottom: 0;
    overflow: visible;
  }

  .category-filter-btn {
    min-height: 44px;
    flex: 0 0 auto;
    padding-inline: 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  #filters .row > .col-md-3 {
    flex: 0 0 100%;
    max-width: 100%;
    justify-content: stretch !important;
  }

  .sort-dropdown,
  .sort-dropdown-toggle {
    width: 100%;
  }

  .sort-dropdown-toggle {
    min-height: 48px;
    justify-content: space-between;
    font-size: 15px;
  }

  .card.bg-yellow.p-4 {
    padding: 16px !important;
  }

  .card.bg-yellow h1 {
    font-size: 24px;
    line-height: 1.2;
  }

  .card.bg-yellow p {
    font-size: 15px !important;
    line-height: 1.55;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .card.bg-yellow .d-flex.flex-wrap.gap-2 {
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin-right: -4px;
    padding: 2px 4px 8px 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .card.bg-yellow .d-flex.flex-wrap.gap-2::-webkit-scrollbar {
    display: none;
  }

  .card.bg-yellow .d-flex.flex-wrap.gap-2 > .badge-retro {
    flex: 0 0 auto;
    font-size: 11px;
  }

  #products-grid {
    --bs-gutter-x: 0;
    --bs-gutter-y: 14px;
  }

  #products-grid > .col-xl-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .product-card-neo .card-header-neo {
    gap: 8px !important;
    padding: 10px 12px;
    font-size: 13px;
  }

  .product-card-neo .p-3 {
    gap: 2px;
    padding: 14px !important;
  }

  .product-card-neo h5 {
    min-height: 0 !important;
    margin-bottom: 7px !important;
    font-size: 17px !important;
    line-height: 1.4 !important;
    white-space: normal;
  }

  .product-card-neo .p-3 > .mb-2.d-flex {
    gap: 6px !important;
    margin-bottom: 10px !important;
  }

  .product-card-neo .badge,
  .product-card-neo .badge-retro,
  .product-card-neo .product-badge-corner {
    font-size: 12px;
    line-height: 1.4;
  }

  .product-card-neo .p-3 > p {
    margin-bottom: 12px !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  .product-card-neo .product-price-tag {
    padding: 6px 9px;
    font-size: 17px;
  }

  .product-card-neo .p-3 > .d-flex.justify-content-between.align-items-center.pt-1.gap-2 {
    align-items: stretch !important;
    flex-direction: column;
    gap: 10px !important;
  }

  .product-card-neo .p-3 > .d-flex.justify-content-between.align-items-center.pt-1.gap-2 > div:first-child {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .product-card-neo .p-3 > .d-flex.justify-content-between.align-items-center.pt-1.gap-2 > div:first-child > .text-muted {
    margin: 0;
    font-size: 13px !important;
  }

  .product-card-actions {
    width: 100%;
    gap: 8px !important;
  }

  .product-card-actions .btn {
    min-width: 44px;
    min-height: 48px;
    padding-inline: 10px !important;
  }

  .product-action-label {
    display: inline;
  }

  .product-buy-label {
    display: inline;
  }

  .catalog-section-title {
    align-items: flex-start !important;
    flex-direction: column;
    gap: 8px;
  }

  .catalog-section-title h3 {
    font-size: 17px !important;
    line-height: 1.4;
  }

  .view-mode-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .view-mode-btn {
    min-height: 72px;
    gap: 6px;
    padding: 10px !important;
  }

  .view-mode-btn .badge-retro,
  .view-mode-btn > div > .small {
    display: none !important;
  }

  .view-mode-btn h4 {
    margin: 0 !important;
    font-size: 13px !important;
    line-height: 1.3;
  }

  .view-mode-btn .product-price-tag {
    padding: 4px 7px;
    font-size: 20px !important;
  }

  #subfilters-active,
  #subfilters-history {
    padding: 10px !important;
  }

  #subfilters-active > .d-flex,
  #subfilters-history > .d-flex {
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin-right: -2px;
    padding: 2px 4px 8px 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  #subfilters-active > .d-flex::-webkit-scrollbar,
  #subfilters-history > .d-flex::-webkit-scrollbar {
    display: none;
  }

  #subfilters-active > .d-flex > span,
  #subfilters-history > .d-flex > span {
    display: none;
  }

  .order-tab-btn {
    min-height: 46px;
    flex: 0 0 auto;
    font-size: 13px;
    white-space: nowrap;
  }

  #orders-container > .card {
    margin-bottom: 16px !important;
  }

  #orders-container .card-header-neo {
    align-items: flex-start !important;
    padding: 10px 12px;
  }

  #orders-container .card-header-neo > .d-flex {
    gap: 7px !important;
  }

  #orders-container .card-header-neo .small {
    font-size: 13px !important;
  }

  #orders-container .card > .p-3 {
    padding: 14px !important;
  }

  #orders-container .card h5 {
    font-size: 17px !important;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }

  #orders-container .card .alert {
    padding: 12px !important;
    font-size: 14px !important;
    line-height: 1.55;
  }

  .escrow-step-track {
    flex-wrap: nowrap;
    gap: 8px;
    margin: 14px 0;
    padding: 2px 4px 8px 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .escrow-step-track::-webkit-scrollbar {
    display: none;
  }

  .escrow-step-pill {
    min-height: 40px;
    flex: 0 0 auto;
    padding: 7px 10px;
    font-size: 12px;
  }

  #orders-container .card .border-top.border-dark.pt-2.justify-content-between {
    align-items: stretch !important;
    flex-direction: column;
    gap: 10px !important;
  }

  #orders-container .card .border-top.border-dark.pt-2.justify-content-between > div {
    width: 100%;
  }

  #orders-container .card .border-top.border-dark.pt-2.justify-content-between .btn {
    width: 100%;
    min-height: 48px;
    white-space: normal;
  }

  #orders-container .history-receipt-card {
    margin-bottom: 16px;
  }

  .history-receipt-card .receipt-header {
    padding: 12px;
  }

  .history-receipt-card .receipt-header .font-retro {
    font-size: 13px;
  }

  .history-receipt-card .receipt-header > .small {
    flex: 0 0 100%;
    font-size: 13px !important;
  }

  .history-receipt-card > .p-3 {
    padding: 12px !important;
  }

  .history-receipt-card h5 {
    margin-bottom: 10px !important;
    font-size: 16px !important;
    line-height: 1.45;
  }

  .history-receipt-card .receipt-financial-box {
    padding: 12px;
    font-size: 14px;
    line-height: 1.5;
  }

  .history-receipt-card .receipt-financial-box > .d-flex {
    align-items: flex-start;
    gap: 8px;
  }

  .history-receipt-card .receipt-financial-box > .d-flex > span:last-child {
    text-align: right;
  }

  .history-receipt-card .receipt-financial-box .badge {
    white-space: normal;
  }

  .history-receipt-card .card.p-2 {
    padding: 12px !important;
  }

  .history-receipt-card .border-top.border-dark.pt-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px !important;
  }

  .history-receipt-card .border-top.border-dark.pt-2 > div,
  .history-receipt-card .border-top.border-dark.pt-2 > .btn,
  .history-receipt-card .border-top.border-dark.pt-2 > div > .btn {
    width: 100%;
  }

  .chat-page-heading {
    gap: 8px;
    padding: 12px;
  }

  .chat-page-heading h1 {
    font-size: 22px;
  }

  .chat-page-heading p {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .chat-page-heading > .btn {
    display: none;
  }

  .chat-list-heading {
    gap: 8px;
    padding: 12px;
  }

  .chat-conversation-items {
    max-height: 150px;
    padding-inline: 8px;
  }

  .chat-conversation-item {
    min-width: min(82vw, 300px);
    min-height: 76px;
    padding: 12px;
  }

  .chat-conversation-copy strong {
    font-size: 15px;
  }

  .chat-conversation-copy small {
    font-size: 13px;
  }

  .chat-conversation-view {
    min-height: 0;
  }

  .chat-active-header {
    gap: 10px;
    padding: 12px;
  }

  .chat-active-header h2 {
    font-size: 16px;
  }

  .chat-active-header small {
    font-size: 13px;
    line-height: 1.4;
  }

  .chat-message-list {
    min-height: 200px;
    max-height: 42dvh;
    padding: 14px;
  }

  .chat-message-list .chat-bubble {
    max-width: 88%;
    padding: 10px 12px;
    font-size: 15px;
    line-height: 1.45;
  }

  .chat-compose {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: #fff;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  }

  .chat-compose .form-control {
    min-height: 48px;
    font-size: 16px;
  }

  .chat-compose .btn {
    min-width: 50px;
    min-height: 48px;
  }

  #chatbot-floating-trigger {
    width: 52px;
    height: 52px;
    right: 12px;
    bottom: max(14px, env(safe-area-inset-bottom));
    justify-content: center;
    padding: 0;
  }

  #chatbot-floating-trigger > span {
    display: none;
  }

  #chatbot-dialogue-modal {
    right: 8px;
    bottom: max(66px, calc(env(safe-area-inset-bottom) + 56px));
    width: calc(100vw - 16px);
  }

}

@media (max-width: 380px) {
  .product-card-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card-actions .btn:last-child {
    grid-column: 1 / -1;
  }

  .product-card-actions .btn {
    width: 100%;
  }
}

body.chat-page {
  color: #201b31;
  background-color: #F4F0E8;
  background-image: radial-gradient(#d8cce8 1px, transparent 1px);
  background-size: 22px 22px;
}

.chat-page .retro-marquee {
  display: none;
}

.chat-page .chat-page-heading {
  align-items: center;
  margin-bottom: 16px !important;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.chat-page .chat-page-heading .badge-retro {
  padding: 0;
  border: 0;
  background: transparent !important;
  color: #201b31 !important;
  font-size: 11px;
  letter-spacing: .08em;
}

.chat-page .chat-page-heading h1 {
  color: #201b31;
  font-size: 26px;
  font-weight: 700;
}

.chat-page .chat-page-heading p {
  max-width: 680px;
  color: #625a73 !important;
  font-size: 14px;
}

.chat-page .chat-inbox-panel {
  height: min(720px, calc(100dvh - 250px));
  min-height: 520px;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  overflow: hidden;
  border: 2px solid #201b31 !important;
  border-radius: 16px !important;
  background: #D8C8FF;
  box-shadow: 4px 4px 0 #201b31 !important;
}

.chat-page .chat-conversation-list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  border-right: 2px solid #201b31;
}

.chat-page .chat-list-heading {
  gap: 14px;
  padding: 18px 16px 14px;
  border-bottom: 1.5px solid rgba(32, 27, 49, .24);
}

.chat-page .chat-list-heading h2 {
  color: #201b31;
  font-size: 17px;
  font-weight: 600;
}

.chat-page .chat-list-heading small {
  color: #625a73 !important;
  font-size: 12px;
}

.chat-page #chat-search {
  min-height: 38px;
  border: 1.5px solid #201b31 !important;
  border-radius: 10px;
  background: #FFF9EF;
  box-shadow: 2px 2px 0 #201b31;
  font-size: 14px;
}

.chat-page .chat-conversation-items {
  max-height: none;
  flex: 1;
}

.chat-page .chat-conversation-item {
  gap: 12px;
  width: 100%;
  min-height: 78px;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  background: #FFF4DC;
}

.chat-page .chat-conversation-item:hover,
.chat-page .chat-conversation-item:focus-visible {
  background: #FFD166;
}

.chat-page .chat-conversation-item.active {
  background: #E8E2FF;
  box-shadow: inset 4px 0 #201b31;
}

.chat-page .chat-avatar {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  padding: 2px;
  border: 2px solid #201b31 !important;
  border-radius: 11px;
  background: #63D5E5;
  color: #201b31;
}

.chat-page .chat-avatar-label {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
}

.chat-page .chat-conversation-copy strong {
  color: #201b31;
  font-size: 14px;
  font-weight: 600;
}

.chat-page .chat-conversation-copy small {
  margin-top: 4px;
  color: #625a73;
  font-size: 12px;
}

.chat-page .chat-conversation-view {
  min-height: 0;
}

.chat-page .chat-active-header {
  min-height: 66px;
  gap: 11px;
  flex-wrap: nowrap;
  padding: 10px 16px;
  border-bottom: 1.5px solid rgba(32, 27, 49, .24);
}

.chat-page .chat-active-header .chat-avatar {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}

.chat-page .chat-active-header h2 {
  margin: 0 !important;
  color: #201b31;
  font-size: 14px;
  font-weight: 600;
}

.chat-page .chat-active-header small {
  color: #625a73 !important;
  font-size: 12px;
}

.chat-page .chat-active-header .btn {
  min-height: 36px;
  padding: 6px 10px;
  border: 1.5px solid #201b31 !important;
  border-radius: 8px;
  background: #FFF4DC;
  box-shadow: 2px 2px 0 #201b31 !important;
  color: #201b31;
  font-size: 13px;
}

.chat-page .chat-active-header .btn:hover {
  background: #FFD166;
}

.chat-page .chat-back-button {
  display: none;
  border: 0;
  background: transparent;
  color: #201b31;
  font-size: 18px;
}

.chat-page .chat-message-list {
  min-height: 0;
  gap: 8px;
  padding: 20px;
  background: #F4EDFF;
}

.chat-page .chat-message-list .chat-bubble {
  display: flex;
  max-width: min(72%, 440px);
  flex-direction: column;
  gap: 5px;
  padding: 10px 14px;
  border: 1.5px solid #201b31 !important;
  border-radius: 14px;
  box-shadow: 2px 2px 0 #201b31;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.chat-page .chat-message-list .chat-bubble.other {
  align-self: flex-start;
  border-color: #201b31 !important;
  background: #FFF4DC;
  color: #201b31;
}

.chat-page .chat-message-list .chat-bubble.own {
  align-self: flex-end;
  border-color: #201b31 !important;
  background: #63D5E5;
  color: #201b31;
}

.chat-page .chat-message-meta {
  align-self: flex-end;
  color: currentColor;
  font-size: 10px;
  opacity: .7;
}

.chat-page .chat-compose {
  align-items: center;
  gap: 10px;
  margin: 10px 16px 14px;
  padding: 5px 6px 5px 16px;
  border: 1.5px solid #201b31;
  border-radius: 12px;
  background: #FFF9EF;
  box-shadow: 2px 2px 0 #201b31;
}

.chat-page .chat-compose .form-control {
  min-height: 38px;
  padding: 6px 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 14px;
}

.chat-page .chat-compose .form-control:focus {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.chat-page .chat-compose .btn {
  display: grid;
  min-width: 38px;
  min-height: 38px;
  place-items: center;
  padding: 0;
  border: 1.5px solid #201b31 !important;
  border-radius: 10px;
  background: #FFD166;
  box-shadow: 2px 2px 0 #201b31;
  color: #201b31;
}

.chat-page .chat-compose .btn:disabled {
  background: #e2d9f4;
  color: #625a73;
}

.chat-page .chat-permission-bubble {
  align-self: center;
  max-width: min(90%, 520px);
  margin: 12px auto;
  padding: 10px 14px;
  border: 1px solid #d7d2e7;
  border-radius: 16px;
  background: #e8e2ff;
  box-shadow: none;
  color: #514b61;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
}

.chat-page .chat-message-list.chat-no-history {
  justify-content: center;
}

.chat-page .chat-empty-state {
  color: #625a73;
}

.chat-page .chat-empty-state > i {
  color: #201b31;
}

@media (max-width: 767.98px) {
  html,
  body,
  body *,
  body *::before,
  body *::after {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar,
  body *::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .chat-page .retro-marquee {
    display: none;
  }

  .chat-page main.container {
    margin-top: 14px !important;
  }

  .chat-page .chat-page-heading {
    margin-bottom: 10px !important;
  }

  .chat-page .chat-page-heading > .btn {
    display: none;
  }

  .chat-page .chat-page-heading > div {
    width: 100%;
  }

  .chat-page .chat-page-heading .badge-retro,
  .chat-page .chat-page-heading p {
    display: none;
  }

  .chat-page .chat-page-heading h1 {
    margin: 0 !important;
    font-size: 21px;
  }

  .chat-page .chat-inbox-panel {
    height: calc(100dvh - 210px);
    min-height: 360px;
    grid-template-columns: minmax(0, 1fr);
    border-radius: 14px !important;
  }

  .chat-page .chat-conversation-list {
    border: 0;
  }

  .chat-page .chat-conversation-items {
    max-height: none;
    display: block;
    overflow: auto;
  }

  .chat-page .chat-conversation-item {
    width: 100%;
    min-width: 0;
    min-height: 76px;
    border: 0;
  }

  .chat-page .chat-conversation-item.active {
    background: #E8E2FF;
    box-shadow: inset 4px 0 #201b31;
  }

  .chat-page .chat-conversation-view {
    display: none;
    min-height: 0;
    height: 100%;
  }

  .chat-page .chat-inbox-panel.mobile-chat-open .chat-conversation-list {
    display: none;
  }

  .chat-page .chat-inbox-panel.mobile-chat-open .chat-conversation-view {
    display: flex;
  }

  .chat-page .chat-active-panel {
    height: 100%;
  }

  .chat-page .chat-active-header {
    min-height: 60px;
    padding: 8px 12px;
  }

  .chat-page .chat-back-button {
    display: inline-grid;
    width: 30px;
    height: 40px;
    flex: 0 0 30px;
    place-items: center;
    padding: 0;
  }

  .chat-page .chat-active-header .btn {
    min-width: 36px;
    min-height: 36px;
    padding: 6px;
  }

  .chat-page .chat-active-header .nav-label {
    display: none;
  }

  .chat-page .chat-message-list {
    max-height: none;
    flex: 1;
    padding: 16px 12px;
  }

  .chat-page .chat-message-list .chat-bubble {
    max-width: 82%;
    padding: 9px 13px;
    font-size: 14px;
  }

  .chat-page .chat-compose {
    position: static;
    flex: 0 0 auto;
    margin: 8px 10px max(10px, env(safe-area-inset-bottom));
    padding: 4px 5px 4px 14px;
  }

  .chat-page .chat-compose .form-control {
    min-height: 40px;
    font-size: 16px;
  }

  .chat-page .chat-compose .btn {
    min-width: 40px;
    min-height: 40px;
  }
}

.d-flex:has(> .btn + .btn),
.d-grid:has(> .btn + .btn),
.d-flex.gap-1 {
  gap: 8px !important;
}

.btn-group {
  flex-wrap: wrap;
  gap: 8px;
}

.btn-group > .btn {
  margin: 0 !important;
  border-radius: 10px !important;
}

.modal-footer {
  flex-wrap: wrap;
  gap: 8px;
}

.modal-footer > * {
  margin: 0 !important;
}

@media (max-width: 767.98px) {
  .card + .card,
  .card + .retro-card,
  .retro-card + .card,
  .retro-card + .retro-card {
    margin-top: 12px;
  }

  .modal-dialog {
    margin: 12px auto;
    padding-inline: 8px;
  }

  .modal-body > .row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
  }

  .modal-body > .card + .card,
  .modal-body > .retro-card + .retro-card {
    margin-top: 12px;
  }

  .modal-body > .d-flex.flex-wrap {
    gap: 10px !important;
  }

  .modal-body .demo-account-card + .demo-account-card {
    margin-top: 10px;
  }

  .chat-page .chat-conversation-item {
    width: calc(100% - 16px);
    min-height: 76px;
    margin: 4px 8px;
    border: 1.5px solid #201b31;
    border-radius: 12px;
    box-shadow: 2px 2px 0 #201b31;
  }

  .chat-page .chat-conversation-item.active {
    box-shadow: inset 4px 0 #201b31, 2px 2px 0 #201b31;
  }
}

.marketplace-navbar .shop-navbar-main {
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand search actions";
}

.marketplace-navbar .shop-brand {
  grid-area: brand;
}

.marketplace-navbar .shop-navbar-actions {
  grid-area: actions;
}

.shop-search-area {
  grid-area: search;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.category-search-dropdown {
  position: relative;
  flex: 0 0 auto;
}

.category-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 12px;
  border: 2px solid #201b31;
  border-radius: 12px;
  background: #C6B4FF;
  color: #201b31;
  font: 600 13px var(--font-body);
  white-space: nowrap;
  box-shadow: 3px 3px 0 #201b31;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.category-search-toggle:hover,
.category-search-toggle[aria-expanded="true"] {
  transform: translate(-1px, -1px);
  background: #BFEFE8;
  box-shadow: 4px 4px 0 #201b31;
}

.category-search-toggle:focus-visible {
  outline: 3px solid rgba(32, 27, 49, .35);
  outline-offset: 3px;
}

.category-search-icon {
  color: #51428B;
  font-size: 15px;
}

.category-search-chevron {
  font-size: 10px;
}

.shop-search-area .shop-search {
  flex: 1 1 auto;
  min-width: 0;
  border: 2px solid #201b31;
  border-radius: 12px;
  box-shadow: 3px 3px 0 #201b31;
}

.shop-search-area .shop-search .form-control {
  border-radius: 10px;
}

.category-search-menu {
  min-width: 200px;
  padding: 6px;
  border: 2px solid #201b31;
  border-radius: 10px;
  box-shadow: 4px 4px 0 #201b31;
}

.category-search-menu .dropdown-item {
  min-height: 40px;
  border-radius: 6px;
  font-weight: 600;
}

.category-search-menu .dropdown-item.active,
.category-search-menu .dropdown-item:hover {
  background: #FFD166;
  color: #201b31;
}

.marketplace-controls {
  display: flex;
  justify-content: flex-end;
}

.seller-navbar-action {
  min-height: 40px;
  padding-inline: 12px;
  border: 2px solid #201b31;
  border-radius: 10px;
  background: #83D9A5;
  box-shadow: 2px 2px 0 #201b31;
}

.profile-stat-card,
.retro-hud-stat {
  min-height: 104px;
  padding: 12px;
  border: 2px solid #201b31 !important;
  border-radius: 8px !important;
  box-shadow: 3px 3px 0 #201b31 !important;
  color: #201b31;
}

.profile-stat-card > i,
.retro-hud-stat > i {
  font-size: 16px;
}

.profile-stat-card > span {
  font-size: 12px;
}

.profile-stat-card > strong {
  font-size: 16px;
}

.order-filter-control {
  display: grid;
  width: min(100%, 360px);
  gap: 6px;
}

.order-filter-control label {
  margin: 0;
}

.rating-star {
  min-width: 38px;
  min-height: 38px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: #B77700;
}

.shop-account-menu .dropdown-item.active {
  background: #FFD166;
  color: #201b31;
}

.mobile-bottom-nav {
  display: none;
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .marketplace-navbar .shop-navbar-main {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand actions" "search search";
  }
}

@media (min-width: 768px) {
  .category-search-dropdown:hover .category-search-menu,
  .category-search-dropdown:focus-within .category-search-menu {
    display: block;
  }
}

@media (max-width: 767.98px) {
  .marketplace-page,
  .orders-page,
  .chat-page {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .orders-page .shop-navbar,
  .chat-page .shop-navbar {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 1050;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 7px 6px max(7px, env(safe-area-inset-bottom));
    border-top: 2px solid #201b31;
    background: #FFF8EB;
    box-shadow: 0 -3px 0 #201b31;
  }

  .mobile-bottom-nav > a {
    display: flex;
    min-width: 0;
    min-height: 48px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 8px;
    color: #49445B;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
  }

  .mobile-bottom-nav > a > i {
    font-size: 17px;
  }

  .mobile-bottom-nav > a.active {
    background: #FFD166;
    color: #201b31;
  }

  .marketplace-navbar .shop-navbar-main {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "search actions";
    gap: 8px;
  }

  .marketplace-navbar .shop-brand {
    display: none;
  }

  .shop-navbar:not(.marketplace-navbar) .shop-navbar-main {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .marketplace-navbar .shop-search-area {
    grid-area: search;
  }

  .marketplace-navbar .shop-navbar-actions {
    grid-area: actions;
    gap: 6px;
  }

  .marketplace-navbar .shop-navbar-actions > :not(.chat-nav-link):not(.cart-action) {
    display: none !important;
  }

  .marketplace-navbar .chat-nav-link {
    display: none !important;
  }

  .marketplace-navbar .shop-action-link {
    min-width: 40px;
    min-height: 44px;
  }

  .marketplace-navbar .chat-nav-link > span:not(.chat-icon-wrap),
  .marketplace-navbar .cart-action > span:not(.cart-icon-wrap) {
    display: none !important;
  }

  .shop-search-area .category-search-toggle {
    height: 48px;
    gap: 6px;
    padding-inline: 9px;
    font-size: 12px;
  }

  .shop-search-area .shop-search {
    height: 48px;
  }

  .shop-search-area {
    gap: 7px;
  }

  .shop-search-area .shop-search .form-control {
    min-height: 44px;
  }

  .category-search-icon {
    font-size: 14px;
  }

  .category-search-chevron {
    font-size: 9px;
  }

  .marketplace-hero {
    padding: 16px !important;
  }

  .marketplace-hero h1 {
    max-width: 18ch;
    margin-bottom: 10px !important;
    font-size: clamp(21px, 6vw, 28px);
    line-height: 1.15;
  }

  .marketplace-hero > .row > .col-lg-8 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .marketplace-hero > .row > .col-lg-8 > .badge-retro {
    margin-bottom: 10px !important;
    font-size: 9px;
  }

  .marketplace-hero .marketplace-hero-benefits {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 7px !important;
    margin-top: 12px;
  }

  .marketplace-hero-benefits .badge-retro {
    max-width: 100%;
    padding: 6px 8px !important;
    font-size: 8px;
    line-height: 1.2;
  }

  .marketplace-hero.bg-yellow p {
    display: block;
    overflow: visible;
    -webkit-box-orient: initial;
    -webkit-line-clamp: unset;
  }

  .marketplace-hero.bg-yellow .marketplace-hero-benefits.d-flex.flex-wrap.gap-2 {
    flex-wrap: wrap !important;
    margin-right: 0;
    padding: 0;
    overflow: visible;
  }

  .marketplace-hero.bg-yellow .marketplace-hero-benefits.d-flex.flex-wrap.gap-2 > .badge-retro {
    flex: 0 1 auto;
  }

  .marketplace-hero p {
    margin-bottom: 0 !important;
    font-size: 14px !important;
    line-height: 1.4;
  }

  .marketplace-controls {
    padding: 10px !important;
  }

  .marketplace-controls .sort-dropdown,
  .marketplace-controls .sort-dropdown-toggle {
    width: 100%;
    max-width: none;
  }

  .order-filter-control {
    width: 100%;
  }

  .profile-stat-card,
  .retro-hud-stat {
    min-height: 94px;
    padding: 10px;
  }

  .marketplace-page #chatbot-dialogue-modal {
    bottom: calc(130px + env(safe-area-inset-bottom));
    max-height: calc(100dvh - 150px);
  }
}

.marketplace-page #chatbot-floating-trigger {
  position: static;
  margin-left: auto;
  z-index: auto;
}

@media (max-width: 767.98px) {
  .marketplace-page #chatbot-floating-trigger {
    width: 44px;
    height: 44px;
    margin: 4px 0 0;
  }

  .chat-icon-wrap > i {
    font-size: 19px;
  }
}

/* Color polish: give each major surface a clear, coordinated accent. */
.retro-marquee {
  color: #A7E9DE;
}

.marketplace-hero > .row > .col-lg-4 .card {
  background-color: #FFB7CF !important;
}

#filters {
  background-color: #DFF5EB !important;
}

#products-grid > div:nth-child(4n + 1) .product-price-tag {
  background-color: #FFD166 !important;
}

#products-grid > div:nth-child(4n + 2) .product-price-tag {
  background-color: #63D5E5 !important;
}

#products-grid > div:nth-child(4n + 3) .product-price-tag {
  background-color: #FFB7CF !important;
}

#products-grid > div:nth-child(4n) .product-price-tag {
  background-color: #C6B4FF !important;
}

.chat-inbox-panel {
  background-color: #D8C8FF;
}

.chat-list-heading,
.chat-active-header {
  background-color: #BFEFE8;
}

.chat-conversation-item:nth-child(4n + 1) {
  background-color: #FFF0C2;
}

.chat-conversation-item:nth-child(4n + 2) {
  background-color: #D9F3E2;
}

.chat-conversation-item:nth-child(4n + 3) {
  background-color: #FCE0EA;
}

.chat-conversation-item:nth-child(4n) {
  background-color: #DDE7FF;
}

.chat-conversation-item:hover,
.chat-conversation-item.active {
  background-color: #C6B4FF;
}

.chat-conversation-item.active {
  box-shadow: inset 5px 0 0 #FF6B9A;
}

.chat-page .chat-message-list {
  background-color: #E8E2FF;
}

.history-receipt-card .receipt-header {
  background-color: #D8C8FF;
}

.history-receipt-card .receipt-financial-box {
  background-color: #DFF5EB;
}

@media (max-width: 767.98px) {
  .mobile-bottom-nav > a:nth-child(1).active {
    background-color: #FFD166;
  }

  .mobile-bottom-nav > a:nth-child(2).active {
    background-color: #83D9A5;
  }

  .mobile-bottom-nav > a:nth-child(3).active {
    background-color: #C6B4FF;
  }

  .mobile-bottom-nav > a:nth-child(4).active {
    background-color: #63D5E5;
  }

  .mobile-bottom-nav > a:nth-child(5).active {
    background-color: #FFB7CF;
  }
}

@media (max-width: 380px) {
  .category-search-toggle {
    width: auto;
    min-width: 100px;
    padding-inline: 8px;
  }

  .category-search-toggle #category-search-label {
    display: inline;
  }

  .category-search-chevron {
    display: inline;
    font-size: 9px;
  }
}

@media (max-width: 767.98px) {
  #cartModal .modal-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 16px 16px;
  }

  #cartModal .modal-footer > .btn {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }

  #cartModal #btn-confirm-checkout {
    order: -1;
  }
}

.shop-navbar {
  padding: 13px 0 15px;
}

@media (max-width: 767.98px) {
  .shop-navbar {
    padding: 10px 0 13px;
  }
}

/* Conversation screens use an inbox layout instead of marketplace cards. */
.chat-page {
  background: #f5f6f7;
  background-image: none;
}

.chat-page .chat-page-heading {
  padding: 8px 0 16px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.chat-page .chat-inbox-panel {
  min-height: min(680px, calc(100dvh - 220px));
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none !important;
}

.chat-page .chat-conversation-list {
  border-right: 1px solid #e1e4e8;
  border-radius: 0;
  background: #fff;
}

.chat-page .chat-list-heading,
.chat-page .chat-active-header {
  background: #fff;
}

.chat-page .chat-list-heading {
  gap: 10px;
  border-bottom: 1px solid #e1e4e8;
}

.chat-page .chat-conversation-items {
  max-height: none;
}

.chat-page .chat-conversation-item,
.chat-page .chat-conversation-item:nth-child(n) {
  width: 100%;
  min-width: 0;
  min-height: 76px;
  margin: 0;
  padding: 12px 16px;
  border: 0 !important;
  border-bottom: 1px solid #edf0f2 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

.chat-page .chat-conversation-item:hover,
.chat-page .chat-conversation-item.active {
  background: #f5f7f8 !important;
  box-shadow: inset 3px 0 #28a884 !important;
}

.chat-page .chat-avatar {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border: 0;
  border-radius: 50%;
  background: #dce8e4;
  color: #35564b;
}

.chat-page .chat-conversation-view {
  background: #fff;
}

.chat-page .chat-active-header {
  min-height: 72px;
  border-bottom: 1px solid #e1e4e8;
}

.chat-page .chat-message-list {
  background: #f3f0e9;
  background-image: none;
}

.chat-page .chat-message-list .chat-bubble {
  max-width: min(78%, 560px);
  padding: 9px 12px 6px;
  border: 0;
  border-radius: 16px 16px 16px 4px;
  background: #fff;
  box-shadow: 0 1px 1px rgb(0 0 0 / 8%);
  font-size: 13px;
  font-weight: 500;
}

.chat-page .chat-message-list .chat-bubble.own {
  border-radius: 16px 16px 4px 16px;
  background: #d9fdd3;
}

.chat-page .chat-message-meta {
  display: block;
  margin-top: 3px;
  color: #737b80;
  font-size: 10px;
  text-align: right;
}

.chat-page .chat-compose {
  align-items: center;
  border-top: 1px solid #e1e4e8;
  background: #f7f8f8;
}

.chat-page .chat-compose .form-control {
  border: 1px solid #dfe3e6;
  border-radius: 22px;
  background: #fff;
  box-shadow: none;
}

.chat-page .chat-compose .btn {
  min-width: 44px;
  border: 0;
  border-radius: 50%;
  background: #168c72;
  box-shadow: none;
}

@media (max-width: 767.98px) {
  .chat-page .chat-inbox-panel {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .chat-page .chat-conversation-list {
    border: 0 !important;
    border-radius: 0 !important;
  }

  .chat-page .chat-conversation-item,
  .chat-page .chat-conversation-item:nth-child(n) {
    width: 100%;
    min-width: 0;
    margin: 0;
    border: 0 !important;
    border-bottom: 1px solid #edf0f2 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .chat-page .chat-conversation-item:hover,
  .chat-page .chat-conversation-item.active {
    box-shadow: inset 3px 0 #28a884 !important;
  }
}

.profile-page {
  min-height: 100vh;
  background: #f4f0e8;
  background-image: none;
}

.profile-page-header {
  position: sticky;
  z-index: 1020;
  top: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 8px max(16px, calc((100vw - 1140px) / 2));
  border-bottom: 1px solid #e1e4e8;
  background: #fff;
}

.profile-page-header h1 {
  font-size: 18px;
  text-align: center;
}

.profile-logout-section {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.profile-page-back {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
}

.profile-page-back:hover {
  background: #f1f3f4;
}

.profile-page-header .audio-toggle-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #49445b;
  box-shadow: none;
}

.profile-page-main {
  max-width: 1140px;
  padding-top: 24px;
  padding-bottom: 32px;
}

@media (max-width: 767.98px) {
  .chat-page {
    overflow: hidden;
    padding-bottom: 0;
  }

  .chat-page .retro-marquee {
    display: none;
  }

  .chat-page main.container.my-4 {
    display: flex;
    width: 100%;
    height: calc(100dvh - 76px - env(safe-area-inset-bottom));
    max-width: none;
    flex-direction: column;
    margin: 0 !important;
    padding: 0;
  }

  .chat-page .chat-page-heading {
    flex: 0 0 auto;
    gap: 8px;
    padding: 14px 16px;
  }

  .chat-page .chat-page-heading > div p {
    font-size: 12px;
  }

  .chat-page .chat-page-heading > .btn {
    width: auto;
    min-height: 36px;
  }

  .chat-page .chat-inbox-panel {
    display: flex;
    min-height: 0;
    flex: 1;
    border: 0;
    border-radius: 0;
  }

  .chat-page .chat-conversation-list {
    display: flex;
    width: 100%;
    flex-direction: column;
    border: 0;
  }

  .chat-page .chat-conversation-items {
    display: block;
    flex: 1;
    overflow-y: auto;
    padding: 0;
  }

  .chat-page .chat-conversation-view {
    display: none;
    min-height: 0;
    flex: 1;
  }

  .chat-page .chat-inbox-panel.mobile-chat-open .chat-conversation-list,
  .chat-page .chat-inbox-panel.chat-show-empty .chat-conversation-list {
    display: none;
  }

  .chat-page .chat-inbox-panel.mobile-chat-open .chat-conversation-view,
  .chat-page .chat-inbox-panel.chat-show-empty .chat-conversation-view {
    display: flex;
  }

  .chat-page .chat-active-header {
    min-height: 64px;
    flex: 0 0 auto;
    padding: 8px 12px;
  }

  .chat-page .chat-message-list {
    min-height: 0;
    max-height: none;
    flex: 1;
    padding: 14px 12px;
  }

  .chat-page .chat-compose {
    flex: 0 0 auto;
    padding: 8px 12px max(10px, env(safe-area-inset-bottom));
  }

  .chat-page.chat-conversation-open main.container.my-4 {
    height: 100dvh;
  }

  .chat-page.chat-conversation-open .chat-page-heading,
  .chat-page.chat-conversation-open .mobile-bottom-nav {
    display: none;
  }

  .profile-page {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .profile-page-header {
    min-height: 56px;
    padding: 6px 12px;
  }

  .profile-page-main {
    padding-top: 16px;
    padding-bottom: 20px;
  }
}
