/* ============================================================================
   Bento Grid Layout & Interactive Component Styles
   ============================================================================ */

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

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px 24px;
}

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

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-primary), #3b3be0);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--accent-primary-glow);
}

.brand-logo svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}

.brand-title h1 {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-title p {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-telemetry {
  display: flex;
  gap: 16px;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.telemetry-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.telemetry-val {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-cyber);
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
}

.card-body {
  padding: 20px 22px;
}

/* Form Controls & Sliders */
.form-group {
  margin-bottom: 18px;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: var(--text-xs);
}

.form-label {
  color: var(--text-secondary);
}

.form-val-display {
  font-weight: 600;
  color: var(--text-primary);
}

input[type="range"] {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-primary-glow);
  transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Opportunity Selector List */
.opportunity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.opp-item {
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.opp-item:hover, .opp-item.active {
  background: rgba(92, 92, 252, 0.08);
  border-color: rgba(92, 92, 252, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.opp-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.opp-name {
  font-size: var(--text-sm);
  font-weight: 600;
}

.opp-submarket {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.opp-price-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
}

/* 3D Spatial Canvas */
#spatial-canvas-container {
  width: 100%;
  height: 320px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(92, 92, 252, 0.08) 0%, transparent 70%);
}

#spatial-canvas-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.canvas-overlay-stats {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.stat-chip {
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(12px);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--text-xs);
}

/* Conviction Verdict Big Display */
.verdict-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  text-align: center;
}

.verdict-badge-large {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 10px 28px;
  border-radius: 30px;
  margin-bottom: 12px;
  display: inline-block;
}

.verdict-rationale-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 440px;
  line-height: 1.5;
}

/* Metric Pill Grid */
.metric-pill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.metric-pill {
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-pill-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 4px;
}

.metric-pill-val {
  font-size: var(--text-lg);
  font-weight: 700;
}

/* Mobility Arbitrage Card Details */
.mobility-gain-box {
  background: linear-gradient(135deg, rgba(0, 245, 155, 0.08), rgba(92, 92, 252, 0.08));
  border: 1px solid rgba(0, 245, 155, 0.25);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.mobility-gain-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.mobility-gain-val {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--accent-cyber);
}

/* Responsive Grid Placement */
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

@media (max-width: 1280px) {
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8 {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-12 {
    grid-column: span 1;
  }
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .header-telemetry {
    width: 100%;
    justify-content: space-between;
  }
}

/* ============================================================================
   Vector Map & DDA GIS Integration
   ============================================================================ */
#vector-map-container {
  width: 100%;
  height: 340px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-map-marker {
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-pin-outer {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(92, 92, 252, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-ring 2s infinite;
}

.marker-pin-inner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #5c5cfc;
  box-shadow: 0 0 10px #5c5cfc;
  border: 2px solid #ffffff;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(92, 92, 252, 0.6); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 12px rgba(92, 92, 252, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(92, 92, 252, 0); }
}

.map-popup-card {
  font-family: var(--font-sans);
  color: #111;
  padding: 4px;
}

.map-popup-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}

.map-popup-sub {
  font-size: 11px;
  color: #666;
}

.map-popup-price {
  font-weight: 700;
  color: #3b3be0;
  margin: 4px 0;
  font-size: 12px;
}

.map-popup-dda {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  color: #444;
  background: #f4f5f8;
  padding: 4px 6px;
  border-radius: 4px;
  margin-top: 4px;
}

.btn-dda-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #030303;
  color: #00f59b !important;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-dda-link:hover {
  opacity: 0.85;
}

/* ============================================================================
   Mortgage 3-Year Reset & Set-Off Advisor
   ============================================================================ */
.mortgage-reset-alert {
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.35);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.mortgage-alert-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reinvest-vs-prepay-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.advisory-option-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px;
}

.advisory-option-card.highlight {
  border-color: rgba(0, 245, 155, 0.4);
  background: rgba(0, 245, 155, 0.04);
}

/* ============================================================================
   Multi-Asset Comparison Table (Real Estate vs Gold vs Silver)
   ============================================================================ */
.asset-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-xs);
  margin-top: 10px;
}

.asset-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.asset-table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.asset-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Rich Ad Specifications Drawer */
.ad-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.ad-spec-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 8px 10px;
}

.ad-spec-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.ad-spec-val {
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================================
   Verified Ad Buttons
   ============================================================================ */
.btn-verified-ad {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(92, 92, 252, 0.12);
  border: 1px solid rgba(92, 92, 252, 0.4);
  color: #7b7bfc !important;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-verified-ad:hover {
  background: rgba(92, 92, 252, 0.25);
  border-color: #5c5cfc;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* ============================================================================
   Savings Accounts Portfolio
   ============================================================================ */
.savings-account-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  margin-bottom: 6px;
}

.savings-bank-info {
  display: flex;
  flex-direction: column;
}

.savings-bank-name {
  font-weight: 600;
  font-size: 12px;
}

.savings-account-label {
  font-size: 10px;
  color: var(--text-muted);
}

.savings-yield-pill {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 245, 155, 0.1);
  color: var(--accent-cyber);
  font-weight: 600;
}

/* ============================================================================
   Existing Property Portfolio Asset Inputs & Strategies
   ============================================================================ */
.unit-toggle-group {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 2px;
  gap: 2px;
}

.unit-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.unit-toggle-btn.active {
  background: var(--accent-primary);
  color: #fff;
}

.form-input-dark {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input-dark:focus {
  border-color: var(--accent-primary);
}

.prop-val-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.prop-strategy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.prop-strategy-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.prop-strategy-card.featured {
  border-color: rgba(0, 245, 155, 0.35);
  background: rgba(0, 245, 155, 0.03);
}

/* ============================================================================
   Project & Location Intelligence Search & Dubai Benchmark
   ============================================================================ */
.project-search-container {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.project-search-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}

.project-search-input:focus {
  border-color: var(--accent-primary);
}

.btn-search-project {
  background: var(--accent-primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-search-project:hover {
  opacity: 0.9;
}

.benchmark-delta-positive {
  color: var(--accent-cyber);
  font-weight: 600;
}

.benchmark-delta-neutral {
  color: var(--text-secondary);
}

.benchmark-delta-negative {
  color: var(--accent-risk);
  font-weight: 600;
}

