:root {
  --bg: #0b0f12;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --text: #111111;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #e81c31;
  --accent-dark: #b90f22;
  --accent-soft: #fde7ea;
  --warning: #a16207;
  --danger: #e81c31;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.locked .app-shell {
  display: none;
}

body:not(.locked) .login-screen {
  display: none;
}

body:not(.admin-mode) .admin-screen {
  display: none;
}

body.admin-mode .app-shell,
body.admin-mode .login-screen {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 20px;
  color: #f8fbfb;
  background: #050505;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 104px;
  height: 48px;
  padding: 8px;
  border-radius: 8px;
  background: #0b0f12;
  object-fit: contain;
  object-position: center;
  flex: 0 0 auto;
}

.login-brand .brand-logo {
  width: 136px;
  height: 58px;
}

.client-name {
  display: block;
  margin-top: 4px;
  color: #ff5968;
  font-size: 0.8rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar .eyebrow,
.sidebar-footer p {
  color: #a3a3a3;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 1.25rem;
}

h2 {
  font-size: clamp(1.55rem, 2vw, 2.2rem);
}

h3 {
  font-size: 1.05rem;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-section-label {
  margin: 0 4px 2px;
  color: #8f9aa7;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 8px;
  color: #e5e7eb;
  background: transparent;
  text-align: left;
  font-weight: 700;
}

.nav-item.active,
.nav-item:hover {
  color: #ffffff;
  background: var(--accent);
}

.nav-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  flex: 0 0 auto;
  font-size: 1.05rem;
}

.nav-divider {
  height: 1px;
  margin: 14px 4px;
  background: rgba(255, 255, 255, 0.16);
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-footer p {
  margin: 0 0 6px;
  font-size: 0.82rem;
}

.sidebar-footer strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
}

.logout-button {
  width: 100%;
  min-height: 38px;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #e8f1f4;
  background: rgba(255, 255, 255, 0.07);
  font-weight: 800;
}

.logout-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #050505;
}

.admin-screen {
  min-height: 100vh;
  padding: 28px;
  background: #050505;
}

.admin-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  color: #ffffff;
}

.admin-header .eyebrow {
  color: #a3a3a3;
}

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

.admin-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid #242424;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.settings-card {
  margin-top: 18px;
}

.settings-help,
.settings-message {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-form textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.45;
}

.settings-message {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: 0;
  font-weight: 800;
}

.settings-message.is-error {
  color: var(--danger);
}

.settings-message.is-ok {
  color: #0f9f55;
}

.settings-actions {
  grid-column: 1 / -1;
}

.account-list {
  display: grid;
  gap: 10px;
}

.account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.account-item strong,
.account-item span {
  display: block;
}

.account-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.account-actions,
.admin-form-actions {
  display: flex;
  gap: 10px;
}

.admin-form-actions {
  align-items: center;
  justify-content: flex-end;
}

.admin-form-actions .primary-button,
.admin-form-actions .ghost-button {
  flex: 1;
}

.login-card {
  display: grid;
  width: min(440px, 100%);
  gap: 20px;
  padding: 28px;
  border: 1px solid #242424;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.login-brand {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.login-brand .eyebrow {
  color: var(--muted);
}

.login-brand .client-name {
  color: var(--accent);
}

.login-copy h2 {
  font-size: 1.6rem;
}

.login-error {
  min-height: 20px;
  margin: -8px 0 0;
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 800;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar-title {
  min-width: 0;
}

.topbar h2 {
  color: #ffffff;
}

.topbar .eyebrow {
  color: #a3a3a3;
}

.topbar-actions,
.dialog-actions,
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-menu-button,
.mobile-menu-backdrop,
.mobile-topbar-logo {
  display: none;
}

.primary-button,
.ghost-button,
.import-button,
.icon-button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
}

.primary-button {
  padding: 0 16px;
  color: #fff;
  background: var(--accent);
}

.primary-button:hover {
  background: var(--accent-dark);
}

.ghost-button,
.import-button {
  padding: 0 14px;
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
}

.ghost-button:hover,
.import-button:hover {
  border-color: #b9c8d5;
}

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

.import-button {
  display: inline-flex;
  align-items: center;
}

.import-button input {
  display: none;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(25, 40, 60, 0.05);
}

.metric-card span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 2rem;
}

.metric-card small {
  color: var(--muted);
}

.workspace {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.is-hidden {
  display: none !important;
}

.workspace.only-leads .content-grid,
.workspace.panel-view .content-grid,
.workspace.only-pipeline .content-grid {
  grid-template-columns: minmax(0, 1fr);
}

.workspace.only-leads .pipeline-panel {
  display: none;
}

.workspace.panel-view .pipeline-panel {
  display: none;
}

.workspace.only-pipeline .table-panel {
  display: none;
}

.workspace.only-pipeline .pipeline-panel {
  border-top: 0;
}

.workspace.only-pipeline .pipeline-list {
  grid-template-columns: repeat(9, minmax(220px, 1fr));
}

.sales-view {
  display: grid;
  gap: 18px;
}

.sales-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.sales-panel {
  min-height: 460px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.sales-list {
  display: grid;
  gap: 10px;
}

.interested-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(140px, 0.8fr) minmax(220px, 1.2fr) minmax(150px, 0.8fr) minmax(220px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.interested-form label {
  font-size: 0.72rem;
}

.interested-form input,
.interested-form select {
  min-height: 38px;
  padding: 8px 10px;
}

.interested-form .primary-button {
  min-height: 38px;
}

.interested-pipeline-heading {
  margin-top: 22px;
}

.interested-pipeline {
  grid-template-columns: repeat(6, minmax(220px, 1fr));
}

.sales-panel .interested-pipeline {
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  overflow-x: auto;
}

.interested-status-Nuevo {
  --stage-color: #f6c343;
}

.interested-status-Contactado {
  --stage-color: #3b82f6;
}

.interested-status-Visita-agendada {
  --stage-color: #f97316;
}

.interested-status-Oferta {
  --stage-color: #7c3aed;
}

.interested-status-Vendido {
  --stage-color: #0f9f4d;
}

.interested-status-Descartado {
  --stage-color: #dc2626;
}

.interested-card .lead-card-head span {
  color: var(--stage-color, var(--accent));
}

.mini-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.sales-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f7;
}

.sales-tab {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #374151;
  background: transparent;
  font-weight: 800;
}

.sales-tab.active {
  color: #ffffff;
  background: var(--accent);
}

.sales-tab-panel {
  display: block;
}

.sales-property {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid #0f9f4d;
  border-radius: 8px;
  background: #fafafa;
}

.sales-property-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.sales-property-main strong,
.sales-property-main span {
  display: block;
}

.sales-property-main span,
.sales-age {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.sales-age {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  white-space: nowrap;
  font-weight: 800;
}

.sales-controls {
  display: grid;
  grid-template-columns: minmax(170px, 1.3fr) minmax(100px, 0.7fr) minmax(120px, 0.8fr) minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 10px;
}

.sales-controls label {
  font-size: 0.72rem;
}

.sales-controls input,
.sales-controls select {
  min-height: 38px;
  padding: 8px 10px;
}

.sales-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid #0f9f4d;
  border-radius: 8px;
  background: #fafafa;
}

.sales-item strong,
.sales-item span,
.sales-item small {
  display: block;
}

.sales-item span,
.sales-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.toolbar {
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.search-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 240px;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.search-wrap input {
  width: 100%;
  min-height: 40px;
  border: 0;
  outline: 0;
}

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.phone-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(180px, 1.1fr);
  gap: 10px;
}

.phone-grid select,
.phone-grid input {
  width: 100%;
}

.toolbar select {
  min-height: 42px;
  padding: 0 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 560px;
}

.table-panel,
.pipeline-panel {
  min-width: 0;
  padding: 18px;
}

.pipeline-panel {
  border-top: 1px solid var(--line);
  background: #fafafa;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.count-pill,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--surface-2);
}

.table-scroll {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

td {
  font-size: 0.9rem;
}

th:nth-child(1),
td:nth-child(1) {
  width: 24%;
}

th:nth-child(2),
td:nth-child(2) {
  width: 17%;
}

th:nth-child(3),
td:nth-child(3) {
  width: 12%;
}

th:nth-child(4),
td:nth-child(4) {
  width: 20%;
}

th:nth-child(5),
td:nth-child(5) {
  width: 27%;
}

.lead-title {
  display: grid;
  gap: 4px;
}

.lead-title strong {
  font-size: 0.95rem;
  line-height: 1.25;
}

.lead-title span,
.muted {
  color: var(--muted);
  font-size: 0.82rem;
}

.notes-cell {
  color: #374151;
  font-size: 0.86rem;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.notes-cell .muted {
  display: inline;
}

.notes-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 48px;
}

.notes-text {
  min-width: 0;
  flex: 1;
}

.status-Nuevo {
  color: #7a4a00;
  background: #fff3bf;
}

.status-Contactado {
  color: #1d4ed8;
  background: #dbeafe;
}

.status-Respondio {
  color: #991b1b;
  background: #fce7f3;
}

.status-Calificado {
  color: #6d28d9;
  background: #ede9fe;
}

.status-Reunion-agendada {
  color: #92400e;
  background: #ffedd5;
}

.status-Tasacion {
  color: #0f766e;
  background: #ccfbf1;
}

.status-Captado {
  color: #ffffff;
  background: #0f9f4d;
}

.status-No-calificado,
.status-Descartado {
  color: #ffffff;
  background: #dc2626;
}

.row-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  flex: 0 0 auto;
}

.whatsapp-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  min-height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid #21b15c;
  border-radius: 8px;
  color: #ffffff;
  background: #21b15c;
  text-decoration: none;
}

.whatsapp-button svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.whatsapp-button:hover {
  background: #178d49;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border-color: var(--line);
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.icon-button:hover {
  border-color: #b9c8d5;
}

.edit-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  min-height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #ffffff;
}

.edit-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.edit-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.pipeline-list {
  display: grid;
  grid-template-columns: repeat(9, minmax(210px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

@media (min-width: 1440px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .workspace:not(.only-leads):not(.only-pipeline) .pipeline-panel {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .pipeline-list {
    grid-template-columns: 1fr;
  }
}

.pipeline-column {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--stage-color, var(--accent));
  border-radius: 8px;
  background: #fafafa;
  min-height: 220px;
}

.pipeline-status-Nuevo {
  --stage-color: #f6c343;
}

.pipeline-status-Contactado {
  --stage-color: #3b82f6;
}

.pipeline-status-Respondio {
  --stage-color: #db2777;
}

.pipeline-status-Calificado {
  --stage-color: #7c3aed;
}

.pipeline-status-No-calificado,
.pipeline-status-Descartado {
  --stage-color: #dc2626;
}

.pipeline-status-Reunion-agendada {
  --stage-color: #f97316;
}

.pipeline-status-Tasacion {
  --stage-color: #14b8a6;
}

.pipeline-status-Captado {
  --stage-color: #0f9f4d;
}

.pipeline-column-head,
.lead-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pipeline-column-head small,
.lead-card small,
.lead-card p {
  color: var(--muted);
}

.pipeline-cards {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 120px;
  padding: 2px;
  border-radius: 8px;
}

.pipeline-cards.is-drop-target {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
  background: var(--accent-soft);
}

.pipeline-empty {
  padding: 18px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
  font-size: 0.85rem;
  text-align: center;
}

.lead-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--stage-color, var(--accent));
  border-radius: 8px;
  background: #ffffff;
  cursor: grab;
}

.lead-card:active {
  cursor: grabbing;
}

.lead-card.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
}

.lead-card-head strong {
  min-width: 0;
  font-size: 0.94rem;
}

.lead-card-head span {
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.lead-card p {
  margin: 0;
  font-size: 0.85rem;
}

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

.lead-card-actions .whatsapp-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
}

.lead-card-actions .whatsapp-button svg {
  width: 19px;
  height: 19px;
}

.lead-card-actions .edit-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
}

.lead-card-actions .edit-button svg {
  width: 17px;
  height: 17px;
}

.empty-state {
  display: none;
  padding: 44px 20px;
  color: var(--muted);
  text-align: center;
}

.admin-empty {
  display: block;
  padding: 22px 12px;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  margin-bottom: 8px;
  color: var(--text);
}

dialog {
  width: min(860px, calc(100vw - 24px));
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(11, 21, 31, 0.45);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

label {
  display: grid;
  gap: 7px;
  color: #344354;
  font-size: 0.84rem;
  font-weight: 800;
}

label input,
label select,
label textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  font-weight: 500;
}

textarea {
  resize: vertical;
}

.full-row {
  grid-column: 1 / -1;
}

.dialog-actions {
  justify-content: space-between;
  margin-top: 20px;
}

.dialog-actions > div {
  display: flex;
  gap: 10px;
}

@media (max-width: 1060px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    width: min(320px, 86vw);
    padding: 22px 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 22px 0 60px rgba(0, 0, 0, 0.45);
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 19;
    display: none;
    background: rgba(0, 0, 0, 0.55);
  }

  body.menu-open .mobile-menu-backdrop {
    display: block;
  }

  .sidebar .brand {
    min-width: 0;
  }

  .sidebar .brand-logo {
    width: 88px;
    height: 40px;
    padding: 6px;
  }

  .sidebar h1 {
    font-size: 1rem;
  }

  .nav-list {
    display: grid;
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .nav-section-label {
    margin: 12px 4px 2px;
  }

  .nav-divider {
    width: auto;
    height: 1px;
    margin: 10px 4px;
  }

  .nav-item {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    white-space: normal;
  }

  .nav-icon {
    width: 20px;
    height: 20px;
  }

  .sidebar-footer {
    display: block;
    margin-top: auto;
    padding: 14px;
  }

  .mobile-menu-button {
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    flex: 0 0 auto;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
  }

  .mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: #ffffff;
  }

  .topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    justify-content: stretch;
    gap: 16px;
  }

  .mobile-topbar-logo {
    display: block;
    width: 112px;
    height: 48px;
    object-fit: contain;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
  }

  .topbar-title {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 2px;
  }

  .mobile-menu-button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .topbar-actions {
    grid-column: 1 / -1;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .main {
    padding: 14px;
  }

  .topbar,
  .toolbar {
    align-items: stretch;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar-actions > * {
    justify-content: center;
  }

  .topbar-actions .primary-button {
    grid-column: 1 / -1;
  }

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

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

  .sales-item,
  .sales-property-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .sales-controls {
    grid-template-columns: 1fr;
  }

  .interested-form {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .table-scroll {
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  td {
    padding: 8px 0;
    border-bottom: 0;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .admin-grid,
  .settings-form,
  .admin-header {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}
