@font-face { font-family: "Raleway"; src: url("https://fonts.gstatic.com/s/raleway/v37/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaooCP.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("https://fonts.gstatic.com/s/raleway/v37/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvoooCP.ttf") format("truetype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("https://fonts.gstatic.com/s/raleway/v37/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVsEpYCP.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("https://fonts.gstatic.com/s/raleway/v37/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVs9pYCP.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Raleway"; src: url("https://fonts.gstatic.com/s/raleway/v37/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVtapYCP.ttf") format("truetype"); font-weight: 800; font-style: normal; font-display: swap; }

:root {
  --page: #f2f4fa;
  --surface: #ffffff;
  --ink: #0b1230;
  --ink-soft: #172044;
  --muted: #717991;
  --line: #e4e8f1;
  --purple: #6956e8;
  --purple-dark: #5140c7;
  --purple-pale: #ece9ff;
  --blue: #45b6ef;
  --blue-pale: #dff4ff;
  --gray-pale: #f5f6fa;
  --reserved: #f0a955;
  --sold: #aab1c2;
  --success: #20a879;
  --danger: #c64768;
  --shadow: 0 20px 55px rgba(20, 28, 70, .08);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 96% 0%, rgba(69, 182, 239, .10), transparent 31rem),
    radial-gradient(circle at 5% 18%, rgba(105, 86, 232, .08), transparent 28rem),
    var(--page);
  font-family: "Raleway", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
button, input, select { font: inherit; }
button { color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(69, 182, 239, .42); outline-offset: 2px; }
[hidden] { display: none !important; }

.button, .icon-button, .link-button { border: 0; cursor: pointer; }
.button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 15px;
  font-weight: 700;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .62; transform: none; }
.button-primary { color: #fff; background: var(--purple); box-shadow: 0 10px 24px rgba(105, 86, 232, .24); }
.button-primary:hover { background: var(--purple-dark); }
.button-light { color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.button-light:hover { box-shadow: 0 8px 20px rgba(20, 28, 70, .08); }
.icon-button {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: var(--purple);
  background: var(--purple-pale);
  font-size: 20px;
  transition: .18s ease;
}
.icon-button:hover { color: #fff; background: var(--purple); }
.link-button { padding: 8px 0; color: var(--purple); background: transparent; font-size: .875rem; font-weight: 700; }

.section-label, .eyebrow {
  display: block;
  margin: 0;
  color: var(--purple);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.auth-gate {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 54px);
  display: grid;
  grid-template-columns: minmax(310px, .85fr) minmax(420px, 1.15fr);
  gap: 18px;
  background: var(--page);
}
.auth-visual, .auth-card { border-radius: clamp(24px, 4vw, 44px); }
.auth-visual {
  position: relative;
  min-height: 560px;
  padding: clamp(28px, 5vw, 60px);
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(145deg, #0b1230 0%, #172044 58%, #4d3cc0 150%);
}
.auth-visual::after {
  content: "";
  position: absolute;
  width: 390px;
  height: 390px;
  right: -110px;
  bottom: -120px;
  border: 72px solid rgba(69, 182, 239, .22);
  border-radius: 50%;
}
.auth-logo {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 30px;
  background: rgba(255,255,255,.08);
  font-size: 48px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}
.auth-chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; }
.auth-chips span { padding: 10px 14px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.07); font-size: .875rem; }
.auth-card {
  align-self: stretch;
  padding: clamp(34px, 7vw, 94px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.mini-badge { align-self: flex-start; padding: 8px 12px; border-radius: 999px; color: var(--purple); background: var(--purple-pale); font-size: .75rem; font-weight: 800; }
.auth-card h1 { margin: 24px 0 0; font-size: clamp(3rem, 6vw, 5.8rem); line-height: .91; letter-spacing: -.055em; }
.auth-card > p:not(.form-error) { max-width: 520px; margin: 24px 0 32px; color: var(--muted); line-height: 1.7; }
.auth-card label, .field > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: .8125rem; font-weight: 700; }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.password-row input, .field input, .field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: 0;
  color: var(--ink);
  background: #fbfcff;
  transition: border .18s ease, box-shadow .18s ease;
}
.password-row input, .field input { padding: 0 15px; }
.field select { padding: 0 42px 0 15px; }
.password-row input:focus, .field input:focus, .field select:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(105, 86, 232, .10); }
.form-error { min-height: 22px; margin: 10px 0 0; color: var(--danger); font-size: .875rem; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 78px;
  padding: 14px clamp(16px, 3vw, 38px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(228, 232, 241, .82);
  background: rgba(242, 244, 250, .82);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; color: #fff; background: var(--purple); font-size: 22px; font-weight: 800; box-shadow: 0 10px 22px rgba(105,86,232,.22); }
.brand small, .brand strong { display: block; }
.brand small { color: var(--muted); font-size: .6875rem; font-weight: 800; letter-spacing: .14em; }
.brand strong { margin-top: 1px; font-size: 1rem; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.sync-status { color: var(--muted); font-size: .8125rem; }

.page { width: min(1820px, 100%); margin: 0 auto; padding: 26px clamp(12px, 2.2vw, 34px) 64px; }
.bento-card { border: 1px solid rgba(222, 227, 239, .95); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }

.hero-grid { display: grid; grid-template-columns: minmax(380px, 1.65fr) repeat(3, minmax(175px, .58fr)); gap: 14px; margin-bottom: 14px; }
.hero-card, .metric-card { min-height: 188px; border-radius: var(--radius); }
.hero-card {
  position: relative;
  padding: clamp(24px, 3vw, 38px);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 72%);
}
.hero-card .section-label { color: #a7dcff; }
.hero-card h2 { position: relative; z-index: 2; margin: 15px 0 0; font-size: clamp(2.35rem, 4vw, 4.4rem); line-height: .92; letter-spacing: -.055em; }
.hero-card p { position: relative; z-index: 2; max-width: 410px; margin: 18px 0 0; color: rgba(255,255,255,.68); font-size: .9375rem; }
.hero-orb { position: absolute; border-radius: 50%; }
.orb-a { width: 190px; height: 190px; right: -32px; top: -74px; background: rgba(105,86,232,.56); }
.orb-b { width: 120px; height: 120px; right: 98px; bottom: -78px; border: 27px solid rgba(69,182,239,.34); }
.metric-card { padding: 24px; display: flex; flex-direction: column; justify-content: space-between; }
.metric-card span, .metric-card small { font-size: .8125rem; font-weight: 700; }
.metric-card strong { font-size: clamp(1.85rem, 3vw, 3.3rem); line-height: 1; letter-spacing: -.045em; }
.metric-purple { color: #fff; background: var(--purple); }
.metric-purple span, .metric-purple small { color: rgba(255,255,255,.7); }
.metric-blue { background: var(--blue-pale); }
.metric-blue span, .metric-blue small { color: #40748f; }
.metric-navy { color: #fff; background: var(--ink-soft); }
.metric-navy span, .metric-navy small { color: rgba(255,255,255,.6); }

.filters-card { margin-bottom: 14px; padding: 22px 24px; }
.card-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.card-heading h3, .mortgage-title h3 { margin: 4px 0 0; font-size: 1.35rem; line-height: 1.15; letter-spacing: -.025em; }
.filter-line { min-width: 0; display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 14px; }
.filter-line > span { color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tabs { min-width: 0; padding: 2px; display: flex; gap: 7px; overflow-x: auto; scrollbar-width: thin; }
.tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--gray-pale);
  cursor: pointer;
  font-size: .8125rem;
  font-weight: 700;
  transition: .18s ease;
}
.tabs button:hover { color: var(--purple); border-color: #cfc8ff; }
.tabs button.active { color: #fff; border-color: var(--purple); background: var(--purple); box-shadow: 0 8px 16px rgba(105,86,232,.18); }
.quick-filters { margin-top: 18px; padding-top: 18px; display: grid; grid-template-columns: minmax(180px, 280px) minmax(180px, 260px); gap: 12px; border-top: 1px solid var(--line); }
.field { min-width: 0; }
.field input, .field select { font-size: .9375rem; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(370px, .64fr); gap: 14px; align-items: start; }
.left-stack { min-width: 0; display: grid; gap: 14px; }
.grid-panel { min-width: 0; overflow: hidden; }
.grid-heading { min-height: 85px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; color: var(--muted); font-size: .75rem; }
.legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.dot.available { background: var(--purple); }
.dot.reserved { background: var(--reserved); }
.dot.sold { background: var(--sold); }

.chessboard { max-height: 690px; padding: 14px; overflow: auto; overscroll-behavior: contain; }
.floor-row { min-width: 760px; display: grid; grid-template-columns: 58px repeat(var(--columns), minmax(100px, 1fr)); border-bottom: 1px solid var(--line); }
.floor-row:last-child { border-bottom: 0; }
.floor-label { position: sticky; left: 0; z-index: 4; min-height: 108px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid var(--line); background: #f0f2f8; }
.floor-label b { font-size: 1.15rem; }
.floor-label span { margin-top: 2px; color: var(--muted); font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.flat {
  position: relative;
  min-width: 0;
  min-height: 108px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 0;
  border-right: 1px solid var(--line);
  background: linear-gradient(145deg, #fff 0%, #f0edff 135%);
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.flat:hover { z-index: 3; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(20,28,70,.13); }
.flat.active { z-index: 2; outline: 2px solid var(--purple); outline-offset: -2px; background: linear-gradient(145deg, #faf9ff, #ded8ff); }
.flat.reserved { background: #fff1dd; }
.flat.sold { background: #eef0f5; opacity: .63; }
.flat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.flat-top b { font-size: .875rem; }
.flat-top i { padding: 4px 7px; border-radius: 8px; color: var(--purple-dark); background: rgba(105,86,232,.10); font-size: .6875rem; font-style: normal; font-weight: 800; }
.flat-area { margin-top: 8px; color: var(--muted); font-size: .75rem; }
.flat-price { margin-top: auto; padding-top: 9px; font-size: .8125rem; font-weight: 800; white-space: nowrap; }
.flat-discount { margin-top: 2px; color: var(--purple); font-size: .6875rem; font-weight: 800; }
.empty { min-height: 300px; padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); text-align: center; }
.empty strong { color: var(--ink); font-size: 1.35rem; }
.empty span { font-size: .875rem; }

.mortgage-card { padding: 24px; }
.mortgage-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.live-rate { padding: 9px 12px; display: flex; align-items: center; gap: 8px; border-radius: 999px; color: #3f7089; background: var(--blue-pale); font-size: .75rem; font-weight: 700; }
.live-rate i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(32,168,121,.12); }
.mortgage-layout { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(285px, .75fr); gap: 14px; }
.mortgage-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-wide { grid-column: 1 / -1; }
.readonly-value { min-height: 58px; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #d6d0ff; border-radius: 16px; background: var(--purple-pale); }
.readonly-value b { min-width: 0; font-size: .875rem; }
.readonly-value strong { flex: 0 0 auto; color: var(--purple-dark); font-size: 1rem; }
.mortgage-results { padding: 18px; border-radius: 22px; color: #fff; background: linear-gradient(145deg, var(--ink) 0%, var(--ink-soft) 100%); }
.payment-highlight { padding-bottom: 17px; border-bottom: 1px solid rgba(255,255,255,.12); }
.payment-highlight span, .payment-highlight strong, .payment-highlight small { display: block; }
.payment-highlight span { color: #9ddcff; font-size: .75rem; font-weight: 700; }
.payment-highlight strong { margin-top: 8px; font-size: clamp(1.75rem, 3vw, 2.7rem); line-height: 1; letter-spacing: -.045em; }
.payment-highlight small { margin-top: 8px; color: rgba(255,255,255,.46); font-size: .75rem; }
.result-grid { margin-top: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.result-grid span, .result-grid strong { display: block; }
.result-grid span { color: rgba(255,255,255,.5); font-size: .6875rem; }
.result-grid strong { margin-top: 4px; font-size: .8125rem; }
.mortgage-results > p { margin: 17px 0 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.48); font-size: .6875rem; line-height: 1.55; }

.detail-panel { position: sticky; top: 92px; min-width: 0; min-height: 600px; overflow: hidden; }
.detail-empty { min-height: 600px; padding: 56px 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.detail-icon { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 20px; color: var(--purple); background: var(--purple-pale); font-size: 28px; }
.detail-empty h3 { margin: 0 0 10px; color: var(--ink); font-size: 1.4rem; }
.detail-empty p { max-width: 320px; margin: 0; font-size: .875rem; line-height: 1.65; }
.detail-media { position: relative; min-height: 275px; display: grid; place-items: center; background: #f3f5fa; }
.detail-media > img { width: 100%; height: 300px; padding: 20px; display: block; object-fit: contain; background: #fff; }
.no-plan { color: var(--muted); font-size: .875rem; }
.availability { position: absolute; top: 16px; right: 16px; padding: 8px 11px; border-radius: 999px; color: var(--purple-dark); background: rgba(236,233,255,.94); font-size: .6875rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; backdrop-filter: blur(8px); }
.availability.reserved { color: #795021; background: rgba(255,240,219,.95); }
.availability.sold { color: #646b7a; background: rgba(238,240,245,.95); }
.detail-body { padding: 24px; }
.detail-title-row { margin-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-title-row h3 { margin: 0; font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1; letter-spacing: -.045em; }
.detail-title-row > span { flex: 0 0 auto; padding: 7px 10px; border-radius: 10px; color: #3c718c; background: var(--blue-pale); font-size: .75rem; font-weight: 800; }
.detail-address { margin: 10px 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.55; }
.price-block { position: relative; margin-top: 18px; padding: 18px; overflow: hidden; border-radius: 20px; color: #fff; background: var(--purple); }
.price-block::after { content: ""; position: absolute; width: 120px; height: 120px; right: -50px; bottom: -70px; border: 23px solid rgba(255,255,255,.10); border-radius: 50%; }
.price-block span, .price-block strong, .price-block small, .price-block b, .price-block em { position: relative; z-index: 1; display: block; }
.price-block span { color: rgba(255,255,255,.66); font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; }
.price-block strong { margin-top: 5px; font-size: 1.55rem; }
.price-block small { margin-top: 2px; color: rgba(255,255,255,.62); font-size: .75rem; text-decoration: line-through; }
.price-block b, .price-block em { margin-top: 8px; color: #e6f6ff; font-size: .75rem; font-style: normal; }
.detail-mortgage { margin-top: 14px; padding: 17px; border-radius: 20px; color: #fff; background: var(--ink); }
.detail-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-section-head span, .detail-section-head strong { display: block; }
.detail-section-head span { color: #99d7f8; font-size: .6875rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.detail-section-head strong { margin-top: 3px; font-size: .875rem; }
.detail-section-head button { padding: 7px 10px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; color: #fff; background: rgba(255,255,255,.08); cursor: pointer; font-size: .75rem; font-weight: 700; }
.mortgage-summary { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.mortgage-summary > div { min-width: 0; padding: 11px; border-radius: 13px; background: rgba(255,255,255,.07); }
.mortgage-summary .summary-payment { grid-column: 1 / -1; background: rgba(105,86,232,.42); }
.mortgage-summary span, .mortgage-summary strong { display: block; }
.mortgage-summary span { color: rgba(255,255,255,.52); font-size: .6875rem; }
.mortgage-summary strong { margin-top: 4px; overflow: hidden; font-size: .8125rem; text-overflow: ellipsis; }
.mortgage-summary .summary-payment strong { font-size: 1.45rem; }
.detail-grid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--line); }
.detail-cell { min-width: 0; padding: 13px; background: #fff; }
.detail-cell span { display: block; color: var(--muted); font-size: .6875rem; letter-spacing: .05em; text-transform: uppercase; }
.detail-cell strong { display: block; margin-top: 5px; overflow: hidden; font-size: .8125rem; text-overflow: ellipsis; }
.gallery { margin-top: 14px; padding-bottom: 3px; display: flex; gap: 8px; overflow-x: auto; }
.gallery button { flex: 0 0 auto; width: 68px; height: 56px; padding: 2px; border: 2px solid transparent; border-radius: 11px; background: transparent; cursor: pointer; }
.gallery button.active { border-color: var(--purple); }
.gallery img { width: 100%; height: 100%; display: block; border-radius: 7px; object-fit: cover; }

.banner-studio {
  position: relative;
  margin-top: 14px;
  padding: clamp(22px, 3vw, 38px);
  overflow: hidden;
  border: 1px solid rgba(135, 124, 255, .32);
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 2%, rgba(69,182,239,.26), transparent 28rem),
    linear-gradient(145deg, #0b1230 0%, #171f45 62%, #372f78 135%);
  box-shadow: 0 30px 80px rgba(11,18,48,.18);
}
.banner-studio::after { content: ""; position: absolute; width: 360px; height: 360px; right: -170px; bottom: -210px; border: 60px solid rgba(105,86,232,.18); border-radius: 50%; pointer-events: none; }
.studio-heading { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.studio-heading .section-label { color: #9bdcff; }
.studio-heading h2 { margin: 7px 0 0; font-size: clamp(2rem, 3.5vw, 3.8rem); line-height: .95; letter-spacing: -.05em; }
.studio-heading p { max-width: 700px; margin: 14px 0 0; color: rgba(255,255,255,.62); font-size: .9375rem; }
.studio-format { flex: 0 0 auto; padding: 10px 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; color: #c5eaff; background: rgba(255,255,255,.07); font-size: .75rem; font-weight: 800; letter-spacing: .04em; }
.studio-layout { position: relative; z-index: 1; margin-top: 26px; display: grid; grid-template-columns: minmax(290px, .52fr) minmax(0, 1.48fr); gap: 18px; align-items: start; }
.studio-editor { padding: 22px; display: grid; gap: 14px; border-radius: 25px; color: var(--ink); background: rgba(255,255,255,.97); box-shadow: 0 20px 50px rgba(0,0,0,.16); }
.editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.editor-heading span { color: var(--muted); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.editor-heading strong { font-size: .875rem; }
.studio-editor .field > span { color: #626b83; }
.studio-editor .field input, .studio-editor .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: 0;
  color: var(--ink);
  background: #f8f9fc;
  font-size: .875rem;
  transition: border .18s ease, box-shadow .18s ease;
}
.studio-editor .field input { min-height: 46px; padding: 0 14px; }
.studio-editor .field textarea { min-height: 88px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.studio-editor .field input:focus, .studio-editor .field textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(105,86,232,.10); }
.editor-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toggle-row { position: relative; min-height: 68px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-radius: 17px; background: var(--purple-pale); cursor: pointer; }
.toggle-row > span strong, .toggle-row > span small { display: block; }
.toggle-row > span strong { font-size: .875rem; }
.toggle-row > span small { margin-top: 3px; color: var(--muted); font-size: .6875rem; }
.toggle-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-row i { position: relative; flex: 0 0 auto; width: 48px; height: 28px; border-radius: 999px; background: #c4c8d4; transition: .18s ease; }
.toggle-row i::after { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); transition: .18s ease; }
.toggle-row input:checked + i { background: var(--purple); }
.toggle-row input:checked + i::after { transform: translateX(20px); }
.toggle-row:has(input:focus-visible) { outline: 3px solid rgba(69,182,239,.42); outline-offset: 2px; }
.editor-source { padding: 13px 14px; border-radius: 15px; background: var(--ink); color: #fff; }
.editor-source span, .editor-source strong { display: block; }
.editor-source span { color: #9bdcff; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.editor-source strong { margin-top: 4px; font-size: .8125rem; }

.banner-previews { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.banner-item { min-width: 0; padding: 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 25px; background: rgba(255,255,255,.07); backdrop-filter: blur(12px); }
.preview-heading { margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.preview-heading div > span, .preview-heading div > strong { display: block; }
.preview-heading div > span { color: #9bdcff; font-size: .6875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.preview-heading div > strong { margin-top: 2px; font-size: .875rem; }
.preview-heading > span { padding: 6px 8px; border-radius: 8px; color: #d8d4ff; background: rgba(105,86,232,.25); font-size: .6875rem; font-weight: 800; }
.promo-banner { position: relative; width: min(100%, 345px); aspect-ratio: 9 / 16; margin: 0 auto; padding: 22px 20px 17px; display: flex; overflow: hidden; flex-direction: column; color: #fff; background: linear-gradient(155deg, #5140c7 0%, #171f45 58%, #0b1230 100%); border-radius: 24px; box-shadow: 0 20px 50px rgba(0,0,0,.28); isolation: isolate; }
.promo-background { position: absolute; z-index: -4; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.promo-shade { position: absolute; z-index: -3; inset: 0; background: linear-gradient(180deg, rgba(11,18,48,.42) 0%, rgba(11,18,48,.72) 42%, rgba(11,18,48,.96) 100%); }
.promo-glow { position: absolute; z-index: -2; border-radius: 50%; pointer-events: none; }
.promo-glow.glow-one { width: 190px; height: 190px; right: -100px; top: 90px; background: rgba(105,86,232,.48); filter: blur(2px); }
.promo-glow.glow-two { width: 110px; height: 110px; left: -55px; bottom: 190px; border: 22px solid rgba(69,182,239,.23); }
.promo-logo { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 9px; }
.promo-logo b { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--purple); font-size: 18px; }
.promo-logo span { font-size: .5625rem; font-weight: 800; letter-spacing: .12em; line-height: 1.2; }
.promo-copy { margin-top: 14px; text-align: center; }
.promo-copy h3 { margin: 0 auto; max-width: 290px; font-size: clamp(1.35rem, 2.3vw, 1.85rem); line-height: .98; letter-spacing: -.045em; }
.promo-copy p { margin: 7px 0 0; color: rgba(255,255,255,.68); font-size: .6875rem; }
.promo-tags { margin-top: 11px; display: flex; justify-content: center; }
.promo-tags span { max-width: 100%; padding: 7px 10px; overflow: hidden; border-radius: 999px; color: #152340; background: #b8e8ff; font-size: .625rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.promo-plan { position: relative; min-height: 178px; margin-top: 10px; padding: 27px 12px 10px; display: grid; place-items: center; overflow: hidden; border-radius: 18px; background: rgba(255,255,255,.95); }
.promo-plan-compact { min-height: 132px; }
.promo-flat-meta { position: absolute; top: 9px; left: 12px; right: 12px; overflow: hidden; color: var(--ink-soft); font-size: .625rem; font-weight: 800; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.promo-plan > img { width: 100%; height: 142px; display: block; object-fit: contain; }
.promo-plan-compact > img { height: 96px; }
.promo-plan-fallback { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--muted); text-align: center; }
.promo-plan-fallback b { color: var(--purple); font-size: 28px; }
.promo-plan-fallback span { font-size: .625rem; line-height: 1.4; }
.promo-price { margin-top: 11px; text-align: center; }
.promo-price span, .promo-price strong { display: block; }
.promo-price span { color: rgba(255,255,255,.52); font-size: .6875rem; text-decoration: line-through; text-decoration-thickness: 1px; }
.promo-price strong { margin-top: 2px; font-size: 1.65rem; line-height: 1; letter-spacing: -.04em; }
.promo-benefit, .promo-payment { margin-top: 9px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 14px; color: var(--ink); background: #9ee1ff; }
.promo-benefit span, .promo-payment span { font-size: .625rem; font-weight: 700; }
.promo-benefit strong, .promo-payment strong { font-size: 1rem; white-space: nowrap; }
.promo-footer { margin-top: auto; padding-top: 10px; text-align: center; }
.promo-footer > strong { display: block; overflow: hidden; color: #d9d4ff; font-size: .6875rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.promo-footer p { margin: 6px 0 0; color: rgba(255,255,255,.42); font-size: .5rem; line-height: 1.35; }
.promo-mortgage-table { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.promo-mortgage-table > div { min-width: 0; padding: 8px; border-radius: 11px; background: rgba(255,255,255,.10); }
.promo-mortgage-table span, .promo-mortgage-table strong { display: block; }
.promo-mortgage-table span { min-height: 22px; color: rgba(255,255,255,.48); font-size: .5rem; line-height: 1.25; }
.promo-mortgage-table strong { margin-top: 3px; overflow: hidden; font-size: .6875rem; text-overflow: ellipsis; white-space: nowrap; }
.promo-payment { color: #fff; background: var(--purple); }
.promo-payment strong { font-size: 1.08rem; }
.download-banner { width: min(100%, 345px); min-height: 54px; margin: 12px auto 0; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-radius: 16px; color: var(--ink); background: #fff; cursor: pointer; box-shadow: 0 12px 26px rgba(0,0,0,.15); transition: transform .18s ease, background .18s ease; }
.download-banner:hover { transform: translateY(-2px); background: #f2f0ff; }
.download-banner:disabled { cursor: not-allowed; opacity: .46; transform: none; }
.download-banner span { font-size: .875rem; font-weight: 800; }
.download-banner small { color: var(--muted); font-size: .625rem; font-weight: 700; }
.pro-downloads { width: min(100%, 345px); margin: 8px auto 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.download-pro { min-width: 0; min-height: 54px; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid rgba(255,255,255,.4); border-radius: 16px; color: rgba(23,32,68,.58); background: rgba(255,255,255,.56); cursor: not-allowed; box-shadow: 0 12px 26px rgba(0,0,0,.08); backdrop-filter: blur(8px); }
.download-pro span { overflow: hidden; font-size: .875rem; font-weight: 800; line-height: 1.2; text-align: left; text-overflow: ellipsis; }
.download-pro b { flex: 0 0 auto; padding: 5px 8px; border-radius: 8px; color: #fff; background: rgba(105,86,232,.65); font-size: .625rem; font-weight: 900; letter-spacing: .08em; }
.download-pro:disabled { opacity: 1; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; max-width: min(380px, calc(100vw - 44px)); padding: 14px 17px; border-radius: 14px; color: #fff; background: var(--ink); box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s ease; font-size: .875rem; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1280px) {
  .hero-grid { grid-template-columns: minmax(360px, 1.4fr) repeat(3, minmax(150px, .55fr)); }
  .workspace { grid-template-columns: minmax(0, 1.4fr) minmax(350px, .72fr); }
  .mortgage-layout { grid-template-columns: 1fr; }
  .studio-layout { grid-template-columns: 1fr; }
  .studio-editor { grid-template-columns: 1fr 1fr; }
  .studio-editor .editor-heading, .studio-editor .toggle-row, .studio-editor .editor-source { grid-column: 1 / -1; }
}

@media (max-width: 1040px) {
  .hero-grid { grid-template-columns: 1.3fr repeat(3, .7fr); }
  .hero-card, .metric-card { min-height: 170px; }
  .metric-card { padding: 20px; }
  .workspace { grid-template-columns: minmax(0, 1.25fr) minmax(330px, .8fr); }
}

@media (max-width: 920px) {
  .auth-gate { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-card { min-height: calc(100vh - 36px); }
  .hero-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-card { grid-column: 1 / -1; min-height: 220px; }
  .workspace { grid-template-columns: 1fr; }
  .detail-panel { position: relative; top: auto; min-height: 0; }
  .detail-empty { min-height: 420px; }
  .chessboard { max-height: 70vh; }
  .studio-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 640px) {
  .topbar { min-height: 68px; padding: 10px 12px; }
  .brand-mark { width: 42px; height: 42px; }
  .brand small, .sync-status, .icon-button { display: none; }
  .brand strong { font-size: .875rem; }
  .button-light { min-height: 42px; padding: 0 14px; font-size: .8125rem; }
  .page { padding: 14px 10px 42px; }
  .hero-grid { gap: 9px; margin-bottom: 9px; }
  .hero-card, .metric-card { border-radius: 22px; }
  .hero-card { min-height: 210px; padding: 24px; }
  .hero-card h2 { font-size: 2.65rem; }
  .hero-card p { max-width: 290px; font-size: .875rem; }
  .metric-card { min-height: 126px; padding: 15px 12px; }
  .metric-card span, .metric-card small { font-size: .6875rem; }
  .metric-card strong { font-size: clamp(1.2rem, 6vw, 1.85rem); }
  .bento-card { border-radius: 22px; }
  .filters-card { margin-bottom: 9px; padding: 18px 15px; }
  .filter-line { grid-template-columns: 1fr; gap: 5px; margin-top: 14px; }
  .quick-filters { grid-template-columns: 1fr 1fr; }
  .card-heading h3, .mortgage-title h3 { font-size: 1.15rem; }
  .grid-heading { min-height: 0; padding: 17px 15px; align-items: flex-start; flex-direction: column; }
  .legend { justify-content: flex-start; }
  .chessboard { padding: 8px; }
  .floor-row { min-width: 680px; grid-template-columns: 48px repeat(var(--columns), minmax(88px, 1fr)); }
  .floor-label, .flat { min-height: 98px; }
  .flat { padding: 9px; }
  .mortgage-card { padding: 18px 15px; }
  .mortgage-title { align-items: flex-start; flex-direction: column; }
  .mortgage-layout { margin-top: 16px; }
  .mortgage-fields { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .readonly-value { align-items: flex-start; flex-direction: column; gap: 4px; }
  .result-grid { gap: 12px; }
  .detail-media > img { height: 320px; }
  .detail-body { padding: 18px 15px; }
  .detail-title-row h3 { font-size: 2rem; }
  .auth-gate { padding: 10px; }
  .auth-card { min-height: calc(100vh - 20px); padding: 30px 22px; border-radius: 24px; }
  .auth-card h1 { font-size: 3.15rem; }
  .password-row { grid-template-columns: 1fr; }
  .banner-studio { margin-top: 9px; padding: 22px 12px; border-radius: 24px; }
  .studio-heading { padding: 0 6px; }
  .studio-heading h2 { font-size: 2.35rem; }
  .studio-format { white-space: nowrap; }
  .studio-layout { margin-top: 20px; }
  .studio-editor { padding: 17px; grid-template-columns: 1fr; border-radius: 20px; }
  .studio-editor .editor-heading, .studio-editor .toggle-row, .studio-editor .editor-source { grid-column: auto; }
  .editor-pair { grid-template-columns: 1fr; }
  .banner-previews { grid-template-columns: 1fr; }
  .banner-item { padding: 12px; border-radius: 20px; }
  .promo-banner { max-width: 335px; }
}

@media (max-width: 390px) {
  .quick-filters { grid-template-columns: 1fr; }
  .metric-card { padding: 13px 10px; }
  .metric-card strong { font-size: 1.14rem; }
  .mortgage-summary { grid-template-columns: 1fr; }
  .mortgage-summary .summary-payment { grid-column: auto; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
