/* ─── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --green:       #4ec7ba;
  --green-dark:  #2f9f98;
  --green-glow:  rgba(78, 199, 186, 0.2);
  --navy:        #eaf5f7;
  --navy-mid:    #ffffff;
  --navy-light:  #f1f9fa;
  --navy-border: #d4e6ea;
  --text-primary:   #1a3d48;
  --text-secondary: #547684;
  --text-muted:     #7f9ea9;
  --bg:          #f6fcfd;
  --card-bg:     #ffffff;
  --radius:      14px;
  --radius-sm:   8px;
  --transition:  0.18s ease;
}

html { height: 100%; }

body {
  min-height: 100vh;
  display: flex;
  background:
    radial-gradient(circle at 82% 12%, rgba(78, 199, 186, 0.14) 0, rgba(78, 199, 186, 0) 38%),
    radial-gradient(circle at 18% 88%, rgba(89, 196, 219, 0.12) 0, rgba(89, 196, 219, 0) 42%),
    var(--bg);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

/* ─── Sidebar ───────────────────────────────────────────────────── */
.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--navy-mid);
  border-right: 1px solid var(--navy-border);
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 28px;
  border-bottom: 1px solid var(--navy-border);
  margin-bottom: 20px;
}

.logo-text {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-text em {
  color: var(--green);
  font-style: italic;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.75;
}

.nav-item:hover {
  background: var(--navy-light);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--green-glow);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.nav-item.active svg {
  opacity: 1;
}

.sidebar-footer {
  padding-top: 20px;
  border-top: 1px solid var(--navy-border);
}

.sidebar-badge {
  display: inline-block;
  background: var(--navy-light);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid var(--navy-border);
}

/* ─── Main ──────────────────────────────────────────────────────── */
.main {
  flex: 1;
  padding: 40px 40px 60px;
  overflow-y: auto;
}

/* ─── Page Header ───────────────────────────────────────────────── */
.page-header {
  margin-bottom: 36px;
  animation: fadeUp 0.5s ease both;
}

.header-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
}

.page-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 38px;
  line-height: 1.15;
  color: var(--text-primary);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.accent-text {
  color: var(--green);
  font-style: italic;
}

.header-sub {
  color: var(--text-secondary);
  font-size: 14.5px;
  max-width: 460px;
}

/* ─── Workspace ─────────────────────────────────────────────────── */
.workspace {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 22px;
  align-items: start;
  animation: fadeUp 0.55s 0.08s ease both;
}

/* ─── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(57, 114, 126, 0.08);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--navy-border);
}

.card-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.card-icon {
  width: 18px;
  height: 18px;
  color: var(--green);
  flex-shrink: 0;
}

/* ─── Filters Card ──────────────────────────────────────────────── */
.filters-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Location select */
.field-group label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}

.field-group label svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.field-group select {
  width: 100%;
  background: var(--navy-light);
  border: 1px solid var(--navy-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238494b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field-group select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

/* Sliders grid */
.sliders-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.slider-label span:first-child {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.slider-value {
  font-size: 13px;
  font-weight: 700;
  color: #22615a;
  background: rgb(56 195 180 / 20%);
  padding: 2px 8px;
  border-radius: 20px;
  min-width: 38px;
  text-align: center;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--navy-border);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  transition: background var(--transition);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--card-bg);
  box-shadow: 0 0 0 2px var(--green-glow), 0 2px 6px rgba(47, 111, 121, 0.28);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 0 4px var(--green-glow);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--card-bg);
  cursor: pointer;
}

/* Predict button */
.btn-predict {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--green);
  color: #0f3f45;
  font-family: 'DM Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  padding: 13px 20px;
  border: none;
  border-radius: var(--radius-sm);
  width: 100%;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 6px 16px rgba(78, 199, 186, 0.34);
}

.btn-predict svg {
  width: 16px;
  height: 16px;
}

.btn-predict:hover {
  background: #72d7cd;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(78, 199, 186, 0.4);
}

.btn-predict:active {
  transform: translateY(0);
}

/* ─── Result Card ───────────────────────────────────────────────── */
.result-card {
  min-height: 520px;
}

.result-body {
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

/* Empty state */
.result-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon-wrap {
  width: 72px;
  height: 72px;
  background: var(--navy-light);
  border: 1px solid var(--navy-border);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-icon-wrap svg {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
}

.result-empty p {
  font-size: 13.5px;
  max-width: 200px;
  line-height: 1.5;
}

/* Price result */
.result-price-wrap {
  animation: fadeUp 0.4s ease both;
}

.price-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.price-value {
  font-family: 'DM Serif Display', serif;
  font-size: 54px;
  letter-spacing: -0.03em;
  color: #2d8b81;
  line-height: 1;
  margin-bottom: 12px;
  text-shadow: 0 0 30px rgba(78, 199, 186, 0.26);
}

.price-range {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.price-range-item {
  font-size: 13px;
  color: var(--text-secondary);
}

.price-range-item span {
  color: var(--text-primary);
  font-weight: 600;
}

.price-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* Summary tags */
.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.result-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--navy-light);
  border: 1px solid var(--navy-border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.result-tag strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ─── Animations ────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--navy-border); border-radius: 6px; }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .sidebar {
    width: 200px;
  }
  .page-header h1 {
    font-size: 28px;
  }
}

@media (max-width: 640px) {
  .sidebar { display: none; }
  .main { padding: 24px 18px; }
  .price-value { font-size: 40px; }
}
