/* =========================================================
   Houston Trade Pros — Admin Panel Styles (css/admin.css)
   GoHighLevel-inspired clean SaaS dashboard
   ========================================================= */

/* ── Admin Body ──────────────────────────────────────── */
.admin-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8f9fb;
  min-height: 100vh;
}

/* ── Login Overlay ───────────────────────────────────── */
.admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a1628 0%, #1a2744 50%, #0e1d35 100%);
}
.admin-overlay.hidden { display: none; }

.admin-login-box {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.admin-login-box h2 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}
.login-subtitle {
  color: var(--grey-500);
  font-size: 0.9rem;
  margin-bottom: 28px;
}
.login-error {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 10px;
  min-height: 20px;
}
.lockout-msg {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 10px;
  padding: 10px;
  background: var(--error-bg);
  border-radius: var(--radius-md);
}

/* ── Admin Page Layout ───────────────────────────────── */
.admin-page {
  display: none;
  min-height: 100vh;
}
.admin-page.visible { display: block; }

/* ── Top Bar ─────────────────────────────────────────── */
.admin-topbar {
  background: var(--white);
  border-bottom: 1px solid #e8eaed;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.topbar-inner {
  display: flex;
  align-items: center;
  height: 56px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 8px;
}
.topbar-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--grey-800);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 24px;
  white-space: nowrap;
  text-decoration: none;
}
.topbar-logo:hover { color: var(--grey-800); }
.topbar-logo .logo-icon {
  width: 28px;
  height: 28px;
  background: var(--orange);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

/* Nav buttons */
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.topbar-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--grey-500);
  cursor: pointer;
  border-radius: 8px;
  transition: all 150ms ease;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.topbar-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.topbar-link:hover {
  color: var(--grey-800);
  background: var(--grey-50);
}
.topbar-link.active {
  color: var(--orange);
  background: var(--orange-light);
  font-weight: 600;
}

/* Right side */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.topbar-action {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--grey-500);
  cursor: pointer;
  border-radius: 8px;
  transition: all 150ms ease;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}
.topbar-action svg {
  width: 16px;
  height: 16px;
}
.topbar-action:hover {
  color: var(--grey-800);
  background: var(--grey-50);
}
.topbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  padding: 8px;
  cursor: pointer;
  color: var(--grey-600);
  margin-left: auto;
}

/* Mobile topbar */
@media (max-width: 900px) {
  .topbar-nav { display: none; }
  .topbar-right { display: none; }
  .topbar-toggle { display: block; }
  .topbar-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid #e8eaed;
    padding: 8px 16px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    z-index: 99;
    gap: 4px;
  }
  .topbar-nav.open .topbar-link {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}

/* ── Main Content ────────────────────────────────────── */
.admin-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.panel-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--grey-800);
  margin: 0;
}
.panel-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Tab panels */
.admin-tab-panel {
  display: none;
}
.admin-tab-panel.active {
  display: block;
  animation: fadeUp 0.25s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Stat Cards ──────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border: 1px solid #e8eaed;
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: box-shadow 150ms ease;
}
.stat-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.stat-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-label-admin {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--grey-800);
  line-height: 1;
}
.stat-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--orange-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon-wrap svg {
  width: 22px;
  height: 22px;
  stroke: var(--orange);
}
.stat-icon-wrap.ic-green { background: #f0fdf4; }
.stat-icon-wrap.ic-green svg { stroke: #16a34a; }
.stat-icon-wrap.ic-amber { background: #fffbeb; }
.stat-icon-wrap.ic-amber svg { stroke: #f59e0b; }
.stat-icon-wrap.ic-purple { background: #f5f3ff; }
.stat-icon-wrap.ic-purple svg { stroke: #7c3aed; }
.stat-icon-wrap.ic-blue { background: #eff6ff; }
.stat-icon-wrap.ic-blue svg { stroke: #2563eb; }
.stat-icon-wrap.ic-teal { background: #f0fdfa; }
.stat-icon-wrap.ic-teal svg { stroke: #0d9488; }
.stat-period {
  text-transform: none;
  font-size: 0.68rem;
  color: var(--grey-400);
  letter-spacing: 0;
}

@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .stats-row { grid-template-columns: 1fr; }
}

/* ── Dashboard Lower Grid ────────────────────────────── */
.dash-grid-lower {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.dash-panel {
  background: var(--white);
  border: 1px solid #e8eaed;
  border-radius: 14px;
  padding: 24px;
}
.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.dash-panel-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--grey-800);
  margin: 0;
}
.dash-panel-subtitle {
  font-size: 0.75rem;
  color: var(--grey-400);
}

/* ── Category Bar Chart ──────────────────────────────── */
.chart-container {
  min-height: 200px;
}
.chart-loading {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}
.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.chart-bar-label {
  font-size: 0.78rem;
  color: var(--grey-600);
  width: 100px;
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-bar-track {
  flex: 1;
  height: 24px;
  background: var(--grey-100);
  border-radius: 6px;
  overflow: hidden;
}
.chart-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #f97316, #fb923c);
  transition: width 0.6s ease;
  min-width: 2px;
}
.chart-bar-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grey-800);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Overview list ───────────────────────────────────── */
.overview-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.overview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f1f3f5;
  font-size: 0.88rem;
  color: var(--grey-600);
}
.overview-row:last-child { border-bottom: none; }
.overview-val {
  font-weight: 600;
  color: var(--grey-800);
  font-size: 0.95rem;
}

/* ── Activity Feed ───────────────────────────────────── */
.activity-panel {
  margin-top: 0;
}
.activity-feed {
  min-height: 100px;
  max-height: 400px;
  overflow-y: auto;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f3f5;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}
.activity-icon.ic-listing { background: #eff6ff; }
.activity-icon.ic-claim { background: #fffbeb; }
.activity-icon.ic-lead { background: #f5f3ff; }
.activity-icon.ic-edit { background: #f0fdf4; }
.activity-icon.ic-delete { background: #fef2f2; }
.activity-body {
  flex: 1;
  min-width: 0;
}
.activity-text {
  font-size: 0.85rem;
  color: var(--grey-700);
  line-height: 1.4;
}
.activity-text strong {
  color: var(--grey-800);
  font-weight: 600;
}
.activity-time {
  font-size: 0.72rem;
  color: var(--grey-400);
  margin-top: 3px;
}
.empty-state-text {
  color: var(--grey-400);
  font-size: 0.88rem;
  text-align: center;
  padding: 30px 0;
}

/* ── Time Range Tabs ─────────────────────────────────── */
.time-range-tabs {
  display: flex;
  background: var(--grey-100);
  padding: 4px;
  border-radius: 10px;
  gap: 2px;
}
.time-tab {
  border: none;
  background: none;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--grey-500);
  cursor: pointer;
  border-radius: 7px;
  transition: all 150ms ease;
  font-family: inherit;
}
.time-tab:hover { color: var(--grey-800); }
.time-tab.active {
  background: var(--white);
  color: var(--orange);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* ── Clickable Stat Cards ────────────────────────────── */
.clickable-stat {
  cursor: pointer;
  text-align: left;
  border: 1px solid #e8eaed !important;
  width: 100%;
  font-family: inherit;
}
.clickable-stat:hover {
  border-color: var(--orange) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.clickable-stat:active { transform: translateY(0); }

/* ── Drill-down Panel ────────────────────────────────── */
.drill-down-panel {
  margin-bottom: 28px;
  background: #fff;
  border: 2px solid var(--orange-light);
  animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.close-drill {
  background: var(--grey-100);
  border: none;
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: var(--grey-500);
  transition: all 150ms ease;
}
.close-drill:hover {
  background: var(--error-bg);
  color: var(--error);
}

@media (max-width: 700px) {
  .dash-grid-lower { grid-template-columns: 1fr; }
}

/* ── Sub Tabs (Businesses) ───────────────────────────── */
.sub-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e8eaed;
  margin-bottom: 20px;
  overflow-x: auto;
}
.sub-tab {
  background: none;
  border: none;
  padding: 10px 18px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--grey-500);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 150ms ease;
  font-family: 'Inter', sans-serif;
}
.sub-tab:hover {
  color: var(--grey-800);
}
.sub-tab.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
  font-weight: 600;
}
.sub-tab-count {
  font-size: 0.72rem;
  color: inherit;
  opacity: 0.7;
}

/* ── Search ──────────────────────────────────────────── */
.admin-search-wrap {
  position: relative;
}
.admin-search-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--grey-400);
  pointer-events: none;
}
.admin-search-input {
  padding: 10px 14px 10px 36px;
  border: 1px solid #e0e3e7;
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--grey-800);
  background: var(--grey-50);
  min-width: 220px;
  transition: all 150ms ease;
  font-family: 'Inter', sans-serif;
}
.admin-search-input:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .1);
}
.admin-search-input::placeholder {
  color: var(--grey-400);
}

/* ── Admin Table ─────────────────────────────────────── */
.admin-table-container {
  background: var(--white);
  border: 1px solid #e8eaed;
  border-radius: 14px;
  overflow: hidden;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.admin-table thead th {
  background: var(--grey-50);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #e8eaed;
  white-space: nowrap;
}
.admin-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f3f5;
  color: var(--grey-700);
  vertical-align: middle;
}
.admin-table tbody tr:last-child td {
  border-bottom: none;
}
.admin-table tbody tr {
  transition: background 100ms ease;
}
.admin-table tbody tr:hover {
  background: #fafbfc;
}

/* Listing title cell (with logo) */
.listing-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.listing-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--orange-light), #fde8d0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
}
.listing-info {
  min-width: 0;
}
.listing-name {
  font-weight: 600;
  color: var(--grey-800);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.listing-address-small {
  font-size: 0.75rem;
  color: var(--grey-400);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Category badges in table */
.cat-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.cat-badge-primary {
  background: #eff6ff;
  color: #2563eb;
}
.cat-badge-green {
  background: #f0fdf4;
  color: #16a34a;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}
.status-active {
  background: #f0fdf4;
  color: #16a34a;
}
.status-active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
}
.status-inactive {
  background: var(--grey-100);
  color: var(--grey-500);
}
.status-inactive::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grey-400);
}

/* Action icons */
.action-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}
.action-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 100ms ease;
  color: var(--grey-400);
}
.action-btn:hover {
  background: var(--grey-100);
  color: var(--grey-700);
}
.action-btn.delete-action:hover {
  background: var(--error-bg);
  color: var(--error);
}
.action-btn svg {
  width: 16px;
  height: 16px;
}

/* Edit row */
.edit-row td {
  background: #fefce8 !important;
}
.edit-row input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #e0e3e7;
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
}
.edit-row input:focus {
  outline: none;
  border-color: var(--orange);
}
.edit-actions {
  display: flex;
  gap: 6px;
}

/* ── Add Business Form ───────────────────────────────── */
.add-form-card {
  background: var(--white);
  border: 1px solid #e8eaed;
  border-radius: 14px;
  padding: 32px;
  max-width: 780px;
}
.add-form-card .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.toggle-group {
  display: flex;
  gap: 32px;
  margin: 20px 0 28px;
}
.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--grey-700);
}

/* ── Claims & Leads badges ───────────────────────────── */
.admin-table .badge-pending {
  background: #fffbeb;
  color: #b45309;
}
.admin-table .badge-approved {
  background: #f0fdf4;
  color: #16a34a;
}
.admin-table .badge-rejected {
  background: #fef2f2;
  color: #dc2626;
}

/* Lead expandable rows */
.lead-row {
  cursor: pointer;
}
.lead-row:hover td {
  background: #f8f9fb;
}
.lead-detail {
  background: #f8f9fb;
}
.lead-detail.hidden { display: none; }
.lead-detail td {
  padding: 12px 16px 16px;
  color: var(--grey-600);
  font-size: 0.85rem;
  border-bottom: 1px solid #e8eaed !important;
}

/* ── Responsive Table ────────────────────────────────── */
@media (max-width: 900px) {
  .admin-table-container {
    overflow-x: auto;
  }
  .admin-table {
    min-width: 700px;
  }
  .add-form-card .form-row {
    grid-template-columns: 1fr;
  }
}

/* ── Utility ─────────────────────────────────────────── */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.hidden { display: none !important; }

/* ── Global refresh spin animation ─────────────────── */
#global-refresh-btn svg { transition: transform 0.2s; }
#global-refresh-btn.spinning svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Business table badges ───────────────────────────── */
.badge-type { display:inline-block; padding:3px 10px; border-radius:20px; font-size:12px; font-weight:600; }
.badge-verified-type { background:#d1fae5; color:#065f46; }
.badge-free-type { background:#f1f5f9; color:#64748b; }
.listing-name-cell { font-weight:600; font-size:14px; display:flex; align-items:center; gap:6px; }
.listing-redirect-btn { display:inline-flex; align-items:center; opacity:0; color:var(--grey-400); transition:opacity .15s; flex-shrink:0; }
.listing-redirect-btn svg { width:13px; height:13px; }
.listing-redirect-btn:hover { color:var(--primary); }
tr:hover .listing-redirect-btn { opacity:1; }

/* ── Bulk action bar ─────────────────────────────────── */
#biz-bulk-bar { display:none; }

/* ── Business Edit Drawer ────────────────────────────── */
#biz-edit-drawer { transition: transform 0.25s ease; }
.drawer-tab { border-bottom: 2px solid transparent !important; transition: color 0.15s, border-color 0.15s; }
.drawer-tab:hover { color: var(--primary) !important; }

/* ── Business Edit Page ──────────────────────────────── */
.topbar-back {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--grey-500);
  text-decoration: none; margin-right: auto;
}
.topbar-back:hover { color: var(--primary); }
.topbar-brand {
  font-size: 1rem; font-weight: 700; color: var(--grey-800);
  display: flex; align-items: center; gap: 6px;
}
.edit-page-main {
  max-width: 780px; margin: 40px auto; padding: 0 24px 80px;
}
.edit-page-container { }
.edit-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 32px; gap: 16px;
}
.edit-page-title { font-size: 1.6rem; font-weight: 700; color: var(--grey-800); margin: 0 0 4px; }
.edit-page-sub { font-size: 13px; color: var(--grey-400); margin: 0; }
.edit-live-link { color: var(--primary); text-decoration: none; }
.edit-live-link:hover { text-decoration: underline; }
.edit-form { }
.edit-section {
  background: var(--white); border: 1px solid #e8eaed;
  border-radius: 14px; padding: 28px; margin-bottom: 24px;
}
.edit-section-title {
  font-size: 1rem; font-weight: 700; color: var(--grey-700);
  margin: 0 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--grey-100);
}
.edit-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.edit-actions {
  display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px;
}
@media (max-width: 600px) {
  .edit-grid { grid-template-columns: 1fr; }
  .edit-actions { flex-direction: column; }
}

/* ── Branding Upload Zones ───────────────────────────── */
.branding-upload-zone {
  border: 2px dashed #e0e3e7;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 150ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  background: var(--grey-50);
}
.branding-upload-zone:hover {
  border-color: var(--orange);
  background: #fff;
}
.upload-ph {
  text-align: center;
  color: var(--grey-400);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.upload-ph span { font-size: 12px; }

/* ── Menu Builder ────────────────────────────────────── */
.menu-builder-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 40px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--white);
  border: 1px solid #e8eaed;
  border-radius: 10px;
  transition: all 150ms ease;
  cursor: grab;
}
.menu-item:active { cursor: grabbing; }
.menu-item:hover { border-color: var(--orange); }
.menu-item.dragging {
  opacity: 0.5;
  border-color: var(--orange);
  box-shadow: 0 4px 12px rgba(249,115,22,0.15);
}
.menu-item .drag-handle {
  color: var(--grey-400);
  flex-shrink: 0;
  cursor: grab;
}
.menu-item .drag-handle svg { width: 14px; height: 14px; }
.menu-item .mi-label,
.menu-item .mi-url {
  flex: 1;
  border: 1px solid transparent;
  padding: 4px 8px;
  font-size: 13px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  background: transparent;
  transition: border-color 150ms;
}
.menu-item .mi-label:focus,
.menu-item .mi-url:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--white);
}
.menu-item .mi-url {
  color: var(--grey-500);
  font-size: 12px;
}
.menu-item .mi-newtab {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--grey-500);
  cursor: pointer; flex-shrink: 0;
}
.menu-item .mi-newtab input { width: 14px; height: 14px; accent-color: var(--orange); }
.menu-item .mi-delete {
  background: none; border: none;
  color: var(--grey-400); cursor: pointer;
  padding: 4px; border-radius: 6px;
  transition: all 150ms; flex-shrink: 0;
}
.menu-item .mi-delete:hover { color: var(--error); background: var(--error-bg); }
.menu-item .mi-delete svg { width: 14px; height: 14px; }
.menu-drop-placeholder {
  border: 2px dashed var(--orange);
  border-radius: 10px;
  height: 44px;
  background: rgba(249,115,22,0.06);
}
.menu-empty-msg {
  text-align: center; padding: 24px 0;
  color: var(--grey-400); font-size: 13px;
}

/* ── Sortable table headers ─────────────────────────────── */
.sortable-th { white-space: nowrap; }
.sortable-th:hover { background: #f8fafc; }
.sortable-th.sort-active { color: var(--primary, #2563eb); }
.sort-icon { display: inline-block; margin-left: 4px; font-size: 11px; opacity: .6; }
.sortable-th.sort-active .sort-icon { opacity: 1; }
