:root {
  --bg: #edf2f6;
  --panel: #fbfdff;
  --soft: #e8eef4;
  --ink: #101b29;
  --muted: #637486;
  --line: #d3dde7;
  --line-strong: #b7c6d5;
  --accent: #1f6f96;
  --accent-soft: rgba(31, 111, 150, .12);
  --danger: #b84b38;
  --ok: #1e7d5b;
  --warn: #a8721d;
  --shadow: 0 18px 42px rgba(8, 24, 42, .09);
  --radius: 14px;
  --sidebar: #081626;
  --sidebar-2: #030a13;
  --metal: linear-gradient(135deg, #071523 0%, #123453 28%, #5b7892 49%, #0b1d31 69%, #d7e3ec 100%);
}
[data-theme="dark"] {
  --bg: #0d1117;
  --panel: #141a22;
  --soft: #1c2430;
  --ink: #edf3f7;
  --muted: #9ba8b5;
  --line: #27313d;
  --line-strong: #3a4654;
  --accent-soft: rgba(79, 164, 197, .18);
  --shadow: 0 16px 42px rgba(0,0,0,.32);
  --sidebar: #06101d;
  --sidebar-2: #02070d;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(92, 155, 190, .18), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(237,242,246,.92)),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}
[data-theme="dark"] body { background: #0d1117; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 268px minmax(0, 1fr); }
[data-auth="signed-out"] .app-shell { display: block; min-height: 100vh; background: #eef6fb; }
[data-auth="signed-out"] .sidebar,
[data-auth="signed-out"] .topbar { display: none; }
[data-auth="signed-out"] .main-area { min-height: 100vh; }
[data-auth="signed-out"] .workspace { padding: 0; min-height: 100vh; }
[data-auth="signed-out"] body { background: #eef6fb; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 20px;
  padding: 20px 14px;
  background:
    linear-gradient(155deg, rgba(255,255,255,.08), transparent 38%),
    linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: #eef3f7;
  border-right: 1px solid rgba(255,255,255,.06);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 16px; min-height: 58px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-logo {
  width: 48px; height: 48px; object-fit: contain; border-radius: 10px;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.24));
}
.brand strong, .brand span { display: block; }
.brand span { margin-top: 2px; color: #aebbc6; font-size: 12px; }
.nav-stack { display: grid; gap: 5px; }
.nav-section-label {
  margin: 10px 10px 4px;
  color: rgba(222,234,242,.56);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-item {
  min-height: 44px; width: 100%; display: flex; align-items: center; gap: 10px;
  border: 1px solid rgba(255,255,255,.04); border-radius: 8px; padding: 0 10px;
  background: linear-gradient(135deg, rgba(255,255,255,.035), rgba(255,255,255,.012)); color: #dce5ec; text-align: left;
  text-decoration: none; font: inherit;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.nav-item:hover, .nav-item.active { background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.04)); border-color: rgba(210,231,244,.2); color: #fff; transform: translateX(2px); }
.nav-item.active { box-shadow: inset 3px 0 0 #9bd4f0, 0 10px 26px rgba(0,0,0,.18); }
.nav-item:hover .nav-icon { transform: scale(1.16) rotate(-2deg); background: linear-gradient(145deg, var(--accent), #9fc2d6); color: #fff; }
.nav-icon {
  width: 30px; height: 28px; display: grid; place-items: center;
  border-radius: 7px; background: rgba(255,255,255,.08); color: #c9d7e0;
  transition: transform .16s ease, background .16s ease;
}
.sidebar-footer { margin-top: auto; display: flex; gap: 8px; align-items: center; padding: 12px 10px; color: #b8c6cf; font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 999px; background: #77d69d; box-shadow: 0 0 0 4px rgba(119,214,157,.12); }
.main-area { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  min-height: 76px; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 30px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 82%, transparent); backdrop-filter: blur(18px);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.account-chip {
  min-height: 32px; display: inline-flex; align-items: center; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  color: var(--muted); font-size: 12px; font-weight: 850;
}
.eyebrow { margin: 0 0 5px; color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 24px; letter-spacing: 0; }
h2 { margin-bottom: 12px; font-size: 17px; letter-spacing: 0; }
h3 { margin-bottom: 8px; font-size: 15px; }
.workspace { padding: 26px 32px 46px; }
.auth-landing {
  min-height: 100vh; display: grid; grid-template-columns: 1fr; gap: 0;
  padding: 0;
  background:
    linear-gradient(180deg, #eef6fb 0, #f8fbfd 42%, #ffffff 100%);
  color: #102233;
  overflow: visible;
  scroll-behavior: smooth;
}
.marketing-site { align-content: start; position: relative; isolation: isolate; }
.marketing-site:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: min(760px, 72vh);
  background:
    linear-gradient(128deg, rgba(5,18,32,.98), rgba(20,63,96,.94) 47%, rgba(229,241,248,.92) 100%);
}
.marketing-site:after {
  content: "";
  position: absolute;
  inset: min(660px, 64vh) 0 auto;
  z-index: -1;
  height: 260px;
  background: linear-gradient(180deg, rgba(238,246,251,0), #f8fbfd 46%, #f8fbfd);
}
.marketing-nav {
  position: sticky;
  top: 14px;
  z-index: 15;
  width: min(1180px, 100%);
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(216,229,237,.7);
  border-radius: 24px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(20px) saturate(1.25);
  box-shadow: 0 18px 44px rgba(31,59,83,.12), inset 0 1px 0 rgba(255,255,255,.88);
}
.marketing-brand { min-width: 0; display: flex; align-items: center; gap: 10px; color: #102233; text-decoration: none; }
.marketing-brand img { width: 52px; height: 34px; object-fit: contain; }
.marketing-brand span { display: grid; gap: 1px; }
.marketing-brand strong { font-size: 15px; }
.marketing-brand small { color: #6a7b89; font-size: 11px; font-weight: 800; }
.marketing-nav-links { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.marketing-nav-links a {
  padding: 9px 10px;
  border-radius: 999px;
  color: #516575;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.marketing-nav-links a:hover { background: rgba(25,82,125,.09); color: #133f62; transform: translateY(-1px); }
.marketing-nav-actions { display: flex; gap: 8px; align-items: center; }
.auth-language-picker { margin: 0; min-width: 118px; }
.auth-language-picker select {
  min-height: 42px;
  padding: 9px 34px 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(191,212,226,.8);
  background: rgba(255,255,255,.82);
  color: #102233;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.84);
}
.auth-hero {
  position: relative; min-height: calc(100vh - 96px); display: grid; grid-template-columns: minmax(320px, .92fr) minmax(360px, 1fr);
  gap: clamp(24px, 5vw, 64px); align-items: center; border: 0; border-radius: 0 0 54px 54px;
  padding: clamp(54px, 7vw, 96px) clamp(24px, 5vw, 64px) clamp(72px, 8vw, 118px);
  background:
    linear-gradient(135deg, rgba(255,255,255,.13), transparent 36%),
    linear-gradient(180deg, rgba(8,26,43,.72), rgba(13,52,82,.44));
  box-shadow: 0 24px 78px rgba(30,65,92,.14);
  overflow: hidden;
}
.marketing-hero { width: 100%; min-height: min(760px, calc(100vh - 80px)); margin: -24px auto 0; }
.auth-hero:before {
  content: ""; position: absolute; inset: auto -6% -30%; height: 42%; border-radius: 50% 50% 0 0 / 100% 100% 0 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(238,246,251,.15), #eef6fb 74%);
  border: 0;
}
.auth-logo { width: min(330px, 80%); height: auto; margin-bottom: 22px; object-fit: contain; }
.metallic-pill {
  width: fit-content; background: linear-gradient(135deg, rgba(255,255,255,.2), rgba(124,157,181,.18));
  color: #dbe9f2; border-color: rgba(255,255,255,.18);
}
.auth-hero-copy { position: relative; z-index: 1; }
.auth-hero-copy h2 { max-width: 800px; margin: 18px 0 18px; color: #fff; font-size: clamp(46px, 6.4vw, 86px); line-height: .98; letter-spacing: 0; }
.auth-hero-copy p { max-width: 700px; color: #d4e4ee; font-size: 18px; line-height: 1.62; }
.marketing-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.ghost-button.light { color: #eaf3fa; border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.11); text-decoration: none; backdrop-filter: blur(10px); }
.marketing-nav-actions a, .marketing-hero-actions a { transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.marketing-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; max-width: 720px; }
.marketing-stats span {
  display: grid;
  gap: 3px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(222,238,248,.24);
  border-radius: 18px;
  background: rgba(255,255,255,.12);
  color: #d1e0ea;
  font-size: 12px;
  font-weight: 850;
  backdrop-filter: blur(12px);
}
.marketing-stats strong { color: #fff; font-size: 24px; }
.hero-benefits { display: grid; gap: 10px; margin: 24px 0; }
.hero-benefits span {
  width: fit-content; padding: 9px 12px; border: 1px solid rgba(199,224,238,.18); border-radius: 999px;
  background: rgba(255,255,255,.06); color: #e7f2f8; font-size: 13px; font-weight: 850;
}
.product-preview {
  position: relative; z-index: 1; align-self: center; min-height: 560px; padding: 20px; border-radius: 34px;
  border: 1px solid rgba(225,239,247,.26); background: linear-gradient(145deg, rgba(248,252,255,.92), rgba(229,241,248,.54));
  box-shadow: 0 44px 110px rgba(8,22,36,.32), inset 0 1px 0 rgba(255,255,255,.86);
  transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
  animation: previewFloat 7s ease-in-out infinite;
}
.preview-top { display: flex; gap: 8px; margin-bottom: 16px; }
.preview-top span { width: 11px; height: 11px; border-radius: 999px; background: #8cb8d0; opacity: .9; }
.preview-search {
  display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 16px; border-radius: 12px;
  background: rgba(255,255,255,.86); border: 1px solid rgba(143,173,193,.2); color: #102233;
}
.preview-search em { font-style: normal; color: #1b6896; font-weight: 900; }
.preview-gallery { display: grid; grid-template-columns: 1.2fr .8fr; grid-template-rows: repeat(2, 128px); gap: 12px; margin: 16px 0; }
.preview-gallery div { border-radius: 18px; background: linear-gradient(145deg, #eef7fb, #7db8d6 52%, #143f62); box-shadow: inset 0 1px 0 rgba(255,255,255,.72); }
.preview-gallery div:first-child { grid-row: 1 / -1; background: linear-gradient(145deg, #ffffff, #86c4df 42%, #123f64); }
.preview-pipeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.preview-pipeline section { min-height: 150px; padding: 13px; border-radius: 20px; background: rgba(255,255,255,.78); border: 1px solid rgba(139,170,191,.2); display: grid; align-content: start; gap: 10px; }
.preview-pipeline strong { color: #203647; font-size: 13px; }
.preview-pipeline span { display: block; height: 42px; border-radius: 14px; background: linear-gradient(135deg, rgba(30,104,151,.12), rgba(255,255,255,.82)); border: 1px solid rgba(92,132,158,.13); }
@keyframes previewFloat { 0%, 100% { transform: perspective(1200px) rotateY(-7deg) rotateX(3deg) translateY(0); } 50% { transform: perspective(1200px) rotateY(-5deg) rotateX(2deg) translateY(-10px); } }
.auth-landing .auth-card {
  align-self: start;
  border: 1px solid rgba(191,212,226,.62);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,250,253,.9));
  box-shadow: 0 24px 80px rgba(28,58,82,.14), inset 0 1px 0 rgba(255,255,255,.9);
}
.marketing-section {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: -28px auto 0;
  padding: clamp(38px, 6vw, 82px);
  border: 1px solid rgba(213,228,237,.78);
  border-radius: 42px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.92), rgba(241,248,252,.76)),
    #fff;
  box-shadow: 0 34px 90px rgba(40,72,95,.11), inset 0 1px 0 rgba(255,255,255,.9);
  overflow: hidden;
}
.marketing-section + .marketing-section { margin-top: 34px; }
.marketing-section:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, rgba(15,59,91,0), rgba(69,151,192,.58), rgba(15,59,91,0));
}
.marketing-section-head { max-width: 760px; margin-bottom: 22px; }
.marketing-section h2, .marketing-auth-copy h2 { color: #102233; font-size: clamp(30px, 4vw, 52px); line-height: 1.02; }
.marketing-section p, .marketing-auth-copy p, .marketing-price-card p { color: #607586; line-height: 1.6; }
.marketing-card-grid, .marketing-pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.marketing-card-grid article, .marketing-price-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 210px;
  padding: 22px;
  border: 1px solid rgba(201,219,231,.78);
  border-radius: 28px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 18px 46px rgba(34,65,88,.08), inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
  overflow: hidden;
}
.marketing-card-grid article:after, .marketing-price-card:after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(69,151,192,.48), transparent);
}
.marketing-card-grid article:hover, .marketing-price-card:hover {
  transform: translateY(-5px);
  border-color: rgba(104,166,198,.72);
  box-shadow: 0 28px 72px rgba(34,65,88,.13), inset 0 1px 0 rgba(255,255,255,.92);
}
.marketing-card-grid h3, .marketing-price-card h3 { color: #102233; }
.marketing-card-grid .nav-icon {
  color: #fff;
  background: linear-gradient(145deg, #173f62, #7fb7d3);
  box-shadow: 0 10px 22px rgba(30,94,133,.2);
}
.marketing-about { display: grid; grid-template-columns: minmax(0, .9fr) minmax(320px, .75fr); gap: 24px; align-items: center; }
.marketing-workflow { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: workflow; }
.marketing-workflow li {
  counter-increment: workflow;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(201,219,231,.72);
  border-radius: 20px;
  background: rgba(255,255,255,.7);
  color: #203647;
  font-weight: 850;
  box-shadow: 0 14px 34px rgba(34,65,88,.07);
}
.marketing-workflow li:before {
  content: counter(workflow);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--metal);
  color: #fff;
}
.marketing-pricing-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.marketing-price-card { min-height: 280px; }
.marketing-price-card.featured {
  border-color: rgba(72,150,190,.6);
  background: linear-gradient(150deg, rgba(255,255,255,.96), rgba(224,241,250,.78));
  box-shadow: 0 28px 78px rgba(27,98,143,.18), inset 0 1px 0 rgba(255,255,255,.92);
}
.marketing-price-card.service-card {
  color: #fff;
  border-color: rgba(24,67,101,.3);
  background: linear-gradient(145deg, #0c263f, #1e628f 56%, #b7d6e6);
  box-shadow: 0 30px 86px rgba(14,57,88,.22), inset 0 1px 0 rgba(255,255,255,.2);
}
.marketing-price-card.service-card h3,
.marketing-price-card.service-card p,
.marketing-price-card.service-card .marketing-price { color: #fff !important; }
.marketing-price { color: #0d2b43 !important; font-size: 25px; font-weight: 950; }
.marketing-price-card ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; color: #506879; font-size: 13px; font-weight: 850; }
.marketing-price-card li:before { content: "✓"; margin-right: 7px; color: #1f6f96; }
.marketing-price-card a { width: fit-content; align-self: end; text-decoration: none; }
.marketing-auth-section {
  width: min(1180px, calc(100% - 40px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 24px;
  align-items: start;
  padding-bottom: 70px;
}
.marketing-auth-copy {
  min-height: 360px;
  display: grid;
  align-content: center;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(201,219,231,.72);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(230,242,249,.7)),
    #fff;
  box-shadow: 0 28px 76px rgba(34,65,88,.1), inset 0 1px 0 rgba(255,255,255,.92);
}
.auth-layout { min-height: calc(100vh - 150px); display: grid; grid-template-columns: minmax(280px, .85fr) minmax(320px, 520px); gap: 18px; align-items: stretch; }
.auth-copy {
  padding: 30px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(145deg, var(--sidebar), color-mix(in srgb, var(--accent) 18%, var(--sidebar-2)));
  color: #eef3f7; display: flex; flex-direction: column; justify-content: flex-end; min-height: 430px;
}
.auth-copy h2 { font-size: 42px; margin: 18px 0 8px; color: #fff; }
.auth-copy p { max-width: 620px; color: #cbd7df; font-size: 15px; line-height: 1.55; }
.auth-card { align-self: center; }
.session-restore {
  grid-template-columns: minmax(320px, 520px);
  place-content: center;
}
.restore-card {
  min-width: min(480px, calc(100vw - 32px));
  display: grid;
  justify-items: start;
  gap: 12px;
}
.restore-card .spinner {
  width: 26px;
  height: 26px;
}
.auth-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 16px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.auth-tabs button { min-height: 36px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-weight: 900; }
.auth-tabs button.active { background: var(--panel); color: var(--ink); box-shadow: 0 1px 6px rgba(17,31,44,.08); }
.auth-form { grid-template-columns: 1fr; }
.checkbox-line { display: flex; align-items: center; gap: 9px; }
.checkbox-line input[type="checkbox"] { width: 18px; min-height: 18px; flex: 0 0 auto; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.legal-links a { color: #fff; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 7px 10px; text-decoration: none; font-size: 12px; font-weight: 850; }
.marketing-auth-copy .legal-links a {
  color: #123453;
  border-color: rgba(42,87,121,.2);
  background: rgba(255,255,255,.72);
}
.marketing-auth-copy .legal-links a:hover {
  color: #1f6f96;
  border-color: rgba(31,111,150,.34);
  transform: translateY(-1px);
}
.verification-gate { max-width: 760px; }
.legal-page { max-width: 980px; margin: 0 auto; padding: 28px; display: grid; gap: 16px; }
.legal-page h1 { font-size: 34px; }
.legal-page .panel { overflow: visible; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.legal-nav a {
  min-height: 34px; display: inline-flex; align-items: center; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 850;
}
.legal-nav a:hover { border-color: var(--accent); color: var(--accent); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: minmax(330px, .82fr) minmax(0, 1.3fr); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel, .card, .property-card, .client-card, .pipeline-column {
  border: 1px solid color-mix(in srgb, var(--line) 74%, white 26%); border-radius: var(--radius);
  background:
    linear-gradient(140deg, rgba(255,255,255,.82), rgba(255,255,255,.28) 38%, transparent 64%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, white), color-mix(in srgb, var(--panel) 91%, var(--soft)));
  box-shadow: 0 20px 55px rgba(9, 31, 51, .08);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
[data-theme="dark"] .panel, [data-theme="dark"] .card, [data-theme="dark"] .property-card, [data-theme="dark"] .client-card, [data-theme="dark"] .pipeline-column { background: color-mix(in srgb, var(--panel) 92%, #243142 8%); }
.panel { padding: 18px; position: relative; overflow: hidden; }
.panel:hover { border-color: color-mix(in srgb, var(--accent) 18%, var(--line)); }
.panel:before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent);
  opacity: .72; pointer-events: none;
}
.compact { box-shadow: none; }
.notice { padding: 12px 14px; border-radius: 8px; background: var(--accent-soft); color: #255c76; border: 1px solid rgba(38,111,145,.2); }
.warning { background: rgba(168,114,29,.11); color: #7e5318; border-color: rgba(168,114,29,.22); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.micro { font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .wide { grid-column: 1 / -1; }
.settings-stack { display: grid; gap: 16px; }
.settings-layout {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.settings-menu {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 8px;
  padding: 14px;
}
.settings-menu h2 { margin-bottom: 4px; }
.settings-menu-button {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: color-mix(in srgb, var(--panel) 88%, var(--soft));
  color: var(--muted);
  text-align: left;
  font-weight: 900;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.settings-menu-button:hover, .settings-menu-button.active {
  transform: translateX(2px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--panel) 88%, white));
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(8,24,42,.08);
}
.settings-menu-button:hover .settings-menu-icon, .settings-menu-button.active .settings-menu-icon {
  transform: scale(1.12);
  background: var(--metal);
  color: #fff;
}
.settings-menu-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--accent);
  transition: transform .18s ease, background .18s ease;
}
.settings-content { min-width: 0; }
.design-settings-panel .status-pill { max-width: 280px; white-space: normal; text-align: right; justify-content: flex-end; }
.design-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.design-choice-group {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 88%, var(--soft));
}
.design-choice-group h3 { margin: 0; }
.design-choice-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.design-choice {
  min-height: 62px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
}
.design-choice span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--accent);
  font-weight: 950;
}
.design-choice strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.design-choice:hover, .design-choice.active {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  box-shadow: 0 12px 26px rgba(8,24,42,.1);
}
.design-choice.active { background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--panel) 88%, white)); }
.design-choice.active span { background: var(--metal); color: #fff; }
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.security-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 88%, var(--soft));
}
.security-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
}
.security-meta strong { color: var(--ink); }
.code-inline {
  display: inline-block;
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
  color: var(--ink);
  font-weight: 900;
}
.recovery-list {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.recovery-list div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}
.recovery-list code {
  padding: 8px 9px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 900;
}
.account-heading { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.status-pill {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--soft);
  color: var(--muted); font-size: 12px; font-weight: 850; white-space: nowrap;
}
.status-pill.ok { background: rgba(30,125,91,.12); color: var(--ok); border-color: rgba(30,125,91,.22); }
.status-pill.warn { background: rgba(168,114,29,.12); color: var(--warn); border-color: rgba(168,114,29,.22); }
.verification-box { margin-top: 14px; display: grid; gap: 10px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--soft); }
.oauth-connect-row {
  margin-top: 14px; margin-bottom: 14px; display: flex; justify-content: space-between; gap: 14px; align-items: center;
  padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--panel) 88%, var(--accent-soft));
}
.team-section { margin-top: 18px; display: grid; gap: 10px; }
.team-list { display: grid; gap: 8px; }
.team-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
}
.team-card strong, .team-card span { display: block; }
.team-card span { color: var(--muted); font-size: 12px; }
.team-form { margin-top: 4px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
input, select, textarea {
  width: 100%; min-height: 40px; padding: 8px 10px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--panel); color: var(--ink); outline: none;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.button-row, .toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.primary-button, .secondary-button, .ghost-button, .danger-button, .icon-button {
  min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 8px; border: 1px solid transparent; padding: 0 13px;
  background: var(--panel); color: var(--ink); text-decoration: none; font-weight: 800; white-space: nowrap;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, filter .18s ease;
}
.primary-button { background: linear-gradient(135deg, #123453, var(--accent) 42%, #9fb9ca 86%, #183655); color: #fff; border-color: color-mix(in srgb, var(--accent) 78%, #0b1520 22%); box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 10px 22px rgba(31,111,150,.2); }
.primary-button:hover, .secondary-button:hover, .ghost-button:hover, .icon-button:hover { transform: translateY(-2px) scale(1.025); filter: saturate(1.08); }
.primary-button:disabled, .secondary-button:disabled, .ghost-button:disabled { opacity: .62; cursor: wait; transform: none; }
.secondary-button { background: linear-gradient(180deg, rgba(255,255,255,.84), var(--accent-soft)); color: var(--accent); border-color: rgba(38,111,145,.25); }
.ghost-button, .icon-button { border-color: var(--line); }
.danger-button { background: #fff3ef; border-color: #edc2b8; color: var(--danger); }
.icon-button { width: 40px; padding: 0; }
.suggestions { display: grid; gap: 8px; margin-top: 9px; }
.client-suggestion, .record-card {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px;
  background: var(--panel); color: var(--ink); text-align: left; display: grid; gap: 4px; box-shadow: none;
}
.client-suggestion:hover, .record-card:hover { border-color: var(--accent); background: var(--soft); }
.client-suggestion small, .record-card small { color: var(--muted); }
.selected-client { display: grid; gap: 2px; padding: 11px 12px; border-radius: 8px; background: var(--accent-soft); border: 1px solid rgba(38,111,145,.22); }
.selected-client span { color: var(--muted); font-size: 12px; }
.results-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.results-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.segmented { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); gap: 4px; }
.segmented button { min-height: 30px; padding: 0 10px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); font-weight: 900; }
.segmented button:hover, .segmented button.active { background: var(--panel); color: var(--accent); box-shadow: 0 8px 18px rgba(10, 32, 48, .08); }
.stream-status { display: inline-flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; }
.spinner { width: 14px; height: 14px; border-radius: 999px; border: 2px solid rgba(38,111,145,.22); border-top-color: var(--accent); animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.search-progress { display: grid; gap: 8px; margin: -2px 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--panel) 84%, var(--soft)); }
.search-progress-head, .search-progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.search-progress-head strong { font-size: 13px; }
.search-progress-head span, .search-progress-meta span { color: var(--muted); font-size: 12px; font-weight: 850; }
.search-progress-bar { height: 8px; border-radius: 999px; background: var(--soft); overflow: hidden; border: 1px solid var(--line); }
.search-progress-bar span { display: block; height: 100%; border-radius: inherit; background: var(--metal); transition: width .25s ease; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(335px, 1fr)); gap: 12px; }
.result-list { display: grid; gap: 8px; }
.property-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 102px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
}
.property-row:hover { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); background: color-mix(in srgb, var(--panel) 86%, var(--soft)); }
.property-row.viewed { opacity: .82; }
.property-row > img { width: 118px; height: 84px; border-radius: 7px; object-fit: cover; background: var(--soft); }
.property-row-main { min-width: 0; display: grid; gap: 7px; }
.property-row-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.property-row-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.property-row-title span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.viewed-badge { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(34,197,94,.45); background: linear-gradient(135deg, rgba(34,197,94,.22), rgba(16,185,129,.36)); color: #0b7a3b; box-shadow: 0 0 0 3px rgba(34,197,94,.08); font-size: 11px; font-style: normal; font-weight: 950; }
.viewed-badge.media { position: absolute; left: 10px; bottom: 10px; z-index: 3; color: #ecfdf5; background: linear-gradient(135deg, rgba(16,185,129,.82), rgba(22,163,74,.72)); border-color: rgba(187,247,208,.42); backdrop-filter: blur(12px); }
.property-row-facts { display: flex; flex-wrap: wrap; gap: 5px; }
.property-row-facts span { padding: 4px 7px; border-radius: 6px; background: var(--soft); color: var(--muted); font-size: 12px; }
.property-row-facts .price { color: var(--ink); font-size: 14px; background: var(--accent-soft); }
.property-row-actions { display: flex; align-items: center; gap: 7px; }
.property-row-actions .primary-button, .property-row-actions .ghost-button { min-height: 32px; padding-inline: 10px; }
.property-row-assign { grid-column: 2 / -1; }
.assign-client-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--soft) 74%, transparent);
}
.assign-client-form.compact { grid-template-columns: minmax(150px, 1fr) auto; padding: 7px; }
.assign-client-form label { min-width: 0; margin: 0; display: grid; gap: 4px; }
.assign-client-form label span { color: var(--muted); font-size: 11px; font-weight: 900; }
.assign-client-form select { min-height: 34px; padding: 0 9px; font-size: 12px; }
.assign-client-form .secondary-button { min-height: 34px; padding-inline: 11px; white-space: nowrap; }
.agency-result-groups { display: grid; gap: 12px; }
.agency-result-group { display: grid; gap: 8px; }
.agency-result-group > header { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); }
.agency-result-group > header div { display: flex; align-items: baseline; gap: 8px; }
.load-more-row { display: flex; justify-content: center; padding-top: 14px; }
.property-card { overflow: hidden; display: grid; grid-template-rows: 188px auto; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.property-card.viewed { opacity: .86; }
.property-card:hover { transform: translateY(-4px) scale(1.006); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 22px 48px rgba(14, 26, 36, .16); }
[data-theme="dark"] .property-card:hover { box-shadow: 0 18px 44px rgba(0,0,0,.42); }
.property-media { position: relative; background: var(--soft); overflow: hidden; }
.property-media img { transition: transform .55s ease; }
.property-card:hover .property-media img { transform: scale(1.055); }
.gallery-nav {
  position: absolute; top: 50%; z-index: 2; width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.42); background: rgba(7,21,35,.68); color: #fff;
  display: grid; place-items: center; padding: 0; font-size: 25px; line-height: 1; cursor: pointer;
  box-shadow: 0 12px 26px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.22);
  opacity: 0; transform: translateY(-50%) scale(.92);
  transition: opacity .18s ease, transform .18s ease, background .18s ease;
  backdrop-filter: blur(12px);
}
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.property-card:hover .gallery-nav, .gallery-nav:focus-visible, .gallery-nav.always-visible { opacity: 1; transform: translateY(-50%) scale(1); }
.gallery-nav:hover { background: rgba(20,68,102,.9); transform: translateY(-50%) scale(1.1); }
.gallery-count {
  position: absolute; right: 10px; bottom: 10px; z-index: 2; min-width: 42px; text-align: center;
  padding: 4px 8px; border-radius: 999px; background: rgba(7,21,35,.72); color: #fff;
  font-size: 11px; font-weight: 900; backdrop-filter: blur(10px);
}
.gallery-dots { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 5px; max-width: calc(100% - 70px); }
.gallery-dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: rgba(255,255,255,.65); }
.gallery-dots button.active { background: #fff; transform: scale(1.35); }
.source-badge { position: absolute; top: 10px; left: 10px; padding: 5px 8px; border-radius: 999px; background: rgba(7,21,35,.78); color: #fff; font-size: 12px; font-weight: 900; backdrop-filter: blur(10px); }
.property-body { padding: 13px; display: grid; gap: 9px; }
.property-title { margin: 0; font-weight: 900; line-height: 1.25; }
.price { font-weight: 950; font-size: 19px; letter-spacing: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; }
.facts span { padding: 5px 8px; border-radius: 6px; background: var(--soft); color: var(--muted); font-size: 12px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { min-height: 24px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 6px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); font-size: 12px; }
.provider-list { display: grid; gap: 7px; }
.provider-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-width: 0; min-height: 36px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); text-decoration: none; }
.provider-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provider-link strong { flex: 0 0 auto; }
.provider-link:hover { border-color: var(--accent); background: var(--soft); }
.agency-scan-list { display: grid; gap: 10px; }
.agency-scan-card { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: none; }
.agency-scan-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.mapping-list { display: grid; gap: 5px; }
.mapping-list div { display: flex; justify-content: space-between; gap: 8px; padding: 7px 8px; border-radius: 6px; background: var(--soft); color: var(--muted); }
.pipeline-board { display: grid; grid-template-columns: repeat(4, minmax(235px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 5px; }
.pipeline-column { min-height: 350px; padding: 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 88%, white), color-mix(in srgb, var(--soft) 72%, var(--panel))); box-shadow: none; }
.pipeline-column.drag-over { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pipeline-column header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.pipeline-column header em { min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 999px; background: var(--accent-soft); font-style: normal; font-weight: 900; }
.pipeline-dropzone { display: grid; gap: 10px; min-height: 260px; }
.pipeline-empty, .empty-state { min-height: 100px; display: grid; place-items: center; text-align: center; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); background: var(--soft); }
.empty-state.small { min-height: 0; padding: 8px 10px; font-size: 12px; }
.pipeline-card { overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: none; }
.pipeline-card.dragging { opacity: .55; }
.pipeline-card img { height: 90px; }
.pipeline-card-body { padding: 10px; display: grid; gap: 8px; }
.split-layout { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(0, 1.35fr); gap: 14px; align-items: start; }
.clients-main-stack { display: grid; gap: 14px; align-content: start; }
.client-list-panel {
  display: grid;
  grid-template-rows: auto auto auto auto auto auto minmax(0, 1fr);
  max-height: calc(100vh - 160px);
  overflow: hidden;
}
.client-record-list {
  min-height: 180px;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 8px;
  padding-bottom: 18px;
}
.client-search-actions { align-items: center; justify-content: space-between; margin-top: 8px; }
.record-card { position: relative; min-height: 82px; overflow: visible; }
.record-card strong, .record-card small { min-width: 0; overflow-wrap: anywhere; }
.record-card em {
  align-self: start;
  justify-self: start;
  margin-top: 7px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.client-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.client-card-tags .tag { min-height: 20px; font-size: 11px; padding-inline: 6px; }
.client-import-panel .account-heading { align-items: flex-start; }

.billing-panel { display: grid; gap: 14px; }
.billing-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.billing-plan-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, white), color-mix(in srgb, var(--soft) 70%, var(--panel)));
}
.billing-plan-card.highlighted {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
  box-shadow: 0 18px 38px rgba(31,111,150,.14);
}
.billing-plan-card.active {
  outline: 3px solid var(--accent-soft);
  border-color: var(--accent);
}
.billing-plan-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.billing-plan-card header strong,
.billing-plan-card header span { display: block; }
.billing-plan-card header strong { font-size: 18px; }
.billing-plan-card header span { color: var(--muted); font-weight: 850; }
.billing-plan-card header em {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}
.billing-plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--muted);
}
.billing-plan-price strong { color: var(--ink); font-size: 20px; }
.billing-usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}
.billing-usage-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.billing-usage-grid span { color: var(--muted); font-weight: 850; }
.billing-usage-grid strong { color: var(--ink); }
.client-import-panel .status-pill { white-space: normal; text-align: right; max-width: 240px; }
.client-import-text { min-height: 150px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.label-editor {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.label-editor-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.label-chip { gap: 5px; background: color-mix(in srgb, var(--accent-soft) 68%, var(--panel)); color: var(--ink); border-color: color-mix(in srgb, var(--accent) 18%, var(--line)); }
.label-remove {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,.08);
  color: inherit;
  font-size: 12px;
}
.inline-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.client-task-summary { margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--panel) 82%, var(--soft)); }
.quick-task-form { display: grid; grid-template-columns: minmax(0, 1fr) 130px 150px auto; gap: 8px; margin-top: 10px; }
.quick-task-form input, .quick-task-form select { min-height: 36px; }
.task-mini-list { display: grid; gap: 7px; margin-top: 10px; }
.task-mini { display: flex; justify-content: space-between; gap: 10px; padding: 8px 9px; border-radius: 7px; background: var(--soft); border: 1px solid var(--line); }
.task-mini strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-mini span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.task-mini.overdue { border-color: rgba(185, 28, 28, .35); background: rgba(185, 28, 28, .08); }
.tasks-layout { display: grid; grid-template-columns: minmax(310px, .72fr) minmax(0, 1.28fr); gap: 16px; align-items: start; }
.task-create-panel { position: sticky; top: 16px; }
.task-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.task-metrics span { display: grid; gap: 5px; padding: 10px; border-radius: 8px; background: var(--soft); color: var(--muted); }
.task-metrics strong { color: var(--ink); font-size: 22px; }
.task-client-field { display: grid; gap: 8px; }
.task-client-current { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--soft); }
.task-client-current.has-client { border-style: solid; background: color-mix(in srgb, var(--accent-soft) 54%, var(--panel)); }
.task-client-current span { min-width: 0; display: grid; gap: 2px; }
.task-client-current strong, .task-client-current small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-client-current small { color: var(--muted); font-size: 12px; }
.task-list-header { align-items: end; }
.task-search-tools { min-width: min(100%, 420px); display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 8px; align-items: end; }
.task-search-tools label { margin: 0; }
.task-search-tools input { min-height: 38px; }
.task-list { display: grid; gap: 10px; }
.task-done-header { margin-top: 18px; }
.task-card { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: none; }
.task-card header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.task-card header div { min-width: 0; display: grid; gap: 3px; }
.task-card header small { color: var(--muted); }
.task-card.done { opacity: .74; }
.task-card.overdue { border-color: rgba(185, 28, 28, .42); box-shadow: 0 0 0 3px rgba(185, 28, 28, .07); }
.task-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.task-meta span { padding: 6px 8px; border-radius: 6px; background: var(--soft); color: var(--muted); font-size: 12px; }
.task-priority { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 900; }
.priority-high { background: rgba(202, 138, 4, .12); color: #a16207; }
.priority-urgent { background: rgba(185, 28, 28, .12); color: #b91c1c; }
.priority-low { background: rgba(22, 101, 52, .1); color: #166534; }
.calendar-layout { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.calendar-create-panel { position: sticky; top: 16px; }
.calendar-main-stack, .calendar-agenda { display: grid; gap: 14px; }
.calendar-integration-note { margin-top: 14px; }
.team-calendar-picker { display: grid; gap: 10px; margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.team-calendar-heading { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.team-calendar-heading p { margin: 4px 0 0; }
.team-calendar-shortcuts .active { border-color: color-mix(in srgb, var(--accent) 44%, var(--line)); color: var(--accent); }
.team-calendar-list { display: grid; gap: 5px; }
.team-calendar-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 8px; border: 1px solid transparent; border-radius: 7px; background: var(--panel); }
.team-calendar-row:hover { border-color: var(--line-strong); }
.team-calendar-row > input[type="checkbox"] { width: 15px; height: 15px; margin: 0; }
.calendar-color-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--calendar-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--calendar-color) 18%, transparent); }
.team-calendar-name { min-width: 0; display: grid; gap: 1px; }
.team-calendar-name strong, .team-calendar-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-calendar-name small { color: var(--muted); }
.team-calendar-color-input { width: 28px; height: 24px; padding: 1px; border-radius: 5px; cursor: pointer; }
.calendar-toolbar { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 12px; }
.calendar-range-nav { display: flex; gap: 5px; align-items: center; }
.calendar-range-title { justify-self: end; text-transform: capitalize; }
.calendar-month-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.calendar-month-head div { min-width: 0; text-align: center; }
.calendar-month-head h2, .calendar-month-head p { margin-bottom: 0; }
.calendar-month-head p { margin-top: 3px; color: var(--muted); font-weight: 850; text-transform: capitalize; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.calendar-weekdays { margin-bottom: 5px; }
.calendar-weekdays span { padding: 5px; color: var(--muted); font-size: 11px; font-weight: 900; text-align: center; text-transform: uppercase; }
.calendar-day { min-height: 92px; padding: 6px; border: 1px solid var(--line); border-radius: 7px; background: color-mix(in srgb, var(--panel) 90%, var(--soft)); color: inherit; text-align: left; }
.calendar-day:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.calendar-day.blank { opacity: .38; background: var(--soft); }
.calendar-day.busy { border-color: color-mix(in srgb, var(--accent) 34%, var(--line)); }
.calendar-day-head { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; margin-bottom: 5px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 950; }
.calendar-day-head:hover { background: var(--soft); color: var(--accent); }
.calendar-day div { display: grid; gap: 3px; }
.calendar-day em { overflow: hidden; padding: 3px 4px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 10%, var(--panel)); color: var(--muted); font-size: 10px; font-style: normal; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.calendar-month-slot { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px; padding: 3px 4px; border: 0; border-radius: 4px; background: color-mix(in srgb, var(--calendar-color, var(--accent)) 14%, var(--panel)); color: var(--calendar-color, var(--accent)); font-size: 10px; font-weight: 850; text-align: left; cursor: pointer; }
.calendar-month-slot strong { font-size: 9px; }
.calendar-month-slot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-month-slot:hover, .calendar-compact-event:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(14,26,36,.08); }
.calendar-days-board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; min-height: 360px; }
.calendar-days-board.day { grid-template-columns: minmax(0, 1fr); min-height: 420px; }
.calendar-agenda-day { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: color-mix(in srgb, var(--panel) 92%, var(--soft)); }
.calendar-agenda-day > header { display: grid; gap: 2px; padding: 8px; border-bottom: 1px solid var(--line); background: var(--soft); text-transform: capitalize; }
.calendar-agenda-day > header span { color: var(--muted); font-size: 12px; }
.calendar-agenda-day > div { display: grid; gap: 5px; padding: 6px; }
.calendar-day-empty { color: var(--muted); padding: 4px; text-align: center; }
.calendar-compact-event { display: grid; gap: 2px; min-width: 0; width: 100%; padding: 6px 7px; border: 0; border-left: 3px solid var(--calendar-color); border-radius: 5px; background: color-mix(in srgb, var(--calendar-color) 12%, var(--panel)); color: var(--ink); text-align: left; cursor: pointer; }
.calendar-compact-event strong { color: var(--calendar-color); font-size: 11px; }
.calendar-compact-event span, .calendar-compact-event small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-compact-event span { font-size: 12px; font-weight: 850; }
.calendar-compact-event small { color: var(--muted); font-size: 10px; }
.calendar-time-board { display: grid; gap: 9px; }
.calendar-drag-hint { padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--accent) 9%, var(--panel)); color: var(--muted); font-size: 12px; font-weight: 850; }
.calendar-surface-panel { min-width: 0; }
.calendar-time-scroll { max-height: min(820px, calc(100vh - 210px)); overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); scroll-behavior: auto; }
.calendar-time-canvas {
  min-width: max(100%, var(--calendar-min-width));
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  grid-template-rows: auto calc(24 * var(--calendar-hour-height));
  position: relative;
}
.calendar-time-corner {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 7;
  grid-column: 1;
  grid-row: 1;
  min-height: 58px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--soft) 86%, var(--panel));
}
.calendar-time-header {
  position: sticky;
  top: 0;
  z-index: 6;
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(var(--calendar-days), minmax(180px, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}
.calendar-time-day-label { min-width: 0; display: grid; gap: 2px; padding: 9px; border-left: 1px solid var(--line); text-transform: capitalize; background: var(--soft); }
.calendar-time-day-label span { color: var(--muted); font-size: 12px; font-weight: 850; }
.calendar-time-axis { position: sticky; left: 0; z-index: 5; grid-column: 1; grid-row: 2; height: calc(24 * var(--calendar-hour-height)); border-right: 1px solid var(--line); background: color-mix(in srgb, var(--soft) 82%, var(--panel)); }
.calendar-time-axis span { position: absolute; right: 8px; transform: translateY(-50%); color: var(--muted); font-size: 11px; font-weight: 900; }
.calendar-time-axis span:first-child { transform: translateY(2px); }
.calendar-time-axis span:last-child { transform: translateY(-100%); }
.calendar-time-columns { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: repeat(var(--calendar-days), minmax(180px, 1fr)); min-width: 0; }
.calendar-time-column { position: relative; height: calc(24 * var(--calendar-hour-height)); min-width: 180px; border-right: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, var(--soft)), var(--panel)); cursor: crosshair; touch-action: none; }
.calendar-time-column:last-child { border-right: 0; }
.calendar-time-column:hover { background: color-mix(in srgb, var(--accent) 4%, var(--panel)); }
.calendar-hour-row { position: absolute; left: 0; right: 0; height: var(--calendar-hour-height); border-top: 1px solid color-mix(in srgb, var(--line) 84%, transparent); background-image: linear-gradient(to bottom, transparent 49%, color-mix(in srgb, var(--line) 42%, transparent) 50%, transparent 51%); background-size: 100% calc(var(--calendar-hour-height) / 2); pointer-events: none; }
.calendar-timed-event { position: absolute; left: 6px; right: 6px; z-index: 3; display: grid; align-content: start; gap: 1px; min-height: 28px; padding: 5px 7px; border: 1px solid color-mix(in srgb, var(--calendar-color) 36%, transparent); border-left: 4px solid var(--calendar-color); border-radius: 7px; background: linear-gradient(135deg, color-mix(in srgb, var(--calendar-color) 18%, var(--panel)), color-mix(in srgb, var(--calendar-color) 7%, var(--soft))); color: var(--ink); text-align: left; overflow: hidden; box-shadow: 0 8px 22px rgba(14,26,36,.10); cursor: pointer; }
.calendar-timed-event:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(14,26,36,.14); }
.calendar-timed-event strong { color: var(--calendar-color); font-size: 11px; }
.calendar-timed-event span { font-size: 12px; font-weight: 900; }
.calendar-timed-event small { color: var(--muted); font-size: 10px; }
.calendar-drag-preview { position: absolute; left: 7px; right: 7px; z-index: 4; display: flex; align-items: center; justify-content: center; border: 1px dashed color-mix(in srgb, var(--accent) 70%, white); border-radius: 8px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font-size: 12px; font-weight: 950; pointer-events: none; backdrop-filter: blur(6px); }
.calendar-event-card { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; padding: 12px; border: 1px solid var(--line); border-left: 3px solid var(--calendar-color); border-radius: 8px; background: var(--panel); }
.calendar-event-date { display: grid; align-content: center; justify-items: center; min-height: 68px; padding: 8px; border-radius: 7px; background: color-mix(in srgb, var(--calendar-color) 14%, var(--panel)); color: var(--calendar-color); text-align: center; }
.calendar-event-date strong { font-size: 16px; }
.calendar-event-date span { margin-top: 3px; font-size: 12px; font-weight: 850; }
.calendar-event-body { min-width: 0; display: grid; gap: 7px; }
.calendar-event-body header { display: flex; justify-content: space-between; gap: 10px; }
.calendar-event-body header div { min-width: 0; display: grid; gap: 3px; }
.calendar-event-body small { color: var(--muted); }
.calendar-event-body p { margin-bottom: 0; }
.calendar-property-summary { display: grid; gap: 4px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); }
.calendar-property-summary > strong { color: var(--muted); font-size: 12px; }
.calendar-property-summary > span { font-weight: 900; }
.calendar-property-summary > small { color: var(--muted); }
.text-preview { min-height: 260px; padding: 15px; border-radius: 8px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 94%, var(--soft)); white-space: pre-wrap; }
.modal-backdrop { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; padding: 22px; background: rgba(17,24,39,.55); backdrop-filter: blur(6px); }
.property-modal { width: min(980px, 100%); max-height: min(760px, calc(100vh - 44px)); display: grid; grid-template-columns: minmax(280px, .95fr) minmax(300px, 1.05fr); overflow: hidden; border-radius: 10px; background: var(--panel); box-shadow: 0 30px 70px rgba(0,0,0,.22); position: relative; }
.calendar-modal { width: min(760px, 100%); max-height: min(780px, calc(100vh - 44px)); overflow: auto; display: grid; gap: 14px; padding: 22px; border-radius: 10px; background: var(--panel); box-shadow: 0 30px 70px rgba(0,0,0,.22); position: relative; }
.calendar-modal-head { display: grid; gap: 4px; padding: 14px; border-left: 4px solid var(--calendar-color); border-radius: 8px; background: color-mix(in srgb, var(--calendar-color) 10%, var(--soft)); }
.calendar-modal-head h2 { margin-bottom: 0; }
.calendar-modal-head span { color: var(--muted); font-weight: 850; }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.94); font-size: 22px; }
.modal-gallery { padding: 14px; background: var(--soft); display: grid; grid-template-rows: 1fr auto; gap: 10px; }
.modal-gallery-main { position: relative; overflow: hidden; border-radius: 8px; min-height: 360px; background: #fff; }
.modal-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.modal-thumbs img { height: 62px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; }
.modal-thumbs img.active { border-color: var(--accent); }
.modal-content { padding: 22px; overflow: auto; display: grid; gap: 14px; }
.modal-price { margin-bottom: 0; font-size: 25px; font-weight: 950; letter-spacing: 0; }
.modal-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.modal-facts span { padding: 10px; border-radius: 8px; background: var(--soft); color: var(--muted); }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 30; max-width: 360px; padding: 12px 14px; border-radius: 8px; background: var(--ink); color: #fff; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

[data-layout="topbar"][data-auth="signed-in"] .app-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
[data-layout="topbar"][data-auth="signed-in"] .sidebar {
  position: sticky;
  top: 0;
  z-index: 9;
  height: auto;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  padding: 12px 24px;
  border-right: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
[data-layout="topbar"] .brand { flex: 0 0 auto; padding: 0 18px 0 0; border-bottom: 0; border-right: 1px solid rgba(255,255,255,.12); }
[data-layout="topbar"] .brand-logo { width: 42px; height: 42px; }
[data-layout="topbar"] .nav-stack { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; overflow-x: auto; }
[data-layout="topbar"] .nav-section-label, [data-layout="topbar"] .sidebar-footer { display: none; }
[data-layout="topbar"] .nav-item { width: auto; flex: 0 0 auto; min-height: 40px; }
[data-layout="topbar"] .nav-item:hover, [data-layout="topbar"] .nav-item.active { transform: translateY(-1px); }
[data-layout="topbar"] .nav-item.active { box-shadow: inset 0 -3px 0 #9bd4f0, 0 10px 26px rgba(0,0,0,.14); }
[data-layout="topbar"] .topbar { position: static; }
[data-layout="topbar"] .workspace { padding-top: 22px; }

[data-layout="compact"][data-auth="signed-in"] .app-shell { grid-template-columns: 88px minmax(0, 1fr); }
[data-layout="compact"] .sidebar { align-items: center; padding: 18px 10px; }
[data-layout="compact"] .brand { justify-content: center; padding: 0 0 14px; }
[data-layout="compact"] .brand div, [data-layout="compact"] .nav-section-label, [data-layout="compact"] .sidebar-footer span:not(.status-dot), [data-layout="compact"] .nav-item span:not(.nav-icon) { display: none; }
[data-layout="compact"] .brand-logo { width: 44px; height: 44px; }
[data-layout="compact"] .nav-item { justify-content: center; padding: 0; width: 52px; }
[data-layout="compact"] .nav-item:hover, [data-layout="compact"] .nav-item.active { transform: scale(1.04); }
[data-layout="compact"] .nav-item.active { box-shadow: inset 0 0 0 1px rgba(155,212,240,.32), 0 12px 28px rgba(0,0,0,.16); }
[data-layout="compact"] .nav-icon { width: 34px; height: 34px; }
[data-layout="compact"] .topbar { min-height: 66px; padding: 14px 24px; }
[data-layout="compact"] .workspace { padding: 20px 24px 34px; }

[data-layout="focus"][data-auth="signed-in"] .app-shell { display: block; padding-bottom: 78px; }
[data-layout="focus"] .sidebar {
  position: fixed;
  left: 50%;
  top: auto;
  bottom: 16px;
  z-index: 20;
  width: min(720px, calc(100vw - 32px));
  height: 58px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  transform: translateX(-50%);
  box-shadow: 0 22px 54px rgba(0,0,0,.28);
}
[data-layout="focus"] .brand, [data-layout="focus"] .nav-section-label, [data-layout="focus"] .sidebar-footer { display: none; }
[data-layout="focus"] .nav-stack { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; }
[data-layout="focus"] .nav-item { width: auto; min-width: 46px; min-height: 42px; justify-content: center; padding: 0 10px; }
[data-layout="focus"] .nav-item span:not(.nav-icon) { display: none; }
[data-layout="focus"] .nav-item:hover, [data-layout="focus"] .nav-item.active { transform: translateY(-2px); }
[data-layout="focus"] .topbar { top: 0; }

[data-density="compact"] body { font-size: 13px; }
[data-density="compact"] .workspace { padding-top: 18px; padding-bottom: 28px; }
[data-density="compact"] .grid { gap: 12px; }
[data-density="compact"] .panel { padding: 14px; }
[data-density="compact"] .form-grid { gap: 9px; }
[data-density="compact"] input, [data-density="compact"] select, [data-density="compact"] textarea { min-height: 34px; padding: 6px 8px; }
[data-density="compact"] .primary-button, [data-density="compact"] .secondary-button, [data-density="compact"] .ghost-button, [data-density="compact"] .danger-button, [data-density="compact"] .icon-button { min-height: 34px; padding: 0 10px; }
[data-density="compact"] .property-card { grid-template-rows: 150px auto; }
[data-density="compact"] .property-body, [data-density="compact"] .pipeline-card-body { padding: 10px; gap: 6px; }
[data-density="compact"] .facts span, [data-density="compact"] .tag { font-size: 11px; min-height: 22px; }
[data-density="compact"] .pipeline-column { min-height: 300px; padding: 10px; }

[data-density="spacious"] body { font-size: 15px; }
[data-density="spacious"] .workspace { padding: 34px 42px 58px; }
[data-density="spacious"] .grid { gap: 22px; }
[data-density="spacious"] .panel { padding: 24px; }
[data-density="spacious"] .form-grid { gap: 16px; }
[data-density="spacious"] input, [data-density="spacious"] select, [data-density="spacious"] textarea { min-height: 46px; padding: 10px 12px; }
[data-density="spacious"] .primary-button, [data-density="spacious"] .secondary-button, [data-density="spacious"] .ghost-button, [data-density="spacious"] .danger-button, [data-density="spacious"] .icon-button { min-height: 44px; padding: 0 16px; }
[data-density="spacious"] .property-card { grid-template-rows: 225px auto; }
[data-density="spacious"] .property-body { padding: 17px; gap: 12px; }
[data-density="spacious"] .pipeline-column { min-height: 410px; padding: 16px; }

[data-cards="editorial"] .result-grid { grid-template-columns: repeat(auto-fill, minmax(410px, 1fr)); }
[data-cards="editorial"] .property-card { grid-template-rows: 245px auto; }
[data-cards="editorial"] .property-title { font-size: 18px; line-height: 1.22; }
[data-cards="editorial"] .property-body { gap: 12px; }
[data-cards="editorial"] .source-badge { top: 14px; left: 14px; }
[data-cards="editorial"] .price { font-size: 23px; }
[data-cards="editorial"] .provider-link { min-height: 42px; }

[data-cards="dense"] .result-grid { grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); gap: 10px; }
[data-cards="dense"] .property-card { grid-template-rows: 132px auto; }
[data-cards="dense"] .property-body { padding: 10px; gap: 7px; }
[data-cards="dense"] .property-title { font-size: 13px; }
[data-cards="dense"] .price { font-size: 16px; }
[data-cards="dense"] .provider-list { display: none; }
[data-cards="dense"] .facts span:nth-child(n+5), [data-cards="dense"] .tag-row .tag:nth-child(n+3) { display: none; }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav-stack { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .nav-section-label { grid-column: 1 / -1; margin-top: 8px; }
  .nav-item { justify-content: center; }
  .sidebar-footer { display: none; }
  .grid.two, .grid.three, .split-layout, .tasks-layout, .calendar-layout { grid-template-columns: 1fr; }
  .task-create-panel, .calendar-create-panel { position: static; }
  .settings-layout, .security-grid { grid-template-columns: 1fr; }
  .settings-menu { position: static; }
  .auth-layout, .auth-landing, .auth-hero, .marketing-about, .marketing-auth-section { grid-template-columns: 1fr; }
  .auth-hero { min-height: auto; }
  .marketing-nav { position: static; flex-wrap: wrap; width: min(100% - 28px, 1180px); }
  .marketing-nav-links { order: 3; width: 100%; justify-content: flex-start; }
  .marketing-nav-actions { margin-left: auto; }
  .auth-language-picker { min-width: 110px; }
  .marketing-card-grid, .marketing-pricing-grid { grid-template-columns: 1fr; }
  .marketing-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-preview { min-height: 430px; transform: none; }
  .pipeline-board { grid-template-columns: repeat(4, 260px); }
}
@media (max-width: 720px) {
  [data-auth="signed-in"] .app-shell { display: block; padding-bottom: 86px; }
  [data-auth="signed-in"] .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: auto;
    z-index: 80;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid rgba(255,255,255,.13);
    box-shadow: 0 -18px 42px rgba(0,0,0,.28);
  }
  [data-auth="signed-in"] .brand,
  [data-auth="signed-in"] .nav-section-label,
  [data-auth="signed-in"] .sidebar-footer { display: none; }
  [data-auth="signed-in"] .nav-stack {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 2px 2px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  [data-auth="signed-in"] .nav-stack::-webkit-scrollbar { display: none; }
  [data-auth="signed-in"] .nav-item {
    flex: 0 0 74px;
    min-height: 58px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    padding: 7px 6px;
    border-radius: 12px;
    font-size: 11px;
    scroll-snap-align: center;
  }
  [data-auth="signed-in"] .nav-item:hover,
  [data-auth="signed-in"] .nav-item.active { transform: translateY(-2px); }
  [data-auth="signed-in"] .nav-icon { width: 30px; height: 30px; border-radius: 10px; }
  .workspace, .topbar { padding-left: 12px; padding-right: 12px; }
  .workspace { padding-top: 14px; padding-bottom: 18px; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    padding-top: 12px;
    padding-bottom: 12px;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: blur(16px);
  }
  .topbar h1 { font-size: 23px; line-height: 1.1; }
  .topbar-actions, .account-heading, .oauth-connect-row, .team-card, .task-mini { align-items: stretch; flex-direction: column; }
  .topbar-actions { width: 100%; }
  .topbar-actions .status-pill, .topbar-actions button { width: 100%; justify-content: center; }
  .panel { padding: 14px; border-radius: 10px; }
  .results-header, .results-actions { align-items: stretch; flex-direction: column; }
  .search-progress-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmented { width: 100%; }
  .segmented button { flex: 1 1 0; }
  .property-row { grid-template-columns: 92px minmax(0, 1fr); align-items: start; }
  .property-row > img { width: 92px; height: 76px; }
  .property-row-title { display: grid; gap: 2px; }
  .property-row-title strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .property-row-title span { font-size: 11px; }
  .property-row-actions, .property-row-assign { grid-column: 1 / -1; justify-content: stretch; }
  .property-row-actions .primary-button, .property-row-actions .ghost-button { flex: 1 1 0; }
  .assign-client-form, .assign-client-form.compact { grid-template-columns: 1fr; }
  .result-grid, .agency-grid, .design-control-grid, .task-metrics, .task-search-tools, .billing-plan-grid { grid-template-columns: 1fr; }
  .task-client-current { align-items: stretch; flex-direction: column; }
  .agency-result-group > header div { display: grid; gap: 2px; }
  .provider-link span { white-space: normal; overflow-wrap: anywhere; }
  .quick-task-form { grid-template-columns: 1fr; }
  .calendar-toolbar { grid-template-columns: 1fr; }
  .calendar-range-title { justify-self: start; }
  .calendar-days-board.week { display: flex; min-height: 300px; overflow-x: auto; scroll-snap-type: x mandatory; }
  .calendar-days-board.week .calendar-agenda-day { flex: 0 0 min(76vw, 260px); scroll-snap-align: start; }
  .calendar-time-scroll { max-height: 68vh; }
  .calendar-time-canvas { grid-template-columns: 52px minmax(0, 1fr); }
  .calendar-time-header { grid-template-columns: repeat(var(--calendar-days), minmax(160px, 1fr)); }
  .calendar-time-columns { grid-template-columns: repeat(var(--calendar-days), minmax(160px, 1fr)); }
  .calendar-time-column { min-width: 160px; }
  .calendar-day { min-height: 60px; padding: 4px; }
  .calendar-day span { max-width: 100%; }
  .calendar-event-card { grid-template-columns: 58px minmax(0, 1fr); gap: 9px; padding: 10px; }
  .calendar-event-date { min-height: 58px; padding: 5px; }
  .calendar-event-body header { display: grid; }
  .oauth-connect-row { align-items: flex-start; flex-direction: column; }
  .auth-landing { padding: 0; }
  .auth-hero { padding: 44px 18px 62px; border-radius: 0 0 28px 28px; }
  .auth-hero-copy h2 { font-size: 42px; }
  .marketing-nav { width: calc(100% - 20px); margin-top: 10px; border-radius: 18px; }
  .marketing-section, .marketing-auth-section { width: calc(100% - 20px); }
  .marketing-section, .marketing-auth-copy { border-radius: 26px; }
  .marketing-nav-actions, .marketing-hero-actions { width: 100%; }
  .auth-language-picker { width: 100%; }
  .auth-language-picker select { width: 100%; }
  .marketing-nav-actions .primary-button, .marketing-nav-actions .ghost-button, .marketing-hero-actions .primary-button, .marketing-hero-actions .ghost-button { flex: 1 1 0; justify-content: center; }
  .marketing-nav-links a { flex: 1 1 auto; text-align: center; }
  .marketing-section, .marketing-auth-copy { padding: 24px 18px; }
  .marketing-section h2, .marketing-auth-copy h2 { font-size: 31px; }
  .marketing-stats { grid-template-columns: 1fr; }
  .product-preview { display: none; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .pipeline-board { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; }
  .pipeline-column { min-width: min(86vw, 340px); scroll-snap-align: start; }
  .client-list-panel { display: block; max-height: none; overflow: visible; }
  .client-record-list { max-height: none; overflow: visible; padding-right: 0; padding-bottom: 0; }
  .inline-entry { grid-template-columns: 1fr; }
  .property-modal { grid-template-columns: 1fr; overflow: auto; width: calc(100vw - 20px); max-height: 94vh; }
  .calendar-modal { width: calc(100vw - 20px); max-height: 94vh; padding: 16px; }
  .modal-gallery-main { min-height: 250px; }
  h1 { font-size: 24px; }
}
@media (hover: none) {
  .gallery-nav { opacity: 1; transform: translateY(-50%) scale(1); }
}

@media (display-mode: standalone) {
  body { overscroll-behavior-y: contain; }
  .topbar { padding-top: calc(14px + env(safe-area-inset-top)); }
}

.agency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.agencies-layout { display: grid; gap: 14px; }
.agency-assistant-panel { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--panel)), var(--panel)); }
.agency-assistant-panel .account-heading { align-items: flex-start; }

.agency-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 14px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.agency-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.agency-card header strong { min-width: 0; overflow-wrap: anywhere; }
.agency-card .muted { overflow-wrap: anywhere; }
.agency-link { max-width: 100%; background: linear-gradient(180deg, rgba(255,255,255,.82), var(--soft)); }
.agency-index-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--soft) 84%, var(--panel)), var(--panel));
}
.agency-index-panel.running {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 8%, transparent);
}
.agency-index-panel.ready { border-color: color-mix(in srgb, var(--ok) 28%, var(--line)); }
.agency-index-panel.error { border-color: color-mix(in srgb, var(--warn) 32%, var(--line)); }
.agency-index-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.agency-index-head strong { font-size: 12px; letter-spacing: 0; }
.agency-index-head .status-pill { font-size: 10px; padding: 4px 7px; white-space: nowrap; }
.status-pill.active {
  background: color-mix(in srgb, var(--accent) 12%, var(--soft));
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
}
.agency-index-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.agency-index-meta span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 72%, var(--soft));
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}
.agency-index-meta strong {
  color: var(--text);
  font-size: 13px;
}
.agency-index-paths {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}
.agency-index-paths > strong { font-size: 12px; }
.agency-index-paths a {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 76%, var(--soft));
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.agency-index-paths a:hover { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); }
.agency-index-paths small { color: var(--muted); font-weight: 850; }
.agency-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.agency-profile-clients { display: grid; gap: 8px; max-height: 280px; overflow: auto; padding-right: 4px; }
.legal-consent-line { align-items: flex-start; line-height: 1.45; }
.legal-consent-copy a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
}
.legal-consent-copy a:hover { border-bottom-color: var(--accent); }
.handoff-summary {
  margin-top: 14px;
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: 12px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 80%, transparent), color-mix(in srgb, var(--panel) 74%, transparent));
}
.handoff-summary span { color: var(--muted); font-size: 13px; font-weight: 800; }
.calendar-layout.calendar-layout-full {
  grid-template-columns: 1fr;
  gap: 18px;
}
.calendar-surface-panel-full {
  padding: 20px;
  overflow: visible;
}
.calendar-master-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
}
.calendar-master-head h2 { font-size: 24px; margin-bottom: 4px; }
.calendar-team-drawer {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  overflow: hidden;
}
.calendar-team-drawer summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 950;
  cursor: pointer;
}
.calendar-team-drawer .team-calendar-picker {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--soft) 72%, var(--panel));
}
.calendar-time-scroll {
  max-height: none;
  height: min(880px, calc(100vh - 260px));
  min-height: 640px;
  border-radius: 14px;
}
.calendar-time-canvas {
  grid-template-columns: 72px minmax(0, 1fr);
}
.calendar-time-corner { min-height: 48px; }
.calendar-time-header { grid-template-columns: repeat(var(--calendar-days), minmax(140px, 1fr)); }
.calendar-time-day-label {
  min-height: 48px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--soft) 88%, var(--panel));
}
.calendar-time-axis span { right: 12px; }
.calendar-time-columns { grid-template-columns: repeat(var(--calendar-days), minmax(140px, 1fr)); }
.calendar-time-column { min-width: 140px; }
.calendar-hour-row { background-size: 100% calc(var(--calendar-hour-height) / 2); }
.calendar-agenda-panel .calendar-agenda {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.calendar-modal.calendar-modal-compact { width: min(520px, 100%); }
.calendar-modal.calendar-modal-full { width: min(860px, 100%); }
.calendar-modal,
.property-modal {
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, white);
  box-shadow: 0 34px 90px rgba(0,0,0,.24);
}
.calendar-modal-head {
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--calendar-color, var(--accent)) 14%, var(--soft)), color-mix(in srgb, var(--panel) 74%, transparent));
}
.billing-plan-card button { width: 100%; justify-content: center; }
.record-card {
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, white), color-mix(in srgb, var(--panel) 86%, var(--soft)));
}
.record-card:hover { transform: translateY(-1px); }
.topbar,
.sidebar,
.nav-item,
.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.record-card,
.agency-card,
.billing-plan-card,
.calendar-timed-event {
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}
@media (max-width: 760px) {
  .calendar-master-head { flex-direction: column; align-items: stretch; }
  .calendar-master-head .button-row { width: 100%; }
  .calendar-master-head .button-row > * { flex: 1; justify-content: center; }
  .calendar-time-scroll { height: 68vh; min-height: 460px; }
  .calendar-agenda-panel .calendar-agenda { grid-template-columns: 1fr; }
}

.calendar-time-board {
  --calendar-header-height: 68px;
  gap: 12px;
}
.calendar-time-scroll {
  height: min(900px, calc(100vh - 250px));
  min-height: 620px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 94%, var(--soft));
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 38%, transparent), 0 18px 46px rgba(9, 21, 34, .10);
}
.calendar-time-corner,
.calendar-time-header,
.calendar-time-axis {
  position: static;
}
.calendar-time-canvas {
  grid-template-columns: 86px minmax(0, 1fr);
  grid-template-rows: var(--calendar-header-height) calc(24 * var(--calendar-hour-height));
}
.calendar-time-corner {
  height: var(--calendar-header-height);
  min-height: var(--calendar-header-height);
  z-index: 12;
  background: color-mix(in srgb, var(--soft) 94%, var(--panel));
  box-shadow: 0 10px 18px rgba(9, 21, 34, .08);
}
.calendar-time-header {
  height: var(--calendar-header-height);
  min-height: var(--calendar-header-height);
  z-index: 11;
  background: color-mix(in srgb, var(--soft) 94%, var(--panel));
  box-shadow: 0 10px 18px rgba(9, 21, 34, .08);
}
.calendar-time-day-label {
  min-height: var(--calendar-header-height);
  align-content: center;
  gap: 4px;
  padding: 12px 16px;
}
.calendar-time-day-label strong {
  font-size: 15px;
  line-height: 1.1;
}
.calendar-time-day-label span {
  font-size: 13px;
  line-height: 1.1;
}
.calendar-time-axis {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  z-index: 1;
  overflow: visible;
  background: color-mix(in srgb, var(--soft) 92%, var(--panel));
}
.calendar-time-axis span {
  left: 14px;
  right: auto;
  width: 58px;
  display: block;
  text-align: left;
  color: color-mix(in srgb, var(--muted) 92%, var(--ink));
  font-size: 13px;
}
.calendar-time-column {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 98%, var(--soft)), color-mix(in srgb, var(--panel) 94%, var(--soft)));
}
.calendar-hour-row {
  border-top: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  background-image:
    linear-gradient(to bottom, transparent 48%, color-mix(in srgb, var(--line) 38%, transparent) 49%, transparent 51%);
}
.calendar-timed-event {
  left: 8px;
  right: 8px;
  min-height: 38px;
  gap: 3px;
  padding: 6px 9px 7px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(9, 21, 34, .14);
}
.calendar-timed-event .calendar-event-time {
  display: block;
  color: var(--calendar-color);
  font-size: 12px;
  line-height: 1.1;
  letter-spacing: 0;
}
.calendar-timed-event span {
  font-size: 13px;
  line-height: 1.12;
}
.calendar-timed-event small {
  font-size: 11px;
  line-height: 1.1;
}
.calendar-drag-preview {
  left: 8px;
  right: 8px;
  border-radius: 10px;
}

.portal-body {
  min-height: 100vh;
  background: #071522;
  color: #e9f2f7;
}
.portal-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 48px; }
.portal-header { display: flex; align-items: center; gap: 18px; padding: 18px 0 26px; border-bottom: 1px solid rgba(255,255,255,.14); }
.portal-header img { width: 62px; height: 62px; object-fit: contain; }
.portal-header h1 { margin: 3px 0 4px; font-size: clamp(27px, 4vw, 42px); letter-spacing: 0; }
.portal-header .muted, .portal-footer { color: rgba(233,242,247,.68); }
.portal-status { min-height: 24px; padding: 18px 0 2px; color: #b7d6e6; }
.portal-status.error { color: #ffb6ae; }
.portal-list { display: grid; gap: 16px; padding-top: 18px; }
.portal-property { display: grid; grid-template-columns: minmax(270px, 360px) minmax(0, 1fr); overflow: hidden; border: 1px solid rgba(155,212,240,.18); border-radius: 8px; background: rgba(12,30,45,.88); box-shadow: 0 14px 34px rgba(0,0,0,.16); }
.portal-gallery { position: relative; min-height: 248px; background: #102433; }
.portal-gallery > img { width: 100%; height: 100%; object-fit: cover; }
.portal-property-body { display: grid; gap: 12px; padding: 18px; }
.portal-property-body header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.portal-property-body h2 { margin: 2px 0 0; font-size: 20px; letter-spacing: 0; }
.portal-price { color: #d5eefb; font-size: 23px; white-space: nowrap; }
.portal-facts, .portal-choice-row, .portal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.portal-facts span { min-height: 28px; display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 5px; background: rgba(255,255,255,.07); color: #cfdee6; font-size: 12px; }
.portal-choice { min-height: 38px; border: 1px solid rgba(255,255,255,.17); border-radius: 6px; padding: 0 12px; background: rgba(255,255,255,.055); color: #dbeaf1; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.portal-choice:hover { transform: translateY(-2px); border-color: rgba(155,212,240,.58); }
.portal-choice.active { border-color: #8bcbe9; background: rgba(66,151,190,.28); color: #fff; box-shadow: inset 0 0 0 1px rgba(155,212,240,.2); }
.portal-property textarea { min-height: 64px; resize: vertical; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; background: rgba(0,0,0,.16); color: #e9f2f7; padding: 10px; }
.portal-actions .primary-button, .portal-actions .secondary-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.portal-saved { color: #9be0b7; font-size: 13px; }
.portal-footer { display: flex; justify-content: space-between; gap: 12px; padding: 28px 0 0; font-size: 13px; }
.portal-footer a { color: #b7d6e6; }
.portal-empty { padding: 28px; border: 1px dashed rgba(255,255,255,.2); border-radius: 8px; color: rgba(233,242,247,.72); }
.portal-share-box { display: grid; gap: 10px; padding: 14px; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.portal-share-box .button-row { margin-top: 0; }
.portal-feedback { display: inline-flex; width: fit-content; align-items: center; min-height: 24px; padding: 3px 7px; border-radius: 5px; color: var(--text); background: var(--soft-strong); font-size: 11px; }
.portal-feedback.wantsViewing { color: #07542e; background: #d8f3e4; }
.portal-feedback.declined { color: #84291f; background: #fde1dc; }

@media (max-width: 720px) {
  .portal-shell { width: min(100% - 20px, 680px); padding-top: 16px; }
  .portal-header { align-items: flex-start; }
  .portal-header img { width: 48px; height: 48px; }
  .portal-property { grid-template-columns: 1fr; }
  .portal-gallery { min-height: 220px; aspect-ratio: 16 / 10; }
  .portal-property-body { padding: 14px; }
  .portal-property-body header { display: grid; gap: 6px; }
  .portal-choice-row { display: grid; grid-template-columns: 1fr; }
  .portal-choice { width: 100%; }
}

/* ZeroS Signature UI */
:root {
  --bg: #f7f4ec;
  --panel: #fffdf8;
  --soft: #f1eee5;
  --soft-strong: #e8e1d3;
  --ink: #222116;
  --muted: #756f61;
  --line: #e7e0d4;
  --line-strong: #cfc5b3;
  --accent: #7f8148;
  --accent-soft: rgba(127, 129, 72, .14);
  --danger: #a85a43;
  --ok: #3d8955;
  --warn: #a87925;
  --shadow: 0 28px 72px rgba(48, 42, 24, .08);
  --radius: 24px;
  --sidebar: #fffdf8;
  --sidebar-2: #f5f0e6;
  --metal: linear-gradient(135deg, #74773e 0%, #a0a168 48%, #62662f 100%);
}

[data-theme="dark"] {
  --bg: #11130f;
  --panel: #171914;
  --soft: #20231c;
  --soft-strong: #2b2f25;
  --ink: #f3efe5;
  --muted: #aaa38f;
  --line: #303429;
  --line-strong: #484d3c;
  --accent: #b0b477;
  --accent-soft: rgba(176, 180, 119, .18);
  --shadow: 0 30px 80px rgba(0, 0, 0, .34);
  --sidebar: #151812;
  --sidebar-2: #10120d;
  --metal: linear-gradient(135deg, #8d9250 0%, #c0c58a 50%, #676c38 100%);
}

[data-theme="system"] {
  --bg: #f7f4ec;
  --panel: #fffdf8;
  --soft: #f1eee5;
  --soft-strong: #e8e1d3;
  --ink: #222116;
  --muted: #756f61;
  --line: #e7e0d4;
  --line-strong: #cfc5b3;
  --accent: #7f8148;
  --accent-soft: rgba(127, 129, 72, .14);
  --sidebar: #fffdf8;
  --sidebar-2: #f5f0e6;
  --metal: linear-gradient(135deg, #74773e 0%, #a0a168 48%, #62662f 100%);
}

@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --bg: #11130f;
    --panel: #171914;
    --soft: #20231c;
    --soft-strong: #2b2f25;
    --ink: #f3efe5;
    --muted: #aaa38f;
    --line: #303429;
    --line-strong: #484d3c;
    --accent: #b0b477;
    --accent-soft: rgba(176, 180, 119, .18);
    --shadow: 0 30px 80px rgba(0, 0, 0, .34);
    --sidebar: #151812;
    --sidebar-2: #10120d;
    --metal: linear-gradient(135deg, #8d9250 0%, #c0c58a 50%, #676c38 100%);
  }
}

/* Champagne Executive production theme */
:root,
:root[data-theme="light"] {
  --bg: #f4f1e9;
  --panel: #fbfaf6;
  --panel-strong: #fffefa;
  --soft: #eee9df;
  --soft-2: #e8e0d1;
  --ink: #211f1a;
  --muted: #766f62;
  --line: rgba(56, 48, 34, 0.12);
  --line-strong: rgba(56, 48, 34, 0.24);
  --accent: #927127;
  --accent-strong: #765917;
  --accent-soft: #eee2c5;
  --success: #467357;
  --danger: #a45143;
  --warning: #a07328;
  --radius: 4px;
  --shadow: none;
}

:root[data-theme="dark"] {
  --bg: #15130f;
  --panel: #1b1813;
  --panel-strong: #211d17;
  --soft: #282219;
  --soft-2: #31291e;
  --ink: #f2ecdf;
  --muted: #b7ac99;
  --line: rgba(232, 214, 174, 0.13);
  --line-strong: rgba(232, 214, 174, 0.28);
  --accent: #c7a65d;
  --accent-strong: #dfc37f;
  --accent-soft: #31291a;
  --success: #79a98a;
  --danger: #d98979;
  --warning: #d5a95b;
}

body {
  background: var(--bg);
  color: var(--ink);
}

[data-auth="signed-in"] .app-shell {
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
}

[data-auth="signed-in"] .sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 76px;
  height: 100vh;
  padding: 18px 10px;
  overflow: hidden auto;
  background: var(--panel);
  border: 0;
  border-right: 1px solid var(--line);
  box-shadow: none;
}

[data-auth="signed-in"] .brand {
  min-height: 58px;
  width: 100%;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  justify-content: center;
}

[data-auth="signed-in"] .brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

[data-auth="signed-in"] .brand > div,
[data-auth="signed-in"] .nav-section-label,
[data-auth="signed-in"] .nav-item > span:last-child,
[data-auth="signed-in"] .sidebar-footer > span:last-child {
  display: none;
}

[data-auth="signed-in"] .nav-stack {
  width: 100%;
  gap: 6px;
  padding-top: 16px;
}

[data-auth="signed-in"] .nav-item {
  position: relative;
  width: 54px;
  min-height: 50px;
  margin: 0 auto;
  padding: 0;
  justify-content: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 3px;
  box-shadow: none;
}

[data-auth="signed-in"] .nav-item::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: transparent;
}

[data-auth="signed-in"] .nav-item:hover,
[data-auth="signed-in"] .nav-item.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  transform: none;
}

[data-auth="signed-in"] .nav-item.active::before {
  background: var(--accent);
}

[data-auth="signed-in"] .nav-icon {
  width: auto;
  height: auto;
  font-size: 20px;
  background: transparent;
  border: 0;
}

[data-auth="signed-in"] .sidebar-footer {
  justify-content: center;
  border: 0;
}

[data-auth="signed-in"] .main-area {
  min-width: 0;
  background: var(--bg);
}

[data-auth="signed-in"] .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 88px;
  padding: 18px 30px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  border: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

[data-auth="signed-in"] .topbar h1,
[data-auth="signed-in"] .panel h2,
[data-auth="signed-in"] .panel h3,
[data-auth="signed-in"] .property-row h3,
[data-auth="signed-in"] .pipeline-column h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
}

[data-auth="signed-in"] .topbar h1 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
}

[data-auth="signed-in"] .eyebrow {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.17em;
}

[data-auth="signed-in"] .topbar-actions {
  gap: 10px;
}

[data-auth="signed-in"] .topbar-actions > * {
  border-radius: 3px;
}

[data-auth="signed-in"] .workspace {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 28px 30px 46px;
}

[data-auth="signed-in"] .panel,
[data-auth="signed-in"] .card,
[data-auth="signed-in"] .client-card,
[data-auth="signed-in"] .property-card,
[data-auth="signed-in"] .pipeline-column {
  min-width: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

[data-auth="signed-in"] .panel::before,
[data-auth="signed-in"] .card::before,
[data-auth="signed-in"] .property-card::before {
  display: none;
}

[data-auth="signed-in"] .panel {
  padding: 26px 28px;
}

[data-auth="signed-in"] .panel h2 {
  margin-bottom: 8px;
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1.12;
}

[data-auth="signed-in"] .muted {
  color: var(--muted);
}

[data-auth="signed-in"] label,
[data-auth="signed-in"] .field-label {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

[data-auth="signed-in"] input,
[data-auth="signed-in"] select,
[data-auth="signed-in"] textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  box-shadow: none;
}

[data-auth="signed-in"] input,
[data-auth="signed-in"] select {
  height: 44px;
}

[data-auth="signed-in"] select {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-auth="signed-in"] input:focus,
[data-auth="signed-in"] select:focus,
[data-auth="signed-in"] textarea:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 1px 0 var(--accent);
}

[data-auth="signed-in"] button,
[data-auth="signed-in"] .button,
[data-auth="signed-in"] .btn {
  min-height: 42px;
  border-radius: 3px;
  box-shadow: none;
  transform: none;
}

[data-auth="signed-in"] button:hover,
[data-auth="signed-in"] .button:hover,
[data-auth="signed-in"] .btn:hover {
  transform: translateY(-1px);
}

[data-auth="signed-in"] button.primary,
[data-auth="signed-in"] .button.primary,
[data-auth="signed-in"] .btn-primary,
[data-auth="signed-in"] .button-row button:first-child {
  color: #fffdf7;
  background: var(--accent);
  border-color: var(--accent);
}

[data-auth="signed-in"] .notice {
  padding: 12px 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-left: 2px solid var(--accent);
  border-radius: 0;
}

[data-auth="signed-in"] .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
  min-width: 0;
}

[data-auth="signed-in"] .form-grid > *,
[data-auth="signed-in"] .form-grid > label,
[data-auth="signed-in"] .field,
[data-auth="signed-in"] .input-shell {
  min-width: 0;
  max-width: 100%;
}

[data-auth="signed-in"] .form-grid input,
[data-auth="signed-in"] .form-grid select,
[data-auth="signed-in"] .form-grid textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

[data-auth="signed-in"] .grid.search-dashboard {
  display: grid;
  grid-template-columns: minmax(340px, 390px) minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

[data-auth="signed-in"] .search-dashboard > .panel {
  min-width: 0;
  padding: 28px 30px;
}

[data-auth="signed-in"] .search-dashboard > .panel:first-child {
  border-right: 1px solid var(--line);
}

[data-auth="signed-in"] .search-dashboard + .panel {
  margin-top: 22px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

[data-auth="signed-in"] .selected-client,
[data-auth="signed-in"] .suggestion,
[data-auth="signed-in"] .client-suggestion {
  border-radius: 2px;
}

[data-auth="signed-in"] .results-header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

[data-auth="signed-in"] .view-toggle,
[data-auth="signed-in"] .segmented-control {
  padding: 3px;
  background: var(--soft);
  border: 0;
  border-radius: 3px;
}

[data-auth="signed-in"] .view-toggle button,
[data-auth="signed-in"] .segmented-control button {
  min-height: 34px;
  border: 0;
  border-radius: 2px;
}

[data-auth="signed-in"] .search-progress,
[data-auth="signed-in"] .search-progress-card,
[data-auth="signed-in"] .search-run-stats {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

[data-auth="signed-in"] .property-row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) auto;
  gap: 22px;
  min-width: 0;
  padding: 20px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

[data-auth="signed-in"] .property-row > img,
[data-auth="signed-in"] .property-row-image {
  width: 210px;
  height: 132px;
  object-fit: cover;
  border-radius: 3px;
}

[data-auth="signed-in"] .property-row-main,
[data-auth="signed-in"] .property-row-actions {
  min-width: 0;
}

[data-auth="signed-in"] .property-row h3 {
  font-size: 25px;
}

[data-auth="signed-in"] .property-row .tag,
[data-auth="signed-in"] .property-row .pill,
[data-auth="signed-in"] .property-facts span {
  color: var(--muted);
  background: var(--soft);
  border: 0;
  border-radius: 2px;
}

[data-auth="signed-in"] .property-row-assign,
[data-auth="signed-in"] .assign-client-form {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

[data-auth="signed-in"] .split-layout,
[data-auth="signed-in"] .tasks-layout,
[data-auth="signed-in"] .settings-layout,
[data-auth="signed-in"] .calendar-layout {
  gap: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

[data-auth="signed-in"] .split-layout > :first-child,
[data-auth="signed-in"] .tasks-layout > :first-child,
[data-auth="signed-in"] .settings-layout > :first-child,
[data-auth="signed-in"] .calendar-layout > :first-child {
  border-right: 1px solid var(--line);
}

[data-auth="signed-in"] .record-card,
[data-auth="signed-in"] .task-card,
[data-auth="signed-in"] .agency-card {
  padding: 16px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

[data-auth="signed-in"] .record-card:hover,
[data-auth="signed-in"] .task-card:hover,
[data-auth="signed-in"] .agency-card:hover {
  background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
}

[data-auth="signed-in"] .settings-menu-button {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

[data-auth="signed-in"] .settings-menu-button.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  box-shadow: inset 2px 0 var(--accent);
}

[data-auth="signed-in"] .pipeline-board {
  gap: 1px;
  padding: 1px;
  background: var(--line);
}

[data-auth="signed-in"] .pipeline-column {
  padding: 16px;
  background: var(--panel);
}

[data-auth="signed-in"] .pipeline-dropzone {
  min-height: 420px;
  background: transparent;
  border: 1px dashed var(--line-strong);
  border-radius: 2px;
}

[data-auth="signed-in"] .agency-assistant-panel,
[data-auth="signed-in"] .client-import-panel {
  border-top: 1px solid var(--line);
}

[data-auth="signed-in"] .calendar-time-scroll,
[data-auth="signed-in"] .calendar-time-canvas,
[data-auth="signed-in"] .calendar-time-header,
[data-auth="signed-in"] .calendar-time-axis,
[data-auth="signed-in"] .calendar-time-column {
  background: var(--panel);
  border-color: var(--line);
  border-radius: 0;
  box-shadow: none;
}

[data-auth="signed-in"] .calendar-timed-event {
  border-radius: 2px;
  box-shadow: none;
}

[data-auth="signed-in"] .modal,
[data-auth="signed-in"] .modal-card,
[data-auth="signed-in"] .modal-gallery,
[data-auth="signed-in"] .calendar-modal-head {
  border-radius: 3px;
  box-shadow: 0 24px 70px rgba(22, 18, 11, 0.2);
}

@media (max-width: 1180px) {
  [data-auth="signed-in"] .grid.search-dashboard {
    grid-template-columns: minmax(320px, 350px) minmax(0, 1fr);
  }

  [data-auth="signed-in"] .property-row {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  [data-auth="signed-in"] .property-row > img,
  [data-auth="signed-in"] .property-row-image {
    width: 170px;
  }

  [data-auth="signed-in"] .property-row-actions {
    grid-column: 2;
  }
}

@media (max-width: 980px) {
  [data-auth="signed-in"] .app-shell {
    grid-template-columns: 1fr;
  }

  [data-auth="signed-in"] .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: 70px;
    padding: 8px 12px;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  [data-auth="signed-in"] .brand {
    width: 58px;
    min-height: 52px;
    padding: 0 10px 0 0;
    flex: 0 0 58px;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  [data-auth="signed-in"] .nav-stack {
    display: flex;
    width: auto;
    padding: 0;
  }

  [data-auth="signed-in"] .nav-item {
    flex: 0 0 50px;
  }

  [data-auth="signed-in"] .nav-item::before {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: -8px;
    width: auto;
    height: 2px;
  }

  [data-auth="signed-in"] .topbar {
    top: 70px;
  }

  [data-auth="signed-in"] .grid.search-dashboard,
  [data-auth="signed-in"] .split-layout,
  [data-auth="signed-in"] .tasks-layout,
  [data-auth="signed-in"] .settings-layout,
  [data-auth="signed-in"] .calendar-layout {
    grid-template-columns: 1fr;
  }

  [data-auth="signed-in"] .search-dashboard > .panel:first-child,
  [data-auth="signed-in"] .split-layout > :first-child,
  [data-auth="signed-in"] .tasks-layout > :first-child,
  [data-auth="signed-in"] .settings-layout > :first-child,
  [data-auth="signed-in"] .calendar-layout > :first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  [data-auth="signed-in"] .topbar {
    min-height: 76px;
    padding: 14px 16px;
  }

  [data-auth="signed-in"] .topbar h1 {
    font-size: 28px;
  }

  [data-auth="signed-in"] .workspace {
    padding: 16px 12px 32px;
  }

  [data-auth="signed-in"] .panel,
  [data-auth="signed-in"] .search-dashboard > .panel {
    padding: 20px 16px;
  }

  [data-auth="signed-in"] .form-grid {
    grid-template-columns: 1fr;
  }

  [data-auth="signed-in"] .property-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  [data-auth="signed-in"] .property-row > img,
  [data-auth="signed-in"] .property-row-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  [data-auth="signed-in"] .property-row-actions,
  [data-auth="signed-in"] .property-row-assign {
    grid-column: 1;
  }

  [data-auth="signed-in"] .pipeline-board {
    display: grid;
    grid-template-columns: minmax(260px, 1fr);
    overflow: visible;
  }
}

html { background: var(--bg); }
body {
  background:
    radial-gradient(circle at 74% -8%, rgba(127, 129, 72, .10), transparent 34%),
    linear-gradient(180deg, #fffdf9 0%, var(--bg) 58%, #f1ece1 100%);
  color: var(--ink);
  letter-spacing: 0;
}
[data-theme="dark"] body { background: linear-gradient(180deg, #151811 0%, var(--bg) 100%); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] body { background: linear-gradient(180deg, #151811 0%, var(--bg) 100%); }
}

[data-auth="signed-in"] .app-shell {
  grid-template-columns: 86px minmax(0, 1fr);
  background: transparent;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 12;
  width: 86px;
  padding: 20px 12px;
  gap: 18px;
  align-items: center;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  border-right: 1px solid var(--line);
  color: var(--muted);
  box-shadow: 16px 0 46px rgba(54, 47, 27, .08);
}
.brand {
  width: 100%;
  justify-content: center;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
}
.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  filter: drop-shadow(0 14px 22px rgba(67, 62, 35, .14));
}
.brand div,
.nav-section-label,
.nav-item span:not(.nav-icon),
.sidebar-footer span:not(.status-dot) { display: none; }
.nav-stack {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 14px;
}
.nav-item {
  width: 58px;
  min-height: 58px;
  justify-content: center;
  padding: 0;
  gap: 0;
  border-radius: 16px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}
.nav-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: transparent;
  color: currentColor;
  font-size: 22px;
}
.nav-item:hover,
.nav-item.active {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--soft) 72%, var(--panel));
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 0 14px 30px rgba(60, 53, 33, .10);
}
.nav-item.active {
  box-shadow: inset 0 -2px 0 var(--accent), 0 16px 34px rgba(60, 53, 33, .12);
}
.nav-item:hover .nav-icon {
  transform: scale(1.12);
  background: transparent;
  color: var(--accent);
}
.sidebar-footer {
  width: 100%;
  justify-content: center;
  padding: 12px 0 0;
  margin-top: auto;
  color: var(--muted);
}
.status-dot {
  background: var(--ok);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 18%, transparent);
}

.main-area { min-width: 0; }
.topbar {
  min-height: 92px;
  padding: 20px 38px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 46px rgba(56, 49, 30, .06);
  gap: 24px;
}
.topbar h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: clamp(25px, 2.3vw, 36px);
  line-height: 1.06;
}
.eyebrow {
  color: var(--accent);
  letter-spacing: .16em;
}
.topbar-actions {
  gap: 14px;
  margin-left: auto;
}
.account-chip,
.status-pill {
  min-height: 38px;
  border-radius: 999px;
  border-color: var(--line);
  background: color-mix(in srgb, var(--panel) 88%, white);
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(55, 48, 29, .06);
}
.status-pill.ok {
  background: color-mix(in srgb, var(--ok) 12%, var(--panel));
  color: var(--ok);
}

.workspace {
  width: min(1780px, 100%);
  margin: 0 auto;
  padding: 28px 36px 58px;
}
.grid.search-dashboard {
  display: grid;
  grid-template-columns: minmax(360px, 520px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel,
.card,
.property-card,
.client-card,
.pipeline-column {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .72), transparent 44%),
    var(--panel);
  box-shadow: var(--shadow);
}
.panel {
  padding: 24px;
  overflow: hidden;
}
.panel:hover,
.property-row:hover,
.client-card:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  box-shadow: 0 30px 82px rgba(48, 42, 24, .10);
}
.panel:before { opacity: .42; }
.panel.compact { box-shadow: var(--shadow); }
h2 {
  font-size: 19px;
  letter-spacing: 0;
}
.panel > h2:first-child,
.account-heading h2,
.results-header h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 23px;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }

label {
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}
input,
select,
textarea {
  min-height: 48px;
  border-radius: 13px;
  border-color: var(--line);
  background: color-mix(in srgb, var(--panel) 92%, white);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .74);
}
input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: 0 0 0 4px var(--accent-soft), inset 0 1px 0 rgba(255, 255, 255, .72);
  outline: 0;
}
.form-grid { gap: 16px 18px; }
.selected-client,
.client-suggestion,
.record-card,
.empty-state,
.notice {
  border-radius: 16px;
  border-color: var(--line);
}
.selected-client {
  padding: 18px;
  background: color-mix(in srgb, var(--soft) 78%, var(--panel));
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 46px;
  border-radius: 14px;
  letter-spacing: 0;
}
.primary-button {
  background: var(--metal);
  border-color: color-mix(in srgb, var(--accent) 70%, #4f5124);
  color: #fffdf8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .36), 0 16px 34px rgba(96, 99, 47, .22);
}
.secondary-button {
  background: color-mix(in srgb, var(--panel) 88%, var(--soft));
  border-color: var(--line);
  color: var(--accent);
}
.ghost-button,
.icon-button {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border-color: var(--line);
  color: var(--ink);
}
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover {
  transform: translateY(-2px) scale(1.01);
}

.signature-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.signature-card-head .eyebrow { margin: 0; }
.results-header {
  align-items: center;
  margin-bottom: 18px;
}
.segmented {
  padding: 6px;
  border-radius: 16px;
  background: var(--soft);
}
.segmented button {
  min-height: 38px;
  border-radius: 12px;
  padding: 0 16px;
}
.segmented button:hover,
.segmented button.active {
  background: var(--panel);
  color: var(--accent);
  box-shadow: 0 12px 26px rgba(55, 48, 29, .08);
}
.stream-status {
  min-height: 40px;
  padding: 0 15px;
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 10%, var(--panel));
}
.spinner {
  border-color: color-mix(in srgb, var(--ok) 22%, transparent);
  border-top-color: var(--ok);
}
.search-progress {
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 72%, var(--soft));
}
.search-progress-bar { height: 7px; border-radius: 999px; }
.search-progress-bar span { background: linear-gradient(90deg, var(--ink), color-mix(in srgb, var(--accent) 62%, white)); }
.result-list { gap: 12px; }
.property-row {
  grid-template-columns: minmax(180px, 250px) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: stretch;
  min-height: 172px;
  padding: 14px;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(49, 43, 24, .07);
}
.property-row > img {
  width: 100%;
  height: 144px;
  align-self: start;
  border-radius: 14px;
}
.property-row-main { align-content: center; gap: 10px; }
.property-row-title strong {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  font-size: 20px;
}
.property-row-title span { font-size: 13px; }
.property-row-facts { gap: 7px; }
.property-row-facts span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  background: var(--soft);
  color: var(--muted);
}
.property-row-facts .price {
  background: transparent;
  color: var(--ink);
  padding-left: 0;
  font-size: 20px;
  font-weight: 950;
}
.property-row-actions {
  align-content: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.property-row-actions .primary-button,
.property-row-actions .ghost-button {
  min-height: 42px;
  border-radius: 13px;
}
.property-row-assign {
  grid-column: 2 / -1;
}
.assign-client-form {
  border-radius: 14px;
  background: color-mix(in srgb, var(--soft) 68%, var(--panel));
}
.design-settings-panel .account-heading {
  align-items: center;
}
.design-control-grid {
  grid-template-columns: 1fr;
}
.design-choice-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.design-choice {
  min-height: 88px;
  border-radius: 18px;
  background: var(--panel);
}
.design-choice.active {
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.signature-preview {
  background: linear-gradient(135deg, var(--panel), var(--soft));
}

.property-modal,
.calendar-modal {
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 40px 110px rgba(25, 22, 14, .30);
}
.modal-close {
  border-radius: 14px;
}
.modal-gallery,
.modal-facts span,
.calendar-modal-head {
  border-radius: 16px;
}

@media (max-width: 1440px) {
  .grid.search-dashboard {
    grid-template-columns: minmax(340px, .85fr) minmax(0, 1.15fr);
  }
}

@media (max-width: 1080px) {
  [data-auth="signed-in"] .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 12px 16px;
    overflow-x: auto;
  }
  .brand {
    width: auto;
    flex: 0 0 auto;
    padding: 0 16px 0 0;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
  .brand-logo { width: 44px; height: 44px; }
  .nav-stack {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    width: auto;
  }
  .nav-item {
    width: 50px;
    min-height: 50px;
    flex: 0 0 auto;
  }
  .sidebar-footer { display: none; }
  .topbar { position: sticky; top: 75px; padding: 16px 20px; }
  .workspace { padding: 20px; }
  .grid.search-dashboard {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    display: grid;
    gap: 12px;
    align-items: start;
  }
  .topbar-actions { justify-content: flex-start; flex-wrap: wrap; }
  .workspace { padding: 14px; }
  .panel { padding: 18px; border-radius: 20px; }
  .form-grid,
  .design-choice-list {
    grid-template-columns: 1fr;
  }
  .property-row {
    grid-template-columns: 1fr;
  }
  .property-row > img {
    height: auto;
    aspect-ratio: 16 / 10;
  }
  .property-row-assign {
    grid-column: 1;
  }
  .assign-client-form,
  .assign-client-form.compact {
    grid-template-columns: 1fr;
  }
}
