@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --bg: #f4f6fb;
  --bg-auth: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99, 102, 241, 0.18), transparent),
    radial-gradient(ellipse 60% 50% at 100% 50%, rgba(168, 85, 247, 0.1), transparent),
    #f8fafc;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);
  --sidebar-width: 260px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
  --success-soft: #ecfdf5;
  --success-text: #059669;
  --danger-soft: #fef2f2;
  --danger-text: #dc2626;
  --transition: 0.18s ease;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.auth-shell {
  background: var(--bg-auth);
}

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

a:hover {
  color: var(--accent-hover);
}

/* Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  padding: 1.25rem 0.875rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem 1.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.sidebar-brand:hover {
  color: var(--text);
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-link-custom {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}

.nav-link-custom i {
  font-size: 1.15rem;
  opacity: 0.75;
}

.nav-link-custom:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--text);
}

.nav-link-custom.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-link-custom.active i {
  opacity: 1;
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.btn-logout:hover {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
}

.app-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
}

.mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
}

/* Page header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.2;
}

.page-header .subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0.25rem 0 0;
}

.page-header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Cards */
.card,
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header,
.app-card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}

.card-body {
  padding: 0.875rem 1rem;
}

.card-footer {
  background: rgba(15, 23, 42, 0.02);
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
}

/* Detail page layout */
.detail-page {
  align-items: start;
}

.detail-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-stack > .card {
  margin-bottom: 0 !important;
}

.card-list-item {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
}

.card-list-item:last-child {
  border-bottom: none;
}

.detail-kv {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 1rem;
  margin: 0;
  font-size: 0.875rem;
}

.detail-kv dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 400;
}

.detail-kv dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}

.detail-kv-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.625rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--border);
}

.detail-kv-total-label {
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin: 0;
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.5rem;
}

.detail-specs-group {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.75rem;
  margin: 0;
  font-size: 0.8125rem;
}

.detail-specs-group dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 400;
}

.detail-specs-group dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}

.detail-notes {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.card-header-actions .btn-sm {
  padding: 0.25rem 0.5rem;
}

/* Property cards */
.property-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.property-card-image {
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  position: relative;
}

.property-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-card-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.property-card-body {
  padding: 1.125rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.property-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.property-card-title:hover {
  color: var(--accent);
}

.property-card-price {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.5rem 0;
}

.property-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.property-card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Filters bar */
.filters-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.filters-bar .form-control,
.filters-bar .form-select {
  min-width: 180px;
}

/* Buttons */
.btn {
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 1px 2px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-accent {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.btn-accent:hover {
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.btn-outline-secondary {
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.btn-outline-secondary:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
}

/* Forms */
.form-control,
.form-select {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.875rem;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

/* Address autocomplete (BAN) */
.address-autocomplete {
  position: relative;
}

.address-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1050;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
}

.address-suggestion-item {
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.address-suggestion-item strong {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.address-suggestion-item span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.address-suggestion-item:hover,
.address-suggestion-item.active {
  background: var(--accent-soft);
}

/* Loan calculator */
.loan-computed-fields {
  background: rgba(99, 102, 241, 0.06);
  border: 1px dashed rgba(99, 102, 241, 0.25);
}

/* Work list */
.work-list {
  display: flex;
  flex-direction: column;
}

.work-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--priority-color, #6c757d);
}

.work-item:last-child {
  border-bottom: none;
}

.work-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.work-item-actions {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex-shrink: 0;
}

.work-item-actions .btn-link {
  padding: 0.15rem 0.35rem;
  line-height: 1;
}

.work-priority-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.work-item-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.work-description,
.work-notes {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.work-description::before {
  content: "·";
  margin: 0 0.35rem;
  color: var(--border);
}

.work-notes {
  color: var(--text-secondary);
  font-style: italic;
}

.work-notes i {
  font-size: 0.7rem;
  margin-right: 0.2rem;
}

.work-notes::before {
  content: "·";
  margin: 0 0.35rem;
  color: var(--border);
  font-style: normal;
}

.work-price {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--text);
}

.visit-price {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.visit-comment {
  color: var(--text-muted);
  white-space: pre-wrap;
}

.visit-item-actions {
  display: flex;
  gap: 0.15rem;
  flex-shrink: 0;
}

.rent-advert-link {
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
}

.rent-advert-link:hover {
  text-decoration: underline;
}

.rent-advert-notes {
  color: var(--text-muted);
}

.rent-advert-actions {
  display: flex;
  gap: 0.15rem;
  flex-shrink: 0;
}

.loan-highlight {
  padding: 1rem;
  background: rgba(99, 102, 241, 0.06);
  border-radius: var(--radius);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.loan-max-amount {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.loan-details {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 1rem;
  row-gap: 0.3rem;
  margin: 0;
}

.loan-details dt,
.loan-details dd {
  margin: 0;
  padding: 0.15rem 0;
}

.loan-details dt {
  font-weight: 400;
}

.loan-details dd {
  font-weight: 500;
  text-align: right;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3em 0.75em;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.status-to_contact { background: #fef3c7; color: #b45309; }
.status-contacted { background: #dbeafe; color: #1d4ed8; }
.status-visited { background: #d1fae5; color: #047857; }
.status-abandoned { background: #f1f5f9; color: #64748b; }
.status-offer_made { background: #ede9fe; color: #6d28d9; }

.dpe-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  font-weight: 700;
  font-size: 0.8rem;
  color: #1e293b;
  border-radius: 6px;
  padding: 0.2rem 0.45rem;
}

.priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.5rem;
}

/* Kanban */
.kanban-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: thin;
}

.kanban-column {
  flex: 0 0 300px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  min-height: 420px;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.kanban-column-header h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-secondary);
}

.kanban-count {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.625rem;
  margin-bottom: 0.625rem;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.kanban-card-inner {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
}

.kanban-card-thumb {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.04);
}

.kanban-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kanban-card-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.kanban-card-content {
  flex: 1;
  min-width: 0;
}

.kanban-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

/* Map */
#map {
  height: 70vh;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  z-index: 1;
  overflow: hidden;
}

.map-dpe-marker {
  background: transparent;
  border: none;
}

.map-dpe-marker-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  border: 2px solid rgba(15, 23, 42, 0.82);
  box-shadow:
    0 0 0 2px #ffffff,
    0 2px 8px rgba(15, 23, 42, 0.45);
  box-sizing: border-box;
}

.map-dpe-marker-inner--unknown {
  font-size: 0.8rem;
  font-weight: 700;
}

.property-detail-map {
  height: 200px;
  width: 100%;
  z-index: 1;
}

.property-detail-map-card .leaflet-control-zoom {
  border: none;
  box-shadow: var(--shadow-sm);
}

.property-detail-map-card .leaflet-control-attribution {
  font-size: 0.65rem;
}

.nearby-station-item {
  padding: 0;
}

.nearby-station-item-divider {
  border-bottom: none;
}

/* Transit card */
.transit-card .card-header {
  border-bottom: none;
  padding-bottom: 0;
}

.transit-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem 0.5rem;
}

.transit-card-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.transit-card-title i {
  font-size: 0.9rem;
  opacity: 0.7;
}

.transit-card-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.btn-icon:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
}

.btn-icon-muted:hover {
  color: var(--text-secondary);
}

.btn-icon-accent {
  color: var(--accent);
}

.btn-icon-accent:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.btn-icon-danger {
  color: var(--text-muted);
}

.btn-icon-danger:hover {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.transit-station-list {
  border-top: 1px solid var(--border);
}

.transit-station-item {
  border-bottom: 1px solid var(--border);
}

.transit-station-item:last-child {
  border-bottom: none;
}

.transit-station-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem 0.625rem;
  align-items: start;
  padding: 0.625rem 0.75rem;
}

.transit-station-item:hover .transit-station-remove {
  opacity: 1;
}

.transit-station-lines {
  min-width: 1.35rem;
  padding-top: 0.125rem;
}

.transit-station-lines .idfm-lines {
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.transit-station-body {
  min-width: 0;
}

.transit-station-name {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25;
  color: var(--text);
}

.transit-station-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.transit-station-meta i {
  font-size: 0.8rem;
  opacity: 0.75;
}

.transit-station-remove {
  margin-top: 0.1rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.transit-station-empty {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.transit-station-lines .idfm-line--shape-circle .idfm-line__label {
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.65rem;
}

.transit-station-lines .idfm-line--shape-square .idfm-line__label {
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.12rem;
  font-size: 0.7rem;
}

.transit-station-lines .idfm-line--metro-10 .idfm-line__label,
.transit-station-lines .idfm-line--metro-11 .idfm-line__label,
.transit-station-lines .idfm-line--metro-12 .idfm-line__label,
.transit-station-lines .idfm-line--metro-13 .idfm-line__label,
.transit-station-lines .idfm-line--metro-14 .idfm-line__label,
.transit-station-lines .idfm-line--tram-t10 .idfm-line__label,
.transit-station-lines .idfm-line--tram-t11 .idfm-line__label,
.transit-station-lines .idfm-line--tram-t12 .idfm-line__label,
.transit-station-lines .idfm-line--tram-t13 .idfm-line__label,
.transit-station-lines .idfm-line--tram-t14 .idfm-line__label {
  min-width: 1.45rem;
}

@media (hover: none) {
  .transit-station-remove {
    opacity: 1;
  }
}

.nearby-station-name {
  font-weight: 500;
  font-size: 0.875rem;
  min-width: 0;
  line-height: 1.3;
}

.nearby-station-main .idfm-lines {
  flex-shrink: 0;
  gap: 0.2rem;
}

.nearby-station-main .idfm-line--shape-circle .idfm-line__label {
  width: 1.25rem;
  height: 1.25rem;
  font-size: 0.62rem;
}

.nearby-station-main .idfm-line--shape-square .idfm-line__label {
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.1rem;
  font-size: 0.68rem;
}

.nearby-station-main .idfm-line--metro-10 .idfm-line__label,
.nearby-station-main .idfm-line--metro-11 .idfm-line__label,
.nearby-station-main .idfm-line--metro-12 .idfm-line__label,
.nearby-station-main .idfm-line--metro-13 .idfm-line__label,
.nearby-station-main .idfm-line--metro-14 .idfm-line__label,
.nearby-station-main .idfm-line--tram-t10 .idfm-line__label,
.nearby-station-main .idfm-line--tram-t11 .idfm-line__label,
.nearby-station-main .idfm-line--tram-t12 .idfm-line__label,
.nearby-station-main .idfm-line--tram-t13 .idfm-line__label,
.nearby-station-main .idfm-line--tram-t14 .idfm-line__label {
  min-width: 1.35rem;
}

.nearby-station-walk {
  font-size: 0.8125rem;
}

.nearby-station-actions .btn-link {
  padding: 0.15rem 0.35rem;
  line-height: 1;
  color: var(--text-muted);
}

.nearby-station-actions .btn-link:hover {
  color: var(--danger-text);
}

.idfm-lines {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

/* Shared typography — Parisine-like sans */
.idfm-line,
.idfm-line__label {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  line-height: 1;
  box-sizing: border-box;
}

/* ── Line badges ── */

.idfm-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.idfm-line__label {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Metro : pastilles circulaires — élargies pour les numéros à 2 chiffres */
.idfm-line--shape-circle .idfm-line__label {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  font-size: 0.72rem;
  letter-spacing: -0.02em;
}

.idfm-line--metro-10 .idfm-line__label,
.idfm-line--metro-11 .idfm-line__label,
.idfm-line--metro-12 .idfm-line__label,
.idfm-line--metro-13 .idfm-line__label,
.idfm-line--metro-14 .idfm-line__label {
  width: auto;
  min-width: 1.55rem;
  padding: 0 0.15rem;
  border-radius: 999px;
}

/* RER / Transilien : carré coloré */
.idfm-line--shape-square .idfm-line__label {
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 0.15rem;
  border-radius: 4px;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

/* Metro lines */
.idfm-line--metro-1 .idfm-line__label { background: #ffbe00; color: #000; }
.idfm-line--metro-2 .idfm-line__label { background: #0055c8; color: #fff; }
.idfm-line--metro-3 .idfm-line__label { background: #6e6e00; color: #fff; }
.idfm-line--metro-3b .idfm-line__label { background: #82c8e6; color: #000; }
.idfm-line--metro-4 .idfm-line__label { background: #a0006e; color: #fff; }
.idfm-line--metro-5 .idfm-line__label { background: #ff5a00; color: #000; }
.idfm-line--metro-6 .idfm-line__label { background: #82dc73; color: #000; }
.idfm-line--metro-7 .idfm-line__label { background: #ff82b4; color: #000; }
.idfm-line--metro-7b .idfm-line__label { background: #82dc73; color: #000; }
.idfm-line--metro-8 .idfm-line__label { background: #d282be; color: #000; }
.idfm-line--metro-9 .idfm-line__label { background: #d2d200; color: #000; }
.idfm-line--metro-10 .idfm-line__label { background: #dc9600; color: #000; }
.idfm-line--metro-11 .idfm-line__label { background: #6e491e; color: #fff; }
.idfm-line--metro-12 .idfm-line__label { background: #00643c; color: #fff; }
.idfm-line--metro-13 .idfm-line__label { background: #82c8e6; color: #000; }
.idfm-line--metro-14 .idfm-line__label { background: #640082; color: #fff; }

/* RER lines */
.idfm-line--rer-a .idfm-line__label { background: #eb2132; color: #fff; }
.idfm-line--rer-b .idfm-line__label { background: #5091cb; color: #fff; }
.idfm-line--rer-c .idfm-line__label { background: #ffcc30; color: #000; }
.idfm-line--rer-d .idfm-line__label { background: #008b5b; color: #fff; }
.idfm-line--rer-e .idfm-line__label { background: #b94e9a; color: #fff; }

/* Tram lines */
.idfm-line--tram-t1 .idfm-line__label { background: #0055c8; color: #fff; }
.idfm-line--tram-t2 .idfm-line__label { background: #a0006e; color: #fff; }
.idfm-line--tram-t3a .idfm-line__label { background: #ff5a00; color: #000; }
.idfm-line--tram-t3b .idfm-line__label { background: #00643c; color: #fff; }
.idfm-line--tram-t4 .idfm-line__label { background: #dc9600; color: #000; }
.idfm-line--tram-t5 .idfm-line__label { background: #640082; color: #fff; }
.idfm-line--tram-t6 .idfm-line__label { background: #ff0000; color: #fff; }
.idfm-line--tram-t7 .idfm-line__label { background: #6e491e; color: #fff; }
.idfm-line--tram-t8 .idfm-line__label { background: #6e6e00; color: #fff; }
.idfm-line--tram-t9 .idfm-line__label { background: #3c91dc; color: #fff; }
.idfm-line--tram-t10 .idfm-line__label { background: #6e6e00; color: #fff; }
.idfm-line--tram-t11 .idfm-line__label { background: #ff5a00; color: #000; }
.idfm-line--tram-t12 .idfm-line__label { background: #a50034; color: #fff; }
.idfm-line--tram-t13 .idfm-line__label { background: #8d653d; color: #fff; }
.idfm-line--tram-t14 .idfm-line__label { background: #00a092; color: #fff; }

.idfm-line--tram-t10 .idfm-line__label,
.idfm-line--tram-t11 .idfm-line__label,
.idfm-line--tram-t12 .idfm-line__label,
.idfm-line--tram-t13 .idfm-line__label,
.idfm-line--tram-t14 .idfm-line__label {
  min-width: 1.55rem;
}

/* Transilien lines */
.idfm-line--transilien-h .idfm-line__label { background: #84653d; color: #fff; }
.idfm-line--transilien-j .idfm-line__label { background: #cec73d; color: #000; }
.idfm-line--transilien-k .idfm-line__label { background: #9b9842; color: #fff; }
.idfm-line--transilien-l .idfm-line__label { background: #c4a4cc; color: #000; }
.idfm-line--transilien-n .idfm-line__label { background: #00b297; color: #fff; }
.idfm-line--transilien-p .idfm-line__label { background: #f58f53; color: #000; }
.idfm-line--transilien-r .idfm-line__label { background: #f49fb3; color: #000; }
.idfm-line--transilien-u .idfm-line__label { background: #b6134c; color: #fff; }
.idfm-line--transilien-v .idfm-line__label { background: #94c11f; color: #000; }

.idfm-line--fallback .idfm-line__label {
  background: #64748b;
  color: #fff;
}

.transit-stop-search {
  position: relative;
}

.transit-stop-search .address-suggestions {
  position: absolute;
  z-index: 1056;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 0.375rem;
  box-shadow: var(--shadow-sm);
  margin-top: 0.25rem;
}

/* Gallery */
.property-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.5rem;
  max-height: 28rem;
  overflow-y: auto;
  padding: 0.25rem;
  scrollbar-gutter: stable;
}

.property-gallery-thumb {
  display: block;
  border: none;
  padding: 0;
  background: var(--surface-muted, #f1f5f9);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 1;
  position: relative;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.property-gallery-thumb.is-pending {
  background: linear-gradient(
    110deg,
    var(--surface-muted, #f1f5f9) 8%,
    #e8edf3 18%,
    var(--surface-muted, #f1f5f9) 33%
  );
  background-size: 200% 100%;
  animation: gallery-shimmer 1.4s linear infinite;
}

@keyframes gallery-shimmer {
  to {
    background-position-x: -200%;
  }
}

.property-gallery-thumb:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.property-gallery-thumb.is-active {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.property-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.property-gallery-thumb-img.is-pending {
  opacity: 0;
}

.photo-lightbox-modal .modal-content {
  overflow: hidden;
}

.photo-lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(70vh, 720px);
  background: #0f172a;
  padding: 1rem 3.5rem;
  position: relative;
}

.photo-lightbox-loader {
  position: absolute;
  z-index: 1;
}

.photo-lightbox-image {
  max-width: 100%;
  max-height: min(70vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.photo-lightbox-image.is-loading-full {
  filter: blur(12px);
  opacity: 0.85;
  transform: scale(1.02);
}

.photo-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.15s ease;
}

.photo-lightbox-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.04);
}

.photo-lightbox-prev {
  left: 0.75rem;
}

.photo-lightbox-next {
  right: 0.75rem;
}

.photo-lightbox-caption:empty,
.photo-lightbox-caption[hidden] {
  display: none;
}

@media (max-width: 575.98px) {
  .property-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    max-height: 22rem;
  }

  .photo-lightbox-stage {
    min-height: 50vh;
    padding: 0.75rem 2.75rem;
  }

  .photo-lightbox-nav {
    width: 2rem;
    height: 2rem;
  }
}

/* Financing */
.financing-ok,
.financing-ko {
  border-left: none;
}

.financing-ok {
  background: var(--success-soft);
}

.financing-ko {
  background: var(--danger-soft);
}

.financing-margin {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Auth */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
}

.auth-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-brand .brand-icon {
  margin: 0 auto 1rem;
  width: 48px;
  height: 48px;
  font-size: 1.35rem;
}

.auth-brand h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}

.auth-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.35rem 0 0;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.empty-state--compact {
  padding: 0.875rem 1rem;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 0;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.empty-state h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Alerts */
.alert {
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.alert-success { background: var(--success-soft); color: var(--success-text); }
.alert-error,
.alert-danger { background: var(--danger-soft); color: var(--danger-text); }
.alert-info { background: #eff6ff; color: #1d4ed8; }

/* Tables */
.table {
  font-size: 0.9rem;
}

.table > :not(caption) > * > * {
  border-color: var(--border);
  padding: 0.75rem 1rem;
}

.compare-table {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Compare */
.compare-picker-card .card-body {
  padding: 1rem;
}

.compare-slots {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
}

.compare-slot {
  padding: 0.75rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.02);
  min-height: 3.5rem;
}

.compare-slot.is-filled {
  border-style: solid;
  border-color: var(--accent-soft);
  background: var(--accent-soft);
}

.compare-slot-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.compare-vs-badge,
.compare-hero-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.compare-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.compare-picker-item {
  position: relative;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.compare-picker-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.compare-picker-item.is-a {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.compare-picker-item.is-b {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
}

.compare-picker-item.is-a.is-b {
  border-color: #8b5cf6;
}

.compare-picker-thumb {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-muted, #f1f5f9);
}

.compare-picker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-picker-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-muted);
}

.compare-picker-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.compare-picker-body strong {
  font-size: 0.875rem;
}

.compare-picker-meta,
.compare-picker-price {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.compare-picker-price {
  color: var(--text);
  font-weight: 600;
}

.compare-picker-badge {
  position: absolute;
  top: 0.4rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
}

.compare-picker-badge-a {
  right: 0.4rem;
  background: #6366f1;
}

.compare-picker-badge-b {
  right: 1.85rem;
  background: #0ea5e9;
}

.compare-picker-item.is-a .compare-picker-badge-a,
.compare-picker-item.is-b .compare-picker-badge-b {
  display: flex;
}

.compare-hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: stretch;
}

.compare-property-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  height: 100%;
}

.compare-property-card-a {
  border-top: 3px solid #6366f1;
}

.compare-property-card-b {
  border-top: 3px solid #0ea5e9;
}

.compare-property-image {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--surface-muted, #f1f5f9);
}

.compare-property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-property-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 1.5rem;
}

.compare-property-body {
  padding: 1rem 1.1rem 1.15rem;
}

.compare-side-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.compare-property-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.compare-property-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.compare-total {
  color: var(--accent);
}

.compare-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.1fr) 2fr;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.compare-row:last-child {
  border-bottom: none;
}

.compare-row-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.compare-row-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.compare-row-value {
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.03);
  font-size: 0.875rem;
  text-align: center;
}

.compare-row-a {
  border-left: 3px solid #6366f1;
}

.compare-row-b {
  border-left: 3px solid #0ea5e9;
}

.compare-row-value.is-better {
  background: rgba(34, 197, 94, 0.12);
  font-weight: 600;
}

.compare-row-value.is-worse {
  opacity: 0.72;
}

.compare-group-label {
  padding: 0.55rem 1rem;
  background: rgba(15, 23, 42, 0.04);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 991.98px) {
  .compare-hero,
  .compare-slots {
    grid-template-columns: 1fr;
  }

  .compare-hero-vs,
  .compare-vs-badge {
    margin: 0 auto;
  }

  .compare-row {
    grid-template-columns: 1fr;
  }
}

/* Pagination */
.pagination .page-link {
  border-color: var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  margin: 0 0.15rem;
}

.pagination .page-link:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--accent);
}

/* Stat pills */
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.budget-highlight {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin: 0;
  line-height: 1.2;
}

/* Mobile */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-lg);
  }

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

  .app-main {
    margin-left: 0;
  }

  .mobile-topbar {
    display: flex;
  }

  .detail-specs {
    grid-template-columns: 1fr;
  }

  .app-content {
    padding: 1.25rem 1rem 2rem;
  }

  .page-header h1 {
    font-size: 1.4rem;
  }
}

@media (max-width: 575.98px) {
  .filters-bar {
    flex-direction: column;
  }

  .filters-bar .form-control,
  .filters-bar .form-select {
    min-width: 100%;
  }
}

/* Completeness badges */
.completeness-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.completeness-badge--high {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
}

.completeness-badge--mid {
  background: rgba(234, 179, 8, 0.16);
  color: #a16207;
}

.completeness-badge--low {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.completeness-badge--warn {
  background: rgba(237, 106, 0, 0.12);
  color: #c2410c;
}

.property-card-badges {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  z-index: 2;
}

.property-card-image {
  position: relative;
}

.property-card-image::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3.5rem;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.45), transparent);
  pointer-events: none;
  z-index: 1;
}

.property-card-badges .completeness-badge--overlay {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.28rem 0.55rem;
  letter-spacing: 0.01em;
  color: #fff;
}

.property-card-badges .completeness-badge--overlay.completeness-badge--high {
  background: rgba(22, 163, 74, 0.94);
}

.property-card-badges .completeness-badge--overlay.completeness-badge--mid {
  background: rgba(202, 138, 4, 0.94);
  color: #fff;
}

.property-card-badges .completeness-badge--overlay.completeness-badge--low {
  background: rgba(220, 38, 38, 0.94);
}

.property-card-badges .completeness-badge--overlay .bi {
  font-size: 0.62rem;
  opacity: 0.92;
}

.whatif-result {
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.whatif-ok {
  background: rgba(34, 197, 94, 0.1);
}

.whatif-ko {
  background: rgba(239, 68, 68, 0.08);
}

.filters-bar--extended {
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.whatif-ok {
  background: rgba(34, 197, 94, 0.1);
}

.whatif-ko {
  background: rgba(239, 68, 68, 0.08);
}

.filters-bar--extended {
  flex-wrap: wrap;
}

.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Dashboard */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.dashboard-kpi {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), border-color var(--transition);
}

a.dashboard-kpi:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.dashboard-kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.dashboard-kpi-icon--budget {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.dashboard-kpi-icon--warn {
  background: rgba(234, 179, 8, 0.14);
  color: #a16207;
}

.dashboard-kpi-icon--calendar {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.dashboard-kpi-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-kpi-value {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.dashboard-kpi-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

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

.dashboard-primary,
.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-sidebar .card-body {
  max-height: none;
}

.pipeline-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pipeline-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.45rem 0.2rem 0.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  background: rgba(15, 23, 42, 0.02);
  transition: background var(--transition);
}

.pipeline-pill:hover {
  background: rgba(15, 23, 42, 0.05);
  color: inherit;
}

.pipeline-pill-count {
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 1.25rem;
  text-align: center;
  color: var(--text-secondary);
}

.pipeline-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr 1.5rem;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

.pipeline-row:last-child {
  margin-bottom: 0;
}

.pipeline-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-bar-track {
  height: 0.45rem;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.pipeline-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  min-width: 2px;
}

.pipeline-count {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: right;
  color: var(--text-secondary);
}

.dashboard-property-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}

.dashboard-property-row:last-child {
  border-bottom: none;
}

.dashboard-property-row:hover {
  background: rgba(15, 23, 42, 0.02);
  color: inherit;
}

.dashboard-property-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.04);
  flex-shrink: 0;
}

.dashboard-property-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dashboard-property-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-muted);
}

.dashboard-property-main {
  min-width: 0;
}

.dashboard-property-side {
  text-align: right;
  flex-shrink: 0;
}

.dashboard-budget-range {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  text-align: center;
}

.dashboard-budget-item {
  padding: 0.5rem 0.35rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.03);
}

.dashboard-budget-item--highlight {
  background: var(--accent-soft);
}

.dashboard-budget-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.dashboard-budget-value {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-finance-list {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.dashboard-finance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.dashboard-finance-row:last-child {
  margin-bottom: 0;
}

.dashboard-agenda-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}

.dashboard-agenda-row:last-child {
  border-bottom: none;
}

.dashboard-agenda-row:hover {
  background: rgba(15, 23, 42, 0.02);
  color: inherit;
}

.dashboard-agenda-row--offer {
  justify-content: space-between;
}

.dashboard-agenda-date {
  flex-shrink: 0;
  width: 2.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.dashboard-agenda-label {
  min-width: 0;
  font-size: 0.82rem;
}

.dashboard-incomplete-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem;
}

.dashboard-incomplete-chip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.dashboard-incomplete-chip:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.dashboard-incomplete-ref {
  font-size: 0.82rem;
  font-weight: 600;
}

.dashboard-incomplete-missing {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.detail-kv--compact dt,
.detail-kv--compact dd {
  font-size: 0.85rem;
}

@media (max-width: 991.98px) {
  .dashboard-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

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

  .dashboard-budget-range {
    grid-template-columns: 1fr;
  }

  .dashboard-property-row {
    grid-template-columns: 44px 1fr;
  }

  .dashboard-property-side {
    grid-column: 2;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: -0.25rem;
  }

  .dashboard-property-side .d-block {
    display: inline !important;
  }
}

/* Kanban drag */
.kanban-card[draggable="true"] {
  cursor: grab;
}

.kanban-card.kanban-dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.kanban-column.kanban-drop-target {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
  border-radius: var(--radius);
}

.kanban-cards {
  min-height: 3rem;
}
