:root {
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --brand: #0f766e;
  --available: #31b66a;
  --hold: #f59e0b;
  --sold: #ef4444;
  --tentative: #c4137c;
  --provisional: #19b7b0;
  --registered: #4c1ee9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: #ffffff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a,
input,
select,
textarea {
  letter-spacing: 0;
}

.app-shell {
  width: min(98vw, 1640px);
  margin: 10px auto 24px;
}

.top-strip {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
  font-size: clamp(0.9rem, 1vw, 1.08rem);
  font-weight: 700;
  overflow: hidden;
}

.top-strip a {
  max-width: 100%;
  overflow: hidden;
  color: #db2777;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.project-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.project-title img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: 0 0 auto;
}

.project-title h2 {
  margin: 0;
  font-size: 1.32rem;
  line-height: 1.1;
  font-weight: 750;
}

.project-title p {
  margin: 4px 0 0;
  color: #f59e0b;
  font-size: 0.95rem;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  color: #14532d;
  background: #dcfce7;
  font-size: 0.84rem;
  font-weight: 800;
}

.viewer-layout-select {
  width: min(44vw, 220px);
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.22), transparent 34%),
    linear-gradient(135deg, #f8fafc, #eefdf3);
}

.login-shell {
  width: min(94vw, 520px);
}

.login-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.login-brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.login-brand h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 850;
}

.login-brand p,
.login-help {
  color: #64748b;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form .btn {
  margin-top: 8px;
  padding-block: 11px;
  font-weight: 800;
}

.login-help {
  margin-top: 18px;
  padding: 13px;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 0.88rem;
}

.login-help strong,
.login-help span {
  display: block;
}

.icon-btn,
.tool-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: #111827;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.icon-btn:hover,
.tool-btn:hover {
  transform: translateY(-1px);
  color: #ffffff;
  background: #0f766e;
}

.stats-band {
  display: flex;
  gap: 7px;
  width: 100%;
  overflow-x: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--soft);
  scrollbar-width: thin;
}

.stats-band::-webkit-scrollbar {
  height: 5px;
}

.stats-band::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 700;
  flex: 0 0 auto;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.12);
}

.stat-chip strong {
  font-size: 0.88rem;
}

.stat-chip.total {
  background: #16803a;
}

.stat-chip.available {
  background: var(--available);
}

.stat-chip.hold {
  background: var(--hold);
}

.stat-chip.sold {
  background: var(--sold);
}

.stat-chip.tentative {
  background: var(--tentative);
}

.stat-chip.provisional {
  background: var(--provisional);
}

.stat-chip.registered {
  background: var(--registered);
}

.layout-stage {
  position: relative;
  border: 1px solid var(--line);
  border-top: 0;
  min-height: 72vh;
  background: #ffffff;
}

.layout-viewport {
  height: 72vh;
  min-height: 450px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.layout-viewport.dragging {
  cursor: grabbing;
}

.layout-canvas {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transform-origin: center center;
  transition: transform 160ms ease;
}

.layout-canvas svg {
  width: min(100%, 980px);
  height: min(100%, 72vh);
  display: block;
}

.layout-canvas svg .plot {
  fill: rgba(49, 182, 106, 0.64);
  stroke: rgba(15, 23, 42, 0.55);
  stroke-width: 4;
  cursor: pointer;
  transition: fill 140ms ease, stroke 140ms ease, opacity 140ms ease;
}

.layout-canvas svg .plot:hover,
.layout-canvas svg .plot.active {
  fill: rgba(14, 165, 233, 0.64) !important;
  stroke: #075985;
}

.layout-canvas svg .plot.status-available {
  fill: rgba(49, 182, 106, 0.62);
}

.layout-canvas svg .plot.status-hold {
  fill: rgba(245, 158, 11, 0.7);
}

.layout-canvas svg .plot.status-sold {
  fill: rgba(239, 68, 68, 0.68);
}

.layout-canvas svg .plot.status-tentative {
  fill: rgba(196, 19, 124, 0.66);
}

.layout-canvas svg .plot.status-provisional {
  fill: rgba(33, 209, 202, 0.55);
}

.layout-canvas svg .plot.status-registered {
  fill: rgba(76, 30, 233, 0.68);
}

.layout-canvas svg .plot.is-dimmed {
  opacity: 0.13;
}

.layout-canvas svg .synthetic-plot {
  stroke-width: 1.2;
  stroke: rgba(15, 23, 42, 0.72);
}

.synthetic-plot-label {
  fill: #0f172a;
  font-size: 8px;
  font-weight: 800;
  text-anchor: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 2px;
}

.layout-error {
  max-width: 520px;
  padding: 18px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  background: #fef2f2;
  font-weight: 750;
  text-align: center;
}

.layout-object-loader {
  width: min(100%, 980px);
  height: min(100%, 72vh);
}

.map-toolbar {
  position: fixed;
  right: 18px;
  bottom: 90px;
  z-index: 20;
  display: grid;
  gap: 10px;
}

.tool-btn {
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
  background: #1f2937;
}

.project-tabs {
  position: sticky;
  bottom: 0;
  z-index: 19;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
}

.project-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 132px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #334155;
  text-decoration: none;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.project-tab i {
  font-size: 1.2rem;
}

.project-tab span {
  line-height: 1.1;
  font-size: 0.84rem;
  font-weight: 750;
}

.project-tab.active {
  color: #ffffff;
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb, #0f766e);
}

.modal-content {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.modal-header {
  border-bottom-color: var(--line);
}

.form-label {
  color: #334155;
  font-weight: 700;
}

.filter-status {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--brand);
  font-weight: 700;
}

.plot-table {
  margin: 0;
}

.plot-table th {
  width: 38%;
  color: var(--muted);
}

.plot-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 750;
}

.plot-status-badge.Available {
  background: var(--available);
}

.plot-status-badge.Hold {
  background: var(--hold);
}

.plot-status-badge.Sold {
  background: var(--sold);
}

.plot-status-badge.TentativelyBooked {
  background: var(--tentative);
}

.plot-status-badge.Provisional {
  background: var(--provisional);
}

.plot-status-badge.Registered {
  background: var(--registered);
}

.plot-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.enquiry-mini {
  margin: 0 0 14px;
  color: #0f766e;
  font-weight: 750;
}

.enquiry-status {
  min-height: 20px;
  margin: 0;
  color: #15803d;
  font-size: 0.86rem;
  font-weight: 800;
}

.copy-message {
  display: none;
  margin: 10px 0 0;
  color: #16a34a;
  font-weight: 700;
}

.share-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
  text-transform: uppercase;
}

.share-divider::before,
.share-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.share-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-icons a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.08rem;
  text-decoration: none;
}

.share-icons .whatsapp {
  background: #25d366;
}

.share-icons .facebook {
  background: #1877f2;
}

.share-icons .twitter {
  background: #111827;
}

.share-icons .email {
  background: #ea4335;
}

.share-icons .linkedin {
  background: #0a66c2;
}

.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(6px);
  animation: fadeIn 220ms ease;
}

.welcome-overlay.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.welcome-box {
  width: min(92vw, 410px);
  padding: 26px;
  text-align: center;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.28);
}

.welcome-box h1 {
  margin: 0 0 8px;
  font-size: 1.85rem;
  font-weight: 800;
}

.company-name {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 700;
}

.browse-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--brand);
  font-weight: 800;
}

.instruction-list {
  padding: 12px;
  border-radius: 8px;
  background: #f1f5f9;
  text-align: left;
}

.instruction-list p {
  display: flex;
  gap: 8px;
  margin: 7px 0;
  color: #334155;
}

.welcome-progress {
  height: 6px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.welcome-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: #0f766e;
  animation: progressShrink 2600ms linear forwards;
}

.spin {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes progressShrink {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .app-shell {
    width: 100vw;
    margin-top: 0;
  }

  .top-strip,
  .project-header {
    padding-inline: 12px;
  }

  .project-header {
    align-items: flex-start;
  }

  .project-title h2 {
    font-size: 1.12rem;
  }

  .layout-stage {
    min-height: 66vh;
  }

  .layout-viewport {
    min-height: 420px;
    height: 66vh;
  }

  .map-toolbar {
    right: 12px;
    bottom: 88px;
  }

  .project-tabs {
    gap: 6px;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 8px;
  }

  .project-tab {
    min-width: 118px;
    flex: 0 0 118px;
    justify-content: center;
    padding: 9px 7px;
  }

  .project-tab span {
    font-size: 0.72rem;
  }

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

.admin-body {
  background:
    radial-gradient(circle at top left, rgba(22, 163, 74, 0.10), transparent 32%),
    #f3f6f9;
}

.admin-shell {
  width: min(96vw, 1480px);
  margin: 22px auto 40px;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.admin-sidebar .btn-outline-success {
  color: #dcfce7;
  border-color: rgba(220, 252, 231, 0.7);
}

.admin-sidebar .btn-outline-success:hover {
  color: #14532d;
  background: #dcfce7;
}

.admin-workspace {
  min-width: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #14532d;
  background: #dcfce7;
  font-size: 1.2rem;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

.sidebar-brand strong {
  font-size: 0.98rem;
}

.sidebar-brand small {
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
}

.sidebar-menu {
  display: grid;
  gap: 7px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 800;
  transition: 160ms ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
}

.sidebar-menu i {
  width: 20px;
  text-align: center;
}

.sidebar-actions {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-tip {
  padding: 12px;
  border-radius: 14px;
  color: #14532d;
  background: #dcfce7;
}

.sidebar-tip strong,
.sidebar-tip span {
  display: block;
}

.sidebar-tip span {
  margin-top: 3px;
  color: #166534;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.admin-header .project-title {
  min-width: 280px;
}

.admin-header .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-header .header-actions .btn {
  display: inline-flex;
  align-items: center;
}

.layout-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.context-label {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.layout-context strong {
  display: block;
  margin-top: 2px;
  font-size: 1.08rem;
}

.layout-context-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.layout-context-actions .form-select {
  width: min(100%, 280px);
}

.layout-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.flow-step strong {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: #111827;
  flex: 0 0 auto;
}

.flow-step span {
  color: #334155;
  font-size: 0.86rem;
  font-weight: 800;
}

.go-live-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 13px 16px;
  border: 1px solid rgba(22, 128, 58, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.go-live-panel strong,
.go-live-panel span {
  display: block;
}

.go-live-panel strong {
  color: #14532d;
  font-size: 0.92rem;
}

.go-live-panel span {
  color: #475569;
  font-size: 0.84rem;
}

.database-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.database-panel p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 650;
}

.database-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.database-actions .form-control {
  width: min(100%, 260px);
}

.db-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.86rem;
}

.db-status-badge.connected {
  color: #14532d;
  background: #dcfce7;
}

.db-status-badge.syncing {
  color: #854d0e;
  background: #fef3c7;
}

.db-status-badge.disconnected {
  color: #991b1b;
  background: #fee2e2;
}

.usage-guide-modal {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
}

.usage-guide-modal .modal-header {
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
}

.usage-steps {
  display: grid;
  gap: 12px;
}

.usage-steps div {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.usage-steps strong {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: #16a34a;
  flex: 0 0 auto;
}

.usage-steps span {
  color: #334155;
  font-weight: 700;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #ffffff;
  background: #16803a;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.metric-card span {
  display: block;
  font-size: 0.78rem;
  font-weight: 750;
  opacity: 0.9;
}

.metric-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.45rem;
  line-height: 1;
}

.metric-card.available {
  background: var(--available);
}

.metric-card.hold {
  background: var(--hold);
}

.metric-card.sold {
  background: var(--sold);
}

.metric-card.tentative {
  background: var(--tentative);
}

.metric-card.provisional {
  background: var(--provisional);
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.layout-manager-panel {
  margin: 0 0 16px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.layout-table {
  margin: 0;
  min-width: 800px;
}

.layout-source-pill,
.active-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: #e2e8f0;
}

.active-pill {
  color: #ffffff;
  background: #16a34a;
}

.admin-tools,
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.bulk-bar {
  justify-content: space-between;
  background: #f8fafc;
}

.search-box {
  flex: 1 1 360px;
}

.admin-tools > .form-select {
  width: min(100%, 190px);
}

.inventory-table-wrap {
  max-height: calc(100vh - 330px);
}

.inventory-table {
  margin: 0;
  min-width: 920px;
}

.inventory-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #475569;
  background: #f8fafc;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.inventory-table td,
.inventory-table th {
  padding: 12px 14px;
}

.status-select {
  min-width: 172px;
}

.plot-number-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: #111827;
  font-weight: 800;
}

.row-actions {
  display: inline-flex;
  gap: 6px;
}

.row-actions .btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.overlay-editor-modal .modal-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  background: #eef2f7;
}

.overlay-editor-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.overlay-editor-board {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: calc(100vh - 84px);
}

.overlay-side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.overlay-help-card,
.overlay-status-card,
.overlay-empty {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.overlay-help-card strong,
.overlay-help-card span {
  display: block;
}

.overlay-help-card strong {
  color: #0f172a;
  font-size: 0.92rem;
}

.overlay-help-card span,
.overlay-status-card,
.overlay-empty {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.overlay-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.overlay-actions-grid .btn:first-child {
  grid-column: 1 / -1;
}

.overlay-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.overlay-field {
  width: 100%;
}

.overlay-field label {
  display: block;
  margin-bottom: 3px;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.overlay-editor-wrap {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 20px;
}

.overlay-editor-canvas {
  width: min(100%, 1180px);
  min-height: 760px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.overlay-editor-canvas svg {
  width: 100%;
  max-height: 84vh;
  display: block;
}

.overlay-nudge {
  display: grid;
  grid-template-columns: repeat(3, 42px);
  gap: 7px;
  justify-content: center;
}

.overlay-nudge .btn:first-child {
  grid-column: 2;
}

.overlay-nudge .btn:last-child {
  grid-column: 2;
}

.overlay-zone-list {
  min-height: 0;
  max-height: 330px;
  overflow: auto;
  display: grid;
  gap: 7px;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.overlay-zone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  color: #334155;
  background: #ffffff;
  font-weight: 850;
  text-align: left;
}

.overlay-zone-item small {
  color: #64748b;
  font-weight: 800;
}

.overlay-zone-item.active {
  border-color: #16a34a;
  color: #14532d;
  background: #dcfce7;
}

.overlay-editor-zone {
  fill: rgba(14, 165, 233, 0.34);
  stroke: #0f172a;
  stroke-width: 1.2;
  cursor: move;
}

.overlay-editor-zone.selected {
  fill: rgba(245, 158, 11, 0.42);
  stroke: #b45309;
  stroke-width: 2.2;
}

.overlay-editor-handle {
  fill: #111827;
  stroke: #ffffff;
  stroke-width: 1.4;
  cursor: nwse-resize;
}

.overlay-editor-label {
  fill: #0f172a;
  font-size: 8px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 2px;
}

@media (max-width: 992px) {
  .admin-dashboard {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .sidebar-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overlay-editor-board {
    grid-template-columns: 1fr;
  }

  .overlay-side-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .layout-context {
    align-items: flex-start;
    flex-direction: column;
  }

  .layout-context-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .layout-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .go-live-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .database-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .database-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-table-wrap {
    max-height: none;
  }
}
