:root {
  --dark: #1A1A18;
  --dark-2: #10100E;
  --cream: #F7F4EE;
  --cream-2: #EFE9DD;
  --gold: #C8A96E;
  --gold-soft: rgba(200, 169, 110, 0.14);
  --mid: #3D3D38;
  --muted: #8A8A80;
  --line: rgba(26, 26, 24, 0.11);
  --line-dark: rgba(255, 255, 255, 0.10);
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --sidebar: 270px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--cream); }
body {
  margin: 0;
  min-width: 320px;
  background: var(--cream);
  color: var(--dark);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  background: var(--dark);
  color: var(--cream);
  border-right: 1px solid var(--line-dark);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 24px;
  border-bottom: 1px solid var(--line-dark);
}
.brand-row img {
  width: 42px;
  height: 34px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.brand-row div { min-width: 0; display: flex; flex-direction: column; }
.brand-row strong { font-size: 14px; font-weight: 600; }
.brand-row span { margin-top: 3px; color: rgba(247,244,238,.45); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }

.side-nav { display: grid; gap: 6px; padding-top: 24px; }
.side-link {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: rgba(247,244,238,.64);
  text-align: left;
  font-size: 12px;
  font-weight: 500;
}
.side-link:hover, .side-link.active {
  border-color: rgba(200,169,110,.20);
  background: rgba(200,169,110,.10);
  color: var(--cream);
}
.side-icon { width: 18px; color: var(--gold); text-align: center; }

.sidebar-bottom {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line-dark);
}
.admin-chip { display: flex; align-items: center; gap: 10px; }
.admin-avatar {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--dark);
  font-size: 12px; font-weight: 700;
}
.admin-meta { min-width: 0; display: flex; flex-direction: column; }
.admin-meta strong { max-width: 155px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; }
.admin-meta span { margin-top: 2px; color: rgba(247,244,238,.38); font-size: 9px; }
.logout-btn {
  width: 100%;
  margin-top: 14px;
  min-height: 40px;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  background: transparent;
  color: rgba(247,244,238,.68);
  font-size: 11px;
}
.logout-btn:hover { border-color: var(--gold); color: var(--cream); }

.main-area { grid-column: 2; min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 82px;
  padding: 14px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(247,244,238,.94);
  backdrop-filter: blur(14px);
}
.topbar-copy h1 { margin: 4px 0 0; font-family: var(--serif); font-size: 24px; font-weight: 700; }
.eyebrow { display: block; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow.gold { color: var(--gold); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.live-pill {
  min-height: 36px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--mid);
  font-size: 10px;
  font-weight: 600;
}
.live-pill i {
  width: 7px; height: 7px; border-radius: 50%; background: #4FC36A;
  box-shadow: 0 0 0 4px rgba(79,195,106,.10);
}
.refresh-btn {
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid var(--dark);
  border-radius: 5px;
  background: var(--dark);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.refresh-btn:hover { background: var(--gold); border-color: var(--gold); color: var(--dark); }
.mobile-menu-btn { display: none; }

.dashboard { padding: 30px 34px 54px; }

.welcome-card {
  min-height: 220px;
  padding: 34px 38px;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: end;
  gap: 40px;
  overflow: hidden;
  position: relative;
  background: var(--dark);
  color: var(--cream);
  border-radius: 8px;
}
.welcome-card::after {
  content: "";
  position: absolute;
  width: 300px; height: 300px;
  right: -80px; top: -120px;
  border: 1px solid rgba(200,169,110,.24);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(200,169,110,.035), 0 0 0 90px rgba(200,169,110,.025);
}
.welcome-card h2 {
  margin: 10px 0 0;
  max-width: 680px;
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1;
  font-weight: 700;
}
.welcome-card h2 em { color: var(--gold); font-weight: 700; }
.welcome-card p {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin: 0;
  color: rgba(247,244,238,.58);
  font-size: 13px;
  line-height: 1.7;
}

.stats-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat-card {
  min-height: 145px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.stat-card.dark { background: var(--gold); border-color: var(--gold); }
.stat-card span { color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.stat-card.dark span, .stat-card.dark small { color: rgba(26,26,24,.65); }
.stat-card strong { margin-top: 12px; font-family: var(--serif); font-size: 42px; line-height: 1; font-weight: 700; }
.stat-card small { margin-top: auto; color: var(--muted); font-size: 10px; }

.panel {
  position: relative;
  min-height: 420px;
  margin-top: 18px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.panel-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.panel-head h2 { margin: 6px 0 0; font-family: var(--serif); font-size: 30px; font-weight: 700; }
.result-count { color: var(--muted); font-size: 11px; }

.filters {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 170px;
  gap: 10px;
}
.search-box {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--cream);
}
.search-box span { color: var(--gold); font-size: 20px; }
.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--dark);
  font-size: 12px;
}
.filters select {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: none;
  background: var(--cream);
  color: var(--mid);
  font-size: 11px;
}

.table-wrap { margin-top: 18px; overflow-x: auto; }
.enquiry-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.enquiry-table th {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: left;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.enquiry-table td {
  padding: 15px 13px;
  border-bottom: 1px solid rgba(26,26,24,.07);
  color: var(--mid);
  font-size: 11px;
  vertical-align: middle;
}
.enquiry-table tbody tr { transition: background .18s ease; }
.enquiry-table tbody tr:hover { background: #FBF9F4; }
.client-cell { display: flex; align-items: center; gap: 10px; }
.client-avatar {
  width: 34px; height: 34px;
  flex: 0 0 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  color: #8C6E37;
  font-size: 10px;
  font-weight: 700;
}
.client-copy { min-width: 0; }
.client-copy strong { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dark); font-size: 11px; font-weight: 600; }
.client-copy span { display: block; max-width: 200px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; }
.service-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #7A6031;
  font-size: 9px;
  font-weight: 600;
}
.view-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--dark);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}
.view-btn:hover { border-color: var(--gold); background: var(--gold); }

.mobile-enquiries { display: none; }

.empty-state, .loading-state {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.empty-mark {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 700;
}
.empty-state h3 { margin: 14px 0 6px; font-family: var(--serif); font-size: 22px; }
.empty-state p, .loading-state p { margin: 0; color: var(--muted); font-size: 11px; }
.spinner {
  width: 28px; height: 28px;
  margin-bottom: 12px;
  border: 2px solid rgba(200,169,110,.22);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(16,16,14,.48);
  opacity: 0;
  visibility: hidden;
  transition: .25s ease;
}
.drawer-backdrop.show { opacity: 1; visibility: visible; }

.detail-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 70;
  width: min(520px, 100%);
  padding: 28px;
  overflow-y: auto;
  background: var(--cream);
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 60px rgba(26,26,24,.15);
  transform: translateX(102%);
  transition: transform .28s ease;
}
.detail-drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 7px 0 0; font-family: var(--serif); font-size: 32px; font-weight: 700; }
.drawer-close {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--dark);
  font-size: 22px;
}
.drawer-body { padding-top: 22px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-item, .detail-block {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.detail-item span, .detail-block > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.detail-item strong, .detail-item a { color: var(--dark); font-size: 12px; font-weight: 600; word-break: break-word; }
.detail-block { margin-top: 10px; }
.detail-block p { margin: 0; color: var(--mid); font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.file-link { display: inline-block; color: #816329; font-size: 11px; font-weight: 600; word-break: break-all; }
.reply-btn {
  min-height: 48px;
  margin-top: 18px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 5px;
  background: var(--dark);
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.reply-btn:hover { background: var(--gold); color: var(--dark); }

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--cream);
}
.login-screen.hidden { display: none; }
.login-art {
  position: relative;
  min-height: 100vh;
  padding: 38px 48px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--dark);
  color: var(--cream);
}
.login-art::before, .login-art::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(200,169,110,.20);
  border-radius: 50%;
}
.login-art::before { width: 560px; height: 560px; right: -230px; top: -210px; box-shadow: 0 0 0 70px rgba(200,169,110,.025), 0 0 0 140px rgba(200,169,110,.018); }
.login-art::after { width: 260px; height: 260px; left: -110px; bottom: -110px; }
.login-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 11px; }
.login-brand img { width: 46px; filter: brightness(0) invert(1); }
.login-brand span { font-family: var(--serif); font-size: 20px; font-weight: 700; }
.login-art-copy { position: relative; z-index: 2; margin: auto 0; max-width: 660px; }
.login-art-copy h2 { margin: 14px 0 20px; font-family: var(--serif); font-size: clamp(48px, 5.2vw, 76px); line-height: .98; font-weight: 700; }
.login-art-copy h2 em { color: var(--gold); font-weight: 700; }
.login-art-copy p { max-width: 470px; margin: 0; color: rgba(247,244,238,.52); font-size: 14px; line-height: 1.75; }
.login-art-footer { position: relative; z-index: 2; display: flex; align-items: center; gap: 13px; color: rgba(247,244,238,.42); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.login-art-footer i { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

.login-panel { min-height: 100vh; padding: 36px; display: flex; align-items: center; justify-content: center; }
.login-card { width: min(430px, 100%); }
.mobile-login-brand { display: none; }
.login-card h1 { margin: 10px 0 8px; font-family: var(--serif); font-size: 44px; line-height: 1; font-weight: 700; }
.login-subtitle { margin: 0 0 30px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.login-card label { display: block; margin-top: 16px; }
.login-card label > span { display: block; margin-bottom: 8px; color: var(--mid); font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.login-card input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: 0;
  background: #fff;
  color: var(--dark);
  font-size: 12px;
}
.login-card input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,169,110,.10); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 65px; }
.password-wrap button {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 10px;
  font-weight: 600;
}
.login-error { min-height: 18px; margin: 12px 0 0; color: #A34545; font-size: 10px; }
.login-btn {
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 5px;
  background: var(--dark);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.login-btn:hover { background: var(--gold); color: var(--dark); }
.login-btn:disabled { opacity: .6; cursor: wait; }
.security-note { display: block; margin-top: 18px; color: var(--muted); text-align: center; font-size: 9px; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 150;
  max-width: 330px;
  padding: 13px 16px;
  border-radius: 5px;
  background: var(--dark);
  color: #fff;
  box-shadow: 0 16px 44px rgba(26,26,24,.24);
  font-size: 11px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: .2s ease;
}
.toast.show { opacity: 1; visibility: visible; transform: translateY(0); }

@media (max-width: 1100px) {
  :root { --sidebar: 230px; }
  .dashboard { padding-inline: 24px; }
  .topbar { padding-inline: 24px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 180px 160px; }
}

@media (max-width: 820px) {
  .admin-shell { display: block; }
  .main-area { min-width: 0; }
  .sidebar {
    width: min(300px, 84vw);
    transform: translateX(-102%);
    transition: transform .24s ease;
    box-shadow: 20px 0 60px rgba(0,0,0,.25);
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu-btn {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
  }
  .topbar { min-height: 74px; padding: 12px 18px; }
  .topbar-copy { margin-right: auto; }
  .topbar-copy .eyebrow { display: none; }
  .topbar-copy h1 { margin: 0; font-size: 21px; }
  .live-pill { display: none; }
  .dashboard { padding: 18px 16px 38px; }
  .welcome-card { min-height: 250px; padding: 28px; grid-template-columns: 1fr; align-content: end; gap: 18px; }
  .welcome-card h2 { font-size: 40px; }
  .welcome-card p { font-size: 12px; }
  .panel { padding: 18px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-box { grid-column: 1 / -1; }
  .table-wrap { display: none; }
  .mobile-enquiries { margin-top: 16px; display: grid; gap: 10px; }
  .mobile-card {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
  }
  .mobile-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .mobile-card h3 { margin: 0; font-size: 12px; font-weight: 600; }
  .mobile-card .email { margin-top: 3px; color: var(--muted); font-size: 9px; }
  .mobile-card-meta { margin-top: 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .mobile-meta-item { padding: 9px; border-radius: 4px; background: var(--cream); }
  .mobile-meta-item span { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }
  .mobile-meta-item strong { display: block; margin-top: 4px; color: var(--mid); font-size: 10px; font-weight: 600; }
  .mobile-card .view-btn { width: 100%; margin-top: 12px; }
  .login-screen { display: block; overflow-y: auto; }
  .login-art { display: none; }
  .login-panel { min-height: 100vh; padding: 28px 20px; }
  .mobile-login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 48px; }
  .mobile-login-brand img { width: 42px; }
  .mobile-login-brand strong { font-family: var(--serif); font-size: 18px; }
}

@media (max-width: 560px) {
  .topbar { gap: 10px; }
  .refresh-btn { padding-inline: 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 125px; padding: 15px; }
  .stat-card strong { font-size: 36px; }
  .stat-card small { font-size: 8px; }
  .panel-head h2 { font-size: 26px; }
  .filters { grid-template-columns: 1fr; }
  .search-box { grid-column: auto; }
  .filters select { width: 100%; }
  .detail-drawer { padding: 22px 16px; }
  .detail-grid { grid-template-columns: 1fr; }
  .drawer-head h2 { font-size: 28px; }
  .welcome-card { min-height: 270px; padding: 24px 20px; }
  .welcome-card h2 { font-size: 35px; }
  .login-card h1 { font-size: 38px; }
}


/* ===== Lead management additions ===== */
.enquiry-filters {
  grid-template-columns: minmax(230px,1fr) 175px 165px 145px 125px;
}

.lead-status-select,
.drawer-status-select {
  min-height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: #fff;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.lead-status-new { background: rgba(138,138,128,.08); color: #66665f; }
.lead-status-contacted { background: rgba(86,122,168,.09); color: #476b98; border-color: rgba(86,122,168,.34); }
.lead-status-email_sent { background: rgba(137,105,166,.09); color: #795994; border-color: rgba(137,105,166,.34); }
.lead-status-interested { background: rgba(74,145,91,.10); color: #397a49; border-color: rgba(74,145,91,.38); }
.lead-status-follow_up { background: rgba(200,169,110,.12); color: #85662d; border-color: rgba(200,169,110,.48); }
.lead-status-converted { background: rgba(49,122,73,.12); color: #23653a; border-color: rgba(49,122,73,.42); }
.lead-status-not_interested { background: rgba(174,73,73,.10); color: #984343; border-color: rgba(174,73,73,.38); }
.lead-status-closed { background: rgba(61,61,56,.08); color: #55554f; border-color: rgba(61,61,56,.28); }

.entry-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.delete-entry-btn,
.drawer-delete-btn {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(163,69,69,.30);
  border-radius: 4px;
  background: rgba(163,69,69,.06);
  color: #9A4444;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.delete-entry-btn:hover,
.drawer-delete-btn:hover {
  border-color: #A34545;
  background: #A34545;
  color: #fff;
}

.drawer-status-select {
  width: 100%;
  min-height: 38px;
  border-radius: 5px;
  font-size: 10px;
}

.drawer-delete-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
}

.mobile-status-row {
  margin-top: 13px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 5px;
  background: var(--cream);
}

.mobile-status-row > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.mobile-entry-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

.mobile-entry-actions .view-btn { width: 100%; margin: 0; }

@media (max-width: 1280px) {
  .enquiry-filters { grid-template-columns: minmax(220px,1fr) 160px 150px; }
}

@media (max-width: 820px) {
  .enquiry-filters { grid-template-columns: 1fr 1fr; }
  .enquiry-filters .search-box { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .enquiry-filters { grid-template-columns: 1fr; }
  .enquiry-filters .search-box { grid-column: auto; }
  .mobile-status-row { align-items: stretch; flex-direction: column; }
  .lead-status-select { width: 100%; }
}


/* =========================================================
   FLOORPLANSPK ADMIN — DARK / COMPACT DESKTOP OVERRIDES
   Visual-only changes. No functionality changed.
========================================================= */

@media (min-width: 821px) {
  :root {
    --sidebar: 156px;
    --dark: #111210;
    --dark-2: #0B0C0B;
    --cream: #F5F0E7;
    --cream-2: #D8D0C3;
    --gold: #C8A96E;
    --gold-soft: rgba(200, 169, 110, .12);
    --mid: #D7D1C7;
    --muted: #918B82;
    --line: rgba(255, 255, 255, .075);
    --line-dark: rgba(255, 255, 255, .08);
  }

  html,
  body {
    background: #0D0E0D;
    color: var(--cream);
  }

  .admin-shell {
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    background: #0D0E0D;
  }

  /* Slim left navigation */
  .sidebar {
    width: var(--sidebar);
    padding: 15px 9px;
    background: #090A09;
    border-right-color: rgba(255,255,255,.07);
  }

  .brand-row {
    gap: 7px;
    padding: 2px 4px 15px;
  }

  .brand-row img {
    width: 30px;
    height: 28px;
  }

  .brand-row strong {
    font-size: 12px;
    letter-spacing: 0;
  }

  .brand-row span {
    margin-top: 2px;
    font-size: 8px;
    letter-spacing: .03em;
  }

  .side-nav {
    gap: 4px;
    padding-top: 15px;
  }

  .side-link {
    min-height: 38px;
    padding: 0 7px;
    gap: 7px;
    border-radius: 5px;
    font-size: 10px;
    letter-spacing: 0;
  }

  .side-icon {
    width: 14px;
  }

  .sidebar-bottom {
    padding-top: 13px;
  }

  .admin-chip {
    gap: 7px;
  }

  .admin-avatar {
    width: 29px;
    height: 29px;
    font-size: 10px;
  }

  .admin-meta strong {
    max-width: 100px;
    font-size: 9px;
    letter-spacing: 0;
  }

  .admin-meta span {
    font-size: 7px;
    letter-spacing: 0;
  }

  .logout-btn {
    min-height: 34px;
    margin-top: 9px;
    font-size: 9px;
  }

  /* Main dark canvas */
  .main-area {
    background: #0D0E0D;
  }

  .topbar {
    min-height: 72px;
    padding: 11px 22px;
    border-bottom-color: rgba(255,255,255,.07);
    background: rgba(13,14,13,.96);
    backdrop-filter: blur(12px);
  }

  .topbar-copy h1 {
    color: var(--cream);
    font-size: 25px;
    letter-spacing: -.015em;
  }

  .eyebrow {
    color: #827B70;
    font-size: 8px;
    letter-spacing: .07em;
  }

  .eyebrow.gold {
    color: var(--gold);
  }

  .live-pill {
    min-height: 34px;
    border-color: rgba(255,255,255,.08);
    background: #171816;
    color: #C8C1B7;
    font-size: 9px;
    letter-spacing: 0;
  }

  .refresh-btn {
    min-height: 34px;
    border-color: #252622;
    background: #191A18;
    color: var(--cream);
    font-size: 9px;
    letter-spacing: .02em;
  }

  .dashboard {
    padding: 22px 22px 42px;
  }

  /* Hero */
  .welcome-card {
    min-height: 175px;
    padding: 27px 30px;
    gap: 28px;
    border: 1px solid rgba(200,169,110,.14);
    background: #141512;
    color: var(--cream);
  }

  .welcome-card h2 {
    font-size: clamp(32px, 3.4vw, 48px);
    letter-spacing: -.02em;
  }

  .welcome-card p {
    color: #918B82;
    font-size: 12px;
    line-height: 1.55;
  }

  /* Stats */
  .stats-grid {
    margin-top: 12px;
    gap: 9px;
  }

  .stat-card {
    min-height: 118px;
    padding: 15px;
    border-color: rgba(255,255,255,.075);
    background: #151614;
  }

  .stat-card.dark {
    border-color: rgba(200,169,110,.25);
    background: rgba(200,169,110,.14);
  }

  .stat-card span {
    color: #90897F;
    font-size: 9px;
    letter-spacing: .035em;
  }

  .stat-card.dark span,
  .stat-card.dark small {
    color: #BDAE93;
  }

  .stat-card strong {
    margin-top: 8px;
    color: var(--cream);
    font-size: 37px;
  }

  .stat-card small {
    color: #777168;
    font-size: 9px;
  }

  /* Main enquiry panel */
  .panel {
    margin-top: 12px;
    padding: 20px;
    border-color: rgba(255,255,255,.075);
    background: #141513;
  }

  .panel-head h2 {
    color: var(--cream);
    font-size: 30px;
    letter-spacing: -.01em;
  }

  .result-count {
    color: #8D867C;
    font-size: 10px;
  }

  /* Filters */
  .filters {
    margin-top: 17px;
    gap: 7px;
  }

  .search-box {
    min-height: 41px;
    padding: 0 11px;
    border-color: rgba(255,255,255,.08);
    background: #0F100F;
  }

  .search-box input {
    color: var(--cream);
    font-size: 12px;
    letter-spacing: 0;
  }

  .search-box input::placeholder {
    color: #6F6A63;
  }

  .filters select {
    min-height: 41px;
    padding: 0 10px;
    border-color: rgba(255,255,255,.08);
    background: #0F100F;
    color: #D8D1C7;
    font-size: 11px;
    letter-spacing: 0;
  }

  /* Table: larger text + tighter spacing */
  .table-wrap {
    margin-top: 13px;
  }

  .enquiry-table th {
    padding: 10px 9px;
    border-bottom-color: rgba(255,255,255,.075);
    color: #817B72;
    font-size: 9px;
    letter-spacing: .035em;
  }

  .enquiry-table td {
    padding: 12px 9px;
    border-bottom-color: rgba(255,255,255,.055);
    color: #D4CDC3;
    font-size: 12px;
    letter-spacing: 0;
  }

  .enquiry-table tbody tr:hover {
    background: rgba(255,255,255,.025);
  }

  .client-cell {
    gap: 8px;
  }

  .client-avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    background: rgba(200,169,110,.12);
    color: #D4B979;
    font-size: 10px;
  }

  .client-copy strong {
    max-width: 210px;
    color: var(--cream);
    font-size: 12.5px;
    font-weight: 650;
    letter-spacing: 0;
  }

  .client-copy span {
    max-width: 220px;
    margin-top: 2px;
    color: #817B72;
    font-size: 10px;
    letter-spacing: 0;
  }

  .service-tag {
    min-height: 25px;
    padding: 0 8px;
    background: rgba(200,169,110,.11);
    color: #D2B472;
    font-size: 10px;
    letter-spacing: 0;
  }

  .view-btn {
    min-height: 31px;
    padding: 0 10px;
    border-color: rgba(255,255,255,.10);
    background: #111210;
    color: #DCD5CB;
    font-size: 9.5px;
    letter-spacing: .01em;
  }

  .view-btn:hover {
    border-color: var(--gold);
    background: rgba(200,169,110,.14);
    color: #E5C886;
  }

  .entry-actions {
    gap: 5px;
  }

  .delete-entry-btn {
    min-height: 31px;
    padding: 0 9px;
    font-size: 9.5px;
    letter-spacing: .01em;
  }

  /* Lead status */
  .lead-status-select,
  .drawer-status-select {
    min-height: 32px;
    padding: 0 25px 0 9px;
    border-radius: 7px;
    background-color: #10110F;
    font-size: 10.5px;
    letter-spacing: 0;
  }

  .lead-status-new {
    background: rgba(138,138,128,.10);
    color: #C2BDB4;
  }

  .lead-status-contacted {
    background: rgba(86,122,168,.14);
    color: #8DB0DF;
  }

  .lead-status-email_sent {
    background: rgba(137,105,166,.14);
    color: #B99AD2;
  }

  .lead-status-interested {
    background: rgba(74,145,91,.14);
    color: #8CC79A;
  }

  .lead-status-follow_up {
    background: rgba(200,169,110,.14);
    color: #DBBE80;
  }

  .lead-status-converted {
    background: rgba(49,122,73,.16);
    color: #7ED094;
  }

  .lead-status-not_interested {
    background: rgba(174,73,73,.14);
    color: #DF9090;
  }

  .lead-status-closed {
    background: rgba(255,255,255,.055);
    color: #A9A39A;
  }

  /* Drawer */
  .detail-drawer {
    background: #10110F;
    color: var(--cream);
    border-left-color: rgba(255,255,255,.08);
    box-shadow: -24px 0 60px rgba(0,0,0,.35);
  }

  .drawer-head {
    border-bottom-color: rgba(255,255,255,.08);
  }

  .drawer-head h2 {
    color: var(--cream);
  }

  .drawer-close {
    border-color: rgba(255,255,255,.08);
    background: #181917;
    color: var(--cream);
  }

  .detail-item,
  .detail-block {
    border-color: rgba(255,255,255,.075);
    background: #171816;
  }

  .detail-item span,
  .detail-block > span {
    color: #817B72;
    font-size: 9px;
    letter-spacing: .035em;
  }

  .detail-item strong,
  .detail-item a,
  .detail-block p {
    color: #D9D2C8;
    font-size: 12.5px;
  }

  .file-link {
    color: #D1B574;
    font-size: 11.5px;
  }

  .reply-btn {
    background: #1A1B18;
    color: var(--cream);
    font-size: 10px;
    letter-spacing: .015em;
  }

  .reply-btn:hover {
    background: rgba(200,169,110,.15);
    color: #E2C585;
  }

  /* Reduce tracking / word spacing overall */
  .topbar,
  .panel,
  .stats-grid,
  .enquiry-table,
  .sidebar {
    word-spacing: 0;
  }

  .side-link,
  .filters select,
  .enquiry-table td,
  .client-copy,
  .service-tag,
  .lead-status-select,
  .view-btn,
  .delete-entry-btn {
    letter-spacing: 0;
  }
}

/* Keep mobile behaviour intact, but use the same dark surfaces */
@media (max-width: 820px) {
  html,
  body,
  .main-area {
    background: #0D0E0D;
    color: #F5F0E7;
  }

  .topbar {
    background: rgba(13,14,13,.96);
    border-bottom-color: rgba(255,255,255,.07);
  }

  .topbar-copy h1 {
    color: #F5F0E7;
  }

  .panel,
  .mobile-card,
  .stat-card {
    border-color: rgba(255,255,255,.075);
    background: #151614;
    color: #F5F0E7;
  }

  .mobile-card h3,
  .mobile-meta-item strong {
    color: #F5F0E7;
  }

  .mobile-card .email,
  .mobile-meta-item span {
    color: #8F887E;
  }

  .mobile-meta-item,
  .mobile-status-row {
    background: #10110F;
  }
}
