:root {
  --red-title: #82181A;
  --red-primary: #E7000B;
  --red-deep: #C10007;
  --red-border: #FFC9C9;
  --red-light: #FFE2E2;
  --gold: #F59E0B;
  --orange: #FF8C00;
  --page-bg: #F9F9F9;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --axis: #0A0A0A;
  --dash-gutter: 24px;
  --dash-section-gap: 24px;
  --dash-card-gap: 16px;
}

* {
  box-sizing: border-box;
}

body.admin-app {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--page-bg);
  color: #111827;
  min-height: 100vh;
}

.admin-shell,
.dashboard-shell {
  width: 100%;
  box-sizing: border-box;
  padding: var(--dash-gutter);
}

.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-topbar-copy h1 {
  margin: 0 0 6px;
  font-size: 36px;
  font-weight: 700;
  color: var(--red-title);
  letter-spacing: -0.02em;
}

.admin-topbar-copy .subtitle {
  margin: 0;
  font-size: 16px;
  color: var(--axis);
  font-weight: 400;
}

.admin-userbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.admin-userbar .admin-user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--axis);
}

.admin-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 8px;
  border: 2px solid var(--red-border);
  background: #fff;
  color: var(--red-title);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.admin-logout-btn:hover {
  background: var(--red-primary);
  color: #fff;
  border-color: var(--red-primary);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  width: fit-content;
  max-width: 100%;
  background: #fff;
  border: 2px solid var(--red-border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--axis);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover {
  background: #f3f4f6;
  color: #111827;
}

.nav a.active {
  background: var(--red-primary);
  color: #fff;
}

.nav a.active svg {
  stroke: #fff;
  fill: none;
}

.nav a:not(.active) svg {
  stroke: #4b5563;
  fill: none;
}

.nav a img.nav-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.nav a.active img.nav-icon {
  filter: brightness(0) invert(1);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--dash-card-gap);
  margin-bottom: var(--dash-section-gap);
  width: 100%;
}

.metrics.metrics-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-shell .grid,
.admin-shell .layout,
.admin-shell .category-grid,
.admin-shell .stack,
.admin-shell .plans-grid,
.dashboard-shell .grid,
.dashboard-shell .layout,
.dashboard-shell .category-grid,
.dashboard-shell .stack,
.dashboard-shell .plans-grid {
  width: 100%;
  min-width: 0;
}

.admin-shell .grid > *,
.admin-shell .layout > *,
.admin-shell .category-grid > *,
.dashboard-shell .grid > *,
.dashboard-shell .layout > *,
.dashboard-shell .category-grid > *,
.admin-shell .chart-card,
.dashboard-shell .chart-card,
.admin-shell .card,
.dashboard-shell .card {
  min-width: 0;
}

.admin-shell .chart-card,
.dashboard-shell .chart-card {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1100px) {
  .admin-shell .layout,
  .dashboard-shell .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .admin-shell,
  .dashboard-shell {
    padding: 20px;
  }

  .metrics,
  .metrics.metrics-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-shell .grid,
  .dashboard-shell .grid,
  .admin-shell .category-grid,
  .dashboard-shell .category-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .admin-shell,
  .dashboard-shell {
    padding: 16px;
  }

  .metrics,
  .metrics.metrics-3 {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    flex-direction: column;
  }
}

.card {
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--card-shadow);
  position: relative;
  min-height: 130px;
}

.card.metric-primary {
  background: linear-gradient(135deg, var(--red-primary) 0%, var(--red-deep) 100%);
  color: var(--red-light);
}

.card.metric-light {
  background: #fff;
  border: 1px solid var(--red-border);
}

.card .label {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.95;
  margin-bottom: 8px;
}

.card.metric-light .label {
  color: #4A5565;
  opacity: 1;
}

.card .value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.card.metric-light .value {
  color: var(--gold);
}

.card .corner-icon {
  position: absolute;
  left: 20px;
  bottom: 16px;
  opacity: 0.95;
}

.chart-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 14px 12px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}

.chart-card h2 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
}

.chart-wrap {
  position: relative;
  height: 320px;
  overflow: visible;
}

.line-chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
  padding-bottom: 4px;
}

.line-chart-legend img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.line-chart-legend span {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #FF8D28;
  line-height: 1.2;
}

/* Login page */
.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(231, 0, 11, 0.08), transparent 28%),
    var(--page-bg);
}

.admin-login-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border: 2px solid var(--red-border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 32px 28px;
}

.admin-login-brand {
  margin-bottom: 28px;
}

.admin-login-brand h1 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 700;
  color: var(--red-title);
  letter-spacing: -0.02em;
}

.admin-login-brand p {
  margin: 0;
  font-size: 15px;
  color: var(--axis);
}

.admin-login-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--axis);
}

.admin-login-form input {
  width: 100%;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--red-border);
  border-radius: 10px;
  font: inherit;
  color: #111827;
  background: #fff;
}

.password-field {
  position: relative;
  margin-bottom: 18px;
}

.password-field input {
  margin-bottom: 0;
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.password-toggle svg {
  display: block;
  flex-shrink: 0;
}

.password-toggle .icon-eye-closed {
  display: none;
}

.password-toggle.is-visible .icon-eye-open {
  display: none;
}

.password-toggle.is-visible .icon-eye-closed {
  display: block;
}

.password-toggle:hover {
  color: var(--red-primary);
  background: #fff5f5;
}

.password-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(231, 0, 11, 0.12);
}

.admin-login-form input:focus {
  outline: none;
  border-color: var(--red-primary);
  box-shadow: 0 0 0 3px rgba(231, 0, 11, 0.12);
}

.admin-login-submit {
  width: 100%;
  margin-top: 4px;
  padding: 13px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red-primary) 0%, var(--red-deep) 100%);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.admin-login-submit:hover {
  opacity: 0.95;
}

.admin-login-error {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
  font-size: 14px;
}

.admin-login-success {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  font-size: 14px;
}

.admin-login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 14px;
}

.admin-login-actions a {
  color: var(--red-primary);
  font-weight: 600;
  text-decoration: none;
}

.admin-login-actions a:hover {
  text-decoration: underline;
}

.otp-countdown {
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--red-title);
}

.otp-countdown #countdownSeconds {
  display: inline-block;
  min-width: 1.5ch;
  color: var(--red-primary);
}

.admin-resend-link.is-disabled {
  color: var(--text-muted);
  pointer-events: none;
  cursor: not-allowed;
  text-decoration: none;
}

.admin-login-footnote {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   Admin Topbar Bell Button & Badges
   ========================================================================== */
.admin-bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 2px solid var(--red-border);
  background: #fff;
  color: var(--red-title);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

.admin-bell-btn:hover,
.admin-bell-btn.active {
  background: var(--red-light);
  color: var(--red-primary);
  border-color: var(--red-primary);
  transform: translateY(-1px);
}

.admin-bell-icon {
  width: 20px;
  height: 20px;
}

.admin-bell-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(231, 0, 11, 0.4);
  line-height: 1;
  border: 2px solid #fff;
  transition: transform 0.2s ease;
}

@keyframes bellBadgePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.badge-pop {
  animation: bellBadgePop 0.35s ease-out;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
}

/* ==========================================================================
   Notifications Dashboard UI
   ========================================================================== */
.notif-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--dash-card-gap);
  margin-bottom: 24px;
}

.notif-stat-card {
  background: #fff;
  border-radius: 12px;
  border: 2px solid var(--red-border);
  padding: 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-stat-card .stat-info h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.notif-stat-card .stat-info .stat-value {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: var(--red-title);
}

.notif-stat-card .stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red-light);
  color: var(--red-primary);
}

.notif-stat-card.stat-gold .stat-icon-wrap {
  background: #fef3c7;
  color: #d97706;
}

.notif-stat-card.stat-blue .stat-icon-wrap {
  background: #e0e7ff;
  color: #4f46e5;
}

.notif-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}

.notif-filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.notif-tab-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f9fafb;
  color: var(--axis);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.notif-tab-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.notif-tab-btn.active {
  background: var(--red-title);
  color: #fff;
  border-color: var(--red-title);
}

.notif-actions-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.notif-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--axis);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.notif-btn-outline:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.notif-list-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notif-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  padding: 18px 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  position: relative;
}

.notif-card.is-unread {
  border-left: 4px solid var(--red-primary);
  background: #fffcfc;
}

.notif-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.notif-icon-col {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.notif-icon-col.icon-unban {
  background: #fef3c7;
  color: #d97706;
}

.notif-icon-col.icon-ban-reply {
  background: #e0e7ff;
  color: #4f46e5;
}

.notif-content-col {
  flex: 1;
  min-width: 0;
}

.notif-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.notif-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notif-type-tag.tag-gold {
  background: #fef3c7;
  color: #b45309;
}

.notif-type-tag.tag-green {
  background: #d1fae5;
  color: #047857;
}

.notif-type-tag.tag-red {
  background: #fee2e2;
  color: #b91c1c;
}

.notif-type-tag.tag-blue {
  background: #e0e7ff;
  color: #4338ca;
}

.notif-time {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.notif-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--axis);
}

.notif-body-text {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: #374151;
  line-height: 1.5;
  background: #f9fafb;
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 3px solid #d1d5db;
  word-break: break-word;
}

.notif-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.notif-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.notif-btn-approve {
  background: #059669;
  color: #fff;
}

.notif-btn-approve:hover {
  background: #047857;
}

.notif-btn-reject {
  background: #fff;
  border-color: #fca5a5;
  color: #dc2626;
}

.notif-btn-reject:hover {
  background: #fee2e2;
}

.notif-btn-view {
  background: #fff;
  border-color: var(--border);
  color: var(--axis);
}

.notif-btn-view:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.notif-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px dashed var(--border);
  color: var(--text-muted);
}

.notif-empty-state svg {
  margin-bottom: 12px;
  color: #9ca3af;
}

.notif-empty-state h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: var(--axis);
}

.notif-empty-state p {
  margin: 0;
  font-size: 14px;
}

/* ==========================================================================
   User / Seller Detail Modal Styling
   ========================================================================== */
.user-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(17, 24, 39, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}
.user-detail-overlay[hidden] {
  display: none !important;
}
.user-detail-modal {
  width: min(1100px, 100%);
  margin: 12px auto 40px;
  background: #f8fafc;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.user-detail-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 2;
}
.user-detail-modal-header h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #111827;
}
.user-detail-close {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-detail-close:hover {
  background: #f3f4f6;
}
.user-detail-body {
  padding: 16px 18px 24px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.user-detail-loading,
.ud-error {
  padding: 40px 16px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}
.ud-error { color: #b91c1c; }
.ud-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
@media (max-width: 800px) {
  .ud-hero { grid-template-columns: 1fr; }
}
.ud-avatar,
.ud-avatar-fallback {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fecaca;
}
.ud-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fff;
  font-size: 32px;
  font-weight: 700;
}
.ud-name { margin: 0 0 4px; font-size: 1.35rem; color: #111827; }
.ud-email { color: #6b7280; font-size: 14px; margin-bottom: 8px; }
.ud-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ud-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #fff7ed;
  color: #c2410c;
}
.ud-chip-ok { background: #ecfdf5; color: #047857; }
.ud-chip-warn { background: #fff7ed; color: #c2410c; }
.ud-chip-danger { background: #fef2f2; color: #b91c1c; }
.ud-hero-meta { display: grid; gap: 8px; min-width: 160px; }
.ud-hero-meta span { display: block; font-size: 11px; color: #6b7280; }
.ud-hero-meta strong { font-size: 13px; color: #111827; }
.ud-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 900px) {
  .ud-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ud-stat {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.ud-stat-val { font-size: 1.25rem; font-weight: 700; color: #b91c1c; }
.ud-stat-label { font-size: 11px; color: #6b7280; margin-top: 2px; }
.ud-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 900px) {
  .ud-grid { grid-template-columns: 1fr; }
}
.ud-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.ud-card-wide { margin-bottom: 12px; }
.ud-card h3 { margin: 0 0 12px; font-size: 0.98rem; color: #111827; }
.ud-count { color: #6b7280; font-weight: 500; font-size: 0.85rem; }
.ud-dl { display: grid; gap: 8px; margin: 0; }
.ud-dl > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
  font-size: 13px;
}
.ud-dl-inline { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ud-dl-inline > div {
  grid-template-columns: 1fr;
  background: #f9fafb;
  border-radius: 10px;
  padding: 10px;
}
.ud-dl dt { margin: 0; color: #6b7280; font-weight: 500; }
.ud-dl dd { margin: 0; color: #111827; word-break: break-word; }
.ud-empty { margin: 0; color: #6b7280; font-size: 13px; }
.ud-subhead { font-size: 12px; font-weight: 700; color: #374151; margin-bottom: 6px; }
.ud-features ul { margin: 0; padding-left: 18px; font-size: 13px; color: #111827; }
.ud-features li { margin-bottom: 4px; }
.ud-mini-table-wrap { overflow-x: auto; }
.ud-mini-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 12px;
}
.ud-mini-table th,
.ud-mini-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
}
.ud-mini-table th { color: #6b7280; font-weight: 600; background: #fafafa; }
.ud-listing-cell { display: flex; align-items: center; gap: 8px; }
.ud-listing-cell img,
.ud-listing-ph {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: #f3f4f6;
  flex-shrink: 0;
}
.ud-muted { color: #9ca3af; font-size: 11px; display: block; }
.ud-pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.ud-pay-card {
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  padding: 12px;
  background: #fafafa;
}
.ud-pay-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

/* ==========================================================================
   Listing Detail Modal Styling
   ========================================================================== */
.listing-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1060;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.listing-detail-overlay[hidden] {
  display: none !important;
}
.listing-detail-modal {
  width: min(880px, 95vw);
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.listing-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
}
.listing-detail-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}
.listing-detail-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 8px;
}
.listing-detail-close:hover {
  background: #e5e7eb;
  color: #111827;
}
.listing-detail-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 70px);
}
.ld-container { display: flex; flex-direction: column; gap: 20px; font-size: 13px; color: #374151; }
.ld-hero { display: grid; grid-template-columns: 320px 1fr; gap: 24px; }
@media (max-width: 768px) { .ld-hero { grid-template-columns: 1fr; } }
.ld-main-img-wrap { width: 100%; height: 230px; border-radius: 12px; overflow: hidden; background: #f3f4f6; display: flex; align-items: center; justify-content: center; border: 1px solid #e5e7eb; }
.ld-main-img { width: 100%; height: 100%; object-fit: cover; }
.ld-img-placeholder { font-size: 48px; }
.ld-thumbnails { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; }
.ld-thumb { width: 60px; height: 50px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; opacity: 0.7; transition: all 0.15s; }
.ld-thumb:hover, .ld-thumb.is-active { border-color: var(--red-primary); opacity: 1; }
.ld-info-column { display: flex; flex-direction: column; gap: 14px; }
.ld-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ld-title { font-size: 18px; font-weight: 700; color: #111827; margin: 0 0 6px 0; }
.ld-id-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: #6b7280; }
.ld-id-badge { font-weight: 600; color: #374151; }
.badge-type { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; background: #e0e7ff; color: #3730a3; }
.badge-type-car_ad, .badge-type-car { background: #fee2e2; color: #991b1b; }
.badge-type-car_part, .badge-type-part { background: #fef3c7; color: #92400e; }
.badge-type-car_plate, .badge-type-plate { background: #e0e7ff; color: #3730a3; }
.badge-status { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.badge-status-active { background: #dcfce7; color: #166534; }
.badge-status-banned { background: #fee2e2; color: #991b1b; }
.badge-status-sold { background: #f3f4f6; color: #374151; }
.badge-status-pending { background: #fef9c3; color: #854d0e; }
.ld-price-card { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.ld-price-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; font-weight: 600; }
.ld-price-value strong { font-size: 22px; font-weight: 800; color: #111827; }
.ld-currency { font-size: 13px; font-weight: 600; color: #6b7280; margin-left: 2px; }
.ld-market-price { font-size: 12px; color: #059669; font-weight: 500; }
.ld-selling-type { font-size: 12px; color: #6b7280; margin-top: 4px; }
.ld-seller-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 16px; }
.ld-seller-header { display: flex; align-items: center; gap: 12px; }
.ld-seller-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.ld-seller-avatar-fallback { width: 44px; height: 44px; border-radius: 50%; background: #fee2e2; color: #991b1b; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.ld-seller-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: #9ca3af; font-weight: 600; }
.ld-seller-name { font-weight: 600; color: #111827; font-size: 14px; }
.ld-seller-name a { color: #dc2626; text-decoration: none; font-weight: 600; }
.ld-seller-name a:hover { text-decoration: underline; }
.ld-seller-email { font-size: 12px; color: #6b7280; }
.ld-seller-phone { font-size: 12px; color: #374151; margin-top: 2px; font-weight: 500; }
.ld-ban-notice { background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 12px 16px; }
.ld-ban-notice-title { font-weight: 700; color: #991b1b; font-size: 13px; margin-bottom: 4px; }
.ld-ban-notice-body { font-size: 12px; color: #b91c1c; }
.ld-section { margin-top: 8px; }
.ld-section-title { font-size: 14px; font-weight: 700; color: #111827; margin: 0 0 10px 0; border-bottom: 1px solid #f3f4f6; padding-bottom: 6px; }
.ld-specs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.ld-spec-item { background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; }
.ld-spec-key { font-size: 11px; color: #6b7280; }
.ld-spec-val { font-size: 13px; font-weight: 600; color: #111827; margin-top: 2px; }
.ld-actions-bar { display: flex; justify-content: flex-end; gap: 12px; padding-top: 14px; border-top: 1px solid #f3f4f6; }
.ld-actions-bar .btn-activate-listing,
.btn-activate-listing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #16a34a;
  color: #ffffff;
  border: 1px solid #15803d;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.25);
}
.ld-actions-bar .btn-activate-listing:hover,
.btn-activate-listing:hover {
  background: #15803d;
  border-color: #166534;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(22, 163, 74, 0.3);
}
.ld-actions-bar .btn-activate-listing:active,
.btn-activate-listing:active {
  transform: translateY(0);
}
.ld-actions-bar .btn-activate-listing:disabled,
.btn-activate-listing:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.ld-actions-bar .btn-ban-listing,
.btn-ban-listing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.ld-actions-bar .btn-ban-listing:hover,
.btn-ban-listing:hover {
  background: #fef2f2;
  border-color: #f87171;
  color: #991b1b;
}
.ld-error { padding: 32px; text-align: center; color: #dc2626; font-weight: 600; }

/* ==========================================================================
   Ban Reason & Conversation Modal Styling
   ========================================================================== */
.ban-conv-overlay {
  position: fixed;
  inset: 0;
  z-index: 1070;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ban-conv-overlay[hidden] {
  display: none !important;
}
.ban-conv-modal {
  width: min(680px, 95vw);
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ban-conv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
}
.ban-conv-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ban-conv-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 8px;
  transition: background 0.15s;
}
.ban-conv-close:hover {
  background: #e5e7eb;
  color: #111827;
}
.ban-conv-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-height: 380px;
  max-height: calc(90vh - 65px);
}
.bc-header {
  padding: 14px 20px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bc-ad-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bc-ad-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}
.bc-badge-car_ad, .bc-badge-car { background: #fee2e2; color: #991b1b; }
.bc-badge-car_part, .bc-badge-part { background: #fef3c7; color: #92400e; }
.bc-badge-car_plate, .bc-badge-plate { background: #e0e7ff; color: #3730a3; }
.bc-ad-id {
  font-weight: 700;
  color: #374151;
  font-size: 13px;
}
.bc-ad-title {
  font-weight: 600;
  color: #111827;
  font-size: 14px;
}
.bc-seller-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}
.bc-ban-reason {
  margin: 12px 20px 0;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  padding: 10px 14px;
}
.bc-ban-reason-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e11d48;
  margin-bottom: 4px;
}
.bc-ban-reason-text {
  font-size: 13px;
  color: #9f1239;
  line-height: 1.4;
}
.bc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
  min-height: 180px;
  max-height: 340px;
}
.bc-message {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}
.bc-msg-admin {
  align-self: flex-end;
  align-items: flex-end;
}
.bc-msg-user {
  align-self: flex-start;
  align-items: flex-start;
}
.bc-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}
.bc-msg-admin .bc-msg-bubble {
  background: #b91c1c;
  color: #ffffff;
  border-bottom-right-radius: 3px;
}
.bc-msg-user .bc-msg-bubble {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-bottom-left-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.bc-msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: #94a3b8;
}
.bc-msg-sender {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
}
.bc-msg-admin .bc-msg-sender {
  color: #b91c1c;
}
.bc-msg-user .bc-msg-sender {
  color: #475569;
}
.bc-msg-time {
  color: #94a3b8;
}
.bc-no-messages {
  text-align: center;
  padding: 32px 16px;
  color: #94a3b8;
}
.bc-no-messages svg {
  margin-bottom: 8px;
  opacity: 0.6;
}
.bc-no-messages p {
  margin: 2px 0;
  font-size: 13px;
}
.bc-reply-area {
  padding: 14px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bc-reply-textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.4;
  color: #1e293b;
  resize: none;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.bc-reply-textarea:focus {
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}
.bc-send-btn {
  display: inline-flex;
  align-self: flex-end;
  align-items: center;
  gap: 6px;
  background: #b91c1c;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}
.bc-send-btn:hover {
  background: #991b1b;
}
.bc-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.bc-error {
  padding: 24px;
  text-align: center;
  color: #b91c1c;
  font-size: 13px;
}



