:root {
  --bg: #f8fafb;
  --bg-soft: #f9fbfc;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --emerald: #059669;
  --emerald-dark: #047857;
  --emerald-ink: #065f46;
  --emerald-soft: #ecfdf5;
  --emerald-line: #a7f3d0;
  --lime: #7ac142;
  --rose: #e11d48;
  --amber: #d97706;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 8px 28px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --font: "Plus Jakarta Sans", "Noto Sans Thai", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; min-height: 100dvh; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button, a, input, select, textarea { touch-action: manipulation; }
button, input, select, textarea { font-family: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.app-root { min-height: 100vh; }

.spinner {
  width: 32px; height: 32px;
  border: 3px solid #d1fae5;
  border-top-color: var(--emerald);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Landing */
.landing {
  min-height: 100vh;
  background: var(--bg-soft);
}
.landing-top {
  display: flex;
  justify-content: center;
  padding: 18px 16px 0;
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-lockup img { width: 36px; height: 36px; }
.brand-lockup strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}
.brand-lockup span {
  display: block;
  font-size: 11px;
  color: var(--emerald);
  font-weight: 600;
}
.landing-body {
  display: flex;
  justify-content: center;
  padding: 56px 16px 72px;
}
.landing-card {
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
  padding: 36px 32px 28px;
  text-align: center;
}
.landing-logo { width: 92px; height: 92px; margin: 0 auto 6px; }
.wordmark { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 2px auto 18px; line-height: 1.15; }
.wordmark strong { font-size: 22px; font-weight: 700; color: #1a4d12; }
.wordmark span { font-size: 9px; font-weight: 600; letter-spacing: 1.6px; color: #5b8c32; }
.landing-card h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -0.04em;
  color: #0b1220;
}
.byline {
  margin: 4px 0 18px;
  color: var(--emerald);
  font-weight: 600;
  font-size: 14px;
}
.landing-card h2 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
}
.lede {
  margin: 0 auto 18px;
  max-width: 360px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.feature-box {
  text-align: left;
  background: #f4f7f8;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.feature-box p {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}
.feature-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.7;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  transition: .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  background: var(--emerald);
  color: #fff;
}
.btn-primary:hover { background: var(--emerald-dark); }
.btn-lg {
  width: 100%;
  height: 44px;
  font-size: 14px;
}
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-ghost {
  background: #f1f5f9;
  color: #334155;
}
.btn-ghost:hover { background: #e2e8f0; }
.btn-outline {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  height: 28px;
  padding: 0 8px;
  font-size: 11px;
  justify-content: flex-start;
}
.btn-outline:hover { background: var(--emerald-soft); color: var(--emerald-dark); }
.hint {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--faint);
}

/* Auth */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 32px 28px 22px;
}
.shield {
  width: 44px; height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #ecfdf5;
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-card h1 {
  margin: 0;
  text-align: center;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.auth-sub {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0 22px;
}
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.field textarea { height: 84px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, .12);
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 4px 0 14px;
  color: var(--ink-2);
}
.check input { width: 15px; height: 15px; accent-color: var(--emerald); }
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 8px;
}
.linkish {
  background: none;
  border: 0;
  color: var(--emerald);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}
.linkish:hover { text-decoration: underline; }
.back-link {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}
.back-link:hover { color: var(--ink); }
.error {
  background: #fef2f2;
  color: #be123c;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  margin-bottom: 12px;
}
.success {
  background: var(--emerald-soft);
  color: var(--emerald-ink);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  margin-bottom: 12px;
}
.demo-box {
  margin-top: 16px;
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
}
.demo-box strong { color: var(--ink-2); }

/* App chrome */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
}
.topbar-inner, .page, .footer-inner {
  max-width: 896px;
  margin: 0 auto;
  padding: 0 16px;
}
.topbar-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-link {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  padding: 6px 8px;
}
.nav-link:hover { color: var(--emerald-dark); }
.nav-pill {
  font-size: 12px;
  font-weight: 600;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0cc;
  border-radius: 8px;
  padding: 6px 10px;
  text-decoration: none;
}
.user-link {
  font-size: 12px;
  color: var(--faint);
  text-decoration: none;
  padding: 4px 8px;
}
.user-link:hover { color: #475569; }

.page { padding: 28px 16px 48px; }
.page h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}
.page .sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.search-panel {
  background: #fff;
  border: 1px solid #e2e8f0cc;
  box-shadow: 0 2px 8px rgba(0,0,0,.03);
  border-radius: 12px;
  padding: 14px;
  margin: 22px 0 18px;
}
.search-wrap { position: relative; }
.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
}
.search-wrap input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 36px 0 44px;
  background: #f8fafc80;
  font-size: 16px;
  outline: none;
}
.search-wrap input[type="search"]::-webkit-search-cancel-button,
.search-wrap input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.search-clear[hidden] { display: none !important; }
.linkish[hidden] { display: none !important; }
.search-breakdown { font-weight: 500; color: var(--muted); }
.search-wrap input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(5,150,105,.12);
}
.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: var(--faint);
  cursor: pointer;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
}
.filter-row > span { font-size: 12px; font-weight: 500; color: var(--muted); }
.area-btn {
  min-width: 190px;
  height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  cursor: pointer;
  position: relative;
}
.area-menu {
  position: absolute;
  left: 0;
  top: 42px;
  z-index: 20;
  width: min(320px, calc(100vw - 3rem));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: 8px;
}
.area-menu-head {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px 8px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}
.area-list { max-height: 224px; overflow: auto; padding-top: 4px; }
.area-opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  text-align: left;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}
.area-opt:hover { background: #ecfdf5; }
.chk {
  width: 16px; height: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  flex-shrink: 0;
}
.chk.on { background: var(--emerald); border-color: var(--emerald); color: #fff; }

.list-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 14px;
  padding: 0 4px;
}
.list-meta p { margin: 0; font-size: 14px; font-weight: 600; min-width: 0; }
.list-meta span { font-size: 11px; color: var(--faint); }
.section-label {
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.search-contacts { margin-bottom: 8px; }
.search-contacts .buyer-card { margin: 0; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 768px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .page h1 { font-size: 30px; }
}

.card {
  background: #fff;
  border: 1px solid #e2e8f0e6;
  box-shadow: var(--shadow);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: 0 8px 20px rgba(15,23,42,.06); }
.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.card-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.card-head h2 { margin: 0; font-size: 16px; }
.card-head button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.card-head button:hover { color: var(--emerald-dark); text-decoration: underline; }
.agent-card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 4px;
}
.agent-card-meta { flex: 1; min-width: 0; }
.agent-avatar {
  flex: 0 0 auto;
  border: 0;
  padding: 0;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
  cursor: zoom-in;
}
.agent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.agent-avatar.md { width: 52px; height: 52px; }
.agent-avatar.lg { width: 88px; height: 88px; }
.agent-avatar.placeholder {
  display: grid;
  place-items: center;
  cursor: default;
  font-weight: 700;
  color: #0f766e;
  background: #ecfdf5;
  font-size: 14px;
}
.agent-avatar.lg.placeholder { font-size: 24px; }
.agent-modal-hero {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}
.agent-photo-editor .agent-photo-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.agent-photo-preview {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
  flex: 0 0 auto;
}
.agent-photo-preview-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.agent-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.agent-photo-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ecfdf5;
  color: #0f766e;
  font-weight: 700;
  font-size: 22px;
  flex: 0 0 auto;
}
.agent-photo-actions { flex: 1; min-width: 0; }
.agent-photo-actions .btn { height: 36px; }
.badge {
  font-size: 10px;
  font-weight: 600;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0cc;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.badge-amber { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.badge-rose { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.badge-slate { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.meta {
  margin: 6px 0 0;
  font-size: 12px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
}
.meta.area { color: #065f46e6; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  margin-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.act-wa { flex: 1; min-width: 85px; background: var(--emerald); color: #fff; }
.act-wa:hover { background: var(--emerald-dark); }
.act-line { flex: 1; min-width: 85px; background: #06c755; color: #fff; }
.act-line:hover { background: #05a847; }
.act-gcal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1a73e8;
  color: #fff;
  text-decoration: none;
}
.act-gcal:hover { background: #1557b0; color: #fff; }
.act-gcal .icon { width: 14px; height: 14px; }
.calendar-hint { margin: 8px 0 0; color: var(--muted); }
.act-soft { background: #f1f5f9; color: #334155; }
.act-soft:hover { background: #e2e8f0; }

.empty {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  max-width: 520px;
  margin: 24px auto;
}
.empty h3 { margin: 0 0 6px; font-size: 16px; }
.empty p { margin: 0 0 16px; font-size: 12px; color: var(--muted); }

.footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 32px 16px;
  margin-top: 48px;
  font-size: 12px;
  color: var(--muted);
}
.footer-inner {
  display: grid;
  gap: 24px;
}
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1.35fr; }
}
.footer-brand { text-align: center; }
@media (min-width: 768px) { .footer-brand { text-align: left; } }
.footer-brand img { width: 112px; height: 112px; margin: 0 auto 12px; border-radius: 12px; }
@media (min-width: 768px) { .footer-brand img { margin: 0 0 12px; } }
.contact-box {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
}
.contact-box p { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--ink); }
.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  color: #475569;
  text-decoration: none;
}
.contact-row:hover { color: var(--emerald-dark); }
.disclaimer {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.6;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  width: 100%;
  max-width: 448px;
  background: #fff;
  border-radius: 16px;
  padding: 24px 28px;
  max-height: min(88vh, 760px);
  overflow: auto;
  position: relative;
}
.modal h2 { margin: 0; font-size: 20px; }
.modal .desc { margin: 4px 0 16px; color: #475569; font-size: 13px; }
.modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
}
.crm-panel {
  margin-top: 16px;
  padding: 20px 24px;
  margin-left: -28px;
  margin-right: -28px;
  margin-bottom: -24px;
  background: #f8fafccc;
  border-top: 1px solid var(--line);
  border-radius: 0 0 16px 16px;
}
.crm-head { display: flex; justify-content: space-between; align-items: center; }
.crm-head span { font-size: 12px; font-weight: 700; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.activity {
  max-height: 96px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  font-size: 11px;
}
.activity-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #f8fafc;
}
.activity-row:last-child { border: 0; }

/* Admin */
.admin-top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 16px;
}
.admin-top-inner {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 768px) {
  .admin-top-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}
.admin-top h1 { margin: 0; font-size: 16px; }
.tabs {
  display: flex;
  gap: 6px;
  margin: 16px 0;
}
.tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.tab.on { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); }
th { background: #f8fafc; font-weight: 700; color: #475569; }
.admin-page { max-width: 1024px; margin: 0 auto; padding: 20px 16px 48px; }

/* Work / follow-ups */
.buckets { display: grid; gap: 16px; }
@media (min-width: 768px) { .buckets { grid-template-columns: 1fr 1fr 1fr; } }
.bucket {
  border-radius: 12px;
  border: 1px solid;
  padding: 12px;
  min-height: 140px;
}
.bucket.rose { border-color: #fecdd3; background: #fff1f280; }
.bucket.amber { border-color: #fde68a; background: #fffbeb80; }
.bucket.emerald { border-color: #a7f3d0; background: #ecfdf580; }
.bucket h3 { margin: 0 0 10px; font-size: 13px; }
.mini-card .actions { padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line-soft); }
.badge-amber.badge { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.mini-card h4 { margin: 0; font-size: 13px; }
.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 16px 0 22px;
}
@media (min-width: 640px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.stat b { display: block; font-size: 22px; letter-spacing: -0.04em; }
.stat span { font-size: 11px; color: var(--muted); }

.toast-wrap {
  position: fixed;
  bottom: 20px;
  right: 16px;
  left: 16px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
@media (min-width: 640px) {
  .toast-wrap { left: auto; width: 280px; }
}
body.has-tabbar .toast-wrap {
  bottom: calc(76px + env(safe-area-inset-bottom));
}
.toast {
  background: #0f172a;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  box-shadow: var(--shadow-md);
}
.toast.ok { background: var(--emerald-ink); }
.toast.err { background: #9f1239; }

.locked-card {
  width: 100%;
  max-width: 384px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
}
.locked-card h2 { margin: 0 0 8px; font-size: 16px; }
.locked-card p { margin: 0 0 18px; font-size: 12px; color: var(--muted); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin: 28px 0 12px;
}
.section-head h2 { margin: 0; font-size: 14px; }
.section-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.icon { width: 16px; height: 16px; flex-shrink: 0; }
.icon-lg { width: 40px; height: 40px; }
.muted { color: var(--muted); }
.tiny { font-size: 11px; color: var(--faint); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; }
.hidden { display: none !important; }
.rel { position: relative; }

/* Work dashboard */
.work-shell { min-height: 100vh; background: #f4f7f8; }
.work-top {
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 20;
}
.work-top-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.work-brand { display: flex; align-items: center; gap: 14px; }
.work-back {
  color: var(--faint);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.work-back:hover { color: var(--ink-2); }
.work-title { font-size: 16px; letter-spacing: -0.03em; }
.work-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}
.work-h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.04em;
  font-weight: 800;
}
.work-lead { margin: 6px 0 18px; color: var(--muted); font-size: 14px; }
.plan-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
@media (min-width: 720px) {
  .plan-row { grid-template-columns: repeat(4, 1fr); }
}
.plan-card {
  border-radius: 16px;
  padding: 18px 18px 16px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid transparent;
}
.plan-card .icon { width: 18px; height: 18px; }
.plan-card b { font-size: 28px; letter-spacing: -0.05em; line-height: 1; }
.plan-card span { font-size: 12px; font-weight: 600; }
.plan-card.overdue { background: #fff1f2; color: #be123c; }
.plan-card.today { background: #fffbeb; color: #b45309; }
.plan-card.tomorrow { background: #f1f5f9; color: #334155; }
.plan-card.tracked { background: #ecfdf5; color: #047857; }
.work-section, .work-block {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 16px 18px 18px;
  margin-bottom: 14px;
}
.work-section { background: transparent; border: 0; padding: 4px 0 18px; }
.work-section-head, .work-block-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.work-section-head h2, .work-block h2 {
  margin: 0;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.work-section-head p, .work-block p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.work-count { font-size: 18px; font-weight: 700; color: var(--faint); }
.work-section.overdue h2, .work-section.overdue .icon { color: #e11d48; }
.work-section.today h2, .work-section.today .icon { color: #d97706; }
.work-section.tomorrow h2, .work-section.tomorrow .icon { color: #64748b; }
.work-empty {
  min-height: 64px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}
.work-item, .buyer-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px 14px;
}
.work-cta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 28px 0 8px; }
.work-cta .btn { height: 40px; padding: 0 18px; border-radius: 10px; }
.type-pill {
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  background: #f1f5f9;
  color: #334155;
  white-space: nowrap;
}
.type-pill.villa { background: #ecfdf5; color: #047857; }
.type-pill.house { background: #fffbeb; color: #b45309; }
.type-pill.condo { background: #eff6ff; color: #1d4ed8; }
.type-pill.townhouse { background: #f5f3ff; color: #6d28d9; }
.type-pill.land { background: #f0fdf4; color: #166534; }
.plan-card.signal {
  border: 1px solid var(--line-soft);
  background: #fff;
  text-align: left;
  cursor: pointer;
  min-height: 78px;
}
.plan-card.signal.on {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px #ccfbf1;
}
.plan-row.sales-brief {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.signal-emoji { font-size: 16px; }
.signal-pill {
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 7px;
  background: #f1f5f9;
  color: #334155;
}
.signal-pill.hot { background: #fee2e2; color: #b91c1c; }
.signal-pill.overdue { background: #ffedd5; color: #c2410c; }
.signal-pill.today { background: #dbeafe; color: #1d4ed8; }
.signal-pill.stale7, .signal-pill.stale30 { background: #f1f5f9; color: #64748b; }
.next-action-line {
  margin: 6px 0 8px;
  font-size: 13px;
  color: #0f172a;
  background: #ecfdf5;
  border-radius: 8px;
  padding: 8px 10px;
}
.next-action-line b { color: #047857; }
.buyer-pipe { overflow-x: auto; flex-wrap: nowrap; }
.buyer-pipe .pipe { font-size: 9px; padding: 4px 6px; white-space: nowrap; }
.match-panel {
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #a7f3d0;
  background: #f0fdf4;
}
.match-panel h3 { margin: 0 0 4px; font-size: 15px; }
.match-row {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #d1fae5;
}
.match-score {
  flex: 0 0 52px;
  text-align: center;
  background: #fff;
  border-radius: 10px;
  padding: 8px 4px;
  border: 1px solid #a7f3d0;
}
.match-score b { display: block; font-size: 16px; color: #047857; }
.match-score span { font-size: 10px; color: #64748b; }
.match-body { flex: 1; min-width: 0; }
.match-why { color: #047857 !important; }
.prop-card .photo-strip { margin: 0 0 10px; }
.photo-editor {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #f8fafc;
}
.photo-editor-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.photo-editor-head strong { font-size: 14px; }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}
.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #e2e8f0;
}
.photo-thumb-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.photo-thumb img,
.photo-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.photo-add {
  aspect-ratio: 1;
  border: 1.5px dashed #94a3b8;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.photo-add span:first-child { font-size: 22px; line-height: 1; font-weight: 500; }
.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 6px;
}
.photo-strip-item {
  aspect-ratio: 4 / 3;
  border: 0;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #e2e8f0;
  cursor: zoom-in;
}
.photo-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.82);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
}
.photo-preview-img {
  max-width: min(920px, 100%);
  max-height: min(78vh, 100%);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.photo-preview-close {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
}
.deal-line {
  font-weight: 700 !important;
  color: #047857 !important;
}
.deal-line.co { color: #b45309 !important; }
.bonus-line.on { color: #be123c; font-weight: 600; }
.bonus-line.off { color: var(--faint); text-decoration: line-through; }
.deal-box {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  border-radius: 14px;
}
.deal-box h3 {
  margin: 0 0 4px;
  font-size: 14px;
}
.deal-box .field { margin-top: 10px; }
.status-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.status-chip {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: #475569;
}
.status-chip b { color: var(--ink); margin-left: 2px; }
.pipeline { display: flex; gap: 4px; margin: 8px 0 4px; }
.pipe {
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.pipe.on { background: #0f172a; color: #fff; }
.icon-btn {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
}
.icon-btn:hover { background: #f1f5f9; color: var(--ink); }
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f8fafc;
  border-radius: 10px;
  padding: 4px;
}
.seg-btn {
  height: 36px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
}
.seg-btn.on { background: var(--emerald); color: #fff; }
.modal.viewing-modal { max-width: 520px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.modal-actions .btn { height: 36px; padding: 0 14px; font-size: 13px; }
.buyer-card .meta { display: flex; align-items: center; gap: 6px; }
@media (max-width: 640px) {
  .two { grid-template-columns: 1fr; }
  .work-h1 { font-size: 26px; }
}

.settings-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}
.settings-page h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -0.04em; }
.settings-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}
.settings-card h2 { margin: 0 0 12px; font-size: 16px; }
.settings-role {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 16px;
}
.settings-role strong { display: block; font-size: 14px; }
.settings-role p { margin: 4px 0 6px; font-size: 12px; color: var(--muted); }
.settings-list { margin: 0; padding-left: 18px; color: #334155; font-size: 13px; }
.settings-list li { margin: 6px 0; }
.role-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: #f8fafc;
  white-space: nowrap;
}
.role-pill.role-super-admin { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.role-pill.role-admin { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.role-pill.role-user { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* Mobile app chrome */
.app-shell.has-tabbar {
  min-height: 100dvh;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
  padding-top: env(safe-area-inset-top);
}
.app-header-inner {
  max-width: 980px;
  margin: 0 auto;
  min-height: 56px;
  padding: 8px 12px 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.app-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.app-header-logo { width: 32px; height: 32px; flex-shrink: 0; }
.app-header-brand strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.app-header-brand span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70vw;
}
.header-plus {
  width: 44px;
  height: 44px;
  background: var(--emerald);
  color: #fff;
  border-radius: 12px;
}
.header-plus:hover { background: var(--emerald-dark); color: #fff; }
.header-plus .icon { width: 20px; height: 20px; }

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  text-decoration: none;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  border-radius: 12px;
}
.tabbar-item.on {
  color: var(--emerald);
  background: #ecfdf5;
}
.tabbar-icon { width: 22px; height: 22px; }
.tabbar-icon-wrap {
  position: relative;
  display: inline-flex;
}
.tab-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pill-tabs {
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0 16px;
  padding-bottom: 2px;
}
.pill-tabs .tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 14px;
}

.settings-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  text-decoration: none;
}
.settings-nav strong { display: block; font-size: 14px; }
.settings-nav span { font-size: 12px; color: var(--muted); }
.settings-nav-arrow { margin-left: auto; font-size: 22px; color: var(--faint); }

@media (max-width: 767px) {
  .screen-title, .screen-sub { display: none; }
  .page { padding: 16px 16px 24px; }
  .settings-page { padding: 12px 16px 32px; }
  .work-page { padding: 16px 16px 28px; }
  .work-h1 { font-size: 24px; }
  .plan-row { grid-template-columns: 1fr 1fr; margin-bottom: 16px; }
  .plan-card { min-height: 92px; padding: 14px; }
  .plan-card b { font-size: 22px; }
  .search-panel { margin: 0 0 14px; }
  .area-btn { min-width: 0; width: 100%; height: 44px; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .work-block-head, .section-head { flex-direction: column; align-items: stretch; }
  .work-block-head .btn, .section-head .btn { height: 44px; width: 100%; }
  .work-cta .btn { width: 100%; height: 44px; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .actions .btn, .actions .act { height: 40px; justify-content: center; border: 0; width: 100%; }
  .icon-btn { width: 40px; height: 40px; }
  .header-plus { width: 44px; height: 44px; }
  input, select, textarea { font-size: 16px !important; }
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    max-width: none;
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top)));
    padding: 22px 18px calc(24px + env(safe-area-inset-bottom));
  }
  .crm-panel {
    margin-left: -18px;
    margin-right: -18px;
  }
  .admin-page { padding: 12px 12px 32px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tab { flex: 0 0 auto; min-height: 40px; }
  table { font-size: 12px; }
  th, td { padding: 12px 10px; }
}

@media (min-width: 768px) {
  .tabbar {
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    border-radius: 18px 18px 0 0;
    box-shadow: var(--shadow-md);
  }
}

/* Work consolidation */
.work-seg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 0 0 16px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
}
.work-seg-btn {
  border: 0;
  background: transparent;
  border-radius: 10px;
  min-height: 48px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.work-seg-btn b { font-size: 15px; letter-spacing: -0.03em; color: #0f172a; }
.work-seg-btn.on {
  background: #ecfdf5;
  color: var(--emerald);
}
.work-seg-btn.on b { color: var(--emerald-ink); }
.role-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 12px;
  padding-bottom: 2px;
}
.role-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  height: 36px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.role-chip b { color: var(--ink); }
.role-chip.on {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}
.role-chip.on b { color: #a7f3d0; }
.work-block.compact { padding: 14px; }
.work-empty-card { margin-top: 8px; }
.scroll-top {
  position: fixed;
  right: 16px;
  bottom: calc(78px + env(safe-area-inset-bottom));
  z-index: 44;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #0f172a;
  color: #fff;
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.scroll-top:active { transform: scale(.96); }
.scroll-top-icon { width: 20px; height: 20px; }
.add-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, .42);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.add-sheet {
  width: min(480px, 100%);
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-md);
}
.add-sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 4px auto 12px;
}
.add-sheet h3 { margin: 0; font-size: 18px; letter-spacing: -0.03em; }
.add-sheet-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1px solid var(--line-soft);
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px;
  margin-top: 10px;
  cursor: pointer;
}
.add-sheet-item:active { background: #ecfdf5; border-color: #a7f3d0; }
.add-sheet-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald);
  flex-shrink: 0;
}
.add-sheet-item strong { display: block; font-size: 14px; }
.add-sheet-item small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }

.prop-sales-grid { display: flex; flex-direction: column; gap: 12px; }
.prop-sales-card { background: #fff; border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; }
.prop-sales-card.selected { border-color: #0f766e; box-shadow: 0 0 0 2px #ccfbf1; }
.prop-sales-cover { position: relative; aspect-ratio: 16/10; background: #e2e8f0; }
.prop-cover-btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #e2e8f0; cursor: pointer; }
.prop-cover-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prop-cover-btn.empty { color: #94a3b8; font-weight: 600; }
.prop-check { position: absolute; top: 8px; left: 8px; z-index: 2; display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 600; }
.prop-status { position: absolute; top: 8px; right: 8px; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 700; background: #ecfdf5; color: #047857; }
.prop-status.wait { background: #fffbeb; color: #b45309; }
.prop-status.stop { background: #fef2f2; color: #b91c1c; }
.prop-status.inline { position: static; }
.prop-sales-body { padding: 12px 14px 14px; }
.prop-sales-title { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 0; font: inherit; font-weight: 800; font-size: 17px; color: #0f172a; cursor: pointer; }
.prop-line { margin: 4px 0; color: #475569; font-size: 13px; }
.prop-price-lg { margin: 6px 0; font-size: 20px; font-weight: 800; color: #0f172a; }
.prop-price-xl { margin: 8px 0; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.prop-specs { margin: 4px 0; font-size: 13px; color: #334155; }
.prop-sales-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.stale-warn { color: #c2410c !important; font-weight: 600; }
.units-filters { margin-bottom: 10px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chips select { height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12px; padding: 0 8px; }
.selection-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #ecfdf5; border: 1px solid #a7f3d0; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(15,23,42,.45); display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.action-sheet, .prop-view-sheet { width: min(560px, 100%); max-height: min(92vh, 900px); overflow: auto; background: #fff; border-radius: 16px 16px 12px 12px; padding: 16px; box-shadow: 0 -8px 40px rgba(0,0,0,.2); }
.prop-view-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 10px; position: sticky; top: 0; background: #fff; z-index: 2; padding-bottom: 8px; }
.prop-view-cta { display: flex; gap: 6px; flex-wrap: wrap; }
.prop-view-cta.bottom { margin-top: 16px; }
.prop-view-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-bottom: 12px; }
.prop-view-gallery button { border: 0; padding: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 4/3; }
.prop-view-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prop-view-gallery.empty { aspect-ratio: 16/9; display: grid; place-items: center; background: #f1f5f9; border-radius: 12px; color: #94a3b8; }
.info-block { margin-top: 14px; padding: 12px; border-radius: 12px; }
.info-block.client { background: #f0fdf4; border: 1px solid #bbf7d0; }
.info-block.internal { background: #fff7ed; border: 1px solid #fed7aa; }
.info-block h3 { margin: 0 0 8px; font-size: 13px; }
.internal-warn { color: #c2410c; font-weight: 600; }
.public-share-page { max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; background: linear-gradient(180deg, #f8fafc, #fff 120px); min-height: 100vh; }
.public-share-head h1 { margin: 4px 0 8px; font-size: 26px; letter-spacing: -0.03em; }
.public-prop-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; margin: 14px 0; box-shadow: 0 4px 16px rgba(15,23,42,.04); }
.public-cover { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: #e2e8f0; }
.public-cover.empty { display: grid; place-items: center; color: #94a3b8; font-weight: 700; }
.public-prop-body { padding: 14px; }
.feedback-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.feedback-row .fb { flex: 1; min-width: 96px; height: 40px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; font-weight: 600; cursor: pointer; }
.feedback-row .fb.on { border-color: #0f766e; background: #ecfdf5; color: #047857; }
.public-share-foot { margin-top: 20px; text-align: center; }

.pipeline-board-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.pipe-col-btn {
  flex: 0 0 auto;
  min-width: 108px;
  border: 1px solid var(--line-soft);
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}
.pipe-col-btn.on { border-color: #0f766e; box-shadow: 0 0 0 2px #ccfbf1; }
.pipe-col-btn strong { display: block; font-size: 10px; color: #64748b; letter-spacing: 0.02em; }
.pipe-col-btn b { display: block; font-size: 20px; margin-top: 2px; color: #0f172a; }
.stale-dot { display: inline-block; margin-top: 4px; font-size: 10px; color: #c2410c; font-weight: 700; }
.match-check { display: flex; align-items: flex-start; padding-top: 8px; }

/* Multi-role VIEW AS + reports */
.view-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0fdfa 0%, #f8fafc 100%);
  border: 1px solid #ccfbf1;
}
.view-switcher-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #0f766e;
  margin-right: 4px;
}
.view-chip {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}
.view-chip.on {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}
.section-label {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.report-panel {
  margin-top: 8px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: #fff;
}
.report-panel h2 { margin: 0 0 6px; font-size: 18px; }
.report-panel h3 { margin: 12px 0 6px; font-size: 14px; }
.income-box {
  margin: 10px 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
}
.income-box.developer {
  border-color: #a7f3d0;
  background: #ecfdf5;
}
.income-box h3 { margin: 0 0 4px; }
.income-box p { margin: 4px 0; font-size: 14px; }
.role-check-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 14px;
}
.role-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}
.role-check input { width: 18px; height: 18px; }
