/* ============================================================
   MOVE APP — token remap over the ported portkey.casa component
   CSS (move-body below). Scoped via body[class^="page-move-"] —
   every move/* view already renders <body class="page-<%= page %>">
   through the shared head.ejs partial, and every move page's `page`
   value starts with "move-", so no extra wrapper class is needed.
   Never leaks into the rest of overseas.wiki's own :root palette.
   ============================================================ */
body[class^="page-move-"] {
  --bg-card:     #ffffff;
  --bg-2:        var(--bg-soft, #f7f8fa);
  --bg-3:        #eef1f5;
  --border:      var(--border, #e2e8f0);
  --border-em:   rgba(15,39,68,0.28);
  --border-gold: rgba(201,146,42,0.35);

  --text:        var(--text, #1a202c);
  --text-dim:    rgba(26,32,44,0.76);
  --text-muted:  var(--text-muted, #64748b);

  /* primary accent = site navy (matches .btn-primary already on the site) */
  --green:       var(--navy, #0f2744);
  --green-light: var(--navy-mid, #1a3a60);
  --green-dark:  #08131e;
  --green-bg:    rgba(15,39,68,0.06);
  --green-glow:  rgba(15,39,68,0.14);

  /* secondary accent = site gold */
  --gold:        var(--gold, #c9922a);
  --gold-d:      #a8791f;
  --gold-bg:     rgba(201,146,42,0.08);

  --ff-display: 'Merriweather', Georgia, serif;
  --ff-body:    'Inter', system-ui, sans-serif;

  --radius:    8px;
  --radius-lg: var(--radius-lg, 14px);
  --radius-xl: 20px;
  --trans:     0.25s cubic-bezier(.4,0,.2,1);
  --shadow:    var(--shadow, 0 1px 4px rgba(0,0,0,0.06));
  --shadow-lg: var(--shadow-lg, 0 12px 40px rgba(0,0,0,0.14));
  --glow:      0 0 40px rgba(15,39,68,0.14);

  font-family: var(--ff-body);
  color: var(--text);
  background: var(--bg-2);
  min-height: 100vh;
}
body[class^="page-move-"] .btn-lg { padding: 16px 36px; font-size: 16px; }
/* ============================================================
   PORTKEY APP — Auth, Onboarding Wizard, Dashboard
   ============================================================ */

.minimal-page { min-height: 100vh; display: flex; flex-direction: column; }
.minimal-topbar {
  padding: 24px 32px;
}

/* ── AUTH ── */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 64px;
}
.auth-shell {
  width: 100%;
  max-width: 880px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-brand {
  position: relative;
  background: linear-gradient(150deg, var(--green-dark) 0%, var(--green) 55%, var(--green-light) 100%);
  color: #fff;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute;
  width: 340px;
  height: 340px;
  right: -140px;
  bottom: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-bg) 0%, transparent 70%);
  opacity: 0.9;
}
.auth-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 700;
  position: relative;
}
.auth-brand-mark .material-icons { color: var(--gold); }
.auth-brand-quote {
  position: relative;
  font-family: var(--ff-display);
  font-size: 24px;
  line-height: 1.4;
  margin: 36px 0;
  max-width: 320px;
}
.auth-brand-quote strong { color: var(--gold); font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 1.12em; }
.auth-brand-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.auth-brand-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,.82);
}
.auth-brand-list .material-icons { font-size: 18px; color: var(--gold); }
.auth-card {
  width: 100%;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; max-width: 440px; }
  .auth-brand { display: none; }
  .auth-card { padding: 40px 32px; }
}
.auth-title { font-family: var(--ff-display); font-size: 28px; margin: 10px 0 6px; }
.auth-subtitle { color: var(--text-dim); font-size: 15px; margin-bottom: 24px; }
.auth-google-btn {
  width: 100%;
  justify-content: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-em);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}
.auth-google-btn:hover { background: var(--bg-2); }
.auth-google-btn svg { flex-shrink: 0; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-error {
  display: none;
  background: rgba(220,80,80,0.10);
  border: 1px solid rgba(220,80,80,0.25);
  color: #c0392b;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
[data-theme="dark"] .auth-error { color: #ff9d8a; }
.auth-switch { text-align: center; font-size: 14px; color: var(--text-dim); margin-top: 22px; }
.auth-switch a { color: var(--green-light); font-weight: 500; }
.auth-back {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-group[hidden] { display: none; }
.form-group.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 12px;
}
.form-group.form-row-3 > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
@media (max-width: 560px) {
  .form-group.form-row-3 { grid-template-columns: 1fr; }
}
.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: var(--ff-body);
  font-size: 15px;
  color: var(--text);
  transition: border-color var(--trans);
  width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}
.form-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  color-scheme: light;
  cursor: pointer;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230f2744' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.form-group select option { background: #fff; color: var(--text); }
.form-group textarea { resize: vertical; min-height: 110px; }

/* Custom "select" — native <select> option popups can't be themed and
   render in the OS's own dark/light mode regardless of page CSS. */
.custom-select { position: relative; }
.custom-select-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; font-family: var(--ff-body); font-size: 15px; color: var(--text);
  cursor: pointer; text-align: left; transition: border-color var(--trans);
}
.custom-select-trigger:hover,
.custom-select.open .custom-select-trigger { border-color: var(--green); }
.custom-select-chevron { font-size: 20px; color: var(--text-muted); transition: transform 0.15s ease; flex-shrink: 0; }
.custom-select.open .custom-select-chevron { transform: rotate(180deg); }
.custom-select-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 10;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 6px; max-height: 240px; overflow-y: auto;
  animation: modalScaleIn 0.14s ease-out both;
}
.custom-select-option {
  padding: 10px 12px; border-radius: 6px; font-size: 14.5px; color: var(--text); cursor: pointer;
}
.custom-select-option:hover { background: var(--bg-2); }
.custom-select-option.selected { background: var(--green-bg); color: var(--green); font-weight: 600; }

/* Country-code phone picker */
.phone-input-group { display: flex; gap: 8px; }
.phone-input-group #prospectPhone { flex: 1; }
.country-select { position: relative; flex-shrink: 0; }
.country-select-trigger {
  display: flex; align-items: center; gap: 8px;
  height: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 12px; font-family: var(--ff-body); font-size: 14.5px; color: var(--text);
  cursor: pointer; transition: border-color var(--trans);
}
.country-select-trigger:hover,
.country-select.open .country-select-trigger { border-color: var(--green); }
.country-flag { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
.country-dial { white-space: nowrap; }
.country-select.open .custom-select-chevron { transform: rotate(180deg); }
.country-select-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: 260px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; animation: modalScaleIn 0.14s ease-out both;
}
.country-search {
  width: 100%; box-sizing: border-box; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 10px; font-size: 13.5px; margin-bottom: 6px; font-family: var(--ff-body);
}
.country-search:focus { outline: none; border-color: var(--green); }
.country-select-list { max-height: 220px; overflow-y: auto; }
.country-option {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px;
  font-size: 13.5px; color: var(--text); cursor: pointer;
}
.country-option:hover { background: var(--bg-2); }
.country-option .country-flag { width: 18px; height: 13px; }
.country-option-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-option-dial { color: var(--text-muted); font-size: 12.5px; }
.country-empty { padding: 10px; font-size: 13px; color: var(--text-muted); text-align: center; }
@media (max-width: 460px) { .country-select-menu { width: 220px; } }

/* ── ONBOARDING WIZARD ── */
.wizard-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 64px;
}
.wizard-card {
  width: 100%;
  max-width: 560px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 44px 40px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.wizard-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}
.wizard-progress-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-3);
  overflow: hidden;
}
.wizard-progress-dot::after {
  content: '';
  display: block;
  height: 100%;
  width: 0%;
  background: var(--green);
  transition: width 0.4s ease;
}
.wizard-progress-dot.done::after   { width: 100%; }
.wizard-progress-dot.active::after { width: 100%; }

.wizard-step {
  display: none;
  flex: 1;
  flex-direction: column;
}
.wizard-step.active {
  display: flex;
  animation: wizardSlideIn 0.32s ease;
}
@keyframes wizardSlideIn {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .wizard-step.active { animation: none; }
}

.wizard-about-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 22px 0 8px;
}
.wizard-about-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.wizard-about-item > .material-icons {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gold-bg);
  color: var(--gold);
}
.wizard-about-item strong {
  display: block;
  font-size: 15px;
  margin-bottom: 3px;
}
.wizard-about-item p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.wizard-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 10px;
}
.wizard-question {
  font-family: var(--ff-display);
  font-size: 26px;
  line-height: 1.3;
  margin-bottom: 8px;
}
.wizard-hint { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }

.wizard-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--trans);
  background: var(--bg-card);
  opacity: 0;
  transform: translateY(10px);
  animation: wizardDrip 0.4s ease forwards;
}
.wizard-options .option-card:nth-child(1) { animation-delay: 0.02s; }
.wizard-options .option-card:nth-child(2) { animation-delay: 0.08s; }
.wizard-options .option-card:nth-child(3) { animation-delay: 0.14s; }
.wizard-options .option-card:nth-child(4) { animation-delay: 0.20s; }
.wizard-options .option-card:nth-child(5) { animation-delay: 0.26s; }
.wizard-options .option-card:nth-child(6) { animation-delay: 0.32s; }
@keyframes wizardDrip {
  to { opacity: 1; transform: translateY(0); }
}
.option-card:hover { border-color: var(--border-em); }
.option-card.selected {
  border-color: var(--green);
  background: var(--green-bg);
}
.option-card-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--green-light);
}
.option-card.selected .option-card-icon { background: var(--green); color: #fff; }
.option-card-title { font-weight: 600; font-size: 15px; }
.option-card-body { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.option-card-check {
  margin-left: auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: transparent;
  transition: var(--trans);
}
.option-card.selected .option-card-check {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.wizard-process-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-light);
  background: var(--green-bg);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}
.wizard-process-tag:empty { display: none; }

.wizard-yesno { display: flex; gap: 12px; margin-bottom: 20px; }
.wizard-yesno .option-card { flex: 1; justify-content: center; text-align: center; flex-direction: column; gap: 6px; }

.wizard-drip-input {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease;
  margin-bottom: 8px;
}
.wizard-drip-input.open { max-height: 120px; opacity: 1; }

.geo-single-input.geo-invalid { border-color: #e0554f; }
.geo-field-error {
  display: none;
  color: #e0554f;
  font-size: 12.5px;
  margin-top: 6px;
}

#geo-ac-panel {
  position: absolute;
  z-index: 4500;
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 280px;
  overflow-y: auto;
  min-width: 340px;
}
#geo-ac-panel .geo-ac-item {
  padding: 12px 16px;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  white-space: normal;
}
#geo-ac-panel .geo-ac-item:last-child { border-bottom: none; }
#geo-ac-panel .geo-ac-item:hover,
#geo-ac-panel .geo-ac-item.active { background: var(--green-bg); color: var(--green-light); }
#geo-ac-panel .geo-ac-empty { padding: 9px 13px; font-size: 12.5px; color: var(--text-muted); }

.wizard-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}
.wizard-back {
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--ff-body);
}
.wizard-back:hover { color: var(--text); }
.wizard-required-msg {
  font-size: 13px;
  color: #c0392b;
  margin-bottom: 12px;
  display: none;
}
[data-theme="dark"] .wizard-required-msg { color: #ff9d8a; }

/* Colored intent cards — buying / selling / relocating each get a distinct accent */
[data-field="intents"] .option-card[data-value="buying"] .option-card-icon { background: var(--green-bg); color: var(--green); }
[data-field="intents"] .option-card[data-value="buying"].selected { border-color: var(--green); background: var(--green-bg); }
[data-field="intents"] .option-card[data-value="buying"].selected .option-card-icon { background: var(--green); color: #fff; }
[data-field="intents"] .option-card[data-value="buying"].selected .option-card-check { background: var(--green); border-color: var(--green); }

[data-field="intents"] .option-card[data-value="selling"] .option-card-icon { background: var(--gold-bg); color: var(--gold-d); }
[data-field="intents"] .option-card[data-value="selling"].selected { border-color: var(--gold); background: var(--gold-bg); }
[data-field="intents"] .option-card[data-value="selling"].selected .option-card-icon { background: var(--gold); color: #fff; }
[data-field="intents"] .option-card[data-value="selling"].selected .option-card-check { background: var(--gold); border-color: var(--gold); }

[data-field="intents"] .option-card[data-value="relocating"] .option-card-icon { background: rgba(180,95,66,0.10); color: #b45f42; }
[data-field="intents"] .option-card[data-value="relocating"].selected { border-color: #b45f42; background: rgba(180,95,66,0.08); }
[data-field="intents"] .option-card[data-value="relocating"].selected .option-card-icon { background: #b45f42; color: #fff; }
[data-field="intents"] .option-card[data-value="relocating"].selected .option-card-check { background: #b45f42; border-color: #b45f42; }

/* ── TERMS STEP ── */
.wizard-terms-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  padding: 18px 20px;
  max-height: 220px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.wizard-terms-box h4 { font-size: 13px; margin: 12px 0 4px; color: var(--text); }
.wizard-terms-box h4:first-child { margin-top: 0; }
.wizard-terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--trans);
}
.wizard-terms-check:hover { border-color: var(--border-em); }
.wizard-terms-check input { margin-top: 2px; accent-color: var(--green); width: 16px; height: 16px; flex-shrink: 0; }
.wizard-terms-check span { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }
.wizard-terms-check a { color: var(--green-light); font-weight: 600; }

/* ── PREPARING STEP ── */
.wizard-preparing { align-items: center; text-align: center; justify-content: center; }
.preparing-spinner {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 3px solid var(--green-bg);
  border-top-color: var(--green);
  margin: 0 auto 24px;
  animation: preparingSpin 0.9s linear infinite;
}
@keyframes preparingSpin { to { transform: rotate(360deg); } }
.preparing-list { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; text-align: left; max-width: 280px; margin-left: auto; margin-right: auto; }
.preparing-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
  opacity: 0.5;
  transition: var(--trans);
}
.preparing-item .material-icons { font-size: 18px; color: var(--border-em); transition: var(--trans); }
.preparing-item.done { opacity: 1; color: var(--text); }
.preparing-item.done .material-icons { color: var(--green); }
@media (prefers-reduced-motion: reduce) { .preparing-spinner { animation-duration: 2s; } }

.wizard-final { align-items: center; text-align: center; justify-content: center; }
.wizard-final-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--green-bg);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.wizard-final-icon .material-icons { font-size: 32px; }

/* ── DASHBOARD ── */
.dash-layout { display: flex; min-height: 100vh; }
.dash-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
}
.dash-sidebar .nav-logo { margin-bottom: 32px; padding: 0 8px; }
.dash-nav { display: flex; flex-direction: column; gap: 4px; }
.dash-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: var(--trans);
}
.dash-nav a:hover { background: var(--bg-2); color: var(--text); }
.dash-nav a.active { background: var(--green-bg); color: var(--green-light); }
.dash-nav a .material-icons { font-size: 20px; }
.dash-sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }

.dash-main { flex: 1; padding: 40px 48px; max-width: 1000px; }
.dash-greeting-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.dash-greeting { font-family: var(--ff-display); font-size: 30px; }
.dash-calendar-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); color: var(--text-dim); flex-shrink: 0;
}
.dash-calendar-link:hover { background: var(--bg-2); border-color: var(--border-em); }

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin-bottom: 24px;
}
.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dash-card-head h3 { font-family: var(--ff-display); font-size: 19px; }
.dash-card-head a { font-size: 13px; color: var(--green-light); font-weight: 500; }

.status-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.status-chip {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}
.status-row { font-size: 14px; color: var(--text-dim); margin-top: 8px; }
.status-row strong { color: var(--text); font-weight: 600; }

.checklist { display: flex; flex-direction: column; gap: 10px; }
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-2);
}
.checklist-item .material-icons { color: var(--green-light); font-size: 20px; flex-shrink: 0; }

.dash-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  font-size: 14px;
}
.dash-empty .material-icons { font-size: 32px; display: block; margin: 0 auto 10px; color: var(--text-muted); }

/* ── Agent CRM dashboard ── */
.dash-greeting-sub { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.agent-stat-row { display: flex; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.agent-stat {
  flex: 1; min-width: 120px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px;
}
.agent-stat-num { font-family: var(--ff-display); font-size: 28px; color: var(--gold-d); }
.agent-stat-label { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }

/* ── Agent panel: client cards with progress ── */
.agent-client-list { display: flex; flex-direction: column; gap: 10px; }
.agent-client-card {
  display: block;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  text-decoration: none;
  color: inherit;
  transition: var(--trans);
}
.agent-client-card:hover { background: var(--gold-bg); }
.agent-client-card-top { display: flex; align-items: center; gap: 12px; }
.agent-client-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--green-bg); color: var(--green-light);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.agent-client-card-info { flex: 1; min-width: 0; }
.agent-client-name { font-weight: 600; font-size: 14.5px; }
.agent-client-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.agent-client-chevron { color: var(--text-muted); flex-shrink: 0; }
.agent-client-progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.agent-client-progress-bar { flex: 1; height: 5px; border-radius: 3px; background: var(--bg-3); overflow: hidden; }
.agent-client-progress-fill { height: 100%; background: var(--gold); border-radius: 3px; transition: width .3s ease; }
.agent-client-progress-label { font-size: 12px; font-weight: 600; color: var(--text-muted); flex-shrink: 0; }

/* ── Documents section ── */
.documents-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.documents-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.documents-section-title { display: flex; align-items: center; gap: 8px; font-family: var(--ff-display); font-size: 15px; }
.documents-section-title .material-icons { font-size: 18px; color: var(--gold-d); }
.documents-upload-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--green-light);
  border: 1px solid var(--border-em); border-radius: 999px; padding: 6px 14px;
  transition: var(--trans);
}
.documents-upload-btn:hover { background: var(--green-bg); }
.documents-upload-btn .material-icons { font-size: 15px; }
.documents-list { display: flex; flex-direction: column; gap: 8px; }
.documents-empty { font-size: 13px; color: var(--text-muted); }
.document-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: var(--radius); background: var(--bg-2); font-size: 13.5px;
}
.document-row .material-icons { font-size: 18px; color: var(--gold-d); flex-shrink: 0; }
.document-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-row a.document-row-name { color: var(--text); text-decoration: none; }
.document-row a.document-row-name:hover { text-decoration: underline; }
.document-row-delete { cursor: pointer; color: var(--text-muted); opacity: 0.6; flex-shrink: 0; }
.document-row-delete:hover { opacity: 1; color: #e0554f; }

/* ── Chat assistant widget ── */
.chat-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 3500;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--gold), var(--gold-d)); color: #1c1204;
  box-shadow: 0 12px 28px -10px rgba(201,146,42,0.55);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease;
}
.chat-fab:hover { transform: translateY(-2px) scale(1.04); }
.chat-fab .material-icons { font-size: 26px; }

.chat-panel[hidden] { display: none; }
.chat-panel {
  position: fixed; right: 24px; bottom: 92px; z-index: 3500;
  width: 360px; max-width: calc(100vw - 40px); height: 480px; max-height: calc(100vh - 140px);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  animation: chatPanelIn .2s ease;
}
@keyframes chatPanelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.chat-panel-head {
  padding: 16px 18px; background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff; font-family: var(--ff-display); font-size: 15.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.chat-panel-close { background: none; border: none; color: rgba(255,255,255,0.8); cursor: pointer; display: flex; }
.chat-panel-close:hover { color: #fff; }
.chat-panel-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 85%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; }
.chat-msg-assistant { align-self: flex-start; background: var(--bg-2); color: var(--text); border-bottom-left-radius: 4px; }
.chat-msg-user { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg-error { align-self: flex-start; background: rgba(220,80,80,0.10); color: #c0392b; border-bottom-left-radius: 4px; }
.chat-panel-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); flex-shrink: 0; }
.chat-panel-form input {
  flex: 1; border: 1px solid var(--border); border-radius: 999px; padding: 10px 16px;
  font-family: var(--ff-body); font-size: 13.5px; background: var(--bg-2); color: var(--text);
}
.chat-panel-form input:focus { outline: none; border-color: var(--green); }
.chat-send-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer; flex-shrink: 0;
  background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center;
}
.chat-send-btn:hover { background: var(--green-light); }
.chat-send-btn .material-icons { font-size: 18px; }
@media (max-width: 480px) {
  .chat-panel { right: 12px; left: 12px; width: auto; bottom: 84px; }
  .chat-fab { right: 16px; bottom: 16px; }
}

.settings-form .form-group { margin-bottom: 18px; }
.settings-process-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.settings-process-row:last-of-type { border-bottom: none; }
.settings-checkbox-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.settings-check-pill {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 13px;
  cursor: pointer;
  transition: var(--trans);
  user-select: none;
}
.settings-check-pill.selected { background: var(--green-bg); border-color: var(--green); color: var(--green-light); font-weight: 600; }

.process-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.process-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--trans);
}
.process-tab.active { background: var(--green-bg); border-color: var(--green); color: var(--green-light); }
.process-tab.locked { color: var(--text-muted); }
.process-tab-add { color: var(--green-light); border-style: dashed; }

.process-panel { display: none; }
.process-panel.active { display: block; }

.process-locked {
  text-align: center;
  padding: 30px 16px;
}
.process-locked .material-icons { font-size: 32px; color: var(--text-muted); margin-bottom: 8px; }
.process-locked h4 { font-family: var(--ff-display); font-size: 18px; margin-bottom: 6px; }
.process-locked p { color: var(--text-muted); font-size: 14px; margin-bottom: 16px; max-width: 420px; margin-left: auto; margin-right: auto; }

.process-edit-form { margin-top: 4px; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 35, 0.55);
  display: grid;
  place-items: center;
  padding: 40px 20px;
  overflow-y: auto;
  z-index: 4000;
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: none;
  animation: modalFadeIn 0.22s ease-out both;
}
.modal-overlay[hidden] { display: none; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalScaleIn { from { opacity: 0; transform: translateY(4px) scale(0.992); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-card {
  max-width: 540px;
  width: 100%;
  /* Grid items get their computed overflow silently forced from visible to
     auto by the UA (so automatic min-size works) — that auto then clips any
     absolutely-positioned dropdown menu that extends past this card's own
     box. Force it back to visible so dropdowns aren't cut off. */
  overflow: visible;
  transform-origin: center center;
  animation: modalScaleIn 0.22s ease-out both;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h3 { font-family: var(--ff-display); font-size: 19px; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); display: flex; padding: 4px; border-radius: 6px; }
.modal-close:hover { background: var(--bg-2); color: var(--text); }
.modal-body .form-group { margin-bottom: 14px; }
.modal-body select, .modal-body textarea { width: 100%; }

.btn-sm { padding: 7px 14px; font-size: 13px; }

.pdf-upload-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px dashed var(--green); color: var(--green-light);
  padding: 10px 16px; border-radius: 8px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; margin-bottom: 6px;
}
.pdf-upload-btn:hover { background: var(--green-bg); }
.pdf-upload-hint { font-size: 12.5px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.pdf-upload-status { font-size: 13px; margin-bottom: 16px; color: var(--text-dim); }

.prospect-list { display: flex; flex-direction: column; gap: 10px; }
.prospect-card {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.prospect-card-link {
  display: block; padding: 14px 16px; text-decoration: none; color: inherit; transition: var(--trans);
}
.prospect-card-link:hover { background: var(--gold-bg); }
.prospect-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.prospect-name { font-weight: 600; font-size: 14.5px; }
.prospect-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.prospect-card-chevron { color: var(--text-muted); flex-shrink: 0; }
.prospect-card-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; justify-content: flex-end; padding: 0 12px 10px; }
.prospect-card-actions .text-link-btn { font-size: 12.5px; padding: 6px 8px; }
.prospect-card-actions .btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.prospect-deal-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.prospect-deal-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-bg); color: var(--green); font-size: 12.5px; font-weight: 500;
  padding: 6px 8px 6px 12px; border-radius: 20px;
}
.prospect-deal-chip-remove { font-size: 15px !important; cursor: pointer; opacity: 0.6; border-radius: 50%; }
.prospect-deal-chip-remove:hover { opacity: 1; background: rgba(0,0,0,0.06); }
.prospect-deal-add {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: 1px dashed var(--border); color: var(--text-muted);
  font-size: 12.5px; font-weight: 500; padding: 6px 12px; border-radius: 20px; cursor: pointer;
}
.prospect-deal-add:hover { border-color: var(--green); color: var(--green); }
.prospect-deal-add .material-icons { font-size: 15px; }

/* ── Prospect profile page: bio grid + portfolio (deals) list ── */
.profile-bio-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px;
}
@media (max-width: 560px) { .profile-bio-grid { grid-template-columns: 1fr; } }
.profile-bio-field { display: flex; flex-direction: column; gap: 3px; }
.profile-bio-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.profile-bio-value { font-size: 14.5px; color: var(--text); }
.profile-bio-notes {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 14px; color: var(--text-dim); white-space: pre-wrap;
}
.profile-status-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500;
  color: var(--text-muted); margin-top: 4px;
}
.profile-status-badge.invited { color: var(--green); }
.profile-status-badge .material-icons { font-size: 15px; }

.portfolio-list { display: flex; flex-direction: column; gap: 10px; }
.portfolio-item {
  display: flex; align-items: center; gap: 14px;
  padding: 0 6px 0 14px; border: 1px solid var(--border); border-radius: 10px;
}
.portfolio-item-link {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px;
  padding: 12px 0; color: inherit; text-decoration: none; cursor: pointer;
}
.portfolio-item-icon {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--green-bg); color: var(--green-light);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.portfolio-item-info { flex: 1; min-width: 0; }
.portfolio-item-title { font-weight: 600; font-size: 14.5px; }
.portfolio-item-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.deal-stage-tag {
  display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text-muted); background: var(--bg-2, var(--bg)); border-radius: 5px;
  padding: 2px 7px; margin-left: 6px; vertical-align: middle;
}

.invite-pending-badge {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--gold-d, #a8791f); background: rgba(201,146,42,0.14);
  border-radius: 5px; padding: 2px 7px; margin-left: 8px; vertical-align: middle;
}

/* ── Deal detail page: stage stepper + next action + activity timeline + documents ── */
.deal-header-row { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.deal-header-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: var(--green-bg); color: var(--green-light);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.deal-header-meta { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.deal-stage-stepper { display: flex; flex-wrap: wrap; gap: 8px; }
.deal-stage-pill {
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-muted);
  font-size: 12.5px; font-weight: 500; padding: 7px 14px; border-radius: 100px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.deal-stage-pill:hover { border-color: var(--green); color: var(--text); }
.deal-stage-pill.done { background: var(--green-bg); border-color: var(--green-bg); color: var(--green-light); }
.deal-stage-pill.current { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.deal-stage-pill.lost-pill { margin-left: auto; }
.deal-stage-pill.lost-pill.current { background: #a03030; border-color: #a03030; }
.deal-stage-pill.lost-pill:hover { border-color: #a03030; color: #a03030; }

.deal-next-action-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.deal-next-action-form .form-group { flex: 1; min-width: 160px; margin: 0; }
.deal-next-action-current {
  display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text);
  margin-bottom: 14px; padding: 10px 14px; background: var(--bg-2, var(--bg)); border-radius: 8px;
}
.deal-next-action-current .material-icons { font-size: 18px; color: var(--green-light); }
.deal-next-action-current-date { font-weight: 600; flex-shrink: 0; }

.activity-form { display: flex; gap: 10px; margin-bottom: 18px; align-items: flex-start; }
.activity-form textarea { flex: 1; min-height: 44px; resize: vertical; }

.activity-timeline { display: flex; flex-direction: column; gap: 0; }
.activity-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.activity-item:first-child { border-top: none; }
.activity-item-icon {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  background: var(--bg-2, var(--bg)); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.activity-item-icon.kind-stage { background: var(--green-bg); color: var(--green-light); }
.activity-item-icon.kind-document { background: var(--green-bg); color: var(--green-light); }
.activity-item-body { flex: 1; min-width: 0; }
.activity-item-note { font-size: 14px; color: var(--text); white-space: pre-wrap; }
.activity-item-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

.doc-list { display: flex; flex-direction: column; gap: 8px; }
.doc-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.doc-item-icon { color: var(--green-light); font-size: 20px; flex-shrink: 0; }
.doc-item-info { flex: 1; min-width: 0; }
.doc-item-name { font-size: 13.5px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-item-meta { font-size: 11.5px; color: var(--text-muted); }
.doc-item a.text-link-btn, .doc-item button.text-link-btn { flex-shrink: 0; }

body.agent-shell-theme .deal-header-icon { background: var(--as-accent-dim); color: var(--as-accent); }
body.agent-shell-theme .deal-header-meta { color: var(--as-text-3); }
body.agent-shell-theme .deal-stage-pill { background: var(--as-bg-1); border-color: var(--as-border); color: var(--as-text-3); }
body.agent-shell-theme .deal-stage-pill:hover { border-color: var(--as-accent); color: var(--as-text-1); }
body.agent-shell-theme .deal-stage-pill.done { background: var(--as-accent-dim); border-color: var(--as-accent-dim); color: var(--as-accent); }
body.agent-shell-theme .deal-stage-pill.current { background: var(--as-text-1); border-color: var(--as-text-1); color: var(--as-bg-1); }
body.agent-shell-theme .deal-stage-pill.lost-pill.current { background: var(--as-red); border-color: var(--as-red); color: #fff; }
body.agent-shell-theme .deal-next-action-current { background: var(--as-bg-0); color: var(--as-text-1); }
body.agent-shell-theme .deal-next-action-current .material-icons { color: var(--as-accent); }
body.agent-shell-theme .activity-item { border-color: var(--as-border); }
body.agent-shell-theme .activity-item-icon { background: var(--as-bg-0); color: var(--as-text-3); }
body.agent-shell-theme .activity-item-icon.kind-stage,
body.agent-shell-theme .activity-item-icon.kind-document { background: var(--as-accent-dim); color: var(--as-accent); }
body.agent-shell-theme .activity-item-note { color: var(--as-text-1); }
body.agent-shell-theme .activity-item-meta { color: var(--as-text-4); }
body.agent-shell-theme .doc-item { border-color: var(--as-border); }
body.agent-shell-theme .doc-item-icon { color: var(--as-accent); }
body.agent-shell-theme .doc-item-name { color: var(--as-text-1); }
body.agent-shell-theme .doc-item-meta { color: var(--as-text-4); }

/* ── Calendar page ── */
.calendar-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
@media (max-width: 800px) { .calendar-layout { grid-template-columns: 1fr; } }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-day-name { text-align: center; font-size: 11px; font-weight: 500; color: var(--text-muted); padding: 8px 0; }
.cal-day {
  min-height: 52px; padding: 6px; border-radius: 8px;
  border: 1px solid transparent; cursor: default; transition: background 0.2s, border-color 0.2s;
}
.cal-day.has-events { cursor: pointer; }
.cal-day:hover { background: var(--bg-2, var(--bg)); border-color: var(--border); }
.cal-day.today { background: var(--green-bg); border-color: var(--green-bg); }
.cal-day-num { font-size: 12px; font-weight: 500; color: var(--text-muted); text-align: center; margin-bottom: 4px; }
.cal-day.today .cal-day-num { color: var(--green-light); font-weight: 700; }
.cal-events { display: flex; flex-direction: column; gap: 2px; }
.cal-event-dot { height: 4px; border-radius: 2px; width: 100%; }
.cal-event-dot.critical { background: #a03030; }
.cal-event-dot.amber    { background: #c9922a; }
.cal-event-dot.normal   { background: var(--green-light); }

.deadline-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 8px; border: 1px solid var(--border);
  margin-bottom: 8px; text-decoration: none; color: inherit;
}
.deadline-item:hover { background: var(--bg-2, var(--bg)); }
.deadline-item.critical { border-left: 2px solid #a03030; }
.deadline-item.amber    { border-left: 2px solid #c9922a; }
.deadline-item.normal   { border-left: 2px solid var(--green); }
.deadline-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.deadline-dot.critical { background: #a03030; }
.deadline-dot.amber    { background: #c9922a; }
.deadline-dot.normal   { background: var(--green-light); }
.deadline-text { flex: 1; min-width: 0; }
.deadline-text strong { display: block; font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deadline-text span { font-size: 11.5px; color: var(--text-muted); }

body.agent-shell-theme .cal-day-name { color: var(--as-text-3); }
body.agent-shell-theme .cal-day:hover { background: var(--as-bg-2); border-color: var(--as-border); }
body.agent-shell-theme .cal-day.today { background: var(--as-accent-dim); border-color: var(--as-accent-border); }
body.agent-shell-theme .cal-day-num { color: var(--as-text-3); }
body.agent-shell-theme .cal-day.today .cal-day-num { color: var(--as-accent); }
body.agent-shell-theme .deadline-item { border-color: var(--as-border); }
body.agent-shell-theme .deadline-item:hover { background: var(--as-bg-2); }
body.agent-shell-theme .deadline-item.normal { border-left-color: var(--as-accent); }
body.agent-shell-theme .deadline-dot.normal { background: var(--as-accent); }
body.agent-shell-theme .cal-event-dot.normal { background: var(--as-accent); }
body.agent-shell-theme .deadline-text strong { color: var(--as-text-1); }
body.agent-shell-theme .deadline-text span { color: var(--as-text-3); }

.checklist-item.task-item { align-items: center; cursor: default; }
.task-toggle { cursor: pointer; }
.checklist-item.task-item.done .task-title { text-decoration: line-through; color: var(--text-muted); }
.checklist-item.task-item.done .task-toggle { color: var(--green-light); }
.task-title { flex: 1; cursor: text; border-radius: 4px; padding: 2px 4px; margin: -2px -4px; transition: background 0.15s; }
.task-title:hover { background: var(--bg-2); }
.task-rename-input {
  width: 100%;
  border: none;
  background: transparent;
  border-bottom: 1.5px solid var(--green);
  font-family: var(--ff-body);
  font-size: inherit;
  color: inherit;
  padding: 0;
}
.task-rename-input:focus { outline: none; }
.task-delete { margin-left: auto; font-size: 18px !important; color: var(--text-muted); cursor: pointer; opacity: 0.6; }
.task-delete:hover { opacity: 1; color: #e0554f; }
.task-add-row { display: flex; gap: 8px; margin-top: 12px; }
.task-add-row input { flex: 1; }

/* ── Aspect groups: wide buttons, each sliding its own items open below ── */
.aspect-accordion { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 18px; }
.aspect-accordion-item { width: 80%; }
@media (max-width: 640px) {
  .aspect-accordion-item { width: 100%; }
}
.aspect-card-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-lg);
  background: var(--gold-bg);
  cursor: pointer;
  text-align: left;
  font-family: var(--ff-body);
  transition: var(--trans);
}
.aspect-card-btn:hover { border-color: var(--gold); }
.aspect-accordion-item.open .aspect-card-btn {
  border-color: var(--green);
  background: var(--green);
}
.aspect-card-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: rgba(255,255,255,.6); color: var(--gold-d);
  display: flex; align-items: center; justify-content: center;
}
.aspect-accordion-item.open .aspect-card-icon { background: rgba(255,255,255,.18); color: #fff; }
.aspect-card-title { flex: 1; font-weight: 600; font-size: 14.5px; }
.aspect-accordion-item.open .aspect-card-title { color: #fff; }
.aspect-card-count {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  background: var(--bg-card); border-radius: 999px; padding: 3px 10px; flex-shrink: 0;
}
.aspect-card-count.all-done { background: var(--gold); color: #fff; }
.aspect-accordion-item.open .aspect-card-count { background: rgba(255,255,255,.2); color: #fff; }
.aspect-accordion-item.open .aspect-card-count.all-done { background: #fff; color: var(--green); }
.aspect-card-chevron { color: var(--gold-d); transition: transform var(--trans); flex-shrink: 0; }
.aspect-accordion-item.open .aspect-card-chevron { color: #fff; transform: rotate(180deg); }
.aspect-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(.4,0,.2,1);
}
.aspect-accordion-body-inner { padding: 14px 4px 4px; }

.task-date-trigger {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--border); border-radius: 6px; padding: 4px 9px;
  font-size: 12px; font-family: var(--ff-body); color: var(--text-dim); background: var(--bg-2);
  flex-shrink: 0; cursor: pointer; transition: var(--trans);
}
.task-date-trigger .material-icons { font-size: 14px; }
.task-date-trigger:hover { border-color: var(--border-em); background: var(--bg-card); }
.task-date-trigger.has-date { color: var(--green-light); background: var(--green-bg); border-color: transparent; }
.task-aspect-tag {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--gold-d); background: var(--gold-bg); border-radius: 999px; padding: 3px 9px; flex-shrink: 0;
}

/* ── Mini calendar popover ── */
.mini-cal-popover {
  position: absolute; z-index: 3000;
  width: 240px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 12px;
  font-family: var(--ff-body); animation: miniCalIn 0.15s ease;
}
@keyframes miniCalIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.mini-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mini-cal-label { font-size: 13px; font-weight: 700; color: var(--text); }
.mini-cal-nav { border: none; background: none; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; border-radius: 6px; padding: 2px; }
.mini-cal-nav:hover { background: var(--bg-2); color: var(--text); }
.mini-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mini-cal-weekday { font-size: 10px; text-align: center; color: var(--text-muted); font-weight: 700; padding-bottom: 4px; }
.mini-cal-day {
  border: none; background: none; cursor: pointer; border-radius: 6px;
  font-size: 12px; padding: 6px 0; color: var(--text-dim); font-family: var(--ff-body);
}
.mini-cal-day:hover { background: var(--bg-2); }
.mini-cal-day.selected { background: var(--green); color: #fff; font-weight: 700; }
.mini-cal-footer { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); text-align: center; }
.mini-cal-clear { border: none; background: none; cursor: pointer; color: var(--text-muted); font-size: 12px; font-family: var(--ff-body); }
.mini-cal-clear:hover { color: #e0554f; }

/* ── Category / date view toggle ── */
.checklist-view { animation: viewSlideIn 0.25s ease; }
@keyframes viewSlideIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.process-footer-links { display: flex; gap: 22px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.text-link-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--ff-body); font-size: 13px; color: var(--text-muted);
}
.text-link-btn .material-icons { font-size: 16px; }
.text-link-btn:hover { color: var(--text); }
.process-delete-btn:hover { color: #c0392b; }


/* ── De-emphasized "add another move" ── */
.add-move-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--text-muted); margin-top: 14px;
}
.add-move-link .material-icons { font-size: 15px; }
.add-move-link:hover { color: var(--green-light); }

.aspect-accordion-body-inner .checklist { gap: 8px; }

/* ── Real month-grid task calendar ── */
.task-cal { padding-top: 4px; }
.task-cal-grid {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; margin-bottom: 16px;
}
.task-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.task-cal-label { font-family: var(--ff-display); font-size: 16px; font-weight: 700; text-transform: capitalize; }
.task-cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.task-cal-weekday { font-size: 11px; text-align: center; color: var(--text-muted); font-weight: 700; padding-bottom: 6px; }
.task-cal-day {
  position: relative; aspect-ratio: 1; border: 1px solid transparent; border-radius: 8px;
  background: var(--bg-2); cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; font-family: var(--ff-body);
  transition: var(--trans);
}
.task-cal-day:hover { border-color: var(--border-em); }
.task-cal-day-num { font-size: 12.5px; color: var(--text-dim); }
.task-cal-day.today .task-cal-day-num { color: var(--gold-d); font-weight: 700; }
.task-cal-day.has-tasks { background: var(--gold-bg); }
.task-cal-day-dot {
  font-size: 10px; font-weight: 700; color: #fff; background: var(--gold);
  border-radius: 999px; min-width: 15px; height: 15px; padding: 0 3px;
  display: flex; align-items: center; justify-content: center;
}
.task-cal-day.selected { background: var(--green); border-color: var(--green); }
.task-cal-day.selected .task-cal-day-num { color: #fff; }
.task-cal-day.selected .task-cal-day-dot { background: #fff; color: var(--green); }
.task-cal-day-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.task-cal-day-heading { font-family: var(--ff-display); font-size: 14px; font-weight: 700; text-transform: capitalize; margin: 6px 0 2px; }
.task-cal-item { background: var(--bg-2); }
.task-cal-undated { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 800px) {
  .dash-layout { flex-direction: column; }
  .dash-sidebar { width: 100%; flex-direction: row; align-items: center; overflow-x: auto; padding: 14px 16px; }
  .dash-sidebar .nav-logo { margin-bottom: 0; }
  .dash-nav { flex-direction: row; }
  .dash-sidebar-footer { display: none; }
  .dash-main { padding: 28px 20px; }
  .wizard-card { padding: 32px 24px; }
}

/* ============================================================
   AGENT SHELL — trasso.site-style admin layout (sidebar + topbar)
   for the agent-facing screens only (agent dashboard, lead/client
   profile). Every token below is scoped under .agent-shell so it
   never touches the client-facing move pages or the rest of the
   site's palette.
   ============================================================ */
/* Theme tokens live on <body> (not the .agent-shell div below) so that
   modals — rendered as siblings of .agent-shell, outside its DOM subtree —
   still inherit them via the cascade. */
body.agent-shell-theme {
  --as-bg-0:  #e7e0d0;
  --as-bg-1:  #ffffff;
  --as-bg-2:  #ded6c2;
  --as-bg-3:  #d2cab6;
  --as-border:       rgba(0,0,0,0.1);
  --as-border-hover: rgba(0,0,0,0.16);

  --as-text-1: #0c0b09;
  --as-text-2: #38332a;
  --as-text-3: #5c5648;
  --as-text-4: #837a68;

  --as-accent:        #b8956a;
  --as-accent-dim:    rgba(184,149,106,0.10);
  --as-accent-border: rgba(184,149,106,0.22);

  --as-green:     #2a5038;
  --as-green-dim: #dceee0;
  --as-red:       #a03030;
  --as-red-dim:   #f5dcdc;

  --as-sidebar-w: 224px;
  --as-topbar-h:  60px;
  --as-radius:    10px;
  --as-radius-sm: 6px;
  --as-shadow:      0 2px 12px rgba(0,0,0,0.08);
  --as-shadow-drop: 0 8px 32px rgba(0,0,0,0.12), 0 0 0 1px var(--as-border);

  --as-ff-display: 'Cormorant Garamond', serif;
  --as-ff-body:    'Inter', system-ui, sans-serif;

  background: var(--as-bg-0);
  color: var(--as-text-1);
  font-family: var(--as-ff-body);
}
.agent-shell {
  display: flex;
  min-height: 100vh;
}

/* ---- sidebar ---- */
.as-sidebar {
  width: var(--as-sidebar-w);
  background: var(--as-bg-1);
  border-right: 1px solid var(--as-border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.35s ease;
}
.as-sidebar-logo {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 20px 18px; border-bottom: 1px solid var(--as-border);
}
.as-sidebar-logo .material-icons { font-size: 26px; color: var(--as-accent); }
.as-sidebar-logo strong { display: block; font-family: var(--as-ff-display); font-size: 19px; font-weight: 600; color: var(--as-text-1); letter-spacing: 0.01em; }
.as-sidebar-logo span { font-size: 10.5px; color: var(--as-text-3); letter-spacing: 0.03em; }

.as-sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.as-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--as-radius-sm);
  font-size: 13.5px; font-weight: 400; color: var(--as-text-3);
  text-decoration: none; margin-bottom: 1px; position: relative;
  transition: all 0.25s ease;
}
.as-nav-item:hover { color: var(--as-text-1); background: var(--as-bg-2); }
.as-nav-item.active { color: var(--as-text-1); background: var(--as-bg-2); font-weight: 500; }
.as-nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 25%; bottom: 25%;
  width: 2px; border-radius: 2px; background: var(--as-accent);
}
.as-nav-item .material-icons { font-size: 19px; opacity: 0.6; }
.as-nav-item.active .material-icons { opacity: 1; color: var(--as-accent); }

.as-sidebar-footer { border-top: 1px solid var(--as-border); padding: 12px 10px; }
.as-sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--as-radius-sm); }
.as-user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--as-bg-2); border: 1px solid var(--as-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--as-text-2); flex-shrink: 0;
}
.as-user-info { flex: 1; min-width: 0; }
.as-user-info strong { display: block; font-size: 12px; font-weight: 500; color: var(--as-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-user-info span { font-size: 11px; color: var(--as-text-4); }
.as-logout { color: var(--as-text-3); margin-left: auto; cursor: pointer; display: flex; align-items: center; text-decoration: none; }
.as-logout:hover { color: var(--as-text-1); }

/* ---- main + topbar ---- */
.as-main { margin-left: var(--as-sidebar-w); flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
.as-topbar {
  height: var(--as-topbar-h); background: var(--as-bg-1); border-bottom: 1px solid var(--as-border);
  position: sticky; top: 0; z-index: 90;
  display: flex; align-items: center; gap: 16px; padding: 0 28px;
}
.as-topbar-title { font-family: var(--as-ff-display); font-size: 17px; color: var(--as-text-1); flex: 1; }
.as-topbar-menu-btn { display: none; background: none; border: none; cursor: pointer; color: var(--as-text-3); padding: 4px; }
.as-content { flex: 1; padding: 32px 28px; max-width: 1160px; width: 100%; margin: 0 auto; box-sizing: border-box; }

.as-mobile-overlay {
  position: fixed; inset: 0; background: rgba(10,9,7,0.4); z-index: 99;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.as-mobile-overlay.show { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  .as-sidebar { transform: translateX(-100%); }
  .as-sidebar.open { transform: translateX(0); }
  .as-main { margin-left: 0; }
  .as-topbar-menu-btn { display: flex; align-items: center; }
  .as-content { padding: 24px 18px; }
}

/* ---- restyle existing dashboard components to the trasso look, scoped to .agent-shell ---- */
body.agent-shell-theme .dash-greeting { font-family: var(--as-ff-display); color: var(--as-text-1); font-size: 26px; font-weight: 600; }
body.agent-shell-theme .dash-greeting-sub { color: var(--as-text-3); font-size: 13.5px; }
body.agent-shell-theme .dash-greeting-row { margin-bottom: 24px; }

body.agent-shell-theme .dash-card {
  background: var(--as-bg-1); border: 1px solid var(--as-border); border-radius: var(--as-radius);
  transition: border-color 0.3s, box-shadow 0.3s; margin-bottom: 20px;
}
body.agent-shell-theme .dash-card:hover { border-color: var(--as-border-hover); box-shadow: var(--as-shadow); }
body.agent-shell-theme .dash-card-head h3, body.agent-shell-theme h3 { font-family: var(--as-ff-display); font-size: 18px; font-weight: 600; color: var(--as-text-1); }

body.agent-shell-theme .agent-stat-row { gap: 16px; margin-bottom: 24px; }
body.agent-shell-theme .agent-stat { background: var(--as-bg-1); border: 1px solid var(--as-border); border-radius: var(--as-radius); padding: 22px 20px; }
body.agent-shell-theme .agent-stat-num { font-family: var(--as-ff-display); font-size: 34px; font-weight: 300; color: var(--as-text-1); letter-spacing: -0.5px; }
body.agent-shell-theme .agent-stat-label { font-size: 11px; font-weight: 500; color: var(--as-text-3); text-transform: uppercase; letter-spacing: 0.08em; }

body.agent-shell-theme .agent-client-card, body.agent-shell-theme .prospect-card-link { background: transparent; }
body.agent-shell-theme .agent-client-card:hover, body.agent-shell-theme .prospect-card-link:hover { background: var(--as-bg-2); }
body.agent-shell-theme .agent-client-name, body.agent-shell-theme .prospect-name { color: var(--as-text-1); }
body.agent-shell-theme .agent-client-meta, body.agent-shell-theme .prospect-meta { color: var(--as-text-3); }
body.agent-shell-theme .agent-client-avatar { background: var(--as-accent-dim); color: var(--as-accent); }
body.agent-shell-theme .prospect-card { border-color: var(--as-border); }
body.agent-shell-theme .prospect-deal-chip { background: var(--as-accent-dim); color: var(--as-accent); }
body.agent-shell-theme .portfolio-item { border-color: var(--as-border); }
body.agent-shell-theme .portfolio-item-icon { background: var(--as-accent-dim); color: var(--as-accent); }
body.agent-shell-theme .portfolio-item-link:hover { background: var(--as-bg-2); }
body.agent-shell-theme .deal-stage-tag { background: var(--as-bg-0); color: var(--as-text-3); }
body.agent-shell-theme .profile-bio-label { color: var(--as-text-3); }
body.agent-shell-theme .profile-bio-value { color: var(--as-text-1); }
body.agent-shell-theme .profile-status-badge { color: var(--as-text-3); }
body.agent-shell-theme .profile-status-badge.invited { color: var(--as-green); }

body.agent-shell-theme .btn-primary { background: var(--as-text-1); color: var(--as-bg-1); }
body.agent-shell-theme .btn-primary:hover { background: var(--as-text-2); }
body.agent-shell-theme .btn-outline { background: var(--as-bg-0); color: var(--as-text-2); border: 1px solid var(--as-border); }
body.agent-shell-theme .btn-outline:hover { background: var(--as-bg-2); color: var(--as-text-1); border-color: var(--as-border-hover); }
body.agent-shell-theme .text-link-btn { color: var(--as-text-3); }
body.agent-shell-theme .text-link-btn:hover { color: var(--as-text-1); }

body.agent-shell-theme .modal-card { background: var(--as-bg-1); border: 1px solid var(--as-border); border-radius: var(--as-radius); box-shadow: var(--as-shadow-drop); padding: 26px; }
body.agent-shell-theme .modal-head h3 { font-family: var(--as-ff-display); }
body.agent-shell-theme .form-group input, body.agent-shell-theme .form-group textarea,
body.agent-shell-theme .custom-select-trigger, body.agent-shell-theme .country-select-trigger {
  background: var(--as-bg-0); border-color: var(--as-border); color: var(--as-text-1);
}
body.agent-shell-theme .form-group label { color: var(--as-text-3); }
body.agent-shell-theme .custom-select-menu, body.agent-shell-theme .country-select-menu { background: var(--as-bg-1); border-color: var(--as-border); box-shadow: var(--as-shadow-drop); }
body.agent-shell-theme .custom-select-option:hover { background: var(--as-bg-2); }
body.agent-shell-theme .custom-select-option.selected { background: var(--as-accent-dim); color: var(--as-accent); }

body.agent-shell-theme .dash-empty { color: var(--as-text-3); }
body.agent-shell-theme .dash-empty .material-icons { color: var(--as-text-4); }
body.agent-shell-theme .invite-pending-badge { background: var(--as-accent-dim); color: var(--as-accent); }

