* { box-sizing: border-box; }
  html, body { height: 100%; margin: 0; }
  body {
    font-family: var(--font-sans);
    color: var(--foreground);
    background: var(--surface);
    letter-spacing: var(--tracking-tight);
    -webkit-font-smoothing: antialiased;
  }
  [data-lucide] { width: 18px; height: 18px; stroke-width: 2; }
  .shell { display: flex; height: 100vh; min-height: 0; }

  /* ---------------- Sidebar (shared with dashboard) ---------------- */
  .sidebar {
    width: 252px; flex: 0 0 252px; background: #fff; border-right: 1px solid var(--border);
    display: flex; flex-direction: column; transition: width .22s ease, flex-basis .22s ease; overflow: hidden;
  }
  .sidebar.collapsed { width: 72px; flex-basis: 72px; }
  .side-top { height: 64px; flex: 0 0 64px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--border); }
  .brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .brand img { width: 26px; height: 26px; flex: 0 0 auto; }
  .brand .name { font-weight: 700; font-size: 17px; color: var(--card-foreground); letter-spacing: -0.02em; white-space: nowrap; }
  .sidebar.collapsed .brand { display: none; }
  .sidebar.collapsed .side-top { padding: 0; justify-content: center; }
  .toggle { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 8px; border: 1px solid var(--border); background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--gray-500); transition: background .15s, color .15s; }
  .toggle:hover { background: var(--accent); color: var(--gray-700); }
  .nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
  .nav-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--gray-400); padding: 6px 12px 4px; white-space: nowrap; }
  .sidebar.collapsed .nav-label { opacity: 0; }
  .nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: 9px; border: none; background: transparent; color: var(--gray-700); font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s; text-align: left; letter-spacing: var(--tracking-tight); white-space: nowrap; text-decoration: none; }
  .nav-item:hover { background: var(--accent); }
  .nav-item.active { background: var(--primary-50); color: var(--primary-darker); }
  .nav-item.active [data-lucide] { color: var(--primary-darker); }
  .nav-item [data-lucide] { flex: 0 0 auto; color: var(--gray-500); }
  .nav-item .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .sidebar.collapsed .nav-item { justify-content: center; padding: 9px 0; }
  .sidebar.collapsed .nav-item .txt, .sidebar.collapsed .nav-item .badge { display: none; }
  .badge { flex: 0 0 auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 9999px; font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
  .badge-red { background: #fee2e2; color: #b91c1c; }
  .badge-blue { background: #dbeafe; color: #1d4ed8; }
  .badge-amber { background: #fef3c7; color: #92400e; }
  .badge-gray { background: #f3f4f6; color: #4b5563; }
  .side-user { flex: 0 0 auto; border-top: 1px solid var(--border); padding: 12px; display: flex; align-items: center; gap: 10px; }
  .avatar { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 9999px; background: var(--secondary); color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
  .side-user .info { min-width: 0; }
  .side-user .info .u-name { font-size: 14px; font-weight: 600; color: var(--card-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-user .info .u-role { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; }
  .sidebar.collapsed .side-user { justify-content: center; padding: 12px 0; }
  .sidebar.collapsed .side-user .info { display: none; }

  /* ---------------- Main / topbar (shared) ---------------- */
  .main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
  .topbar { height: 64px; flex: 0 0 64px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; }
  .search-top { display: flex; align-items: center; gap: 10px; width: 340px; max-width: 42vw; height: 38px; padding: 0 14px; border: 1px solid var(--input); border-radius: 9999px; background: #fff; color: var(--muted-foreground); transition: box-shadow .15s, border-color .15s; }
  .search-top:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(128,204,235,.45); }
  .search-top [data-lucide] { flex: 0 0 auto; color: var(--gray-400); width: 16px; height: 16px; }
  .search-top input { border: none; outline: none; background: transparent; font-family: inherit; font-size: 14px; color: var(--foreground); width: 100%; letter-spacing: var(--tracking-tight); }
  .search-top input::placeholder { color: var(--gray-400); }
  .bell { position: relative; width: 40px; height: 40px; border-radius: 9999px; border: none; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; }
  .bell:hover { background: var(--accent); }
  .bell [data-lucide] { width: 20px; height: 20px; color: var(--gray-700); }
  .bell .count { position: absolute; top: 5px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9999px; background: #dc2626; color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }

  .content { flex: 1; overflow-y: auto; min-height: 0; padding: 30px 32px 40px; }
  .page-head { margin-bottom: 22px; }
  .page-head h1 { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -0.025em; margin: 0; color: var(--card-foreground); }
  .page-head .sub { font-size: 14px; color: var(--muted-foreground); margin-top: 4px; }

  /* ---------------- Toolbar ---------------- */
  .toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
  .tb-search { display: flex; align-items: center; gap: 9px; width: 300px; max-width: 100%; height: 38px; padding: 0 13px; border: 1px solid var(--input); border-radius: 9px; background: #fff; transition: box-shadow .15s, border-color .15s; }
  .tb-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(128,204,235,.45); }
  .tb-search [data-lucide] { color: var(--gray-400); width: 16px; height: 16px; flex: 0 0 auto; }
  .tb-search input { border: none; outline: none; background: transparent; font-family: inherit; font-size: 14px; color: var(--foreground); width: 100%; letter-spacing: var(--tracking-tight); }
  .tb-search input::placeholder { color: var(--gray-400); }
  .filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

  .dd { position: relative; }
  .dd-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 13px; border: 1px solid var(--input); border-radius: 9px; background: #fff; font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--gray-700); cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; letter-spacing: var(--tracking-tight); }
  .dd-btn:hover { background: var(--accent); }
  .dd-btn.has-value { border-color: var(--primary); color: var(--primary-darker); background: var(--primary-50); }
  .dd-btn [data-lucide] { width: 15px; height: 15px; color: var(--gray-400); flex: 0 0 auto; }
  .dd-btn.has-value [data-lucide] { color: var(--primary-darker); }
  .dd-menu { position: absolute; top: 44px; right: 0; min-width: 200px; background: #fff; border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow-lg); padding: 5px; z-index: 30; display: none; animation: ddin .14s ease; }
  .dd.open .dd-menu { display: block; }
  @keyframes ddin { from { transform: translateY(-4px); } to { transform: none; } }
  .dd-opt { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: none; background: transparent; border-radius: 7px; font-family: inherit; font-size: 13.5px; color: var(--gray-700); cursor: pointer; text-align: left; }
  .dd-opt:hover { background: var(--accent); }
  .dd-opt.sel { color: var(--primary-darker); font-weight: 600; }
  .dd-opt .ck { margin-left: auto; opacity: 0; }
  .dd-opt.sel .ck { opacity: 1; }
  .dd-opt .ck [data-lucide] { width: 15px; height: 15px; color: var(--primary-darker); }
  .dd-sep { height: 1px; background: var(--border); margin: 4px 2px; }

  /* ---------------- Table ---------------- */
  .table-wrap { background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); overflow-x: auto; overflow-y: hidden; }
  table { width: 100%; border-collapse: collapse; }
  thead th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--gray-500); background: var(--gray-50); padding: 12px 13px; border-bottom: 1px solid var(--border); white-space: nowrap; }
  tbody td { padding: 13px 13px; border-bottom: 1px solid var(--gray-100); font-size: 14px; vertical-align: middle; }
  tbody tr:last-child td { border-bottom: none; }
  tbody tr { transition: background .12s; }
  tbody tr:hover { background: var(--gray-50); }

  .nm { font-weight: 600; color: var(--card-foreground); white-space: nowrap; }
  .em { font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; max-width: 165px; overflow: hidden; text-overflow: ellipsis; }

  .type-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 9999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
  .type-owner { background: #dcfce7; color: #166534; }
  .type-lender { background: #ede9fe; color: #6d28d9; }
  .type-broker { background: #fce7f3; color: #be185d; }

  .status-txt { color: var(--gray-700); white-space: nowrap; }

  .assigned { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
  .mini-av { width: 26px; height: 26px; border-radius: 9999px; color: #fff; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
  .av-rachel { background: #0e7490; }
  .av-josh { background: var(--secondary); }
  .av-jack { background: #7c3a21; }
  .assigned .a-name { font-size: 13.5px; color: var(--gray-700); }

  .days-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; padding: 4px 9px; border-radius: 9999px; font-size: 12.5px; font-weight: 600; background: #f3f4f6; color: #4b5563; white-space: nowrap; }
  .days-pill.over { background: #fee2e2; color: #b91c1c; }

  .note { color: var(--muted-foreground); font-size: 13px; max-width: 115px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .actions { display: flex; gap: 7px; justify-content: flex-end; white-space: nowrap; }
  .act-btn { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px; border-radius: 8px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s; letter-spacing: var(--tracking-tight); white-space: nowrap; }
  .act-view { border: 1px solid var(--border); background: #fff; color: var(--gray-700); }
  .act-view:hover { background: var(--accent); }
  .act-handoff { border: 1px solid var(--border); background: #fff; color: var(--gray-700); }
  .act-handoff:hover { background: var(--accent); }
  .act-btn [data-lucide] { width: 14px; height: 14px; }

  .empty-row td { text-align: center; color: var(--gray-400); font-size: 14px; padding: 40px 18px; }
  th.right, td.right { text-align: right; }

  /* sortable headers */
  thead th.sortable { cursor: pointer; user-select: none; transition: color .12s; }
  thead th.sortable:hover { color: var(--gray-700); }
  .th-inner { display: inline-flex; align-items: center; gap: 5px; }
  .sort-arrow { display: inline-flex; align-items: center; opacity: .35; }
  .sort-arrow [data-lucide] { width: 13px; height: 13px; }
  thead th.sorted { color: var(--primary-darker); }
  thead th.sorted .sort-arrow { opacity: 1; color: var(--primary-darker); }

  /* columns checklist */
  .dd-cols .dd-menu { min-width: 190px; }
  .dd-head { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-400); padding: 6px 10px 5px; }
  .dd-check { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px; font-size: 13.5px; color: var(--gray-700); cursor: pointer; }
  .dd-check:hover { background: var(--accent); }
  .dd-check input { width: 15px; height: 15px; accent-color: var(--primary-dark); cursor: pointer; flex: 0 0 auto; margin: 0; }

  /* ---------------- Slide-over panel ---------------- */
  .overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); opacity: 0; visibility: hidden; transition: opacity .25s ease; z-index: 60; }
  .overlay.open { opacity: 1; visibility: visible; }
  .panel { position: fixed; top: 0; right: 0; height: 100vh; width: 480px; max-width: 92vw; background: #fff; box-shadow: -8px 0 30px rgba(15,23,42,.14); transform: translateX(100%); transition: transform .28s cubic-bezier(.22,.61,.36,1); z-index: 70; display: flex; flex-direction: column; }
  .panel.open { transform: none; }
  .panel-close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--gray-500); z-index: 3; transition: background .15s, color .15s; }
  .panel-close:hover { background: var(--accent); color: var(--gray-700); }
  .panel-inner { flex: 1; overflow-y: auto; min-height: 0; }

  .p-header { padding: 24px 26px 20px; border-bottom: 1px solid var(--border); }
  .p-name { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--card-foreground); margin: 0; padding-right: 42px; }
  .p-sub { font-size: 13px; color: var(--muted-foreground); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .p-sub span { display: inline-flex; align-items: center; gap: 6px; }
  .p-sub [data-lucide] { width: 14px; height: 14px; color: var(--gray-400); }
  .p-meta { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
  .p-meta .pstatus { position: relative; }
  .p-meta .pstatus .dd-menu { left: 0; right: auto; min-width: 230px; }

  .p-section { padding: 22px 26px; border-bottom: 1px solid var(--border); }
  .p-section:last-child { border-bottom: none; }
  .p-sec-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-400); margin: 0 0 16px; }

  .info-grid { display: grid; grid-template-columns: 112px 1fr; gap: 12px 16px; font-size: 14px; margin: 0; }
  .info-grid dt { color: var(--muted-foreground); }
  .info-grid dd { margin: 0; color: var(--card-foreground); font-weight: 500; }

  .timeline { position: relative; padding-left: 26px; }
  .timeline::before { content: ''; position: absolute; left: 7px; top: 5px; bottom: 5px; width: 2px; background: var(--gray-200); }
  .tl-item { position: relative; padding-bottom: 20px; }
  .tl-item:last-child { padding-bottom: 0; }
  .tl-dot { position: absolute; left: -26px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); }
  .tl-item:first-child .tl-dot { background: var(--primary); }
  .tl-head { font-size: 14px; color: var(--gray-700); }
  .tl-head b { font-weight: 700; color: var(--card-foreground); }
  .tl-date { font-size: 12px; color: var(--gray-400); margin-top: 3px; }
  .tl-note { font-size: 13px; color: var(--muted-foreground); margin-top: 6px; line-height: 1.5; }

  .note-list { display: flex; flex-direction: column; gap: 16px; max-height: 290px; overflow-y: auto; }
  .note-item { display: flex; gap: 11px; }
  .note-body-wrap { flex: 1; min-width: 0; }
  .note-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .note-author { font-size: 13.5px; font-weight: 600; color: var(--card-foreground); }
  .note-time { font-size: 12px; color: var(--gray-400); }
  .note-text { font-size: 13.5px; line-height: 1.55; color: var(--gray-700); margin-top: 3px; }
  .note-add { margin-top: 16px; }
  .note-add textarea { width: 100%; min-height: 66px; resize: vertical; border: 1px solid var(--input); border-radius: 10px; padding: 10px 12px; font-family: var(--font-sans); font-size: 14px; color: var(--foreground); outline: none; letter-spacing: var(--tracking-tight); }
  .note-add textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(128,204,235,.45); }
  .note-add .addrow { display: flex; justify-content: flex-end; margin-top: 10px; }
  .btn-addnote { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 9px; background: var(--secondary); color: #fff; border: none; font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .15s; }
  .btn-addnote:hover { background: #46586a; }
  .btn-addnote [data-lucide] { width: 15px; height: 15px; }

  .p-actions { display: flex; gap: 10px; }
  .p-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 42px; border-radius: 10px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; letter-spacing: var(--tracking-tight); transition: background .15s, border-color .15s; }
  .p-btn [data-lucide] { width: 16px; height: 16px; }
  .p-btn-primary { background: var(--primary); color: #fff; border: 1px solid transparent; }
  .p-btn-primary:hover { background: #73c4e6; }
  .p-btn-outline { background: #fff; border: 1px solid var(--border); color: var(--gray-700); }
  .p-btn-outline:hover { background: var(--accent); }
  .mini-av.av-sys { background: var(--gray-400); }

  /* user switcher + roles */
  .side-user { cursor: pointer; position: relative; transition: background .15s; }
  .side-user:hover { background: var(--accent); }
  .side-user .chev { margin-left: auto; color: var(--gray-400); flex: 0 0 auto; width: 16px; height: 16px; }
  .sidebar.collapsed .side-user .chev { display: none; }
  .user-menu { position: absolute; bottom: 66px; left: 12px; right: 12px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 50; }
  .user-menu.open { display: block; }
  .sidebar.collapsed .user-menu { display: none !important; }
  .user-menu-head { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-400); padding: 6px 10px 5px; }
  .user-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: none; background: transparent; border-radius: 8px; cursor: pointer; font-family: inherit; text-align: left; }
  .user-opt:hover { background: var(--accent); }
  .user-opt .uo-info { min-width: 0; flex: 1; }
  .user-opt .uo-name { font-size: 13.5px; font-weight: 600; color: var(--card-foreground); display: block; }
  .user-opt .uo-role { font-size: 11.5px; color: var(--muted-foreground); display: block; }
  .user-opt .uo-check { margin-left: auto; color: var(--primary-darker); opacity: 0; flex: 0 0 auto; }
  .user-opt.cur .uo-check { opacity: 1; }

  /* awaiting-acknowledgment badge */
  .status-cell { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
  .ack-badge { display: inline-flex; align-items: center; gap: 4px; background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 9999px; white-space: nowrap; }
  .ack-badge [data-lucide] { width: 11px; height: 11px; }

  /* bell + notifications */
  .bell-wrap { position: relative; }
  .bell .count.hidden { display: none; }
  .notif { position: absolute; top: 48px; right: 0; width: 326px; background: #fff; border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: 55; }
  .notif.open { display: block; }
  .notif-head { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-400); padding: 6px 8px 8px; }
  .notif-item { padding: 11px 8px; border-top: 1px solid var(--gray-100); }
  .notif-item .ni-t { font-size: 13.5px; color: var(--card-foreground); line-height: 1.4; }
  .notif-item .ni-t b { font-weight: 700; }
  .notif-item .ni-s { font-size: 12px; color: var(--muted-foreground); margin: 4px 0 9px; line-height: 1.45; }
  .notif-empty { padding: 22px 8px; text-align: center; color: var(--gray-400); font-size: 13px; }

  /* panel: global-status caption + personal flag */
  .p-meta-cap { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-foreground); margin-top: 10px; }
  .p-meta-cap [data-lucide] { width: 13px; height: 13px; color: var(--gray-400); }
  .pflag { margin-top: 14px; background: var(--gray-50); border: 1px solid var(--border); border-radius: 11px; padding: 12px 13px; }
  .pflag-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--gray-500); margin-bottom: 8px; }
  .pflag-label [data-lucide] { width: 13px; height: 13px; color: var(--gray-400); }
  .pflag-label .only { color: var(--muted-foreground); font-weight: 500; }
  .pflag-input { width: 100%; height: 36px; border: 1px solid var(--input); border-radius: 8px; padding: 0 11px; font-family: var(--font-sans); font-size: 13.5px; color: var(--foreground); background: #fff; outline: none; }
  .pflag-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(128,204,235,.45); }

  /* timeline pending + acknowledge */
  .tl-item.pending .tl-dot { background: #fbbf24; border-color: #fbbf24; }
  .tl-ackrow { margin-top: 8px; }
  .btn-ack { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 8px; background: var(--primary); color: #fff; border: none; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
  .btn-ack:hover { background: #73c4e6; }
  .btn-ack [data-lucide] { width: 14px; height: 14px; }

  /* handoff modal */
  .modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none; align-items: center; justify-content: center; z-index: 80; padding: 20px; }
  .modal-overlay.open { display: flex; }
  .modal { width: 440px; max-width: 100%; background: #fff; border-radius: 16px; box-shadow: var(--shadow-xl); overflow: hidden; }
  .modal-head { padding: 20px 22px 0; }
  .modal-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin: 0; color: var(--card-foreground); }
  .modal-sub { font-size: 13px; color: var(--muted-foreground); margin-top: 4px; }
  .modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
  .modal-foot { padding: 0 22px 20px; display: flex; justify-content: flex-end; gap: 10px; }
  .modal .fl { font-size: 13px; font-weight: 600; color: var(--card-foreground); display: block; margin-bottom: 8px; }
  .modal textarea { width: 100%; min-height: 66px; resize: vertical; border: 1px solid var(--input); border-radius: 10px; padding: 10px 12px; font-family: var(--font-sans); font-size: 14px; outline: none; color: var(--foreground); }
  .modal textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(128,204,235,.45); }
  .recip-grid { display: flex; gap: 8px; flex-wrap: wrap; }
  .recip-opt { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--input); border-radius: 9px; background: #fff; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--gray-700); }
  .recip-opt:hover { background: var(--accent); }
  .recip-opt.sel { border-color: var(--primary); background: var(--primary-50); color: var(--primary-darker); }
  .recip-opt .mini-av { width: 24px; height: 24px; font-size: 10px; }

  /* ---------------- email composer (slide-over) ---------------- */
  .composer { display: flex; flex-direction: column; gap: 12px; }
  .composer-row { display: flex; gap: 10px; align-items: stretch; }
  .composer .dd { flex: 1; min-width: 0; }
  .composer .dd .dd-btn { width: 100%; justify-content: space-between; height: 40px; }
  .composer .dd .dd-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .composer .dd-menu { left: 0; right: auto; width: 100%; max-height: 290px; overflow-y: auto; }
  .composer .dd-opt { align-items: flex-start; }
  .dd-opt .opt-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .dd-opt .opt-name { font-weight: 600; color: var(--gray-700); }
  .dd-opt.sel .opt-name { color: var(--primary-darker); }
  .dd-opt .opt-sub { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
  .opt-default-tag { margin-left: auto; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 7px; border-radius: 9999px; background: var(--primary-50); color: var(--primary-darker); flex: 0 0 auto; }
  .csend { flex: 0 0 auto; height: 40px; padding: 0 16px; }
  .composer-hint { font-size: 12px; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: 6px; }
  .composer-hint [data-lucide] { width: 13px; height: 13px; color: var(--primary-darker); }
  .composer-hint b { color: var(--gray-700); font-weight: 600; }
  .cpreview { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
  .cpreview .cp-subj { padding: 10px 13px; border-bottom: 1px solid var(--gray-100); font-size: 13.5px; font-weight: 700; color: var(--card-foreground); }
  .cpreview .cp-body { padding: 12px 13px; font-size: 13px; line-height: 1.55; color: var(--gray-700); white-space: pre-wrap; word-break: break-word; max-height: 172px; overflow-y: auto; }
  .cpreview .ph { background: #fef3c7; color: #92400e; border-radius: 4px; padding: 0 4px; font-weight: 600; }
  .csent { display: flex; align-items: center; gap: 11px; background: var(--success-bg); border: 1px solid #a7f3d0; border-radius: 11px; padding: 12px 14px; }
  .csent .cs-ic { width: 30px; height: 30px; border-radius: 9999px; background: var(--success); color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
  .csent .cs-ic [data-lucide] { width: 16px; height: 16px; }
  .csent .cs-txt { font-size: 12.5px; color: var(--success-fg); line-height: 1.45; }
  .csent .cs-txt b { font-weight: 700; }
  .csent .cs-again { margin-left: auto; background: none; border: none; color: var(--primary-darker); font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; flex: 0 0 auto; white-space: nowrap; }
  .csent .cs-again:hover { color: var(--primary-dark); }
  .composer-foot { display: flex; justify-content: flex-end; }
  .composer-foot a { font-size: 12px; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
  .composer-foot a:hover { color: var(--primary-darker); }
  .composer-foot a [data-lucide] { width: 12px; height: 12px; }
  .var-field { display: flex; flex-direction: column; gap: 7px; }
  .var-field label { font-size: 13px; font-weight: 600; color: var(--card-foreground); }
  .var-field input { width: 100%; height: 38px; border: 1px solid var(--input); border-radius: 9px; padding: 0 12px; font-family: var(--font-sans); font-size: 14px; color: var(--foreground); outline: none; }
  .var-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(128,204,235,.45); }

  /* ---------------- call (slide-over row + modal) ---------------- */
  .call-row { display: flex; align-items: center; gap: 12px; }
  .call-row .cr-num { flex: 1; min-width: 0; }
  .call-row .cr-num .cr-phone { font-size: 15px; font-weight: 600; color: var(--card-foreground); font-variant-numeric: tabular-nums; }
  .call-row .cr-num .cr-via { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; display: inline-flex; align-items: center; gap: 5px; }
  .call-row .cr-num .cr-via [data-lucide] { width: 12px; height: 12px; color: var(--gray-400); }
  .call-btn { flex: 0 0 auto; height: 40px; padding: 0 18px; }
  .call-vm { flex: 0 0 auto; height: 40px; width: 40px; padding: 0; }

  .call-modal { width: 384px; max-width: 100%; }
  .cm-top { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 24px 20px; }
  .cm-avatar { width: 72px; height: 72px; border-radius: 9999px; background: var(--primary-50); color: var(--primary-darker); display: flex; align-items: center; justify-content: center; position: relative; }
  .cm-avatar [data-lucide] { width: 30px; height: 30px; }
  .cm-avatar.live { background: var(--success-bg); color: var(--success); }
  .cm-avatar.live::after { content: ''; position: absolute; inset: -6px; border-radius: 9999px; border: 2px solid var(--success); opacity: .4; animation: cmpulse 1.4s ease-out infinite; }
  @keyframes cmpulse { 0% { transform: scale(.92); opacity: .5; } 100% { transform: scale(1.18); opacity: 0; } }
  .cm-name { font-size: 18px; font-weight: 700; color: var(--card-foreground); letter-spacing: -0.01em; }
  .cm-phone { font-size: 14px; color: var(--gray-700); font-variant-numeric: tabular-nums; margin-top: 1px; }
  .cm-via { font-size: 12px; color: var(--muted-foreground); margin-top: 7px; display: inline-flex; align-items: center; gap: 5px; }
  .cm-via [data-lucide] { width: 12px; height: 12px; color: var(--gray-400); }
  .cm-status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 13px; font-weight: 600; padding: 5px 13px; border-radius: 9999px; background: var(--gray-50); border: 1px solid var(--border); }
  .cm-status .dot { width: 8px; height: 8px; border-radius: 9999px; background: var(--gray-400); flex: 0 0 auto; }
  .cm-status.live .dot { background: var(--success); animation: cmblink 1.1s ease-in-out infinite; }
  .cm-status.live { color: var(--success-fg); border-color: #a7f3d0; background: var(--success-bg); }
  .cm-status.warn { color: #92400e; border-color: #fde68a; background: #fef3c7; }
  .cm-status.warn .dot { background: #d97706; }
  .cm-status.bad { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
  .cm-status.bad .dot { background: #dc2626; }
  @keyframes cmblink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
  .cm-helper { font-size: 12.5px; color: var(--muted-foreground); text-align: center; line-height: 1.45; max-width: 280px; }
  .cm-timer { font-family: var(--font-mono); font-size: 34px; font-weight: 300; color: var(--card-foreground); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
  .cm-vmnote { display: flex; align-items: center; gap: 9px; background: #fef3c7; border: 1px solid #fde68a; border-radius: 11px; padding: 10px 13px; width: 100%; }
  .cm-vmnote [data-lucide] { width: 16px; height: 16px; color: #92400e; flex: 0 0 auto; }
  .cm-vmnote span { font-size: 12.5px; color: #92400e; font-weight: 500; }
  .cm-foot { display: flex; gap: 10px; padding: 16px 24px 22px; }
  .cm-foot .p-btn { flex: 1; height: 44px; }
  .p-btn-danger { background: #dc2626; color: #fff; border: 1px solid transparent; }
  .p-btn-danger:hover { background: #b91c1c; }
  .cm-statusedit { padding: 0 24px 4px; }
  .cm-statusedit .se-label { font-size: 11.5px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }

  /* ---------------- sonner toast ---------------- */
  .toaster { position: fixed; top: 24px; right: 24px; display: flex; flex-direction: column; gap: 12px; z-index: 120; pointer-events: none; }
  .sonner { pointer-events: auto; width: 360px; max-width: calc(100vw - 48px); display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 13px; box-shadow: 0 5px 18px rgba(15,23,42,.12), 0 1px 3px rgba(15,23,42,.06); padding: 15px 16px; transform: translateY(-18px) scale(.96); opacity: 0; transition: transform .32s cubic-bezier(.21,1.02,.73,1), opacity .3s ease; }
  .sonner.show { transform: translateY(0) scale(1); opacity: 1; }
  .sonner-ic { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 9px; background: var(--gray-50); display: flex; align-items: center; justify-content: center; }
  .sonner-ic [data-lucide] { width: 17px; height: 17px; color: var(--secondary); }
  .sonner-content { flex: 1; min-width: 0; }
  .sonner-title { font-size: 13.5px; font-weight: 600; color: var(--card-foreground); letter-spacing: -0.01em; line-height: 1.35; }
  .sonner-desc { font-size: 12.5px; color: var(--muted-foreground); margin-top: 2px; }
  .sonner-action { flex: 0 0 auto; height: 30px; padding: 0 14px; border-radius: 8px; border: none; background: var(--secondary); color: #fff; font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background .15s; }
  .sonner-action:hover { background: #46586a; }

  /* ---------------- contact methods (multi phone / email) ---------------- */
  .sec-count { font-size: 12px; font-weight: 600; color: var(--gray-400); margin-left: 5px; }
  .sec-cap { font-size: 12px; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: 6px; margin-bottom: 11px; }
  .sec-cap [data-lucide] { width: 13px; height: 13px; color: var(--gray-400); }
  .method-list { display: flex; flex-direction: column; gap: 9px; }
  .method-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
  .method-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
  .method-val { font-size: 14px; font-weight: 600; color: var(--card-foreground); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; word-break: break-word; }
  .primary-chip { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 7px; border-radius: 9999px; background: var(--primary-50); color: var(--primary-darker); }
  .method-actions { display: flex; gap: 7px; flex: 0 0 auto; }
  .method-actions .p-btn { height: 34px; }
  .method-actions .call-btn { padding: 0 13px; }
  .method-actions .call-vm { width: 34px; padding: 0; }
  /* status pill = compact dropdown */
  .status-dd { position: relative; align-self: flex-start; }
  .status-dd .dd-menu { left: 0; right: auto; min-width: 168px; }
  .status-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 11px; border-radius: 9999px; font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: #fff; letter-spacing: var(--tracking-tight); white-space: nowrap; }
  .status-pill .dotp { width: 7px; height: 7px; border-radius: 9999px; flex: 0 0 auto; background: var(--gray-400); }
  .status-pill [data-lucide] { width: 13px; height: 13px; opacity: .55; }
  .tone-green { color: #15803d; border-color: #a7f3d0; background: var(--success-bg); }
  .tone-green .dotp { background: #16a34a; }
  .tone-amber { color: #92400e; border-color: #fde68a; background: #fef3c7; }
  .tone-amber .dotp { background: #d97706; }
  .tone-red { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
  .tone-red .dotp { background: #dc2626; }
  .tone-gray { color: var(--gray-600); border-color: var(--border); background: var(--gray-50); }
  .tone-gray .dotp { background: var(--gray-400); }
  .composer .composer-to .dd-btn { width: 100%; justify-content: space-between; height: 38px; }
  .composer-to .dd-text { display: flex; align-items: center; gap: 7px; overflow: hidden; text-overflow: ellipsis; }
  .composer-to .to-lab { color: var(--muted-foreground); font-weight: 500; flex: 0 0 auto; }
