/* ─── Base Card ──────────────────────────────────────────────────── */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card.pad {
  padding: 1.25rem;
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.62rem 1.15rem;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition:
    transform var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out),
    background var(--dur-2) var(--ease-out),
    border-color var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out);
  user-select: none;
  white-space: nowrap;
  letter-spacing: 0.005em;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(145deg, var(--color-lime), var(--color-lime-hover));
  color: #fff;
  box-shadow: 0 8px 24px var(--color-lime-glow), var(--glass-inner-top);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(115, 215, 0, 0.46), 0 0 0 4px rgba(115, 215, 0, 0.12), var(--glass-inner-top);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: var(--dash-surface-4);
  border-color: var(--glass-border);
  color: var(--color-text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  transform: translateY(-1px);
  background: var(--dash-surface-2);
  border-color: var(--color-border);
  box-shadow: 0 8px 20px rgba(26, 31, 54, 0.12);
}

/* ─── Form Inputs ────────────────────────────────────────────────── */
.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  background: var(--dash-surface-2);
  color: var(--color-text);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  transition:
    border-color var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out),
    background var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(115, 215, 0, 0.60);
  box-shadow: 0 0 0 4px rgba(115, 215, 0, 0.10);
}

/* ─── Pills / Badges ─────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: var(--dash-surface-4);
  color: var(--color-muted);
}

.pill-category {
  background: rgba(115, 215, 0, 0.12);
  color: var(--color-navy);
  border-color: rgba(115, 215, 0, 0.28);
  font-weight: 700;
}

.pill-location {
  color: var(--color-primary-900);
  background: var(--glass-bg-card);
}

.rating-pill {
  justify-content: center;
  text-align: center;
  background: var(--glass-bg-card);
}

/* ─── Utilities ──────────────────────────────────────────────────── */
.stack {
  display: grid;
  gap: 0.75rem;
}

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

.error-text {
  color: var(--color-danger);
  font-size: var(--text-sm);
}

/* ─── Toast ──────────────────────────────────────────────────────── */
.toast-host {
  position: fixed;
  inset: auto 1rem 1rem auto;
  display: grid;
  gap: 0.5rem;
  z-index: 60;
}

.toast {
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  background: var(--glass-bg-nav);
  box-shadow: var(--shadow-md);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  max-width: min(92vw, 420px);
}

.toast[data-type="success"] {
  border-color: rgba(115, 215, 0, 0.38);
  background: rgba(244, 255, 220, 0.96);
  color: #1a3a10;
}

.toast[data-type="error"] {
  border-color: rgba(220, 38, 38, 0.30);
  background: rgba(254, 242, 242, 0.96);
  color: #7f1d1d;
}

:root[data-theme="dark"] .toast[data-type="success"] {
  background: rgba(39, 168, 116, 0.18);
  border-color: rgba(115, 215, 0, 0.34);
  color: var(--color-text);
}

:root[data-theme="dark"] .toast[data-type="error"] {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.28);
  color: var(--color-text);
}

.toast-title {
  font-weight: 750;
  margin: 0 0 0.15rem;
}

.toast-body {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

/* ─── State Blocks ───────────────────────────────────────────────── */
.state-block {
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 2rem 1.5rem;
  text-align: center;
}

.state-title {
  margin: 0;
  font-size: var(--text-xl);
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
}

.state-desc {
  margin: 0.4rem 0 0;
  color: var(--color-muted);
}

/* ─── Skeleton ───────────────────────────────────────────────────── */
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-border);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--glass-bg-card), transparent);
  animation: shimmer 1.1s linear infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* ─── Navbar ─────────────────────────────────────────────────────── */
.nav {
  position: relative;
  z-index: 1;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  gap: 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: var(--glass-bg-nav);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 8px rgba(10, 40, 28, 0.12);
}

.brand-name {
  font-family: var(--font-serif);
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-navy);
}

.nav-links {
  display: none;
  gap: 0.35rem;
  align-items: center;
  flex: 1;
  padding: 0 0.5rem;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  padding: 0.38rem 0.62rem;
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--color-muted);
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
  white-space: nowrap;
}

.nav-links a:hover {
  background: var(--dash-surface-2);
  color: var(--color-text);
}

/* Role perspective badge */
.nav-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-role-badge.role-farmer {
  background: rgba(39, 168, 116, 0.16);
  color: var(--color-primary-700);
  border: 1px solid rgba(39, 168, 116, 0.24);
}

.nav-role-badge.role-business {
  background: rgba(26, 31, 54, 0.08);
  color: var(--color-navy);
  border: 1px solid rgba(26, 31, 54, 0.16);
}

.nav-role-badge.role-consumer {
  background: rgba(115, 215, 0, 0.14);
  color: var(--color-primary-800);
  border: 1px solid rgba(115, 215, 0, 0.28);
}

.nav-role-badge.role-guest {
  background: rgba(26, 31, 54, 0.08);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.nav-role-badge.role-admin {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.24);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--dash-surface-3);
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--dash-surface-3);
  cursor: pointer;
  transition: background var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0;
}

.lang-toggle:hover {
  background: var(--dash-surface-2);
  transform: translateY(-1px);
}

.lang-toggle-flag {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.theme-toggle:hover {
  background: var(--dash-surface-2);
  transform: translateY(-1px);
  opacity: 0.8;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.32rem 0.7rem 0.32rem 0.32rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--dash-surface-3);
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  min-width: 0;
}

.nav-user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9rem;
}

.nav-user:hover {
  opacity: 0.8;
}

.nav-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--color-primary-500), var(--color-primary-700));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

@media (min-width: 1200px) {
  .nav-links { display: flex; }
  .nav-user { display: inline-flex; }
  .nav-hamburger { display: none !important; }
  .nav-drawer { display: none !important; }
}

/* ─── Mobile hamburger + drawer ──────────────────────────────────── */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--dash-surface-3);
  color: var(--color-text);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}

.nav-hamburger:hover {
  background: var(--dash-surface-2);
}

.nav-hamburger-box {
  display: grid;
  gap: 5px;
  width: 18px;
}

.nav-hamburger-line {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform var(--dur-3) var(--ease-out), opacity var(--dur-2) var(--ease-out);
}

.nav-hamburger[aria-expanded="true"] .nav-hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger[aria-expanded="true"] .nav-hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-hamburger[aria-expanded="true"] .nav-hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  visibility: hidden;
}

.nav-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.nav-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(10, 15, 25, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease-out);
  cursor: pointer;
}

.nav-drawer.is-open .nav-drawer-backdrop {
  opacity: 1;
}

.nav-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(88vw, 320px);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1rem 1.5rem;
  background: var(--glass-bg-nav);
  border-left: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  transform: translateX(100%);
  transition: transform var(--dur-3) var(--ease-out);
  overflow-y: auto;
}

.nav-drawer.is-open .nav-drawer-panel {
  transform: translateX(0);
}

.nav-drawer-links {
  display: grid;
  gap: 0.35rem;
}

.nav-drawer-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-md);
  font-weight: 650;
  color: var(--color-text);
  transition: background var(--dur-2) var(--ease-out);
}

.nav-drawer-links a:hover {
  background: var(--dash-surface-2);
}

.nav-drawer-footer {
  margin-top: auto;
  display: grid;
  gap: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.nav-drawer-actions {
  display: grid;
  gap: 0.55rem;
}

.nav-drawer-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 650;
  color: var(--color-text);
}

.nav-drawer-link:hover {
  background: var(--dash-surface-2);
}

.nav-drawer-account .nav-avatar {
  flex-shrink: 0;
}

@media (max-width: 1199px) {
  .nav-inner {
    padding: 0.5rem 0.65rem;
    gap: 0.5rem;
    border-radius: 16px;
  }

  .nav-hamburger {
    display: inline-flex;
  }

  .nav-actions {
    gap: 0.35rem;
    min-width: 0;
  }

  .nav-desktop-only {
    display: none !important;
  }

  .brand-name {
    font-size: 0.95rem;
  }

  .lang-toggle,
  .theme-toggle,
  .notif-bell-btn,
  .nav-messages-link {
    width: 44px;
    height: 44px;
  }

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

  .notif-dropdown {
    right: -0.5rem;
    width: min(92vw, 320px);
  }
}

@media (max-width: 480px) {
  .brand img {
    width: 30px;
    height: 30px;
  }

  .brand-name {
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}


/* ─── Listing image picker (add / edit listing) ──────────────────── */
.listing-image-picker {
  display: grid;
  gap: 0.65rem;
}

.listing-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.listing-image-thumb {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.listing-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--glass-bg-card);
}

.listing-image-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid var(--color-white);
  background: #d32f2f;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  transition: transform var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out);
}

.listing-image-remove:hover {
  background: #b71c1c;
  transform: scale(1.06);
}

.listing-image-add {
  width: fit-content;
  min-height: 44px;
  cursor: pointer;
}

.listing-image-input {
  display: none;
}

/* ─── Footer ─────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--color-border);
  background: var(--dash-surface-4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.footer-inner {
  padding: 1.75rem 0;
  display: grid;
  gap: 0.65rem;
  color: var(--color-muted);
}

.footer-top {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-weight: 650;
  font-size: var(--text-sm);
}

/* ─── Listing Card ───────────────────────────────────────────────── */
.listing-card {
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  border-radius: var(--radius-lg);
  position: relative;
  transition:
    transform var(--dur-3) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out),
    border-color var(--dur-2) var(--ease-out);
}

.listing-card:hover {
  transform: translateY(-7px) scale(1.008);
  box-shadow: var(--glass-shadow-hover);
  border-color: rgba(115, 215, 0, 0.48);
}

.listing-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.listing-card-link:focus-visible {
  outline: 2px solid var(--color-lime);
  outline-offset: 2px;
}

.listing-card[data-listing-id]:not([data-listing-id=""]) {
  cursor: pointer;
}

.glass-card {
  background: var(--glass-bg-card);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--glass-shadow);
}

/* Image area */
.listing-media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 600 / 440;
  min-height: 200px;
  background: rgba(20, 106, 75, 0.06);
  z-index: 0;
}

.listing-media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transition: transform 400ms var(--ease-out);
}

.listing-card:hover .listing-media img {
  transform: scale(1.06);
}

/* Gradient overlay + category badge on image */
.listing-media-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 0.85rem 0.75rem;
  background: linear-gradient(to top, rgba(5, 20, 14, 0.60) 0%, transparent 100%);
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

.listing-badge-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--color-navy);
  background: rgba(115, 215, 0, 0.88);
  border: 1px solid rgba(115, 215, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
}

/* Card body */
.listing-body {
  padding: 1rem 1.05rem 1.15rem;
  display: grid;
  gap: 0.75rem;
}

.listing-header {
  display: grid;
  gap: 0.32rem;
}

.listing-title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.listing-title a {
  color: var(--color-text);
  transition: color var(--dur-1) var(--ease-out);
}

.listing-title a:hover {
  color: var(--color-lime-hover);
}

.listing-meta-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.listing-location {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 500;
}

.listing-location svg {
  color: var(--color-lime-hover);
  flex-shrink: 0;
}

.listing-location-masked {
  border: 1px dashed var(--color-border);
  border-radius: 999px;
  padding: 0.16rem 0.46rem;
  background: var(--dash-surface-4);
}

.listing-avail {
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--color-navy);
  background: rgba(115, 215, 0, 0.16);
  border: 1px solid rgba(115, 215, 0, 0.32);
  padding: 0.22rem 0.55rem;
  border-radius: 8px;
}

/* Price + rating footer */
.listing-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  border-top: 1px solid var(--color-border);
}

.listing-price-group {
  display: flex;
  align-items: baseline;
  gap: 0.28rem;
}

.listing-price-main {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.025em;
}

.listing-price-unit {
  font-size: 0.82rem;
  color: var(--color-muted);
  font-weight: 500;
}

.listing-rating {
  display: flex;
  align-items: center;
  gap: 0.32rem;
}

.rating-stars {
  color: #f59e0b;
  font-size: 0.82rem;
  letter-spacing: -0.05em;
  line-height: 1;
}

.rating-val {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-muted);
}

.rating-no-data {
  font-size: 0.78rem;
  color: var(--color-subtle);
  font-style: italic;
}

/* Legacy aliases kept for other pages using the old card markup */
.listing-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ─── Notification Bell ──────────────────────────────────────────── */
.notif-bell-wrap {
  position: relative;
}

.notif-bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--dash-surface-3);
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0;
  flex-shrink: 0;
}

.notif-bell-btn:hover {
  background: var(--dash-surface-2);
  transform: translateY(-1px);
}

.notif-bell-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  flex-shrink: 0;
}

/* Unread count badge */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 0.60rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--color-bg);
  line-height: 1;
  pointer-events: none;
  animation: badgePop 200ms var(--ease-spring) both;
}

@keyframes badgePop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ─── Notification Dropdown ──────────────────────────────────────── */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  width: min(340px, 92vw);
  background: var(--glass-bg-nav);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 160ms var(--ease-out), transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 50;
}

.notif-bell-wrap.open .notif-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid var(--color-border);
}

.notif-dropdown-title {
  font-size: 0.88rem;
  font-weight: 760;
  color: var(--color-text);
}

.notif-mark-all {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--color-lime-hover);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  font-family: inherit;
  border-radius: 6px;
  transition: background 140ms ease-out, color 140ms ease-out;
}

.notif-mark-all:hover {
  background: var(--color-lime-light);
  color: var(--color-lime);
}

.notif-list {
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 215, 0, 0.20) transparent;
}

/* Individual notification row */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
  transition: background 140ms ease-out;
  outline: none;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover,
.notif-item:focus {
  background: rgba(115, 215, 0, 0.05);
}

.notif-item.unread {
  background: rgba(115, 215, 0, 0.07);
}

.notif-item.unread:hover,
.notif-item.unread:focus {
  background: rgba(115, 215, 0, 0.12);
}

/* Unread indicator dot */
.notif-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-lime);
  flex-shrink: 0;
  margin-top: 0.35rem;
  transition: background 200ms ease-out;
}

.notif-item:not(.unread) .notif-item-dot {
  background: transparent;
  border: 1.5px solid var(--color-border);
}

.notif-item-body {
  flex: 1;
  min-width: 0;
}

.notif-msg {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
}

.notif-item.unread .notif-msg {
  font-weight: 720;
}

.notif-time {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--color-subtle);
}

.notif-empty {
  padding: 2.25rem 1.25rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.84rem;
}

/* ─── Order Summary Row (Business Dashboard) ─────────────────────── */
.order-summary-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.order-summary-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-width: 100px;
  gap: 0.15rem;
  text-align: center;
}

.order-summary-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.025em;
  font-family: var(--font-serif);
}

.order-summary-lbl {
  font-size: 0.71rem;
  font-weight: 650;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── Guest Gate Modal ───────────────────────────────────────────── */
.guest-gate-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 12, 22, 0.46);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.guest-gate-backdrop.open {
  display: flex;
}

.guest-gate-modal {
  width: min(92vw, 480px);
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-nav);
  box-shadow: var(--glass-shadow-hover);
  backdrop-filter: var(--glass-blur-heavy);
  -webkit-backdrop-filter: var(--glass-blur-heavy);
  padding: 1.55rem 1.35rem 1.25rem;
  position: relative;
}

.guest-gate-eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(115, 215, 0, 0.34);
  background: rgba(115, 215, 0, 0.11);
  color: var(--color-text);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.58rem;
}

.guest-gate-title {
  margin: 0.7rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.guest-gate-sub {
  margin: 0.55rem 0 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.guest-gate-actions {
  margin-top: 1.1rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.guest-gate-actions .btn {
  flex: 1;
  min-width: 170px;
}

.guest-gate-close {
  position: absolute;
  top: 0.6rem;
  right: 0.68rem;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

/* ─── Navbar messages link ───────────────────────────────────────── */
.nav-messages-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--dash-surface-3);
  color: var(--color-text);
  flex-shrink: 0;
  transition: background var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}

.nav-messages-link:hover {
  background: var(--dash-surface-2);
  transform: translateY(-1px);
}

.nav-messages-link svg {
  width: 18px;
  height: 18px;
}

/* ─── Messaging page ─────────────────────────────────────────────── */
.msg-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 560px;
  height: calc(100vh - 240px);
  overflow: hidden;
  padding: 0;
}

.msg-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--color-border);
  min-width: 0;
}

.msg-sidebar-head {
  padding: 1rem 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--color-border);
}

.msg-convo-list {
  flex: 1;
  overflow-y: auto;
}

.msg-convo-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1.1rem;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--dur-2) var(--ease-out);
}

.msg-convo-item:hover {
  background: var(--dash-surface-3);
}

.msg-convo-item.is-active {
  background: var(--dash-surface-2);
}

.msg-convo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.msg-convo-name {
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-convo-unread {
  flex-shrink: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-primary, #2e7d32);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.msg-convo-listing {
  font-size: var(--text-sm);
  color: var(--color-primary, #2e7d32);
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-convo-preview {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-convo-time {
  font-size: 0.68rem;
  color: var(--color-muted);
  margin-top: 0.2rem;
}

.msg-chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.msg-chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
}

.msg-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--color-border);
}

.msg-chat-name {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.msg-chat-sub {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.msg-thread {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.msg-bubble-row {
  display: flex;
}

.msg-bubble-row.mine {
  justify-content: flex-end;
}

.msg-bubble-row.theirs {
  justify-content: flex-start;
}

.msg-bubble {
  max-width: 72%;
  padding: 0.55rem 0.8rem;
  border-radius: 14px;
  background: var(--dash-surface-2);
  border: 1px solid var(--color-border);
}

.msg-bubble-row.mine .msg-bubble {
  background: var(--color-primary, #2e7d32);
  border-color: transparent;
  color: #fff;
}

.msg-bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
}

.msg-bubble-time {
  font-size: 0.62rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

.msg-composer {
  display: flex;
  gap: 0.6rem;
  padding: 0.85rem 1.2rem;
  border-top: 1px solid var(--color-border);
}

.msg-composer .input {
  flex: 1;
}

.msg-empty {
  padding: 1.2rem;
  text-align: center;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

@media (max-width: 768px) {
  .listing-card:hover {
    transform: none;
  }

  .listing-card:hover .listing-media img {
    transform: none;
  }

  .footer-inner {
    padding: 1.25rem 0;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .listing-media {
    min-height: 180px;
  }

  .card.pad {
    padding: 1rem;
  }
}

@media (max-width: 760px) {
  .msg-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .msg-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
    max-height: 240px;
  }

  .msg-chat {
    min-height: 420px;
  }
}
