/* =========================================================
   InmoPro — App Shell (authenticated pages)
   ========================================================= */

/* Google Fonts — Space Grotesk replaces Playfair Display */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg: #08131E;
  --surface: #161f32;
  --surface-2: #1a293d;
  --border: #243650;
  --border-alt: #415A77;
  --gold: #DFBE67;
  --gold-light: #EDD07A;
  --gold-bg: rgba(223, 190, 103, 0.10);
  --gold-border: rgba(223, 190, 103, 0.28);
  --text: #E0E1DD;
  --text-2: #778DA9;
  --text-3: #415A77;
  --green: #1ED87A;
  --green-bg: rgba(22, 163, 74, 0.12);
  --yellow: #ca8a04;
  --yellow-bg: rgba(202, 138, 4, 0.12);
  --red: #dc2626;
  --red-bg: rgba(220, 38, 38, 0.12);
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --nav-h: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(rgba(201,168,76,0.055) 1px, transparent 1px);
  background-size: 26px 26px;
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
}

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

/* ── NAV ──────────────────────────────────────────────────── */
/* Only the main app shell nav (the one containing .nav-logo) gets fixed positioning */
nav:has(.nav-logo) {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  z-index: 100;
  line-height: 1.6;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin-right: 28px;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-link {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 6px 13px;
  border-radius: 7px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: var(--text);
  background: var(--border);
}

.nav-link.active {
  color: var(--gold);
  background: var(--gold-bg);
}

/* ── + CREAR DROPDOWN ─────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  background: none;
  border: none;
  font-family: var(--font-sans);
  cursor: pointer;
  padding: 9px 13px;
  /* inherits .nav-link styles via class */
}

.nav-dd-arrow {
  width: 12px !important;
  height: 12px !important;
  vertical-align: -1px !important;
  transition: transform 0.18s;
}

.nav-dropdown.open .nav-dd-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 190px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  z-index: 200;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  flex-direction: column;
  gap: 2px;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 7px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-dropdown-item:hover {
  color: var(--text);
  background: var(--border);
}

.nav-dropdown-item.active {
  color: var(--gold);
  background: var(--gold-bg);
}

.nav-dropdown-item .lucide,
.nav-dropdown-item i[data-lucide] {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-user-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  padding: 6px 13px;
  border-radius: 7px;
  transition: color 0.2s, background 0.2s;
}

.nav-user-link:hover .nav-user {
  color: var(--text);
}

.nav-user-link:hover {
  color: #f0f0f0;
  background: #243650;
}

.nav-user-link--active .nav-avatar {
  border-color: var(--gold);
  background: var(--gold-bg);
}

.nav-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  overflow: hidden;
  flex-shrink: 0;
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: none;
}

.nav-user {
  font-size: 0.82rem;
  color: var(--text-2);
  white-space: nowrap;
}

.nav-user strong {
  color: var(--text);
}

.btn-logout {
  background: none;
  border: 1px solid #243650;
  color: #778DA9;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  padding: 8px 13px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-logout i,
.btn-logout svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.btn-logout:hover {
  color: #f0f0f0;
  background-color: #243650;
}

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border-alt);
  color: var(--text-2);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color .2s, border-color .2s;
}

.hamburger:hover {
  color: var(--text);
  border-color: var(--text-3);
}

/* ── Lucide icon sizing ───────────────────────────────────── */
.lucide,
i[data-lucide] {
  display: inline-block;
  width: 16px;
  height: 16px;
  stroke-width: 2;
  vertical-align: -2px;
  flex-shrink: 0;
}

.hamburger .lucide,
.hamburger i[data-lucide] {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
}

.tab-btn .lucide,
.tab-btn i[data-lucide] {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.btn-logout .lucide,
.btn-logout i[data-lucide] {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.btn-primary .lucide,
.btn-primary i[data-lucide],
.btn-outline .lucide,
.btn-outline i[data-lucide],
.btn-danger .lucide,
.btn-danger i[data-lucide] {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
}

.section-title .lucide,
.section-title i[data-lucide] {
  width: 15px;
  height: 15px;
  vertical-align: -3px;
}

.btn-new .lucide,
.btn-new i[data-lucide] {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
}

.stat-card-icon .lucide,
.stat-card-icon i[data-lucide] {
  width: 52px;
  height: 52px;
  stroke-width: 1.2;
  vertical-align: 0;
}

.mrr-icon .lucide,
.mrr-icon i[data-lucide] {
  width: 110px;
  height: 110px;
  stroke-width: 0.8;
  vertical-align: 0;
}

/* ── MAIN LAYOUT ─────────────────────────────────────────── */
main {
  padding: calc(var(--nav-h) + 32px) 28px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── PAGE HEADER ──────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-top: 4px;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-new,
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #08131E;
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn-new:hover,
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border-alt);
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.btn-outline:hover {
  color: var(--text);
  border-color: var(--text-3);
  background: var(--surface-2);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #f87171;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn-danger:hover {
  background: var(--red-bg);
  border-color: rgba(220, 38, 38, 0.7);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border-alt);
  border-radius: 7px;
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.btn-icon i,
.btn-icon svg {
  width: 16px;
  height: 16px;
  line-height: 2;
}

.btn-icon:hover {
  color: var(--gold);
  border-color: var(--gold-border);
  background: var(--gold-bg);
}

.btn-icon.danger:hover {
  color: #f87171;
  border-color: rgba(220, 38, 38, 0.5);
  background: var(--red-bg);
}

/* ── STAT CARDS ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.stat-card-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  opacity: 0.08;
  pointer-events: none;
  line-height: 0;
}

/* Card color variants */
.stat-card.c-gold {
  --cv: #DFBE67;
  --ca: rgba(223, 190, 103, 0.25);
  --cb: rgba(223, 190, 103, 0.50);
}

.stat-card.c-purple {
  --cv: #A78BFA;
  --ca: rgba(167, 139, 250, 0.25);
  --cb: rgba(167, 139, 250, 0.30);
}

.stat-card.c-green {
  --cv: #34D399;
  --ca: rgba(52, 211, 153, 0.25);
  --cb: rgba(52, 211, 153, 0.30);
}

.stat-card.c-cyan {
  --cv: #48a6fd;
  --ca: rgba(72, 166, 253, 0.25);
  --cb: rgba(72, 166, 253, 0.30);
}

.stat-card.c-fuchsia {
  --cv: #F472B6;
  --ca: rgba(244, 114, 182, 0.25);
  --cb: rgba(244, 114, 182, 0.30);
}

.stat-card.c-gold,
.stat-card.c-purple,
.stat-card.c-green,
.stat-card.c-cyan,
.stat-card.c-fuchsia {
  border-color: var(--cb);
  background: linear-gradient(140deg, var(--ca) 0%, var(--surface) 65%);
}

.stat-card.c-gold .stat-value,
.stat-card.c-purple .stat-value,
.stat-card.c-green .stat-value,
.stat-card.c-cyan .stat-value,
.stat-card.c-fuchsia .stat-value {
  color: var(--cv);
}

.stat-card.c-gold .stat-card-icon,
.stat-card.c-purple .stat-card-icon,
.stat-card.c-green .stat-card-icon,
.stat-card.c-cyan .stat-card-icon,
.stat-card.c-fuchsia .stat-card-icon {
  color: var(--cv);
  opacity: 0.13;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.stat-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 6px;
  line-height: 1;
  font-family: var(--font-heading);
}

.stat-value.gold {
  color: var(--gold);
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--text-2);
  margin-top: 5px;
}

/* MRR Card */
.mrr-card {
  background: linear-gradient(140deg, rgba(236, 142, 66, 0.25) 0%, var(--surface) 65%);
  border: 1px solid rgba(236, 142, 66, 0.50);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 28px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

.mrr-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  opacity: 0.06;
  line-height: 0;
  pointer-events: none;
}

.mrr-main {
  flex: 1;
}

.mrr-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-2);
  margin-bottom: 6px;
}

.mrr-value {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.mrr-sub {
  font-size: 0.82rem;
  color: var(--text-2);
  margin-top: 6px;
}

.mrr-plans {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 240px;
}

.mrr-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
}

.mrr-plan-name {
  color: var(--text-2);
}

.mrr-plan-count {
  font-size: 0.75rem;
  color: var(--text-3);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 20px;
}

.mrr-plan-amount {
  font-weight: 600;
  color: var(--gold);
  font-size: 0.9rem;
}

/* ── TOOLBAR ─────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}

.search-wrap svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-alt);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.87rem;
  padding: 9px 12px 9px 36px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--gold);
}

.search-input::placeholder {
  color: var(--text-3);
}

.filter-select {
  background: var(--surface);
  border: 1px solid var(--border-alt);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.87rem;
  padding: 9px 32px 9px 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.2s;
}

.filter-select:focus {
  border-color: var(--gold);
}

/* ── TABLE ───────────────────────────────────────────────── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead tr {
  border-bottom: 1px solid var(--border);
}

th {
  text-align: left;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 13px 16px;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: pointer;
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--surface-2);
}

tbody tr.expanded {
  background: var(--surface-2);
}

td {
  padding: 14px 16px;
  font-size: 0.88rem;
  vertical-align: middle;
}

/* ── BADGES ──────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: capitalize;
}

.badge-active {
  background: var(--green-bg);
  color: #4ade80;
}

.badge-trial {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

.badge-suspended {
  background: rgba(220, 38, 38, 0.12);
  color: #f87171;
}

.badge-cancelled {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
}

.badge-draft {
  background: var(--border);
  color: var(--text-2);
}

.badge-archived {
  background: var(--border);
  color: var(--text-3);
}

.badge-ready {
  background: var(--yellow-bg);
  color: #fbbf24;
}

.badge-published {
  background: var(--green-bg);
  color: #4ade80;
}

.badge-failed {
  background: var(--red-bg);
  color: #f87171;
}

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border-alt);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-wide {
  max-width: 680px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
}

/* ── FORM FIELDS (in modals/panels) ─────────────────────── */
.field {
  margin-bottom: 16px;
}

.field label,
.field-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-alt);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(223, 190, 103, 0.10);
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23DFBE67' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.field select option {
  background: var(--surface);
  color: var(--text);
}

/* ── SECTION TITLE ───────────────────────────────────────── */
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── TABS ────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.tab-panel {
  display: none;
}

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

/* ── EMPTY / LOADING STATES ──────────────────────────────── */
.loading-row td,
.empty-row td {
  text-align: center;
  color: var(--text-2);
  padding: 48px 16px;
  font-size: 0.9rem;
}

.loading-row td::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-alt);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 10px;
}

/* ── PAGINATION ──────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.83rem;
  color: var(--text-2);
}

.pagination-btns {
  display: flex;
  gap: 6px;
}

.page-btn {
  background: none;
  border: 1px solid var(--border-alt);
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.page-btn:hover:not(:disabled) {
  color: var(--gold);
  border-color: var(--gold-border);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── TOP TENANTS TABLE ───────────────────────────────────── */
.top-tenants-table {
  width: 100%;
  border-collapse: collapse;
}

.top-tenants-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
}

.top-tenants-table td {
  padding: 12px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}

.top-tenants-table tr:last-child td {
  border-bottom: none;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  nav {
    padding: 0 16px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 16px;
    gap: 4px;
    z-index: 99;
  }

  .nav-links.mob-open {
    display: flex;
  }

  .nav-user {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Flatten dropdown inside mobile menu */
  .nav-dropdown {
    position: static;
  }

  .nav-dropdown-menu {
    display: flex;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 0 10px;
    gap: 2px;
  }

  .nav-dd-arrow {
    display: none !important;
  }

  main {
    padding: calc(var(--nav-h) + 20px) 16px 32px;
  }

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

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

  .mrr-card {
    flex-direction: column;
    gap: 16px;
  }

  .mrr-plans {
    min-width: unset;
    width: 100%;
  }

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

  .search-wrap {
    max-width: 100%;
  }
}

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

  .tabs {
    overflow-x: auto;
  }
}

/* ── Site Footer — fixed al fondo de la ventana ─────────────────────────── */
body {
  padding-bottom: 50px;
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 15px 24px;
}

.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-2);
  font-family: var(--font-sans);
}

.site-footer-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-footer-nav a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer-nav a:hover {
  color: var(--gold);
}

.site-footer-nav .sep {
  opacity: 0.4;
  user-select: none;
}

@media (max-width: 500px) {
  .site-footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}