:root {
  --primary: #7C3AED;
  --secondary: #EC4899;
  --accent: #38BDF8;
  --bg: #FDF7FF;
  --surface: #FFFFFF;
  --text: #1E1B2E;
  --muted: #6B7280;
  --border: #E9D5FF;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --shopee: #EE4D2D;
  --gradient-main: linear-gradient(135deg, #7C3AED, #EC4899);
  --radius: 22px;
  --shadow: 0 18px 45px rgba(67, 56, 202, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #FCE7F3 0, transparent 34%), var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(253, 247, 255, .82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: max-content; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--gradient-main); color: white; font-weight: 900;
  box-shadow: var(--shadow);
}
.brand small { display: block; color: var(--muted); font-size: 12px; margin-top: -3px; }
.main-nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.nav-toggle { display: none; border: 0; background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 60px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--gradient-main); color: white; font-weight: 800;
  border: 1px solid transparent; box-shadow: 0 12px 26px rgba(124,58,237,.22);
  cursor: pointer;
}
.btn.ghost { background: white; color: var(--primary); border-color: var(--border); box-shadow: none; }
.btn.soft { background: #F3E8FF; color: var(--primary); box-shadow: none; }
.btn.shopee { background: var(--shopee); box-shadow: 0 12px 26px rgba(238,77,45,.18); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }

.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center;
  min-height: 420px; padding: 38px 0;
}
.eyebrow { color: var(--secondary); font-weight: 900; letter-spacing: .09em; text-transform: uppercase; font-size: 12px; }
h1 { font-size: clamp(34px, 5vw, 64px); line-height: 1.02; margin: 10px 0 16px; letter-spacing: -0.05em; }
h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.1; margin: 8px 0; letter-spacing: -0.035em; }
h3 { margin: 0 0 8px; }
.hero p, .page-title p { color: var(--muted); font-size: 18px; max-width: 650px; }
.hero-actions, .detail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-card {
  position: relative; min-height: 330px; border-radius: 36px; background: var(--gradient-main);
  box-shadow: var(--shadow); overflow: hidden;
}
.hero-card:before { content: ''; position: absolute; inset: 35px; border: 2px solid rgba(255,255,255,.28); border-radius: 28px; }
.floating-card { position: absolute; background: rgba(255,255,255,.9); color: var(--text); padding: 16px 20px; border-radius: 18px; font-weight: 900; box-shadow: 0 16px 36px rgba(0,0,0,.14); }
.floating-card.one { top: 70px; left: 50px; }
.floating-card.two { top: 150px; right: 42px; }
.floating-card.three { bottom: 64px; left: 96px; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 34px 0 16px; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.product-grid.compact { grid-template-columns: repeat(4, 1fr); }
.product-card, .shop-card, .dash-card, .post-card, .review-card, .auth-card, .empty-state, .notice {
  background: rgba(255,255,255,.9); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}
.product-card { overflow: hidden; }
.product-image { aspect-ratio: 1 / 1; background: #F3E8FF; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.product-card:hover .product-image img { transform: scale(1.04); }
.product-body { padding: 14px; }
.badge { display: inline-flex; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800; background: #E0F2FE; color: #0369A1; margin-bottom: 10px; }
.price { font-weight: 900; color: var(--primary); font-size: 18px; margin: 8px 0; }
.price.big { font-size: 34px; }
.muted { color: var(--muted); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.shop-grid, .dashboard-grid, .review-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.shop-card, .dash-card, .review-card { padding: 18px; }
.shop-card { display: flex; align-items: center; gap: 14px; }
.shop-avatar { width: 48px; height: 48px; border-radius: 18px; display: grid; place-items: center; background: var(--gradient-main); color: white; font-weight: 900; }
.shop-avatar.large { width: 92px; height: 92px; font-size: 34px; flex: 0 0 auto; }

.page-title { padding: 28px 0 18px; }
.filter-bar { display: grid; grid-template-columns: 1fr 220px auto; gap: 12px; background: white; border: 1px solid var(--border); padding: 12px; border-radius: 999px; margin-bottom: 22px; box-shadow: var(--shadow); }
input, select, textarea { width: 100%; min-height: 44px; border-radius: 14px; border: 1px solid var(--border); padding: 0 14px; font: inherit; background: white; }

.detail-layout { display: grid; grid-template-columns: minmax(280px, .9fr) 1.1fr; gap: 28px; align-items: start; }
.detail-image { background: white; border-radius: 32px; border: 1px solid var(--border); padding: 16px; box-shadow: var(--shadow); }
.detail-image img { border-radius: 24px; width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.detail-info { background: rgba(255,255,255,.86); border: 1px solid var(--border); border-radius: 32px; padding: clamp(20px, 4vw, 34px); box-shadow: var(--shadow); }
.info-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px; margin: 18px 0; }
.info-list p { margin: 0; }
.notice { padding: 14px; margin: 16px 0; }
.seller-mini { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.shop-hero { display: flex; gap: 22px; background: white; border: 1px solid var(--border); border-radius: 34px; padding: 28px; box-shadow: var(--shadow); }
.shop-meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); }
.community-layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; }
.channel-list { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); align-self: start; }
.channel-list a { display: flex; justify-content: space-between; gap: 8px; padding: 12px; border-radius: 14px; }
.channel-list a:hover { background: #F3E8FF; }
.post-list { display: grid; gap: 14px; }
.post-card { padding: 18px; }
.auth-card { max-width: 460px; margin: 30px auto; padding: 28px; }
.form-stack { display: grid; gap: 14px; }
.form-stack label { font-weight: 800; display: grid; gap: 8px; }
.form-stack .check { display: flex; align-items: center; gap: 10px; }
.form-stack .check input { width: auto; min-height: auto; }
.alert { padding: 12px 14px; border-radius: 14px; margin: 12px 0; }
.alert.danger { background: #FEE2E2; color: #991B1B; }
.alert.success { background: #DCFCE7; color: #166534; }
.empty-state { padding: 26px; text-align: center; }
.site-footer { text-align: center; color: var(--muted); padding: 30px 16px; border-top: 1px solid var(--border); }

@media (max-width: 980px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .shop-grid, .dashboard-grid, .review-grid { grid-template-columns: repeat(2, 1fr); }
  .hero, .detail-layout, .community-layout { grid-template-columns: 1fr; }
  .hero-card { min-height: 260px; }
}

@media (max-width: 720px) {
  .site-header { padding: 12px 14px; }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none; position: absolute; top: 70px; left: 12px; right: 12px;
    flex-direction: column; align-items: stretch; background: white; border: 1px solid var(--border);
    border-radius: 20px; padding: 14px; box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .page { width: min(100% - 24px, 1180px); padding-top: 18px; }
  .hero { min-height: auto; padding: 18px 0; }
  .hero-card { display: none; }
  .hero-actions, .detail-actions { display: grid; grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .section-head { align-items: start; }
  .product-grid, .product-grid.compact { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .shop-grid, .dashboard-grid, .review-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; border-radius: 24px; }
  .info-list { grid-template-columns: 1fr; }
  .shop-hero { flex-direction: column; }
  h1 { font-size: 34px; }
}

@media (max-width: 420px) {
  .product-grid, .product-grid.compact { grid-template-columns: 1fr; }
  .product-body { padding: 12px; }
  .detail-info { padding: 18px; }
}

/* Product modal + tighter mobile cards */
.product-card {
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 58, 237, .35);
}
.product-card h3 {
  line-height: 1.25;
}
.product-shop {
  font-size: 13px;
  margin: 0;
}
.product-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 16, 32, .58);
  backdrop-filter: blur(10px);
}
.product-modal-backdrop[hidden] {
  display: none;
}
.product-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, .85fr) 1.15fr;
  gap: 18px;
  width: min(860px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(15, 16, 32, .28);
  padding: 18px;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 16, 32, .18);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.modal-image-wrap {
  border-radius: 24px;
  background: #F3E8FF;
  overflow: hidden;
}
.modal-image-wrap img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}
.modal-content {
  padding: 10px 10px 10px 2px;
}
.modal-content h2 {
  margin-top: 6px;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 720px) {
  .product-card {
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(67, 56, 202, .10);
  }
  .product-body {
    padding: 9px;
  }
  .product-body .badge {
    font-size: 10px;
    padding: 4px 7px;
    margin-bottom: 6px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .product-body h3 {
    font-size: 13px;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 32px;
  }
  .product-body .price {
    font-size: 14px;
    margin: 5px 0;
  }
  .product-shop,
  .product-body .muted {
    font-size: 11px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .card-actions {
    gap: 6px;
    margin-top: 8px;
  }
  .card-actions .btn.small {
    width: auto;
    min-height: 28px;
    padding: 0 9px;
    font-size: 11px;
    box-shadow: none;
  }
  .product-image {
    aspect-ratio: 1 / 1.05;
  }
  .product-modal {
    grid-template-columns: 1fr;
    gap: 12px;
    border-radius: 24px;
    padding: 12px;
  }
  .modal-image-wrap img {
    min-height: auto;
    aspect-ratio: 1 / .78;
  }
  .modal-content {
    padding: 0 4px 4px;
  }
  .modal-content h2 {
    font-size: 22px;
  }
  .modal-content .price.big {
    font-size: 24px;
  }
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .product-grid,
  .product-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .product-body {
    padding: 8px;
  }
  .card-actions .btn.small {
    min-height: 27px;
    padding: 0 8px;
  }
}

/* BeliaFans phase 2: cart, checkout, seller CRUD, picklist */
.cart-layout, .checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
.cart-list { display: grid; gap: 12px; }
.cart-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.cart-item img { width: 92px; height: 92px; object-fit: cover; border-radius: 16px; background: #F3E8FF; }
.cart-main h3 { margin: 0 0 4px; font-size: 16px; }
.cart-actions-inline { display: flex; gap: 8px; align-items: center; }
.cart-actions-inline input { width: 74px; min-height: 36px; }
.summary-card, .form-panel, .info-card, .table-card, .print-sheet {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.summary-card { position: sticky; top: 92px; display: grid; gap: 12px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; }
.summary-row.total { font-size: 18px; }
.small-note { font-size: 12px; }
.form-panel { display: grid; gap: 14px; }
.form-panel.wide { max-width: 980px; margin: 0 auto; }
.form-panel label { display: grid; gap: 8px; font-weight: 800; }
.form-two { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.check-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.check-grid .check { display: inline-flex; grid-template-columns: unset; align-items: center; gap: 8px; background: #F3E8FF; border: 1px solid var(--border); border-radius: 999px; padding: 8px 12px; }
.check-grid input, .form-stack .check input { width: auto; min-height: auto; }
.detail-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.responsive-table { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.table-product { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.table-product img { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; background: #F3E8FF; }
.status-pill { display: inline-flex; border-radius: 999px; padding: 5px 9px; background: #F3E8FF; color: var(--primary); font-weight: 900; font-size: 12px; }
.status-pill.shopee-mini { background: #FFE4DE; color: var(--shopee); }
.picklist-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pick-card { background: white; border: 1px solid var(--border); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.current-image { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.current-image img { width: 92px; height: 92px; object-fit: cover; border-radius: 18px; background: #F3E8FF; }
.print-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pick-table th, .pick-table td { border: 1px solid var(--border); }
@media print {
  .site-header, .site-footer, .no-print, .product-modal-backdrop { display: none !important; }
  body { background: white; }
  .page { width: 100%; padding: 0; }
  .print-sheet { box-shadow: none; border: 0; }
}
@media (max-width: 900px) {
  .cart-layout, .checkout-layout, .detail-grid-2 { grid-template-columns: 1fr; }
  .summary-card { position: static; }
  .picklist-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .form-two, .form-three { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 68px minmax(0, 1fr); gap: 10px; }
  .cart-item img { width: 68px; height: 68px; border-radius: 14px; }
  .cart-actions-inline, .cart-item form { grid-column: 1 / -1; width: 100%; }
  .cart-actions-inline input { flex: 1; width: auto; }
  .picklist-grid { grid-template-columns: 1fr; }
  .summary-card, .form-panel, .info-card, .table-card, .print-sheet { padding: 14px; border-radius: 18px; }
}


/* BeliaFans: wishlist + cart icon buttons */
.nav-icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(233, 213, 255, .9);
}
.nav-icon-link em {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--gradient-main);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.nav-symbol { font-size: 16px; line-height: 1; }
.product-card { position: relative; }
.product-quick-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  gap: 7px;
}
.icon-action {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--primary);
  box-shadow: 0 12px 28px rgba(15, 16, 32, .18);
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.icon-action:hover { transform: translateY(-2px) scale(1.04); }
.icon-action.active {
  background: linear-gradient(135deg, #EC4899, #F472B6);
  color: white;
}
.icon-action.cart {
  background: linear-gradient(135deg, #7C3AED, #38BDF8);
  color: white;
}
.compact-actions .btn.soft {
  background: #FCE7F3;
  color: #BE185D;
}

@media (max-width: 720px) {
  .nav-icon-link {
    justify-content: space-between;
    width: 100%;
  }
  .product-quick-actions {
    top: 7px;
    right: 7px;
    gap: 5px;
  }
  .icon-action {
    width: 30px;
    height: 30px;
    font-size: 15px;
    box-shadow: 0 8px 18px rgba(15, 16, 32, .16);
  }
  .compact-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .compact-actions .btn.small {
    justify-content: center;
    padding: 0 6px;
  }
  .compact-actions .btn.shopee {
    grid-column: 1 / -1;
  }
}

/* BeliaFans phase 3: chat, community post, review, admin */
.tabs-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}
.tab-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.9);
  color: var(--primary);
  font-weight: 900;
}
.tab-chip.active {
  background: var(--gradient-main);
  color: white;
  border-color: transparent;
}
.chat-room-list {
  display: grid;
  gap: 12px;
}
.chat-room-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 14px;
}
.chat-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  background: var(--gradient-main);
  color: white;
  font-size: 24px;
}
.chat-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.chat-context-card,
.chat-panel,
.review-wide-card {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.chat-context-card { padding: 18px; position: sticky; top: 92px; }
.chat-context-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 20px; background: #F3E8FF; margin-bottom: 14px; }
.chat-panel { padding: 18px; }
.chat-header-line { display: flex; align-items: start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 14px; }
.chat-header-line h1 { font-size: 28px; margin: 4px 0 0; }
.message-list {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow-y: auto;
  padding: 8px 2px 14px;
}
.message-bubble {
  width: fit-content;
  max-width: min(72%, 620px);
  background: #F3E8FF;
  border: 1px solid var(--border);
  border-radius: 18px 18px 18px 6px;
  padding: 10px 12px;
}
.message-bubble.mine {
  justify-self: end;
  background: linear-gradient(135deg, #7C3AED, #EC4899);
  color: white;
  border-color: transparent;
  border-radius: 18px 18px 6px 18px;
}
.message-bubble.system {
  justify-self: center;
  background: #E0F2FE;
  color: #075985;
  border-radius: 999px;
  text-align: center;
}
.message-bubble small { display: block; opacity: .72; font-weight: 800; margin-bottom: 4px; }
.message-bubble p { margin: 0; }
.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.chat-compose textarea { padding-top: 12px; resize: vertical; }
.community-post-form { margin-bottom: 16px; }
.community-post-list { margin-top: 16px; }
.channel-list a.active { background: var(--gradient-main); color: white; }
.post-actions-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.post-actions-row form { margin: 0; }
.comment-list { background: #F8FAFC; border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px; display: grid; gap: 6px; }
.comment-list p { margin: 0; }
.comment-form { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 8px; margin-top: 10px; }
.review-list-wide { display: grid; gap: 14px; }
.review-wide-card { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; padding: 18px; }
.seller-reply-form { align-self: start; }
.review-photo { width: 120px; height: 120px; object-fit: cover; border-radius: 18px; border: 1px solid var(--border); background: #F3E8FF; }
.mini-list { display: grid; gap: 10px; }
.mini-item { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.mini-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; background: #F3E8FF; }
.inline-form { display: flex; gap: 8px; align-items: center; min-width: 260px; }
.inline-form select { min-height: 36px; }
.admin-stat-grid .dash-card h3 { font-size: 30px; margin-bottom: 4px; color: var(--primary); }
@media (max-width: 900px) {
  .chat-shell, .review-wide-card { grid-template-columns: 1fr; }
  .chat-context-card { position: static; }
}
@media (max-width: 640px) {
  .chat-room-card { grid-template-columns: 44px minmax(0, 1fr); padding: 12px; border-radius: 18px; }
  .chat-avatar { width: 44px; height: 44px; border-radius: 15px; font-size: 19px; }
  .chat-panel, .chat-context-card { padding: 12px; border-radius: 18px; }
  .chat-header-line { display: grid; }
  .message-bubble { max-width: 88%; }
  .chat-compose, .comment-form { grid-template-columns: 1fr; }
  .review-wide-card { padding: 12px; border-radius: 18px; }
  .inline-form { flex-direction: column; align-items: stretch; min-width: 0; }
}

/* Phase 4: payment, delivery, complaint helpers */
.proof-preview {
  width: min(100%, 360px);
  max-height: 420px;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.narrow-form {
  max-width: 760px;
  margin: 0 auto;
}
.inline-form {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.inline-form input,
.inline-form select {
  min-width: 150px;
}
.stack-mobile input { min-width: 180px; }
.status-update-panel {
  margin: 1.25rem 0 2rem;
}
.seller-status-form textarea { resize: vertical; }
.table-actions {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
}
.message-preview {
  max-width: 360px;
  white-space: normal;
  line-height: 1.45;
}
@media (max-width: 640px) {
  .inline-form,
  .stack-mobile,
  .table-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }
  .inline-form .btn,
  .inline-form input,
  .inline-form select,
  .stack-mobile .btn,
  .stack-mobile input,
  .stack-mobile select {
    width: 100%;
  }
  .proof-preview { max-height: 300px; }
}
