.pinBadge {
  color: #fff !important;
}

:root {
  --bg: #0e1220;
  --panel: #141a2a;
  --panel-2: #19223a;
  --text: #e8edf7;
  --muted: #a8b3cf;
  --brand: #6ea8fe;
  --good: #1db954;
  --okay: #f5c542;
  --bad: #ef4444;
  --great: #22c55e;
  --chip: #223157;
  --border: #223052;
  --coc-bg: rgba(110, 168, 254, .08);
  --cap-bg: rgba(34, 197, 94, .08);
  /* reserved */
  --prop-min-h: 220px;
  /* JS can override for compact mode */
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif
}

a {
  color: var(--brand);
  text-decoration: none
}

a:hover {
  text-decoration: underline
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px
}

.container.full {
  min-height: 100vh;
  display: flex;
  flex-direction: column
}

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

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

.logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #89b4ff);
  box-shadow: 0 8px 20px rgba(110, 168, 254, .2)
}

.brand h1 {
  font-size: 20px;
  margin: 0;
  font-family: "Plus Jakarta Sans", Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 600;
}

.nav {
  display: flex;
  gap: 10px
}

.nav a,
.btn {
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 16px;
  color: var(--text);
  font-weight: 600;
  font-family: "Plus Jakarta Sans", Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px
}

.btn.primary {
  background: linear-gradient(180deg, #2a3c6a, var(--panel-2));
  border-color: #2b3a60
}

.btn.ghost {
  background: transparent;
  border: 1px dashed var(--border)
}

.btn.btn-danger {
  background: var(--bad);
  border-color: var(--bad);
  color: #fff;
}

.btn:disabled,
.btn.btn-danger:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px
}

.grid {
  display: grid;
  gap: 16px
}

.grid.one {
  grid-template-columns: 1fr
}

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

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr))
}

@media (max-width:1100px) {

  .grid.one,
  .grid.two,
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr
  }
}

.section-title {
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 6px 0 10px
}

h2 {
  margin: 0 0 12px;
  font-size: 18px
}

.input {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.input label {
  font-size: 13px;
  color: var(--muted)
}

.input input,
.input select,
.input textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1.5px solid #4a7fcf;
  background: linear-gradient(90deg, var(--panel-2) 80%, #223157 100%);
  color: var(--text);
  outline: none;
  font-size: 14px;
  font-family: "Montserrat", Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 2px 8px rgba(74, 127, 207, 0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input input:focus,
.input select:focus,
.input textarea:focus {
  border-color: #6ea8fe;
  box-shadow: 0 0 0 2px #6ea8fe33;
}

.input select {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%236ea8fe" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="10" fill="%23223157"/><path d="M5.516 7.548a.75.75 0 0 1 1.06 0L10 10.972l3.424-3.424a.75.75 0 1 1 1.06 1.06l-3.954 3.954a.75.75 0 0 1-1.06 0L5.516 8.608a.75.75 0 0 1 0-1.06z" fill="%236ea8fe"/></svg>');
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 28px 28px;
  padding-right: 48px;
  border: 2px solid #6ea8fe;
  background-blend-mode: lighten;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #6ea8fe;
  box-shadow: 0 2px 12px rgba(110,168,254,0.10);
}

#moduleFilter {
  background: #1b2237;
  border: 2px solid #476ea8;
  color: #eaeaea; 
  font-weight: 700;
  font-size: 17px;
  font-family: "Plus Jakarta Sans", Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 12px rgba(110,168,254,0.10);
  padding-left: 22px;
  padding-right: 48px;
  border-radius: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  padding: 8px 8px;
}
#moduleFilter:focus {
  border-color: #89b4ff;
  box-shadow: 0 0 0 2px #89b4ff33;
}

#moduleFilter option {
  background: #1b2237;
  color: #6ea8fe;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  border-radius: 16px;
  padding: 10px 22px;
}

#exportSelect {
  background: #1b2237;
  border: 2px solid #476ea8;
  color: #eaeaea; 
  font-weight: 700;
  font-size: 17px;
  font-family: "Plus Jakarta Sans", Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 12px rgba(110,168,254,0.10);
  padding-left: 22px;
  padding-right: 48px;
  border-radius: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  padding: 8px 8px;
}
#exportSelect:focus {
  border-color: #89b4ff;
  box-shadow: 0 0 0 2px #89b4ff33;
}

#exportSelect option {
  background: #1b2237;
  color: #6ea8fe;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  border-radius: 16px;
  padding: 10px 22px;
}

.input input[type="search"],
#searchBox {
  background: #1b2237;
  border: 1.5px solid #4a7fcf;
  border-radius: 16px;
  font-size: 16px;
  font-family: "Plus Jakarta Sans", Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(74, 127, 207, 0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
  padding: 16px 12px;
}

.input input[type="search"]:focus,
#searchBox:focus {
  border-color: #6ea8fe;
  box-shadow: 0 0 0 2px #6ea8fe33;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap
}

/* Larger, better-aligned checkboxes (Catalogue) */
.selectBox {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  accent-color: #89b4ff;
  margin: 0;
  vertical-align: middle;
}


.kpi-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}


/* Required-field highlight when hovering a KPI pill — label text only, no border */
.highlight-required label {
  color: #e8d5b0;
  transition: color 0.15s;
}

.kpi,
.kpi-badges .badge {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
  font-weight: 600;
  font-size: 16px;
}

.kpi .value {
  font-variant-numeric: tabular-nums;
}

.kpi.great {
  background: rgba(34, 197, 94, .12);
  border-color: rgba(34, 197, 94, .3)
}

.kpi.good {
  background: rgba(29, 185, 84, .1);
  border-color: rgba(29, 185, 84, .3)
}

.kpi.okay {
  background: rgba(245, 197, 66, .1);
  border-color: rgba(245, 197, 66, .3)
}

.kpi.bad {
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .3)
}

.kpi.na {
  background: rgba(168, 179, 207, .08);
  border-color: rgba(168, 179, 207, .2)
}

.kpi-panel {
  position: sticky;
  top: 18px
}

.small {
  font-size: 12px;
  color: var(--muted)
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0
}

/* Toggle */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px
}

.toggle input {
  display: none
}

.toggle .pill {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  position: relative;
  transition: .2s;
}

.toggle .pill::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--text);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: .2s;
}

.toggle input:checked+.pill {
  background: #2b3a60
}

.toggle input:checked+.pill::after {
  transform: translateX(20px)
}

/* Table & badges */
.table {
  width: 100%;
  border-collapse: collapse
}

.table th,
.table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px
}

.badge {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--chip);
  font-weight: 700;
  font-size: 12px
}

.badge.great {
  background: rgba(34, 197, 94, .12);
  border-color: rgba(34, 197, 94, .3)
}

.badge.good {
  background: rgba(29, 185, 84, .1);
  border-color: rgba(29, 185, 84, .3)
}

.badge.okay {
  background: rgba(245, 197, 66, .1);
  border-color: rgba(245, 197, 66, .3)
}

.badge.bad {
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .3)
}

.badge.na {
  background: rgba(168, 179, 207, .08);
  border-color: rgba(168, 179, 207, .2)
}

/* Hero */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px
}

.hero-title {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: .02em;
  text-align: center
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center
}

.big-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  height: 64px;
  padding: 0 22px;
  border-radius: 16px;
  background: linear-gradient(180deg, #2a3c6a, var(--panel-2));
  border: 1px solid #2b3a60;
  color: var(--text);
  font-weight: 900;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(110, 168, 254, .15);
}

.big-btn:hover {
  text-decoration: none;
  transform: translateY(-1px)
}

.big-btn.ghost {
  background: transparent;
  border: 1px dashed var(--border);
  box-shadow: none
}

/* Better wide utilization for content pages */
.container>.grid.two {
  grid-template-columns: 1.2fr .8fr
}

@media (max-width:1100px) {
  .container>.grid.two {
    grid-template-columns: 1fr
  }
}

/* Suggested rent grouping — unified color, lighter weight headings, more spacing */
.group-head {
  margin-top: 6px;
  margin-bottom: 6px;
  font-weight: 600;
  /* semi-bold */
  font-size: 13px;
  color: var(--muted);
}

.group-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 14px;
  /* slightly increased spacing */
  background: var(--coc-bg);
  /* same color for both groups */
}

/* Address emphasis (Catalogue) */
.addr-head {
  font-family: "Plus Jakarta Sans", Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 600;
  /* SemiBold */
  font-size: 28px;
  letter-spacing: .2px;
}

/* Property card sizing (Catalogue) */
.property-card {
  min-height: var(--prop-min-h);
}

body.compact .property-card {
  padding: 14px;
  min-height: var(--prop-min-h);
}

body.compact .addr-head {
  font-size: 24px;
  font-weight: 600
}

body.compact .table th,
body.compact .table td {
  padding: 8px
}

/* ===== Toasts ===== */
.toast-root {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none
}

.toast {
  min-width: 320px;
  max-width: 560px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
  pointer-events: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.toast .title {
  font-weight: 700
}

.toast.info {
  border-color: #375493
}

.toast.success {
  border-color: #1f8f4d
}

.toast.warn {
  border-color: #b38a2c
}

.toast.error {
  border-color: #b23a3a
}

/* ===== Modal Confirm ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 22, .6);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9998
}

.modal {
  width: min(520px, 90vw);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5)
}

.modal h3 {
  margin: 0 0 8px 0;
  font-size: 18px
}

.modal p {
  margin: 0 0 14px 0;
  color: var(--muted)
}

.modal .actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end
}

.modal .btn.primary {
  background: linear-gradient(180deg, #2a3c6a, var(--panel-2));
  border-color: #2b3a60
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 18px;
  flex-shrink: 0;
}

.modal-icon.archive {
  background: rgba(245, 197, 66, .12);
  color: var(--okay);
}

.modal-icon.erase {
  background: rgba(239, 68, 68, .12);
  color: var(--bad);
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.modal-field input,
.modal-field select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: linear-gradient(90deg, var(--panel-2) 80%, #223157 100%);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.modal-field input:focus,
.modal-field select:focus {
  border-color: #6ea8fe;
  box-shadow: 0 0 0 2px #6ea8fe33;
}

.modal-field select {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%236ea8fe" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="10" fill="%23223157"/><path d="M5.516 7.548a.75.75 0 0 1 1.06 0L10 10.972l3.424-3.424a.75.75 0 1 1 1.06 1.06l-3.954 3.954a.75.75 0 0 1-1.06 0L5.516 8.608a.75.75 0 0 1 0-1.06z" fill="%236ea8fe"/></svg>');
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 22px 22px;
  padding-right: 40px;
}

.modal-field .char-count {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}

.modal-field-error {
  font-size: 12px;
  color: var(--bad);
  display: none;
}

.modal-field.has-error input {
  border-color: var(--bad);
}

.modal-field.has-error .modal-field-error {
  display: block;
}

.modal-address {
  font-weight: 700;
  color: var(--text);
}

.btn.btn-archive {
  background: rgba(245, 197, 66, .12);
  border-color: rgba(245, 197, 66, .3);
  color: var(--okay);
}

.btn.btn-archive:hover {
  background: rgba(245, 197, 66, .2);
}

.btn.btn-archive:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.modal .btn.btn-archive-submit {
  background: var(--okay);
  border-color: var(--okay);
  color: #1a1206;
}

/* ── Themed dropdown (replaces native <select> popup, which can't be restyled) ── */
.styled-dropdown {
  position: relative;
}

.styled-dropdown-toggle {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: linear-gradient(90deg, var(--panel-2) 80%, #223157 100%);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

.styled-dropdown-toggle:focus {
  border-color: #6ea8fe;
  box-shadow: 0 0 0 2px #6ea8fe33;
}

.styled-dropdown-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 14px;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  background: url('data:image/svg+xml;utf8,<svg fill="%236ea8fe" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="10" fill="%23223157"/><path d="M5.516 7.548a.75.75 0 0 1 1.06 0L10 10.972l3.424-3.424a.75.75 0 1 1 1.06 1.06l-3.954 3.954a.75.75 0 0 1-1.06 0L5.516 8.608a.75.75 0 0 1 0-1.06z" fill="%236ea8fe"/></svg>') no-repeat center;
  background-size: 22px 22px;
  pointer-events: none;
}

.styled-dropdown-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--panel-2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  max-height: 220px;
  overflow-y: auto;
  z-index: 10001;
  display: none;
}

.styled-dropdown.open .styled-dropdown-list {
  display: block;
}

.styled-dropdown-option {
  padding: 9px 14px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.styled-dropdown-option:hover {
  background: rgba(110, 168, 254, .15);
}

.styled-dropdown-option.selected {
  background: rgba(110, 168, 254, .1);
  color: var(--brand);
  font-weight: 600;
}

/* ── Role badge (nav) — shared across all pages ─────────────────────────────── */
.role-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--chip);
  color: var(--brand);
}
.role-badge.investor {
  background: rgba(245, 197, 66, .12);
  color: var(--okay);
}
.role-badge:empty {
  display: none;
}

