/* ===== Design Tokens ===== */
:root {
  /* Brand green, sampled from static/logo.png's checkmark + "Track" wordmark (#34c77b) */
  --primary-hue: 149;
  --primary-sat: 59%;
  --primary-light: 49%;
  --theme-primary: hsl(var(--primary-hue), var(--primary-sat), var(--primary-light));
  --theme-primary-hover: hsl(var(--primary-hue), var(--primary-sat), calc(var(--primary-light) - 8%));
  --theme-primary-light: hsl(var(--primary-hue), var(--primary-sat), 96%);
  --theme-primary-glow: hsla(var(--primary-hue), var(--primary-sat), var(--primary-light), 0.15);

  /* Brand navy, sampled from static/icon.png's tile background (#16233b / #21375d) */
  --brand-navy: #16233b;
  --brand-navy-light: #21375d;
  --brand-cream: #f6f1e7;

  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --bg-app: #f7f9fb;
  --bg-card: rgba(255,255,255,0.92);
  --border-color: rgba(210,220,230,0.8);
  --text-main: #0f1b2a;
  --text-muted: #64748b;
  --shadow-sm: 0 2px 8px rgba(15,27,42,0.04);
  --shadow-md: 0 8px 30px rgba(15,27,42,0.08);

  --color-green: #10b981;
  --color-blue: #3b82f6;
  --color-purple: #8b5cf6;
  --color-red: #ef4444;
  --color-orange: #f97316;
  --color-amber: #f59e0b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-app: #0b1420;
    --bg-card: rgba(20,30,45,0.9);
    --border-color: rgba(255,255,255,0.08);
    --text-main: #eef2f7;
    --text-muted: #94a3b8;
    --theme-primary-light: hsla(var(--primary-hue), var(--primary-sat), var(--primary-light), 0.18);
  }
}
:root[data-theme="dark"] {
  --bg-app: #0b1420;
  --bg-card: rgba(20,30,45,0.9);
  --border-color: rgba(255,255,255,0.08);
  --text-main: #eef2f7;
  --text-muted: #94a3b8;
  --theme-primary-light: hsla(var(--primary-hue), var(--primary-sat), var(--primary-light), 0.18);
}
:root[data-theme="light"] {
  --bg-app: #f7f9fb;
  --bg-card: rgba(255,255,255,0.92);
  --border-color: rgba(210,220,230,0.8);
  --text-main: #0f1b2a;
  --text-muted: #64748b;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-app);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ===== Buttons ===== */
.btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}
.btn-primary { background: var(--theme-primary); color: #fff; }
.btn-primary:hover { background: var(--theme-primary-hover); }
.btn:disabled { background: var(--border-color); color: var(--text-muted); cursor: not-allowed; }
.btn:disabled:hover { background: var(--border-color); }
.btn-secondary { background: var(--bg-card); color: var(--text-main); border-color: var(--border-color); }
.btn-secondary:hover { background: var(--theme-primary-light); border-color: var(--theme-primary); }
.btn-block { width: 100%; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-color);
  background: var(--bg-card); color: var(--text-main); display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--theme-primary-light); color: var(--theme-primary); }
.row-icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border-color);
  background: var(--bg-card); display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem;
}

/* ===== Forms ===== */
.form-group { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="datetime-local"], select, textarea {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-app);
  color: var(--text-main);
  font-size: 0.9rem;
}
textarea { resize: vertical; }
.search-input { width: 100%; margin-bottom: 12px; }
.search-box {
  display: flex; align-items: center; gap: 8px; background: var(--bg-app); border: 1px solid var(--border-color);
  border-radius: 12px; padding: 0 12px; margin-bottom: 12px; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-box:focus-within { border-color: var(--theme-primary); box-shadow: 0 0 0 3px var(--theme-primary-glow); }
.search-box i { color: var(--text-muted); font-size: 0.85rem; }
.search-box .search-input { border: none; background: transparent; margin-bottom: 0; padding: 10px 0; }
.search-box .search-input:focus { outline: none; }

.tenant-filter-chips { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tenant-filter-chip {
  border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-muted);
  padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.tenant-filter-chip:hover { border-color: var(--theme-primary); color: var(--theme-primary); }
.tenant-filter-chip.active { background: var(--theme-primary); border-color: var(--theme-primary); color: #fff; }

/* ===== Login ===== */
.login-overlay {
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 480px at 12% -10%, hsla(var(--primary-hue), var(--primary-sat), 55%, 0.35), transparent 60%),
    radial-gradient(700px 420px at 100% 110%, hsla(var(--primary-hue), var(--primary-sat), 45%, 0.22), transparent 55%),
    linear-gradient(135deg, var(--brand-navy-light), var(--brand-navy));
  display: flex; align-items: center; justify-content: center; z-index: 500; padding: 20px;
}
.login-card {
  background: var(--bg-card); border-radius: 18px; padding: 36px; width: 100%; max-width: 380px;
  box-shadow: var(--shadow-md);
}
.login-brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; margin-bottom: 10px; }
.login-sub { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 20px; }
.login-hint { font-size: 0.75rem; color: var(--text-muted); text-align: center; margin-top: 10px; }
.login-divider-block { margin-top: 18px; }
.login-divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 0.78rem; margin-bottom: 14px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-color); }
.login-google-btn { display: flex; justify-content: center; }

/* ===== Brand mark (logo) ===== */
.brand-mark { height: 30px; width: 30px; border-radius: 8px; display: block; }
.login-brand .brand-mark { height: 46px; width: 46px; border-radius: 12px; }
.brand-tenan { color: var(--text-main); }
.brand-track { color: var(--theme-primary); }

/* ===== Header / Nav ===== */
.app-container { display: flex; flex-direction: column; height: 100vh; }
.app-header {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 20px;
  border-bottom: 1px solid var(--border-color); background: var(--bg-card);
  position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.sim-time-badge {
  font-family: var(--font-mono); font-size: 0.72rem; background: var(--theme-primary-light);
  color: var(--theme-primary); padding: 5px 10px; border-radius: 20px;
}
.app-main { flex: 1; overflow-y: auto; padding: 20px; padding-bottom: 90px; max-width: 1100px; margin: 0 auto; width: 100%; scrollbar-width: none; -ms-overflow-style: none; }
.app-main::-webkit-scrollbar { display: none; }
.app-nav {
  position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--bg-card);
  border-top: 1px solid var(--border-color); z-index: 50; backdrop-filter: blur(12px);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}
.nav-item {
  flex: 1; border: none; background: none; padding: 10px 4px; display: flex; flex-direction: column;
  align-items: center; gap: 4px; color: var(--text-muted); font-size: 0.68rem; font-weight: 600;
  transition: color 0.15s ease, transform 0.15s ease;
}
.nav-item i { font-size: 1.05rem; transition: transform 0.15s ease; }
.nav-item.active { color: var(--theme-primary); }
.nav-item.active i { transform: translateY(-2px); }

.tab-pane { display: none; }
.tab-pane.active { display: block; animation: tab-fade-in 0.22s ease; }
@keyframes tab-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .tab-pane.active { animation: none; }
  .nav-item, .nav-item i { transition: none; }
  .modal-card { animation: none; }
  .property-card, .unit-chip.is-clickable, .tenant-list-item, .kpi-card { transition: none; }
}
.pane-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.section-hint { color: var(--text-muted); font-size: 0.83rem; margin: 6px 0 14px; }

/* ===== Cards ===== */
.card {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px;
  padding: 20px; box-shadow: var(--shadow-sm);
}

/* ===== KPI cards (icon-badge summary tiles) ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi-card {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 16px;
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.kpi-icon.color-green { background: hsla(150,60%,45%,0.15); color: #0a7548; }
.kpi-icon.color-blue { background: hsla(220,70%,55%,0.15); color: #1d4ed8; }
.kpi-icon.color-purple { background: hsla(262,70%,60%,0.15); color: #6d28d9; }
.kpi-icon.color-red { background: hsla(0,80%,60%,0.15); color: #b91c1c; }
.kpi-icon.color-orange { background: hsla(30,90%,55%,0.15); color: #b45309; }
.kpi-info { min-width: 0; display: flex; flex-direction: column; }
.kpi-info .kpi-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 0.03em; }
.kpi-info h3 { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700; margin: 2px 0; }
.kpi-info .kpi-sub { font-size: 0.72rem; color: var(--text-muted); }

/* ===== Portfolio ===== */
.usage-banner {
  background: var(--theme-primary-light); color: var(--theme-primary); padding: 10px 14px;
  border-radius: 10px; font-size: 0.82rem; margin-bottom: 14px; font-weight: 600;
}
.usage-banner.hidden { display: none; }
.portfolio-list { display: flex; flex-direction: column; gap: 16px; }
.property-card {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.property-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.property-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.property-card-header h3 { font-size: 1.05rem; }
.property-card-header .property-address { color: var(--text-muted); font-size: 0.8rem; margin-top: 2px; }
.units-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.unit-chip {
  border: 1px solid var(--border-color); border-radius: 10px; padding: 12px; background: var(--bg-app);
}
.unit-chip.is-clickable { cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.unit-chip.is-clickable:hover { border-color: var(--theme-primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.unit-chip-due { border-color: var(--color-red); background: hsla(0,80%,55%,0.07); }
.unit-due-badge {
  display: inline-flex; align-items: center; gap: 5px; background: var(--color-red); color: #fff;
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 3px 8px; border-radius: 20px; margin-bottom: 8px;
}
.unit-chip .unit-label { font-weight: 700; font-size: 0.92rem; }
.unit-chip .unit-meta { font-size: 0.75rem; color: var(--text-muted); margin: 4px 0 8px; }
.status-pill { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.status-pill.vacant { background: hsla(38,90%,50%,0.15); color: #b45309; }
.status-pill.occupied { background: hsla(150,60%,40%,0.15); color: #0a7548; }
.status-pill.paid { background: hsla(150,60%,40%,0.15); color: #0a7548; }
.status-pill.pending { background: hsla(38,90%,50%,0.15); color: #b45309; }
.status-pill.partially_paid { background: hsla(220,70%,50%,0.15); color: #1d4ed8; }
.status-pill.late { background: hsla(0,80%,55%,0.15); color: #b91c1c; }
.add-unit-link { display: block; margin-top: 10px; font-size: 0.8rem; color: var(--theme-primary); font-weight: 600; }
.empty-portfolio { text-align: center; color: var(--text-muted); padding: 40px 20px; }

/* ===== Tenants directory + ledger ===== */
.directory-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.directory-list-panel { position: sticky; top: 0; }
.tenant-list { display: flex; flex-direction: column; gap: 8px; max-height: 70vh; overflow-y: auto; }
.tenant-list-item {
  border: 1px solid var(--border-color); border-radius: 12px; padding: 12px; background: var(--bg-card); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  display: flex; align-items: flex-start; gap: 10px;
}
.tenant-list-item:hover { transform: translateX(2px); box-shadow: var(--shadow-sm); }
.tenant-list-item:hover, .tenant-list-item.selected { border-color: var(--theme-primary); background: var(--theme-primary-light); }
.tenant-list-item-due { border-color: var(--color-red); background: hsla(0,80%,55%,0.07); }
.tenant-list-item-due:hover, .tenant-list-item-due.selected { border-color: var(--color-red); background: hsla(0,80%,55%,0.12); }
.tenant-list-item .t-info { min-width: 0; flex: 1; }
.tenant-list-item .unit-due-badge { margin-bottom: 6px; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--theme-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display);
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.avatar.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }
.tenant-list-item .t-name { font-weight: 700; font-size: 0.92rem; }
.tenant-list-item .t-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.tenant-list-item .t-balance { font-size: 0.78rem; font-weight: 700; margin-top: 4px; }

.profile-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; min-height: 300px; }
.profile-card.empty-state { display: flex; align-items: center; justify-content: center; }
.empty-prompt { text-align: center; color: var(--text-muted); }
.empty-prompt i { font-size: 2rem; margin-bottom: 10px; display: block; }

.profile-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.profile-header h2 { font-size: 1.2rem; }
.profile-header .profile-meta { color: var(--text-muted); font-size: 0.82rem; margin-top: 4px; }
.profile-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.kpi-box { border: 1px solid var(--border-color); border-radius: 10px; padding: 12px; text-align: center; background: var(--bg-app); }
.kpi-box .kpi-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.kpi-box .kpi-value { font-size: 1.15rem; font-weight: 800; margin-top: 4px; }

.lease-card { border: 1px solid var(--border-color); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.lease-card-summary { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.lease-card-summary h4 { font-size: 0.98rem; }
.lease-card-summary .lease-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }
.lease-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.charges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.charge-card-item {
  border: 1px solid var(--border-color); border-radius: 10px; padding: 10px; background: var(--bg-app);
  display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem;
}
.charge-card-item .cc-period { font-weight: 700; }
.charge-card-item .cc-amount { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 700; }
.charge-card-item .cc-due { color: var(--text-muted); }
.charge-card-item .cc-action { margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.charge-card-item.is-paid { opacity: 0.75; }
.charge-card-item.is-late { border-color: var(--color-red); }

/* ===== Lease Setup ===== */
.lease-setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; margin-bottom: 20px; }
.preview-stats { display: flex; gap: 20px; margin-bottom: 14px; }
.preview-stats div { display: flex; flex-direction: column; }
.preview-stats span { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.preview-stats strong { font-size: 1.1rem; font-family: var(--font-mono); }
.schedule-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.schedule-table th, .schedule-table td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--border-color); }
.schedule-table tbody { display: block; max-height: 340px; overflow-y: auto; }
.schedule-table thead, .schedule-table tbody tr { display: table; width: 100%; table-layout: fixed; }

/* ===== Register / Reminders table ===== */
.register-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; }
.register-table th { text-align: left; padding: 10px 12px; background: var(--theme-primary-light); color: var(--theme-primary); font-size: 0.72rem; text-transform: uppercase; }
.register-table td { padding: 10px 12px; border-top: 1px solid var(--border-color); }

/* ===== Reports ===== */
.report-export-card { max-width: 480px; }

/* ===== Billing ===== */
.usage-bar { height: 10px; border-radius: 20px; background: var(--border-color); overflow: hidden; margin-top: 10px; }
.usage-bar-fill { height: 100%; background: var(--theme-primary); border-radius: 20px; transition: width 0.3s ease; }
.pricing-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.modal-body .pricing-cards { grid-template-columns: 1fr; margin-bottom: 18px; }
.pricing-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 20px; text-align: center; }
.pricing-card.current { border-color: var(--theme-primary); box-shadow: 0 0 0 2px var(--theme-primary-glow); }
.pricing-card .price { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; margin: 8px 0; }
.pricing-card .price span { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.pricing-card p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 14px; }

/* ===== Modals ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,15,25,0.55); display: flex; align-items: center;
  justify-content: center; z-index: 400; padding: 16px;
}
.modal-card {
  background: var(--bg-card); border-radius: 16px; width: 100%; max-width: 480px; max-height: 88vh;
  overflow-y: auto; box-shadow: var(--shadow-md); animation: modal-scale-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modal-scale-in {
  from { transform: scale(0.94) translateY(8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border-color); }
.modal-header h2 { font-size: 1.1rem; }
.modal-body { padding: 18px 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border-color); }
.modal-section-title { font-size: 0.88rem; margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--border-color); }
.modal-section-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.confirm-card { max-width: 400px; }
.pay-summary { background: var(--bg-app); border-radius: 10px; padding: 12px; margin-bottom: 14px; font-size: 0.85rem; }
.pay-summary div { display: flex; justify-content: space-between; padding: 3px 0; }

/* ===== Global loader ===== */
.global-loader-overlay {
  position: fixed; inset: 0; background: rgba(247,249,251,0.7); display: flex; align-items: center;
  justify-content: center; z-index: 600;
}
.loader-spinner {
  width: 40px; height: 40px; border: 4px solid var(--theme-primary-light); border-top-color: var(--theme-primary);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Scroll to top ===== */
.scroll-top-btn {
  position: fixed; right: 18px; bottom: 90px; width: 44px; height: 44px; border-radius: 50%; border: none;
  background: var(--theme-primary); color: #fff; font-size: 1rem; box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 95;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.scroll-top-btn:hover { background: var(--theme-primary-hover); transform: translateY(-2px); }
.scroll-top-btn.hidden { display: none; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text-main); color: var(--bg-app); padding: 12px 20px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600; opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 700;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.text-danger { background: var(--color-red); color: #fff; }
.toast.text-success { background: var(--color-green); color: #fff; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .directory-layout { grid-template-columns: 1fr; }
  .directory-list-panel { position: static; }
  .lease-setup-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .pricing-cards { grid-template-columns: 1fr; }
  .profile-kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .app-main { padding: 14px; padding-bottom: 90px; }
}

@media (max-width: 640px) {
  .register-table thead { display: none; }
  .register-table, .register-table tbody, .register-table tr, .register-table td { display: block; width: 100%; }
  .register-table { border-collapse: separate; border: none; background: none; }
  .register-table tr { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
  .register-table td { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: none; text-align: right; }
  .register-table td::before { content: attr(data-label); flex-shrink: 0; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); text-align: left; }
  .register-table td[data-label="Message"] { flex-direction: column; align-items: flex-start; text-align: left; }
  .register-table td[data-label="Message"]::before { margin-bottom: 4px; }
  .register-table td.section-hint { display: block; text-align: center; padding: 16px 0; }
  .register-table td.section-hint::before { content: none; }
}
