/* ─────────────────────────────────────────────────────────────
   RAY WHITE CHAPEL HILL — CLIENT PORTAL
   styles.css — Direction A · Editorial Refined
   Exact design implementation
───────────────────────────────────────────────────────────── */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --rw-yellow:       #FFE512;
  --rw-yellow-dark:  #E6CD00;
  --rw-yellow-pale:  #FFFBE0;
  --rw-ink:          #1A1A1A;
  --rw-graphite:     #595959;
  --rw-muted:        #8A8A8A;
  --rw-faint:        #C9C9C9;
  --rw-paper:        #FFFFFF;
  --rw-cream:        #FAF8F4;
  --rw-line:         #E6E2DC;
  --rw-success:      #2A7A45;
  --rw-danger:       #C0392B;
  --rw-font-display: 'Playfair Display', Georgia, serif;
  --rw-font-body:    'Lato', system-ui, sans-serif;
  /* Legacy aliases — keep for any JS-generated markup */
  --rw-dark-grey:    #1A1A1A;
  --rw-white:        #FFFFFF;
  --rw-grey:         #FAF8F4;
  --rw-grey2:        #E6E2DC;
  --rw-grey3:        #C9C9C9;
  --rw-text:         #1A1A1A;
  --rw-text-muted:   #8A8A8A;
  --rw-text-dim:     #C9C9C9;
  --rw-green:        #2A7A45;
  --rw-green-light:  #E8F5EE;
  --rw-red:          #C0392B;
  --rw-red-light:    #FDF0EE;
  --rw-blue:         #1A3560;
  --rw-blue-light:   #EEF1F8;
  --shadow-sm:       0 1px 4px rgba(0,0,0,.06);
  --shadow:          0 4px 24px rgba(0,0,0,.07);
  --shadow-lg:       0 24px 64px rgba(0,0,0,.10);
  --radius:          0px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--rw-font-body);
  background: var(--rw-paper);
  color: var(--rw-ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-size: 14px;
}
h1,h2,h3,h4,p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: inherit; }

/* ── Screens ─────────────────────────────────────────────────── */
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }

/* ═══════════════════════════════════════════════════════════
   RW LOGO MARK
═══════════════════════════════════════════════════════════ */
.rwmark { display: inline-flex; align-items: center; }
.rwmark .sq {
  background: var(--rw-yellow);
  display: flex; align-items: flex-end; justify-content: flex-start;
  flex-shrink: 0;
  font-family: var(--rw-font-body);
  font-weight: 900;
  color: var(--rw-graphite);
  letter-spacing: -.02em;
  line-height: 1;
  position: relative;
}
.rwmark .sq .wordmark { display: inline-block; white-space: nowrap; font-weight: 900; }
.rwmark .sq .dot { color: var(--rw-yellow); -webkit-text-stroke: .5px var(--rw-graphite); font-weight: 900; }
.rwmark .name {
  font-family: var(--rw-font-display);
  font-weight: 400;
  letter-spacing: .08em;
  white-space: nowrap;
  color: var(--rw-graphite);
}
.rwmark--lg .sq   { width: 56px; height: 56px; padding: 6px 6px 6px 4px; font-size: 11px; }
.rwmark--lg       { gap: 20px; }
.rwmark--lg .name { font-size: 24px; }
.rwmark--md .sq   { width: 40px; height: 40px; padding: 5px 5px 5px 3px; font-size: 8px; }
.rwmark--md       { gap: 14px; }
.rwmark--md .name { font-size: 17px; }
.rwmark--sm .sq   { width: 36px; height: 36px; padding: 4px 4px 4px 3px; font-size: 7px; }
.rwmark--sm       { gap: 12px; }
.rwmark--sm .name { font-size: 14px; }
.rwmark--xs .sq   { width: 28px; height: 28px; padding: 3px 3px 3px 2px; font-size: 5.5px; }
.rwmark--xs       { gap: 10px; }
.rwmark--xs .name { font-size: 11px; }

/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY HELPERS
═══════════════════════════════════════════════════════════ */
.eyebrow {
  font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--rw-muted);
  font-weight: 700; font-family: var(--rw-font-body);
}
.eyebrow--lg { font-size: 11px; letter-spacing: .32em; }
.icn { display: inline-flex; vertical-align: middle; }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--rw-line);
  font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--rw-graphite);
  font-family: var(--rw-font-body);
  cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--rw-ink); color: var(--rw-paper); border-color: var(--rw-ink); }
.btn--dark {
  background: var(--rw-ink); color: var(--rw-paper);
  border-color: var(--rw-ink); font-weight: 700; letter-spacing: .14em;
}
.btn--dark:hover { background: #333; }
.btn--yellow {
  background: var(--rw-yellow); color: var(--rw-ink);
  border: none; font-weight: 700; letter-spacing: .18em;
}
.btn--yellow:hover { background: var(--rw-yellow-dark); }
.btn--outline-dark { border: 1px solid var(--rw-ink); color: var(--rw-ink); }
.btn--outline-dark:hover { background: var(--rw-ink); color: var(--rw-paper); }
.btn--block { width: 100%; }
.btn--sm { padding: 7px 12px; font-size: 10px; letter-spacing: .14em; }
.btn--enter {
  background: var(--rw-ink); color: var(--rw-paper); border: none;
  padding: 16px 24px; font-size: 11px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  width: 100%; justify-content: space-between;
  transition: background .15s;
}
.btn--enter:hover { background: #333; }

/* ═══════════════════════════════════════════════════════════
   LOGIN
═══════════════════════════════════════════════════════════ */
.login {
  min-height: 100vh;
  display: grid; grid-template-columns: 1.05fr 1fr;
  border-top: 6px solid var(--rw-yellow);
}
@media (max-width: 700px) {
  .login { grid-template-columns: 1fr; }
  .login__left { display: none; }
  .login__right { padding: 48px 32px; }
}
.login__left {
  padding: 72px 80px 64px;
  display: flex; flex-direction: column; justify-content: center; gap: 80px;
  border-right: 1px solid var(--rw-line);
  position: relative; overflow: hidden;
  background: var(--rw-paper);
}
.login__watermark {
  position: absolute; right: -60px; bottom: -40px;
  font-family: var(--rw-font-display);
  font-size: 300px; color: var(--rw-cream);
  line-height: .8; font-weight: 400;
  pointer-events: none; user-select: none;
}
.login__intro,
.login__hero { position: relative; z-index: 1; }
.login__hero h1 {
  font-family: var(--rw-font-display);
  font-size: 64px; font-weight: 400;
  line-height: 1.05; letter-spacing: -.01em;
  color: var(--rw-ink); margin-bottom: 24px;
}
.login__hero h1 .accent {
  display: inline-block;
  width: 16px; height: 16px;
  background: var(--rw-yellow);
  transform: translateY(-22px);
  margin-left: 6px;
}
.login__hero p {
  font-size: 15px; line-height: 1.65;
  color: var(--rw-graphite);
  max-width: 440px; font-weight: 300;
}
.login__right {
  padding: 80px 64px 64px;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  background: var(--rw-paper);
}
.login__form { width: 100%; max-width: 380px; }
.login__form .eyebrow { margin-bottom: 14px; }
.login__form h2 {
  font-family: var(--rw-font-display);
  font-size: 36px; font-weight: 400;
  line-height: 1.1; margin-bottom: 6px;
}
.login__form .lede { font-size: 13px; color: var(--rw-muted); margin-bottom: 40px; }

/* Role tabs on landing page */
.role-tabs {
  display: flex; border-bottom: 1px solid var(--rw-line);
  margin-bottom: 32px;
}
.role-tabs button {
  flex: 1; padding: 14px 0;
  background: none; border: none;
  font-size: 11px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--rw-muted); margin-bottom: -1px;
  font-family: var(--rw-font-body);
  cursor: pointer; transition: color .15s;
}
.role-tabs button.is-active {
  color: var(--rw-ink); font-weight: 700;
  border-bottom: 2px solid var(--rw-ink);
}

/* Fields */
.field { margin-bottom: 28px; }
.field label {
  display: block; font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--rw-muted); margin-bottom: 8px;
}
.field .input-wrap { position: relative; }
.field input {
  width: 100%; border: none;
  border-bottom: 1.5px solid var(--rw-ink);
  padding: 12px 0; font-size: 18px; font-weight: 300;
  letter-spacing: .18em; background: transparent;
  color: var(--rw-ink); outline: none;
  transition: border-color .15s;
}
.field input:focus { border-bottom-color: var(--rw-yellow-dark); }
.field .input-icon { position: absolute; right: 0; top: 14px; color: var(--rw-faint); }
.field .help { font-size: 11px; color: var(--rw-muted); margin-top: 8px; font-style: italic; }

/* Login meta / footer */
.login__meta {
  margin-top: 24px; display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--rw-muted);
}
.login__footer {
  margin-top: 48px; font-size: 10px;
  letter-spacing: .18em; color: var(--rw-faint);
  text-transform: uppercase;
}
.login-back {
  text-align: center; margin-top: 24px;
  font-size: 12px; color: var(--rw-muted);
}
.login-back a { cursor: pointer; color: var(--rw-graphite); font-weight: 600; }
.login-back a:hover { color: var(--rw-ink); }
.login-hint { font-size: 11px; color: var(--rw-faint); text-align: center; margin-top: 8px; }

/* DB status pill */
.db-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  padding: 4px 12px; border: 1px solid var(--rw-line);
  margin-bottom: 20px;
}
.db-pill.connecting { color: var(--rw-muted); }
.db-pill.ready { color: var(--rw-success); border-color: var(--rw-success); }
.db-pill.error { color: var(--rw-danger); border-color: var(--rw-danger); }
.db-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.db-pill.connecting .db-dot { animation: blink 1s infinite; }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:.2; } }

/* Error message */
.error-msg {
  background: #fdf0ee; border: 1px solid rgba(192,57,43,.2);
  padding: 10px 14px; font-size: 12px; color: var(--rw-danger);
  margin-bottom: 20px; display: none;
}
.error-msg.show { display: block; }

/* ═══════════════════════════════════════════════════════════
   TOPBAR
═══════════════════════════════════════════════════════════ */
.topbar {
  padding: 16px 40px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--rw-line);
  background: var(--rw-paper);
  position: sticky; top: 0; z-index: 300;
}
.topbar-brand { display: flex; align-items: center; gap: 20px; }
.topbar-divider { height: 24px; width: 1px; background: var(--rw-line); }
.topbar-section-label { display: none; }
.topbar-office-name { display: none; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

/* Status dot badge */
.badge-status-dot {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--rw-line);
  border-radius: 99px; font-size: 11px; color: var(--rw-graphite);
  font-family: var(--rw-font-body);
}
.badge-status-dot:not(:empty)::before {
  content: ""; width: 6px; height: 6px;
  border-radius: 99px; background: var(--rw-success); flex-shrink: 0;
}

@media (min-width: 769px) {
  .topbar { padding: 18px 40px; }
  .topbar-section-label { display: block; }
  .topbar-office-name { display: inline; }
}

/* ── Hamburger ── */
.btn-hamburger {
  display: flex; flex-direction: column; gap: 4px;
  align-items: flex-start;
  background: none; border: none; padding: 6px; cursor: pointer;
}
.btn-hamburger span:nth-child(1),
.btn-hamburger span:nth-child(2) { width: 22px; height: 1.5px; background: var(--rw-ink); display: block; }
.btn-hamburger span:nth-child(3) { width: 14px; height: 1.5px; background: var(--rw-ink); display: block; }
.btn-hamburger.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); width: 22px; }
.btn-hamburger.open span:nth-child(2) { opacity: 0; }
.btn-hamburger.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); width: 22px; }
@media (min-width: 769px) { .btn-hamburger { display: none; } }

/* btn-signout legacy alias */
.btn-signout {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 12px; background: transparent;
  border: 1px solid var(--rw-line); font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--rw-graphite);
  font-family: var(--rw-font-body); cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-signout:hover { background: var(--rw-ink); color: var(--rw-paper); border-color: var(--rw-ink); }
@media (max-width: 768px) {
  #screen-admin .topbar-right .btn-signout,
  #screen-admin .topbar-right .btn,
  .topbar-right .btn-drive { display: none; }
  #screen-client .topbar-right .btn-signout,
  #screen-client .topbar-right .btn { display: inline-flex; }
}

/* btn-drive legacy alias */
.btn-drive {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; background: transparent;
  border: 1px solid var(--rw-line); font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--rw-graphite);
  font-family: var(--rw-font-body); cursor: pointer; white-space: nowrap;
  transition: background .15s;
}
.btn-drive.connected {
  color: var(--rw-success); border-color: rgba(42,122,69,.3);
  background: rgba(42,122,69,.04);
}
.btn-drive.connected::before {
  content: ""; width: 6px; height: 6px;
  border-radius: 99px; background: var(--rw-success);
}

/* ═══════════════════════════════════════════════════════════
   PROPERTY BAR
═══════════════════════════════════════════════════════════ */
.prop-bar {
  padding: 12px 40px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--rw-line);
  background: var(--rw-cream);
}
.prop-select {
  flex: 1; max-width: 320px;
  background: var(--rw-paper);
  border: 1px solid var(--rw-line);
  color: var(--rw-ink);
  font-family: var(--rw-font-body);
  font-size: 13px; font-weight: 500;
  padding: 8px 12px; outline: none; cursor: pointer;
}
.prop-select:focus { border-color: var(--rw-ink); }
.btn-add-prop {
  font-family: var(--rw-font-body);
  font-size: 10px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--rw-ink);
  background: transparent;
  border: 1px solid var(--rw-ink);
  padding: 8px 16px; cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.btn-add-prop:hover { background: var(--rw-ink); color: var(--rw-paper); }

/* ═══════════════════════════════════════════════════════════
   DESKTOP TAB BAR
═══════════════════════════════════════════════════════════ */
.tab-bar {
  display: flex; padding: 0 40px;
  border-bottom: 1px solid var(--rw-line);
  background: var(--rw-paper);
  overflow-x: auto; scrollbar-width: none;
  position: sticky; top: 57px; z-index: 200;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0; background: none; border: none;
  border-bottom: 2px solid transparent;
  padding: 16px 0; margin-right: 32px;
  font-family: var(--rw-font-body);
  font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--rw-muted); cursor: pointer;
  margin-bottom: -1px;
  transition: color .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.tab-btn:last-child { margin-right: 0; }
.tab-btn:hover { color: var(--rw-ink); }
.tab-btn.active { color: var(--rw-ink); font-weight: 700; border-bottom-color: var(--rw-yellow); }
.tab-badge {
  background: var(--rw-yellow); color: var(--rw-ink);
  font-size: 9px; padding: 1px 6px;
  border-radius: 99px; font-weight: 800;
  min-width: 16px; text-align: center; display: inline-block;
}
@media (max-width: 768px) { .tab-bar { display: none; } }

/* ═══════════════════════════════════════════════════════════
   DRAWER (mobile)
═══════════════════════════════════════════════════════════ */
.drawer-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(26,26,26,.42); z-index: 400;
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 320px;
  background: var(--rw-paper); z-index: 500;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: 8px 0 40px rgba(0,0,0,.12);
  border-top: 6px solid var(--rw-yellow);
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  padding: 32px 24px 20px;
  border-bottom: 1px solid var(--rw-line);
}
.drawer-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.drawer-close-btn {
  background: none; border: none;
  font-size: 24px; color: var(--rw-muted);
  padding: 0; line-height: 1; cursor: pointer;
  font-family: var(--rw-font-body);
}
.drawer-close-btn:hover { color: var(--rw-ink); }
.drawer-agent-row { display: flex; align-items: center; gap: 12px; }
.drawer-avatar {
  width: 44px; height: 44px; border-radius: 99px;
  background: var(--rw-yellow);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--rw-ink);
  flex-shrink: 0;
}
.drawer-agent-name { font-size: 14px; font-weight: 600; color: var(--rw-ink); }
.drawer-agent-role { font-size: 11px; color: var(--rw-muted); margin-top: 2px; }
.drawer-nav { padding: 12px; flex: 1; overflow-y: auto; }
.drawer-section-label {
  padding: 0 12px 8px;
  font-size: 9px; letter-spacing: .24em;
  color: var(--rw-muted); text-transform: uppercase; font-weight: 700;
}
.drawer-item {
  margin: 2px 0; padding: 12px 14px;
  border-left: 2px solid transparent;
  display: flex; align-items: center; gap: 14px;
  font-size: 14px; font-weight: 500; color: var(--rw-graphite);
  background: none; border: none; border-left: 2px solid transparent;
  width: 100%; text-align: left; cursor: pointer;
  font-family: var(--rw-font-body);
  transition: background .1s, color .1s;
}
.drawer-item:hover { background: var(--rw-cream); color: var(--rw-ink); }
.drawer-item.active {
  background: var(--rw-cream); border-left-color: var(--rw-yellow);
  color: var(--rw-ink); font-weight: 700;
}
.drawer-item-ico { color: var(--rw-muted); display: flex; flex-shrink: 0; }
.drawer-item.active .drawer-item-ico { color: var(--rw-ink); }
.drawer-item-lbl { flex: 1; }
.drawer-badge {
  background: var(--rw-ink); color: var(--rw-yellow);
  font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 99px;
}
.drawer-item.active .drawer-badge { background: var(--rw-yellow); color: var(--rw-ink); }
.drawer-footer {
  padding: 14px 24px 28px;
  border-top: 1px solid var(--rw-line);
  display: flex; flex-direction: column; gap: 10px;
}
.drawer-user { font-size: 11px; color: var(--rw-muted); }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-drawer-action {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px; background: transparent;
  border: 1px solid var(--rw-line); font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--rw-graphite);
  font-family: var(--rw-font-body); cursor: pointer; flex: 1;
}
.btn-drawer-action.primary { background: var(--rw-ink); color: var(--rw-paper); border-color: var(--rw-ink); }
@media (max-width: 768px) { .drawer-overlay { display: block; } }
@media (min-width: 769px) { .drawer { display: none !important; } .drawer-overlay { display: none !important; } }

/* ═══════════════════════════════════════════════════════════
   ADMIN LAYOUT
═══════════════════════════════════════════════════════════ */
.admin-main { background: var(--rw-paper); min-height: calc(100vh - 200px); }
.admin-inner { padding: 32px 40px; max-width: 1280px; margin: 0 auto; }
@media (max-width: 768px) { .admin-inner { padding: 20px; } }

/* ═══════════════════════════════════════════════════════════
   PROPERTY HEADER (rendered by JS)
═══════════════════════════════════════════════════════════ */
.prop-hdr {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 8px; gap: 20px; flex-wrap: wrap;
  padding-bottom: 20px; border-bottom: 1px solid var(--rw-line);
}
.prop-hdr h2 {
  font-family: var(--rw-font-display);
  font-size: 38px; font-weight: 400;
  line-height: 1; letter-spacing: -.01em;
  color: var(--rw-ink);
}
.prop-hdr-meta { font-size: 12px; color: var(--rw-graphite); margin-top: 8px; }
.prop-hdr-meta strong { font-weight: 600; }
.code-badge {
  background: var(--rw-cream); border: 1px solid var(--rw-line);
  padding: 6px 14px; font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--rw-graphite); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; white-space: nowrap;
  font-family: 'ui-monospace', 'SFMono-Regular', monospace;
  transition: background .15s;
}
.code-badge:hover { background: var(--rw-yellow); color: var(--rw-ink); }

/* ═══════════════════════════════════════════════════════════
   PROGRESS
═══════════════════════════════════════════════════════════ */
.prog-row { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.prog-bar { flex: 1; height: 2px; background: var(--rw-line); position: relative; }
.prog-fill { position: absolute; inset: 0; background: var(--rw-ink); transition: width .4s; }
.prog-label {
  font-family: var(--rw-font-display); font-size: 18px;
  font-weight: 400; color: var(--rw-ink); white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   CARD
═══════════════════════════════════════════════════════════ */
.card {
  background: var(--rw-paper);
  border: 1px solid var(--rw-line);
  margin-bottom: 20px;
}
.card-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--rw-line);
}
.card-title {
  font-size: 10px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--rw-muted);
}
.card-body { padding: 20px; }

/* Card cream variant */
.card-cream {
  background: var(--rw-cream); padding: 24px; position: relative;
  margin-bottom: 20px;
}
.card-cream::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 40px; height: 3px; background: var(--rw-yellow);
}

/* ═══════════════════════════════════════════════════════════
   SECTION HEADING
═══════════════════════════════════════════════════════════ */
.sec-lbl {
  display: flex; align-items: center; gap: 12px;
  margin: 28px 0 0; padding-bottom: 10px;
  border-bottom: 1px solid var(--rw-line);
  font-family: var(--rw-font-body);
  font-size: 10px; font-weight: 700;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--rw-muted);
}
.sec-lbl::after {
  content: ''; flex: 1; height: 1px;
  background: var(--rw-line);
}

/* ═══════════════════════════════════════════════════════════
   TASK ROWS
═══════════════════════════════════════════════════════════ */
/* ── Task row — exact design match ── */
/* grid: [cb 24px] [name 1fr] [email-pill auto] [due auto] [del auto] */
.task-item {
  display: grid;
  grid-template-columns: 24px 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--rw-line);
  background: transparent;
}
.task-item:hover { background: var(--rw-cream); }
.task-item.done { opacity: .55; }

/* Checkbox */
.task-cb {
  width: 18px; height: 18px;
  border: 1.5px solid var(--rw-faint);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--rw-paper); cursor: pointer; flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.task-cb-inner { display: contents; }
.task-cb:hover { border-color: var(--rw-ink); }
.task-cb.checked { background: var(--rw-ink); border-color: var(--rw-ink); }

/* Name */
.task-info { min-width: 0; }
.task-name-el {
  font-size: 14px; font-weight: 400; color: var(--rw-ink);
  outline: none; display: block; width: 100%;
  background: transparent; line-height: 1.4;
}
.task-name-el:focus { border-bottom: 1px dashed var(--rw-faint); }
.task-item.done .task-name-el { text-decoration: line-through; color: var(--rw-muted); }
.task-desc-el { font-size: 12px; color: var(--rw-muted); outline: none; display: block; margin-top: 2px; }

/* Meta row — not used as a cell, kept for JS compat */
.task-meta-row { display: contents; }

/* Due date — plain text, always far right */
.task-deadline {
  font-size: 11px; color: var(--rw-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap; text-align: right;
  min-width: 44px;
}
.task-deadline.overdue { color: var(--rw-danger); font-weight: 600; }
.task-deadline.soon { color: #b56b00; font-weight: 500; }

/* The formatted date display span */
.deadline-display {
  font-size: 11px; color: var(--rw-muted);
  font-variant-numeric: tabular-nums;
  cursor: pointer; display: block; text-align: right;
}
.deadline-display:hover { color: var(--rw-ink); }

/* Hidden date input — overlaid on display */
.deadline-input {
  position: absolute; opacity: 0; width: 0; height: 0;
  pointer-events: none; border: none; padding: 0;
}

/* Delete */
.task-del {
  background: transparent; border: none; color: var(--rw-faint);
  cursor: pointer; font-size: 14px; padding: 2px; line-height: 1;
  flex-shrink: 0; transition: color .15s;
}
.task-del:hover { color: var(--rw-danger); }

/* Email trigger badge — subtle, no box */
.email-trigger-badge {
  display: inline;
  font-size: 10px; font-weight: 400; font-style: italic;
  color: var(--rw-muted); margin-left: 6px;
  letter-spacing: 0;
}
.email-trigger-badge.sent { color: var(--rw-success); font-style: normal; }
.email-trigger-badge.pending { color: var(--rw-muted); }

/* Add task button */
.btn-add-task {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px; background: none;
  border: 1px solid var(--rw-line); padding: 8px 14px;
  font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--rw-graphite); cursor: pointer; font-family: var(--rw-font-body);
  transition: background .15s, color .15s;
}
.btn-add-task:hover { background: var(--rw-ink); color: var(--rw-paper); border-color: var(--rw-ink); }

/* ═══════════════════════════════════════════════════════════
   CONTRACTORS / TRADE TABLE
═══════════════════════════════════════════════════════════ */
/* ── Contractor cards ── */
.trade-hdr { display: none; } /* replaced by card layout */
.trade-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--rw-line);
}
.trade-card:last-child { border-bottom: none; }
.trade-card-top {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 10px;
}
.trade-card-btm {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px; margin-top: 10px;
  border-top: 1px solid var(--rw-line); padding-top: 10px;
}
.trade-badge {
  font-size: 8px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 3px 8px;
  background: transparent;
  border: 1px solid var(--rw-faint);
  color: var(--rw-graphite); white-space: nowrap;
  display: inline-block;
}
.trade-field {
  display: block; width: 100%;
  font-size: 14px; font-weight: 400; color: var(--rw-ink);
  border: none; border-bottom: 1px solid var(--rw-line);
  background: transparent; outline: none;
  font-family: var(--rw-font-body);
  padding: 6px 0; margin-bottom: 4px;
  transition: border-color .15s;
}
.trade-field:focus { border-bottom-color: var(--rw-ink); }
.trade-field--muted { font-size: 13px; color: var(--rw-muted); }
.trade-field--date { font-size: 12px; color: var(--rw-muted); width: auto; flex-shrink: 0; }
.trade-inp { font-size: 13px; color: var(--rw-ink); outline: none; width: 100%; background: transparent; border: none; font-family: var(--rw-font-body); }
.btn-send-email {
  background: var(--rw-ink); border: none; color: var(--rw-paper);
  font-family: var(--rw-font-body); font-size: 9px; font-weight: 700;
  padding: 6px 12px; cursor: pointer; letter-spacing: .12em; text-transform: uppercase;
  transition: background .15s; white-space: nowrap;
}
.btn-send-email:hover { background: #333; }
.btn-send-email.sent { background: var(--rw-success); cursor: default; }
.btn-row-del { background: transparent; border: none; color: var(--rw-faint); cursor: pointer; font-size: 16px; padding: 2px; transition: color .15s; }
.btn-row-del:hover { color: var(--rw-danger); }
.btn-add-trade {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px; background: none;
  border: 1px solid var(--rw-line); padding: 8px 14px;
  font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--rw-graphite); cursor: pointer; font-family: var(--rw-font-body);
  transition: background .15s, color .15s;
}
.btn-add-trade:hover { background: var(--rw-ink); color: var(--rw-paper); border-color: var(--rw-ink); }

/* Deadline input — "Add date" placeholder */
.deadline-input::placeholder { color: var(--rw-faint); font-style: italic; font-size: 11px; }

/* Drive status row */
.drive-status-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0;
  border-bottom: 1px solid var(--rw-line); margin-bottom: 16px;
  flex-wrap: wrap;
}
.drive-status-info { display: flex; flex-direction: column; gap: 3px; }
.drive-status-label {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--rw-ink);
}
.drive-status-sub { font-size: 11px; color: var(--rw-muted); font-style: italic; }
.drive-status-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.drive-synced-tag {
  font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rw-success); border: 1px solid rgba(42,122,69,.3);
  padding: 3px 8px; display: inline-block;
}

/* ═══════════════════════════════════════════════════════════
   FORMS (details, notes, wizard)
═══════════════════════════════════════════════════════════ */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .info-grid { grid-template-columns: 1fr; } }
.info-field label {
  display: block; font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--rw-muted); margin-bottom: 8px;
}
.info-field input,
.info-field select,
.info-field textarea {
  width: 100%; border: none;
  border-bottom: 1px solid var(--rw-line);
  padding: 10px 0; font-size: 14px; font-weight: 400;
  background: transparent; color: var(--rw-ink);
  font-family: var(--rw-font-body); outline: none;
  transition: border-color .15s;
}
.info-field input:focus,
.info-field select:focus,
.info-field textarea:focus { border-bottom-color: var(--rw-ink); }
.info-field textarea { resize: vertical; min-height: 80px; }
.span2 { grid-column: 1 / -1; }
.section-divider {
  grid-column: 1 / -1; font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--rw-muted);
  padding-top: 20px; border-top: 1px solid var(--rw-line); margin-top: 8px;
}
.btn-save {
  background: var(--rw-ink); color: var(--rw-paper); border: none;
  font-family: var(--rw-font-body); font-size: 10px; font-weight: 700;
  padding: 12px 24px; cursor: pointer; letter-spacing: .18em; text-transform: uppercase;
  margin-top: 20px; transition: background .15s;
}
.btn-save:hover { background: #333; }
.notes-textarea {
  width: 100%; min-height: 320px;
  border: 1px solid var(--rw-line);
  font-family: var(--rw-font-body); font-size: 14px; color: var(--rw-ink);
  padding: 16px; outline: none; resize: vertical;
  transition: border-color .15s; line-height: 1.6; background: var(--rw-paper);
}
.notes-textarea:focus { border-color: var(--rw-ink); }

/* ═══════════════════════════════════════════════════════════
   DOCUMENTS
═══════════════════════════════════════════════════════════ */
.doc-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--rw-line);
  background: transparent;
}
.doc-item:hover { background: var(--rw-cream); }
.doc-icon { color: var(--rw-faint); flex-shrink: 0; font-size: 12px; }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-size: 13px; font-weight: 400; color: var(--rw-ink); }
.doc-meta { font-size: 11px; color: var(--rw-muted); margin-top: 2px; font-style: italic; }
/* Sync/Drive status tags — outlined like EMAIL pill */
.doc-tag {
  display: inline-block; font-size: 8px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 2px 6px; border: 1px solid var(--rw-faint);
  color: var(--rw-muted); white-space: nowrap; margin-left: 6px;
  vertical-align: middle;
}
.doc-tag--synced { color: var(--rw-success); border-color: rgba(42,122,69,.3); }
.btn-doc-dl {
  background: transparent; color: var(--rw-graphite);
  border: 1px solid var(--rw-faint);
  font-family: var(--rw-font-body); font-size: 9px; font-weight: 700;
  padding: 4px 10px; cursor: pointer; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-doc-dl:hover { background: var(--rw-ink); color: var(--rw-paper); border-color: var(--rw-ink); }
.btn-doc-upload {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px; background: none; border: 1px solid var(--rw-line);
  padding: 8px 14px; font-size: 10px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--rw-graphite); cursor: pointer; font-family: var(--rw-font-body);
  transition: background .15s, color .15s;
}
.btn-doc-upload:hover { background: var(--rw-ink); color: var(--rw-paper); border-color: var(--rw-ink); }

/* ═══════════════════════════════════════════════════════════
   WIZARD
═══════════════════════════════════════════════════════════ */
.wizard-steps { display: flex; align-items: center; margin-bottom: 28px; }
.wizard-step { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--rw-muted); }
.wizard-step-num {
  width: 24px; height: 24px; border: 1.5px solid var(--rw-faint);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0; color: var(--rw-muted);
}
.wizard-step.active .wizard-step-num { background: var(--rw-yellow); border-color: var(--rw-yellow); color: var(--rw-ink); }
.wizard-step.active { color: var(--rw-ink); }
.wizard-step.done .wizard-step-num { background: var(--rw-ink); border-color: var(--rw-ink); color: var(--rw-paper); }
.wizard-step.done { color: var(--rw-graphite); }
.wizard-connector { flex: 1; height: 1px; background: var(--rw-line); margin: 0 8px; min-width: 16px; }
.wizard-connector.done { background: var(--rw-ink); }
.wizard-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rw-line);
}
.btn-wizard-back {
  background: transparent; border: 1px solid var(--rw-line);
  color: var(--rw-graphite); font-family: var(--rw-font-body);
  font-size: 10px; font-weight: 600; padding: 10px 20px;
  cursor: pointer; letter-spacing: .14em; text-transform: uppercase;
  transition: background .15s;
}
.btn-wizard-back:hover { background: var(--rw-cream); }
.btn-wizard-next {
  background: var(--rw-yellow); color: var(--rw-ink); border: none;
  font-family: var(--rw-font-body); font-size: 10px; font-weight: 700;
  padding: 10px 24px; cursor: pointer; letter-spacing: .18em; text-transform: uppercase;
  transition: background .15s;
}
.btn-wizard-next:hover { background: var(--rw-yellow-dark); }
.wizard-task-select {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 4px; border-bottom: 1px solid var(--rw-line);
  cursor: pointer; transition: background .1s;
}
.wizard-task-select:hover { background: var(--rw-cream); }
.wizard-task-select.selected { background: var(--rw-cream); }
.wizard-task-cb {
  width: 18px; height: 18px; border: 1.5px solid var(--rw-faint);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  margin-top: 2px; font-size: 10px; color: transparent; transition: all .15s;
}
.wizard-task-select.selected .wizard-task-cb { background: var(--rw-ink); border-color: var(--rw-ink); color: var(--rw-paper); }
.wizard-task-name { font-size: 14px; font-weight: 500; color: var(--rw-ink); }
.wizard-task-notes { font-size: 12px; color: var(--rw-muted); margin-top: 3px; font-style: italic; }

/* ═══════════════════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════════════════ */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 32px; text-align: center; gap: 16px;
}
.empty-icon { width: 40px; height: 3px; background: var(--rw-yellow); }
.empty-state h3 {
  font-family: var(--rw-font-display); font-size: 24px;
  font-weight: 400; color: var(--rw-muted);
}
.empty-state p { font-size: 13px; color: var(--rw-muted); max-width: 260px; font-weight: 300; }

/* ═══════════════════════════════════════════════════════════
   CLIENT PORTAL — Mobile-first, matches design exactly
═══════════════════════════════════════════════════════════ */

#client-hero-wrap { border-bottom: 1px solid var(--rw-line); }

/* Mobile hero */
.client-mobile-hero {
  padding: 24px 20px 20px;
  background: var(--rw-paper);
}
.client-mobile-hero h1 {
  font-family: var(--rw-font-display);
  font-size: 36px; font-weight: 400;
  line-height: 1.05; letter-spacing: -.01em;
  margin-bottom: 6px; color: var(--rw-ink);
}
.client-mobile-hero h1 em { font-style: italic; }
.client-mobile-hero p {
  font-size: 12px; color: var(--rw-muted);
  line-height: 1.55; font-weight: 300;
  margin-bottom: 18px; letter-spacing: .02em;
}
.client-mobile-hero p strong { color: var(--rw-ink); font-weight: 600; }
.client-mobile-hero__prog { margin-top: 4px; }

/* Client tabs — justify space-between, no scroll needed */
.client-body { padding: 0; background: var(--rw-paper); }
.client-tabs-wrap {
  display: flex;
  justify-content: space-between;
  gap: 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--rw-line);
  background: var(--rw-paper);
  overflow: visible;
}
.client-tab {
  flex: 1; background: none; border: none;
  border-bottom: 2px solid transparent;
  padding: 14px 4px; margin-bottom: -1px;
  font-family: var(--rw-font-body);
  font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--rw-muted); cursor: pointer;
  transition: color .15s;
  display: inline-flex; align-items: center;
  justify-content: center; gap: 5px;
  white-space: nowrap; text-align: center;
}
.client-tab:hover { color: var(--rw-ink); }
.client-tab.active,
.client-tab.is-active { color: var(--rw-ink); font-weight: 700; border-bottom-color: var(--rw-yellow); }
.badge-dark-sm {
  background: var(--rw-ink); color: var(--rw-yellow);
  font-size: 8px; padding: 1px 5px;
  border-radius: 99px; font-weight: 700;
}
/* Yellow circle black number — matches design concept */
.badge-yellow-sm {
  background: var(--rw-yellow); color: var(--rw-ink);
  font-size: 8px; padding: 1px 6px;
  border-radius: 99px; font-weight: 800;
  display: inline-block; min-width: 16px; text-align: center;
}
.ctab { display: none; }
.ctab.active { display: block; }
.client-tab-body { padding: 20px 20px 48px; }

/* Todo cards — exact design grid */
.ctodo-card {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 18px; align-items: flex-start;
  padding: 16px 0; border-bottom: 1px solid var(--rw-line);
}
.ctodo-card:last-child { border-bottom: none; }
.ctodo-card.done { opacity: .55; }
.ctodo-icon { display: none; }
.ctodo-body { min-width: 0; }
.ctodo-name { font-size: 13px; font-weight: 600; color: var(--rw-ink); margin-bottom: 3px; line-height: 1.3; }
.ctodo-card.done .ctodo-name { text-decoration: line-through; color: var(--rw-muted); }
.ctodo-desc { font-size: 11px; color: var(--rw-muted); line-height: 1.55; font-style: italic; }
.ctodo-footer { display: none; } /* not used in new layout */

/* Done tag */
.todo-done-tag {
  font-size: 9px; letter-spacing: .18em;
  color: var(--rw-muted); text-transform: uppercase;
  white-space: nowrap; align-self: center;
}

/* Round checkbox */
.cb--round {
  width: 20px; height: 20px; border-radius: 99px;
  border: 1.5px solid var(--rw-faint); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--rw-paper); margin-top: 2px;
  transition: all .15s;
}
.cb--round.checked { background: var(--rw-ink); border-color: var(--rw-ink); }

/* Upload button */
.btn-upload {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--rw-ink); color: var(--rw-paper); border: none;
  font-family: var(--rw-font-body); font-size: 9px; font-weight: 700;
  padding: 7px 12px; cursor: pointer;
  letter-spacing: .16em; text-transform: uppercase;
  white-space: nowrap; align-self: center;
  transition: background .15s;
}
.btn-upload:hover { background: #333; }
.upload-input { display: none; }
.upload-success { font-size: 10px; color: var(--rw-success); font-weight: 600; }
.todo-btn { align-self: center; }

/* Status pills — kept for any remaining JS compat */
.status-pill { display: none; }
.pill-action { display: none; }
.pill-done { display: none; }

/* Progress tab — agent task categories */
.agent-cat { margin-bottom: 20px; }
.agent-cat-hdr {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 4px; padding-bottom: 8px;
  border-bottom: 1px solid var(--rw-line);
  font-family: var(--rw-font-display);
  font-size: 10px; font-weight: 400;
  letter-spacing: .28em; text-transform: uppercase; color: var(--rw-muted);
}
.mini-bar { flex: 1; height: 1px; background: var(--rw-line); position: relative; }
.mini-fill { position: absolute; inset: 0; background: var(--rw-ink); }
.agent-task-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--rw-line);
  font-size: 13px; color: var(--rw-graphite);
}
.agent-task-row.done { color: var(--rw-muted); text-decoration: line-through; }

/* Team tab */
.trade-contact-card {
  display: flex; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--rw-line); align-items: center;
}
.trade-contact-card:last-child { border-bottom: none; }
.trade-avatar {
  width: 40px; height: 40px; border-radius: 99px;
  background: var(--rw-yellow);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--rw-font-display);
  font-size: 16px; font-weight: 400; color: var(--rw-ink); flex-shrink: 0;
}
.tc-name { font-size: 15px; font-family: var(--rw-font-display); font-weight: 400; color: var(--rw-ink); }
.tc-type { font-size: 10px; color: var(--rw-muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }
.tc-contact { font-size: 12px; color: var(--rw-graphite); margin-top: 4px; }
.tc-contact a { color: var(--rw-ink); text-decoration: none; }
.tc-contact a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   QUESTIONNAIRE
═══════════════════════════════════════════════════════════ */
.client-q-form { }
.cq-section {
  font-size: 10px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--rw-muted);
  padding: 24px 0 12px; border-bottom: 1px solid var(--rw-line); margin-bottom: 16px;
}
.cq-field { margin-bottom: 20px; }
.cq-field label {
  display: block; font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--rw-muted); margin-bottom: 8px;
}
.cq-field input,
.cq-field select,
.cq-field textarea {
  width: 100%; border: none; border-bottom: 1px solid var(--rw-line);
  padding: 10px 0; font-size: 14px; background: transparent;
  color: var(--rw-ink); font-family: var(--rw-font-body); outline: none;
  transition: border-color .15s;
}
.cq-field input:focus, .cq-field select:focus, .cq-field textarea:focus { border-bottom-color: var(--rw-ink); }
.cq-field textarea { resize: vertical; line-height: 1.55; }

/* btn-rw legacy — used in questionnaire submit */
.btn-rw {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--rw-ink); color: var(--rw-paper); border: none;
  font-family: var(--rw-font-body); font-size: 10px; font-weight: 700;
  padding: 14px 24px; cursor: pointer; letter-spacing: .18em; text-transform: uppercase;
  width: 100%; transition: background .15s; margin-top: 8px;
}
.btn-rw:hover { background: #333; }

/* ═══════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,26,26,.48); z-index: 600;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px 20px; opacity: 0; pointer-events: none;
  transition: opacity .2s; overflow-y: auto;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--rw-paper); padding: 40px;
  width: 100%; max-width: 520px;
  box-shadow: 0 24px 64px rgba(0,0,0,.14);
  max-height: 90vh; overflow-y: auto;
  transform: translateY(8px); transition: transform .2s;
  position: relative; border-top: 4px solid var(--rw-yellow);
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-box h3 {
  font-family: var(--rw-font-display); font-size: 28px; font-weight: 400;
  color: var(--rw-ink); margin-bottom: 24px; line-height: 1.15;
}
.modal-form-group { margin-bottom: 20px; }
.modal-form-group label {
  display: block; font-size: 10px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--rw-muted); margin-bottom: 8px;
}
.modal-form-group input,
.modal-form-group select,
.modal-form-group textarea {
  width: 100%; border: none; border-bottom: 1px solid var(--rw-line);
  padding: 10px 0; font-size: 14px; background: transparent;
  color: var(--rw-ink); font-family: var(--rw-font-body); outline: none;
  transition: border-color .15s;
}
.modal-form-group input:focus,
.modal-form-group select:focus,
.modal-form-group textarea:focus { border-bottom-color: var(--rw-ink); }
.modal-form-group textarea { resize: vertical; min-height: 100px; }
.modal-btns {
  display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px;
}
.btn-cancel {
  background: transparent; border: 1px solid var(--rw-line);
  color: var(--rw-graphite); font-family: var(--rw-font-body);
  font-size: 10px; font-weight: 600; padding: 10px 20px;
  cursor: pointer; letter-spacing: .14em; text-transform: uppercase;
  transition: background .15s;
}
.btn-cancel:hover { background: var(--rw-cream); }
.btn-modal-confirm {
  background: var(--rw-ink); color: var(--rw-paper); border: none;
  font-family: var(--rw-font-body); font-size: 10px; font-weight: 700;
  padding: 10px 24px; cursor: pointer; letter-spacing: .18em; text-transform: uppercase;
  transition: background .15s;
}
.btn-modal-confirm:hover { background: #333; }

/* ═══════════════════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--rw-ink); color: var(--rw-paper);
  font-family: var(--rw-font-body); font-size: 11px; font-weight: 600;
  padding: 12px 24px; z-index: 700; opacity: 0;
  transition: all .25s; pointer-events: none;
  white-space: nowrap; letter-spacing: .08em;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  border-left: 3px solid var(--rw-yellow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════════════════════════
   CLIENT PORTAL — LEGACY HERO COMPAT
   (app.js renders hero inline; these map to design tokens)
═══════════════════════════════════════════════════════════ */
#client-hero-wrap { border-bottom: 1px solid var(--rw-line); }
