/* LinqCRM — styles for the working app (adds to styles.css, same look) */
[hidden] { display: none !important; }
code { font-family: var(--mono); font-size: 12px; background: var(--bg3); padding: 1px 5px; border-radius: 4px; }
kbd { background: var(--bg4); border: 1px solid var(--border2); border-radius: 3px; padding: 1px 4px; font-family: var(--mono); font-size: 10px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--linq-blue); outline-offset: 2px; }

/* ─── Sign-in / setup ─── */
.auth-wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: radial-gradient(1200px 600px at 50% -10%, #23304d 0%, #1a1f2e 55%, #12161f 100%); overflow-y: auto; z-index: 5; }
.auth-card { width: 100%; max-width: 420px; background: var(--bg2); border-radius: 16px; padding: 30px 30px 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.45); display: flex; flex-direction: column; }
.auth-card .form-label { margin-top: 12px; }
.auth-logo { width: 54px; height: 54px; border-radius: 12px; margin: 0 auto 12px; display: block; }
.auth-title { font-size: 20px; font-weight: 700; text-align: center; color: var(--text); letter-spacing: -0.3px; }
.auth-sub { font-size: 13px; color: var(--text3); text-align: center; margin: 4px 0 8px; line-height: 1.55; }
.auth-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-error { margin-top: 12px; padding: 8px 12px; border-radius: 8px; background: var(--red-lt); color: var(--red); font-size: 12px; font-weight: 500; }
.auth-btn { margin-top: 18px; padding: 11px; font-size: 14px; justify-content: center; }
.auth-foot { margin-top: 14px; font-size: 11px; color: var(--text3); text-align: center; }

/* ─── Global search ─── */
.search-results { position: absolute; top: calc(100% + 6px); right: 0; width: 380px; max-height: 420px; overflow-y: auto; background: var(--bg2); border: 1px solid var(--border2); border-radius: 12px; box-shadow: var(--shadow-md); z-index: 200; padding: 6px; }
.sr-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.sr-item:hover, .sr-item.on { background: var(--bg3); }
.sr-empty { padding: 14px; font-size: 12px; color: var(--text3); text-align: center; }

/* ─── Dashboard ─── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; height: 100%; overflow: hidden; }
.dash-q { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.dash-head { padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 8px; }
.dash-head-title { font-size: 12px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 7px; }
.dash-count { background: rgba(255,255,255,0.2); color: #fff; font-size: 10px; padding: 1px 7px; border-radius: 10px; font-family: var(--mono); }
.dash-search { display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,0.15); border-radius: 6px; padding: 4px 8px; }
.dash-search input { background: none; border: none; outline: none; font-size: 11px; color: #fff; font-family: var(--font); width: 90px; }
.dash-search input::placeholder { color: rgba(255,255,255,0.7); }
.dash-btn { background: rgba(255,255,255,0.18); border: none; color: #fff; font-size: 10px; font-weight: 700; padding: 4px 9px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.dash-btn:hover { filter: brightness(1.1); }
.dash-sq { background: rgba(255,255,255,0.2); border: none; color: #fff; font-size: 13px; font-weight: 700; width: 24px; height: 24px; border-radius: 5px; cursor: pointer; }
.dash-select { background: rgba(255,255,255,0.2); border: none; color: #fff; font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 6px; cursor: pointer; outline: none; }
.dash-select option { color: var(--text); }
.tabs4 { display: flex; background: var(--bg2); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.t4 { flex: 1; padding: 6px; text-align: center; font-size: 10px; font-weight: 700; cursor: pointer; color: var(--text3); border-bottom: 2px solid transparent; user-select: none; }
.tabs4.big .t4 { padding: 7px; font-size: 11px; }
.t4.on { color: var(--linq-blue); border-bottom-color: var(--linq-blue); }
.tabs4.green .t4.on { color: var(--linq-green); border-bottom-color: var(--linq-green); }
.metric-tile { border-radius: 10px; padding: 12px 14px; }
.metric-tile .k { font-size: 10px; font-family: var(--mono); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 4px; }
.metric-tile .v { font-size: 28px; font-weight: 700; font-family: var(--mono); line-height: 1; }
.metric-tile .s { font-size: 10px; margin-top: 3px; opacity: 0.75; }
.sec-label { font-size: 10px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.8px; font-family: var(--mono); margin: 4px 0 6px; }
.row-tile { display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: var(--bg3); border-radius: 8px; margin-bottom: 4px; }
.cal-day { text-align: center; padding: 3px 2px; border-radius: 5px; cursor: pointer; font-size: 11px; font-weight: 500; color: var(--text); background: transparent; border: none; font-family: var(--font); }
.cal-day:hover { background: var(--bg3); }
.cal-day.today { background: var(--linq-blue); color: #fff; font-weight: 700; }
.cal-day.sel { box-shadow: inset 0 0 0 2px var(--linq-orange); }
.cal-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--linq-orange); margin: 1px auto 0; }
.cal-day.today .cal-dot { background: #fff; }
.appt-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--linq-green-lt); border-radius: 8px; margin-bottom: 5px; border-left: 3px solid var(--linq-green); cursor: pointer; }
.empty-note { padding: 14px; text-align: center; font-size: 12px; color: var(--text3); }

/* ─── Lead / client lists ─── */
.list-col { width: 290px; min-width: 290px; border-right: 1px solid var(--border); display: flex; flex-direction: column; background: var(--bg2); }
.list-head { padding: 10px 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.list-head-title { font-size: 13px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 7px; }
.list-filters { padding: 8px 10px; border-bottom: 1px solid var(--border); display: flex; gap: 6px; align-items: center; }
.list-search { flex: 1; display: flex; align-items: center; gap: 6px; background: var(--bg3); border: 1px solid var(--border); border-radius: 7px; padding: 6px 9px; }
.list-search input { background: none; border: none; outline: none; font-size: 12px; color: var(--text); font-family: var(--font); width: 100%; }
.list-select { background: var(--bg3); border: 1px solid var(--border); border-radius: 7px; padding: 6px 8px; font-size: 11px; color: var(--text2); font-family: var(--font); outline: none; cursor: pointer; }
.lrow { padding: 11px 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; border-bottom: 1px solid var(--border); background: var(--bg2); transition: background 0.1s; }
.lrow:hover { background: var(--bg3); }
.lrow.on { background: #eef4ff; }
.lrow.client.on { background: #f0fdf4; }
.lrow .view-btn { opacity: 0; flex-shrink: 0; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--linq-blue); background: var(--linq-blue-lt); color: var(--linq-blue); font-size: 10px; font-weight: 600; cursor: pointer; transition: opacity 0.15s; }
.lrow:hover .view-btn, .lrow .view-btn:focus { opacity: 1; }
.av { border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.st-badge { font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 8px; font-family: var(--mono); white-space: nowrap; }
.load-more { display: block; width: calc(100% - 20px); margin: 10px; padding: 8px; border-radius: 8px; border: 1px dashed var(--border2); background: transparent; color: var(--text2); font-size: 11px; font-weight: 600; cursor: pointer; }
.load-more:hover { background: var(--bg3); }
.empty-panel { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--bg); z-index: 2; padding: 20px; }

/* ─── Conversation panel ─── */
.convo-header { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 12px 20px; display: flex; align-items: center; gap: 14px; }
.convo-avatar { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; cursor: pointer; background: var(--linq-blue-lt); color: var(--linq-blue); }
.convo-name { font-size: 15px; font-weight: 700; color: var(--text); cursor: pointer; text-decoration: underline dotted var(--text3); }
.convo-meta { font-size: 11px; color: var(--text3); font-family: var(--mono); margin-top: 2px; }
.followup-line { font-size: 11px; color: var(--linq-orange); font-weight: 600; margin-top: 3px; }
.followup-line.overdue { color: var(--red); }
.convo-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 340px; }
.convo-actions .btn { font-size: 11px; padding: 6px 10px; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.btn-callgreen { background: var(--linq-green-lt); color: var(--linq-green); border-color: rgba(46,125,50,0.3); font-weight: 600; }
.btn-convert { background: var(--linq-orange-lt); color: var(--linq-orange); border-color: rgba(245,124,0,0.3); font-weight: 600; }
.btn-danger { background: var(--red-lt); color: var(--red); border-color: rgba(198,40,40,0.25); font-weight: 600; }
.btn-danger:hover { background: #ffd9de; }
.pill-select { appearance: none; border: none; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; font-family: var(--mono); cursor: pointer; outline: none; background: var(--amber-lt); color: var(--linq-orange); }
.pill-select.hot { background: var(--red-lt); color: var(--red); }
.pill-select.warm { background: var(--amber-lt); color: var(--linq-orange); }
.pill-select.cold, .pill-select.blue { background: var(--linq-blue-lt); color: var(--linq-blue); }
.pill-select.green, .pill-select.active { background: var(--linq-green-lt); color: var(--linq-green); }
.pill-select.renewal { background: var(--amber-lt); color: var(--linq-orange); }
.pill-select.lapsed { background: var(--red-lt); color: var(--red); }
.mini-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; font-family: var(--mono); background: var(--linq-blue-lt); color: var(--linq-blue); white-space: nowrap; }
.mini-badge.red { background: var(--red-lt); color: var(--red); }
.mini-badge.orange { background: var(--amber-lt); color: var(--linq-orange); }
.mini-badge.gray { background: var(--bg3); color: var(--text2); }
.info-strip { background: var(--linq-blue-lt); border-bottom: 1px solid rgba(21,101,192,0.15); padding: 7px 20px; display: flex; overflow-x: auto; flex-wrap: nowrap; align-items: center; min-height: 40px; }
.chipcol { display: flex; flex-direction: column; padding: 0 14px; border-right: 1px solid rgba(21,101,192,0.2); white-space: nowrap; }
.chipcol:first-child { padding-left: 0; }
.chipcol .k { font-size: 9px; color: rgba(21,101,192,0.6); text-transform: uppercase; letter-spacing: 0.8px; font-family: var(--mono); font-weight: 600; }
.chipcol .v { font-size: 11px; font-weight: 700; color: #1d4ed8; font-family: var(--mono); }
.flagp { font-size: 9px; font-weight: 700; padding: 1px 7px; border-radius: 8px; font-family: var(--mono); white-space: nowrap; }
.flagp.aca { background: #dbeafe; color: #1d4ed8; }
.flagp.dia { background: #fef2f2; color: #991b1b; }
.legend-row { padding: 6px 20px; background: var(--bg2); border-bottom: 1px solid var(--border); display: flex; gap: 14px; align-items: center; flex-shrink: 0; flex-wrap: wrap; }
.lg { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--text3); }
.lg i { width: 9px; height: 9px; border-radius: 2px; border: 1px solid; display: inline-block; }
.chip { font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 10px; border: 1px solid var(--border2); background: transparent; color: var(--text2); cursor: pointer; font-family: var(--font); }
.chip.on { background: var(--linq-blue); color: #fff; border-color: var(--linq-blue); }
.convo-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; flex-direction: column; }
.msg.right { align-items: flex-end; }
.msg-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.msg.right .msg-top { flex-direction: row-reverse; }
.msg-tag { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; font-family: var(--mono); border: 1px solid; }
.msg-time { font-size: 10px; color: var(--text3); font-family: var(--mono); }
.msg-bubble { max-width: 70%; border: 1px solid; padding: 10px 14px; font-size: 13px; color: #1e293b; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; border-radius: 4px 14px 14px 14px; }
.msg.right .msg-bubble { border-radius: 14px 4px 14px 14px; }
.msg-status { font-size: 10px; color: var(--text3); margin-top: 3px; font-style: italic; }
.composer { background: var(--bg2); border-top: 1px solid var(--border); padding: 12px 16px; }
.mode-btn { padding: 5px 13px; border-radius: 20px; border: 1.5px solid var(--border2); background: transparent; color: var(--text2); font-size: 11px; font-weight: 700; cursor: pointer; font-family: var(--font); }
.mode-btn.on[data-mode="note"] { background: #ca8a04; border-color: #ca8a04; color: #fff; }
.mode-btn.on[data-mode="sms"] { background: var(--linq-green); border-color: var(--linq-green); color: #fff; }
.mode-btn.on[data-mode="email"] { background: var(--linq-blue); border-color: var(--linq-blue); color: #fff; }
.mode-label { font-size: 10px; color: var(--text3); margin-left: 6px; }
.subject-input { width: 100%; background: var(--bg3); border: 1px solid var(--border2); border-radius: 7px; padding: 7px 11px; color: var(--text); font-size: 12px; font-family: var(--font); outline: none; margin-bottom: 7px; }
.reply-input { flex: 1; background: var(--bg3); border: 1px solid var(--border2); border-radius: 10px; padding: 10px 12px; color: var(--text); font-size: 13px; font-family: var(--font); outline: none; resize: none; line-height: 1.5; }
.reply-input:focus, .subject-input:focus { border-color: var(--linq-blue); }
.send-btn { width: 38px; height: 38px; border-radius: 50%; background: #ca8a04; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.send-btn:disabled { opacity: 0.5; cursor: default; }

/* ─── Clients ─── */
.cl-col1 { width: 240px; min-width: 240px; border-right: 1px solid var(--border); display: flex; flex-direction: column; background: var(--bg2); overflow-y: auto; }
.cl-col2 { width: 400px; min-width: 320px; border-right: 1px solid var(--border); display: flex; flex-direction: column; background: var(--bg2); overflow: hidden; }
.cl-col3 { flex: 1; min-width: 260px; display: flex; flex-direction: column; overflow: hidden; }
.cl-colhead { padding: 10px 14px; font-size: 11px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.8px; font-family: var(--mono); flex-shrink: 0; }
.info-k { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.7px; font-family: var(--mono); font-weight: 600; margin-bottom: 2px; }
.info-v { font-size: 12px; color: var(--text); font-weight: 500; margin-bottom: 9px; word-wrap: break-word; }
.pol-card { background: var(--bg3); border: 1px solid var(--border2); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.side-btn { width: 100%; padding: 7px; border-radius: 8px; font-size: 11px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; display: block; font-family: var(--font); }

/* ─── Pipeline ─── */
.pipe-col { display: flex; flex-direction: column; min-height: 0; width: 230px; min-width: 230px; }
.pipe-drop { flex: 1; overflow-y: auto; border-radius: 0 0 var(--radius) var(--radius); padding: 2px; min-height: 80px; transition: background 0.15s; }
.pipe-drop.over { background: var(--linq-blue-lt); outline: 2px dashed var(--linq-blue); }
.pipe-card[draggable="true"] { cursor: grab; }
.pipe-card.dragging { opacity: 0.4; }
.pipe-more { font-size: 11px; color: var(--text3); text-align: center; padding: 8px; }

/* ─── Follow-ups ─── */
.fu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fu-list { padding: 6px; max-height: 420px; overflow-y: auto; }
.fu-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.fu-item:hover { background: var(--bg3); }
.fu-when { font-size: 10px; font-family: var(--mono); font-weight: 700; white-space: nowrap; }

/* ─── Dialer ─── */
.dialer-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
.dialer-note { font-size: 11px; color: var(--text3); margin-top: 10px; line-height: 1.5; }
.outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.outcomes .btn { justify-content: center; font-weight: 600; padding: 9px 6px; }
.dial-big { display: block; text-align: center; margin: 14px auto 4px; padding: 12px 24px; border-radius: 30px; background: var(--linq-green); color: #fff; font-size: 16px; font-weight: 700; font-family: var(--mono); text-decoration: none; width: fit-content; }
.dial-big:hover { background: var(--linq-green2); }
.plain-list { padding-left: 18px; font-size: 13px; color: var(--text2); line-height: 1.9; }

/* ─── Intake form ─── */
.modal.intake { width: 900px; max-width: calc(100vw - 24px); margin-bottom: 40px; }
.intake .irow { flex-wrap: wrap; }
.sep-row { background: var(--linq-blue-lt); border-radius: 8px; padding: 8px 12px 0; }
.fam-head { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.7px; font-family: var(--mono); font-weight: 600; margin-bottom: 4px; }
.intake textarea.iinput { resize: vertical; }

/* ─── Dialogs ─── */
.dlg-overlay { position: fixed; inset: 0; background: rgba(15,25,35,0.5); z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 50px 12px 40px; overflow-y: auto; }
.dlg { background: var(--bg2); border: 1px solid var(--border2); border-radius: 14px; width: 520px; max-width: 100%; padding: 24px; box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.dlg.wide { width: 880px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dlg-title { font-size: 16px; font-weight: 700; color: var(--linq-blue); }
.dlg-foot { display: flex; gap: 8px; margin-top: 18px; }
.dlg-foot .btn-primary { flex: 1; padding: 10px; justify-content: center; }
.dlg .form-group { margin-bottom: 10px; }
.utable { width: 100%; border-collapse: collapse; }
.utable th { padding: 8px 12px; text-align: left; font-size: 10px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.7px; background: var(--bg3); border-bottom: 2px solid var(--border2); }
.utable td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 12px; }
.ubtn { padding: 3px 9px; border-radius: 5px; font-size: 10px; font-weight: 600; cursor: pointer; border: 1px solid; font-family: var(--font); }

/* ─── Toast ─── */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #1a1f2e; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 500; opacity: 0; pointer-events: none; transition: all 0.2s; z-index: 2000; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--red); }

/* ─── Smaller screens ─── */
@media (max-width: 1100px) {
  .agents-grid { grid-template-columns: repeat(2, 1fr); }
  .fu-grid { grid-template-columns: 1fr; }
  .dialer-grid { grid-template-columns: 1fr; }
  .cl-col2 { width: 320px; }
}
@media (max-width: 760px) {
  .dash-grid { grid-template-columns: 1fr; grid-template-rows: none; overflow-y: auto; }
  .dash-q { min-height: 360px; }
  .settings-grid, .agents-grid { grid-template-columns: 1fr; }
  .topbar .search-box { display: none; }
}

/* ─── Sidebar: Ringy-style logo, toggle and account menu ─── */
.sidebar { transition: width 0.28s cubic-bezier(0.4,0,0.2,1), min-width 0.28s cubic-bezier(0.4,0,0.2,1); }
.logo-area { height: 76px; padding: 0 6px; gap: 10px; justify-content: flex-start; padding-left: 7px; }
.logo-img { width: 42px; min-width: 42px; height: auto; border-radius: 0; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4)); }
.logo-text { display: none; }
.logo-word { font-size: 27px; font-weight: 800; letter-spacing: -0.5px; color: #fff; white-space: nowrap; opacity: 0; transform: translateX(-8px); transition: opacity 0.2s, transform 0.2s; line-height: 1; }
.logo-word span { color: var(--linq-orange); }
.sidebar-inner:hover .logo-word, .sb-pinned .logo-word { opacity: 1; transform: translateX(0); }
.sidebar-inner:hover .logo-img, .sb-pinned .logo-img { width: 46px; min-width: 46px; }

/* top-bar toggle (keeps the sidebar open) */
.sb-toggle { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border2); background: var(--bg3); color: var(--text2); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background 0.15s, color 0.15s; }
.sb-toggle:hover { background: var(--bg4); color: var(--text); }
.sb-toggle .ic-close { display: none; }
.sb-pinned .sb-toggle .ic-open { display: none; }
.sb-pinned .sb-toggle .ic-close { display: block; }
.sb-pinned .sb-toggle { background: var(--linq-blue-lt); color: var(--linq-blue); border-color: rgba(21,101,192,0.25); }

/* pinned open: page makes room */
.sb-pinned .sidebar { width: 240px; min-width: 240px; }
.sb-pinned .sidebar-inner, .sb-pinned .sidebar-inner:hover { width: 240px; box-shadow: none; }
.sb-pinned .nav-label { opacity: 1; transform: translateX(0); }
.sb-pinned .nav-badge { opacity: 1; }
.sb-pinned .nav-item[data-tip]::after { display: none; }

/* account button at the bottom of the sidebar */
.sidebar-footer { padding: 10px 0; }
.user-card { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 12px; background: none; border: none; cursor: pointer; color: inherit; font-family: var(--font); text-align: left; }
.user-card:hover .user-av, .user-card[aria-expanded="true"] .user-av { box-shadow: 0 0 0 2px rgba(245,124,0,0.6); }
.user-av { width: 32px; height: 32px; min-width: 32px; border-radius: 50%; background: rgba(245,124,0,0.25); color: #f57c00; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; transition: box-shadow 0.15s; }
.user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.user-name { font-size: 12px; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10px; color: rgba(255,255,255,0.45); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-caret { color: rgba(255,255,255,0.45); flex-shrink: 0; }

/* account menu */
.user-menu { position: fixed; z-index: 300; width: 250px; background: var(--bg2); border: 1px solid var(--border2); border-radius: 12px; box-shadow: 0 12px 36px rgba(0,0,0,0.25); padding: 6px; }
.um-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.um-av { width: 38px; height: 38px; min-width: 38px; border-radius: 50%; background: var(--linq-orange-lt); color: var(--linq-orange); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.um-name { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-sub { font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: none; background: none; border-radius: 8px; font-size: 13px; color: var(--text2); cursor: pointer; font-family: var(--font); text-align: left; }
.um-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.um-item:hover, .um-item:focus-visible { background: var(--bg3); color: var(--text); outline: none; }
.um-item.danger { color: var(--red); }
.um-item.danger:hover { background: var(--red-lt); }
@media (prefers-reduced-motion: reduce) { .logo-word, .sidebar { transition: none; } }
.logo-area { padding-left: 5px; }
.logo-img { width: 46px; min-width: 46px; }
.sidebar-inner:hover .logo-img, .sb-pinned .logo-img { width: 54px; min-width: 54px; }

/* ─── Claude AI ─── */
.ai-wrap { max-width: 880px; display: flex; flex-direction: column; gap: 12px; height: 100%; }
.ai-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-chat-card { display: flex; flex-direction: column; flex: 1; min-height: 360px; }
.ai-chat-card .ai-messages { flex: 1; overflow-y: auto; padding: 16px; max-height: none; }
.ai-foot { font-size: 11px; color: var(--text3); line-height: 1.5; }
.ai-bubble { line-height: 1.6; }
.ai-bubble.ai-err { background: var(--red-lt); color: var(--red); }
.ai-typing { display: flex; gap: 4px; align-items: center; min-height: 20px; }
.ai-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--linq-orange); animation: aiDot 1s infinite ease-in-out; }
.ai-typing span:nth-child(2) { animation-delay: 0.15s; } .ai-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-draft-btn { padding: 5px 12px; border-radius: 20px; border: 1.5px solid rgba(245,124,0,0.4); background: var(--linq-orange-lt); color: var(--linq-orange); font-size: 11px; font-weight: 700; cursor: pointer; font-family: var(--font); white-space: nowrap; }
.ai-draft-btn:hover { background: #ffe6c7; }
.ai-draft-btn:disabled { opacity: 0.6; cursor: default; }
.ai-setup { border-color: rgba(245,124,0,0.35); background: var(--linq-orange-lt); }
@media (prefers-reduced-motion: reduce) { .ai-typing span { animation: none; opacity: 0.7; } }
.msg-status-bad { color: var(--red); font-style: normal; font-weight: 600; }
/* wave 1: tags, block, templates, inbox */
.tag-row { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tag-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; border: 1px solid; white-space: nowrap; font-family: var(--font); }
.tag-chip.sm { font-size: 9px; padding: 1px 6px; }
.tag-chip.big { font-size: 12px; padding: 6px 12px; cursor: pointer; background: #fff; color: var(--tc); border: 1.5px solid var(--tc); }
.tag-chip.big.on { background: var(--tc); color: #fff; }
.tag-chip.big small { font-size: 9px; opacity: .8; }
.tag-add, .tpl-btn { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 8px; border: 1px dashed var(--border2); background: transparent; color: var(--text2); cursor: pointer; font-family: var(--font); white-space: nowrap; }
.tag-add:hover, .tpl-btn:hover { border-color: var(--linq-blue); color: var(--linq-blue); }
.tpl-btn { border-style: solid; }
.blocked-badge { font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: #0f1923; color: #fff; letter-spacing: .4px; }
.tpl-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 1px solid var(--border2); border-radius: 10px; padding: 9px 11px; background: #fff; cursor: pointer; font-family: var(--font); font-size: 12px; color: var(--text); }
.tpl-pick span { font-size: 11px; color: var(--text3); }
.tpl-pick:hover { border-color: var(--linq-blue); background: var(--linq-blue-lt); }
.tpl-row { display: flex; gap: 8px; align-items: center; border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; font-size: 12px; }
#page-inbox .composer { border-top: 1px solid var(--border); background: #fff; padding: 12px 16px; }
code { font-family: var(--mono); font-size: 10px; background: var(--bg3); padding: 1px 4px; border-radius: 4px; }
/* wave 2 */
.notice { background: var(--linq-orange-lt); border: 1px solid #ffe0b2; color: #8a4b00; border-radius: 10px; padding: 10px 12px; font-size: 12px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mini-table th { text-align: left; font-size: 10px; color: var(--text3); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; padding: 6px 8px; border-bottom: 1px solid var(--border); font-family: var(--mono); }
.mini-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.bar { height: 7px; border-radius: 4px; background: var(--bg3); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--linq-green); }
.script-body { background: var(--bg3); border-radius: 10px; padding: 14px 16px; font-size: 14px; line-height: 1.7; color: var(--text); max-height: 55vh; overflow: auto; }
.sc-cue { background: var(--linq-orange-lt); color: #8a4b00; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; }
.sec-label { font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--text3); margin: 4px 0 8px; font-family: var(--mono); }
/* wave 3 */
.accept-toggle { font-size: 11px; font-weight: 800; padding: 6px 12px; border-radius: 20px; border: 1.5px solid #a5d6a7; background: var(--linq-green-lt); color: var(--linq-green); cursor: pointer; white-space: nowrap; font-family: var(--font); margin-right: 8px; }
.accept-toggle.off { border-color: var(--border2); background: var(--bg3); color: var(--text3); }
.code-box { background: #0f1923; color: #d6e2f0; border-radius: 10px; padding: 12px 14px; font-family: var(--mono); font-size: 11px; line-height: 1.6; overflow: auto; white-space: pre; max-height: 260px; }
@media (max-width: 760px) { .accept-toggle { display: none; } }

/* ═════ Phone app layout ═════ */
#m-tabs, .m-back { display: none; }
.m-more { display: flex; flex-direction: column; gap: 4px; }
.m-more-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 12px; border: 0; border-radius: 10px; background: var(--bg3); font: 600 14px var(--font); color: var(--text); text-align: left; cursor: pointer; }
.m-more-item .m-ic { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--linq-blue); }
.m-more-item .m-ic svg { width: 20px; height: 20px; }
.m-more-item.danger { color: var(--red); }
.m-steps { font-size: 13px; color: var(--text2); line-height: 1.8; padding-left: 20px; margin-bottom: 6px; }
@media (max-width: 760px) {
  html, body { overscroll-behavior-y: none; }
  .sidebar { display: none !important; }
  .main { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  #m-tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: #0f1923; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 18px rgba(0,0,0,.18); }
  .m-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; color: rgba(255,255,255,.55); font: 600 10px var(--font); padding: 6px 0; position: relative; cursor: pointer; }
  .m-tab .m-ic { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
  .m-tab .m-ic svg { width: 21px; height: 21px; }
  .m-tab.on { color: #fff; }
  .m-tab.on .m-ic { color: #ffb74d; }
  .m-badge { position: absolute; top: 2px; left: 54%; min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; line-height: 17px; padding: 0 4px; }
  .topbar { padding: calc(8px + env(safe-area-inset-top)) 12px 8px; gap: 8px; min-height: 0; }
  .topbar .sb-toggle, .breadcrumb, .accept-toggle { display: none !important; }
  .page-title { font-size: 18px; }
  .topbar-right { gap: 6px; }
  .topbar-right .search-box { display: none; }
  .m-back { display: inline-flex; align-items: center; border: 0; background: var(--linq-blue-lt); color: var(--linq-blue); font: 700 13px var(--font); padding: 6px 12px; border-radius: 18px; margin-right: 8px; cursor: pointer; }
  .m-back[hidden] { display: none; }
  /* lists and record screens: one at a time */
  .list-col { width: 100% !important; min-width: 0 !important; border-right: 0 !important; }
  .page .list-col ~ * { display: none !important; }
  .page.m-detail .list-col { display: none !important; }
  .page.m-detail .list-col ~ * { display: flex !important; flex: 1; min-width: 0; }
  .list-filters { flex-wrap: wrap; }
  .convo-header { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .convo-actions { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
  .convo-actions .btn { flex: 1 1 auto; justify-content: center; padding: 9px 10px; }
  .composer { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .reply-input { font-size: 16px; }              /* stops iPhone from zooming in on tap */
  input, select, textarea { font-size: 16px !important; }
  .dash-q { min-height: 70vh; border-right: 0 !important; }
  .settings-grid, .auth-two { grid-template-columns: 1fr !important; }
  .page-content { padding: 12px; }
  .dlg-overlay { padding: 0; align-items: stretch; }
  .dlg { width: 100% !important; max-width: 100% !important; min-height: 100%; border-radius: 0; padding: calc(18px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
  .mini-table { font-size: 11px; }
  .lrow { padding-top: 12px; padding-bottom: 12px; }
  .hover-card { display: none !important; }
}
@media (max-width: 760px) {
  .page.m-detail .list-col ~ * { flex-direction: column; overflow-y: auto !important; -webkit-overflow-scrolling: touch; }
  .page.m-detail .list-col ~ * > * { flex-shrink: 0; }
  .page.m-detail .convo-messages { min-height: 46vh; max-height: none; flex: 0 0 auto; overflow: visible; }
  .composer > div:first-child { flex-wrap: wrap; row-gap: 6px; }
  .composer .mode-label { flex-basis: 100%; margin-left: 0; order: 10; }
  .composer .char-count, .composer kbd, .composer kbd + * { display: none; }
  .convo-header .tag-row { flex-wrap: wrap; }
}

/* ── SSN Show buttons ── */
.ssn-eye { font: 600 10px/1 var(--font, inherit); color: var(--linq-blue); background: var(--linq-blue-lt); border: 1px solid rgba(21,101,192,0.25); border-radius: 6px; padding: 3px 7px; cursor: pointer; text-transform: none; letter-spacing: 0; vertical-align: 1px; }
.ssn-eye:hover { background: var(--linq-blue); color: #fff; }
.ssn-eye[hidden] { display: none; }
.ssn-wrap { white-space: nowrap; }
.flagp.mcr { background: #ede9fe; color: #5b21b6; }

/* ── Address validate ── */
.addr-status { display: flex; align-items: center; gap: 6px; align-self: flex-end; min-height: 34px; font-size: 12px; color: var(--text3); }
.addr-status.ok { color: var(--linq-green); font-weight: 600; }
.addr-status.bad { color: var(--red); font-weight: 600; }
.addr-check { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--linq-green); color: #fff; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.addr-x { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; flex-shrink: 0; }
#intake-form .iinput:disabled { background: #e5e7eb; color: #9ca3af; border-color: #d1d5db; box-shadow: none; opacity: 1; cursor: not-allowed; }
#intake-form .iinput.addr-ok { border-color: var(--linq-green); background: #ecfdf3; box-shadow: 0 0 0 1px var(--linq-green) inset; }
.addr-pick { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 10px 12px; border: 1px solid var(--border2); border-radius: 10px; background: var(--bg2, #fff); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.addr-pick:hover, .addr-pick:focus-visible { border-color: var(--linq-green); background: #ecfdf3; }
.addr-pin { font-size: 18px; }
/* the client form has more columns now (SSN, Medicare, address) */
@media (min-width: 1000px) { .modal.intake { width: min(1080px, calc(100vw - 48px)); } }
#fam-rows [data-k="first"], #fam-rows [data-k="last"] { min-width: 90px; }
#f-mail-check:disabled, #f-addr-check:disabled { background: #e5e7eb !important; color: #9ca3af !important; border-color: #d1d5db !important; cursor: not-allowed; }
#intake-form .btn.addr-ok-btn { background: var(--linq-green) !important; border-color: var(--linq-green) !important; color: #fff !important; }

/* ── ACA plan flag on policies ── */
.aca-plan-chk { text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 11px; color: var(--linq-blue); gap: 4px; }
.aca-only-chip { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 0 10px; height: 30px; border: 1px solid var(--border2); border-radius: 8px; font-size: 11px; font-weight: 700; color: var(--text2); background: var(--bg2, #fff); cursor: pointer; white-space: nowrap; }
.aca-only-chip:has(input:checked) { border-color: var(--linq-blue); background: var(--linq-blue-lt); color: var(--linq-blue); }

/* ── Assistants ── */
.perm-tools { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 8px; }
.perm-tools span:last-child { text-transform: none; letter-spacing: 0; font-weight: 600; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--linq-blue); font: inherit; cursor: pointer; }
.perm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.perm-item { display: flex; gap: 9px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--border2); border-radius: 9px; cursor: pointer; background: var(--bg2, #fff); }
.perm-item input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--linq-blue); flex-shrink: 0; }
.perm-item b { display: block; font-size: 12px; color: var(--text); }
.perm-item small { display: block; font-size: 11px; color: var(--text3); line-height: 1.4; }
.perm-item:has(input:checked) { border-color: var(--linq-blue); background: var(--linq-blue-lt); }
.perm-item.warn:has(input:checked) { border-color: #d97706; background: #fffbeb; }
.asst-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.asst-mode label { display: flex; gap: 9px; align-items: flex-start; padding: 10px; border: 1px solid var(--border2); border-radius: 10px; cursor: pointer; }
.asst-mode label:has(input:checked) { border-color: var(--linq-blue); background: var(--linq-blue-lt); }
.asst-mode b { display: block; font-size: 12px; } .asst-mode small { display: block; font-size: 11px; color: var(--text3); }
.asst-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.asst-av { width: 32px; height: 32px; border-radius: 50%; background: var(--linq-blue-lt); color: var(--linq-blue); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; flex-shrink: 0; }
.inv-link { display: flex; gap: 8px; } .inv-link input { flex: 1; font-family: var(--mono); font-size: 12px; }
.asst-banner { position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 50; background: #1e293b; color: #fff; font-size: 12px; padding: 6px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.2); pointer-events: none; white-space: nowrap; }
@media (max-width: 760px) { .asst-banner { bottom: 70px; font-size: 11px; } .asst-mode { grid-template-columns: 1fr; } }

/* ── Passkeys / idle sign-out ── */
.pk-btn { background: #0f172a; color: #fff; border-color: #0f172a; display: flex; align-items: center; justify-content: center; gap: 8px; }
.pk-btn:hover { background: #1e293b; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--text3); font-size: 11px; margin: 14px 0 6px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border2); }
.pk-hero { font-size: 40px; text-align: center; margin: 4px 0 2px; }
.pk-alt { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; }
.idle-warn { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 9999; background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; font-size: 13px; padding: 10px 14px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.15); display: flex; gap: 12px; align-items: center; }

/* ── wave 12: outreach ── */
.attach-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.attach-strip[hidden] { display: none; }
.attach-strip .att { position: relative; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: var(--bg3); }
.attach-strip .att img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-strip .att button, .attach-strip .att-when button { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; line-height: 18px; padding: 0; cursor: pointer; }
.attach-strip .att-when { position: relative; display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; color: var(--linq-blue); background: var(--linq-blue-lt); border-radius: 999px; padding: 4px 28px 4px 10px; align-self: center; }
.attach-strip .att-when button { top: 50%; transform: translateY(-50%); right: 5px; background: rgba(21,101,192,.7); }
.line-pick { font-size: 11px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text2); max-width: 210px; }
.line-pick[hidden] { display: none; }
.msg-media { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.msg.right .msg-media { justify-content: flex-end; }
.msg-media img { max-width: 200px; max-height: 200px; border-radius: 10px; border: 1px solid var(--border); display: block; background: var(--bg3); }
.msg.msg-pending .msg-bubble { border-style: dashed !important; opacity: .8; }
.line-tabs { display: flex; gap: 6px; padding: 8px 20px 0; flex-wrap: wrap; }
.line-tabs[hidden] { display: none; }
.line-tabs button, .seg button { font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text2); cursor: pointer; font-weight: 600; }
.line-tabs button.on, .seg button.on { background: var(--linq-blue); border-color: var(--linq-blue); color: #fff; }
.seg { display: inline-flex; gap: 4px; }
.ib-flag { font-size: 13px; padding: 6px 9px; }
.ib-flag.on { color: #f59e0b; border-color: #fcd34d; background: #fffbeb; }
#inbox-pin.on { color: var(--linq-blue); border-color: var(--linq-blue); background: var(--linq-blue-lt); }
.drip-window { border: 1px dashed var(--border2); border-radius: 10px; padding: 10px; background: var(--bg3); }
.day-chip { display: inline-flex; cursor: pointer; }
.day-chip input { position: absolute; opacity: 0; pointer-events: none; }
.day-chip span { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; border: 1px solid var(--border); color: var(--text3); background: var(--bg); }
.day-chip input:checked + span { background: var(--linq-blue); border-color: var(--linq-blue); color: #fff; }
.day-chip input:focus-visible + span { outline: 2px solid var(--linq-blue); outline-offset: 2px; }
.rep-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.rep-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.rep-val { font-size: 22px; font-weight: 800; font-family: var(--mono); line-height: 1.1; }
.rep-lab { font-size: 11px; color: var(--text2); font-weight: 600; margin-top: 2px; }
.rep-sub { font-size: 10px; color: var(--text3); margin-top: 2px; }
.rep-funnel { display: flex; flex-direction: column; gap: 5px; max-width: 560px; }
.rep-frow { display: grid; grid-template-columns: 80px 1fr 40px; align-items: center; gap: 8px; font-size: 12px; }
.rep-frow b { text-align: right; font-family: var(--mono); }
.rep-frow .bar span { display: block; height: 100%; border-radius: inherit; }
#agents-grid.tree-mode { display: block; overflow-x: auto; }
.team-tree ul { list-style: none; margin: 0; padding-left: 26px; position: relative; }
.team-tree > ul { padding-left: 0; }
.team-tree li { position: relative; padding: 6px 0 0 0; }
.team-tree ul ul li::before { content: ''; position: absolute; left: -16px; top: 0; bottom: 0; border-left: 2px solid var(--border2); }
.team-tree ul ul li:last-child::before { bottom: auto; height: 30px; }
.team-tree ul ul li::after { content: ''; position: absolute; left: -16px; top: 30px; width: 14px; border-top: 2px solid var(--border2); }
.tree-node { display: inline-flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; background: var(--bg); min-width: 240px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.tree-node[data-view-agent] { cursor: pointer; }
.tree-node[data-view-agent]:hover { border-color: var(--linq-blue); }
.tree-node.off { opacity: .55; }
.tree-stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--text2); margin-top: 4px; font-family: var(--mono); }
.tree-team { font-size: 10px; color: var(--linq-blue); font-weight: 700; margin-top: 3px; }
.review-banner { font-size: 12px; }
@media (max-width: 700px) { .tree-node { min-width: 0; } .msg-media img { max-width: 150px; } }
/* "Keep menu open" pin at the bottom of the sidebar */
.sidebar-footer .sb-pin { background: none; border: 0; font: inherit; width: calc(100% - 12px); text-align: left; margin-bottom: 6px; }
.sidebar-footer .sb-pin[aria-pressed="true"] { color: #ffb74d; }
@media (max-width: 760px) { .sidebar-footer .sb-pin { display: none; } }

/* ─── Drips tab ─── */
.drips-top { margin-bottom: 14px; }
.drips-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.drip-kpi { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.drip-kpi b { display: block; font-size: 22px; font-weight: 800; color: var(--text); }
.drip-kpi span { font-size: 11px; color: var(--text3); }
.drips-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.drips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.drip-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.drip-card.paused { opacity: .85; border-style: dashed; }
.drip-card-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.drip-name { font-weight: 800; font-size: 15px; overflow-wrap: anywhere; }
.drip-desc { font-size: 12px; color: var(--text3); margin-top: 2px; }
.drip-status { flex: none; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg3); color: var(--text3); }
.drip-status.on { background: var(--linq-green-lt, #e8f5e9); color: var(--linq-green, #2e7d32); }
.drip-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.drip-trigger { font-size: 12px; color: var(--text2); }
.drip-timeline-mini { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 11px; }
.drip-chip { background: var(--linq-blue-lt); color: var(--linq-blue); border-radius: 999px; padding: 2px 8px; font-weight: 600; white-space: nowrap; }
.drip-chip.end { background: var(--bg3); color: var(--text3); }
.drip-arrow { color: var(--text3); }
.drip-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 8px 0; text-align: center; }
.drip-stats b { display: block; font-size: 15px; font-weight: 800; }
.drip-stats span { font-size: 10px; color: var(--text3); }
.drip-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.drip-actions .btn { font-size: 12px; padding: 5px 10px; }
.drip-empty { grid-column: 1 / -1; text-align: center; background: var(--bg2); border: 2px dashed var(--border2); border-radius: 14px; padding: 34px 18px; }
.drip-empty p { font-size: 13px; color: var(--text3); max-width: 460px; margin: 6px auto 14px; line-height: 1.55; }
/* drip builder */
.drip-timeline { border-left: 2px solid var(--linq-blue-lt); margin-left: 8px; padding-left: 14px; }
.step-row { position: relative; margin-bottom: 4px; }
.step-wait { margin: 6px 0; }
.step-wait-pill { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text2); background: var(--bg3); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
.step-wait-pill::before { content: ''; position: absolute; left: -21px; width: 12px; height: 12px; border-radius: 50%; background: var(--linq-blue); border: 2px solid var(--bg2); }
.step-wait-pill input { width: 58px; padding: 3px 6px; font-size: 12px; }
.step-wait-pill select { width: auto; padding: 3px 6px; font-size: 12px; }
.step-card { border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: var(--bg2); }
.step-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 12px; flex-wrap: wrap; }
.step-head select { width: auto; padding: 4px 6px; font-size: 12px; }
.step-tool { font-size: 11px; padding: 3px 8px; }
.step-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.step-tools select { width: auto; padding: 4px 6px; font-size: 11px; }
.step-meter { margin-left: auto; font-size: 11px; color: var(--text3); }
.step-preview { margin-top: 8px; background: var(--bg3); border-radius: 10px; padding: 8px 10px; }
.step-bubble { display: inline-block; max-width: 92%; background: var(--linq-blue); color: #fff; border-radius: 14px 14px 4px 14px; padding: 7px 11px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.step-email { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.drip-end { margin: 6px 0 10px 8px; font-size: 12px; font-weight: 700; color: var(--text3); }
@media (max-width: 640px) { .drips-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .drips-grid { grid-template-columns: 1fr; } .drip-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .step-meter { margin-left: 0; width: 100%; } }

/* ─── Drips hub (own menu, Drip Club-style dashboard) ─── */
#page-drips { padding: 0; }
.dc-wrap { display: flex; min-height: calc(100vh - 64px); }
.dc-menu { width: 210px; flex: none; background: var(--bg2); border-right: 1px solid var(--border); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; align-self: flex-start; min-height: calc(100vh - 64px); }
.dc-brand { font-weight: 800; font-size: 15px; padding: 4px 10px 12px; color: var(--linq-blue); }
.dc-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--text2); font: inherit; font-size: 13px; font-weight: 600; padding: 9px 10px; border-radius: 9px; cursor: pointer; text-align: left; }
.dc-item svg { width: 18px; height: 18px; flex: none; }
.dc-item:hover { background: var(--bg3); color: var(--text); }
.dc-item.on { background: var(--linq-blue-lt); color: var(--linq-blue); }
.dc-item:focus-visible { outline: 2px solid var(--linq-blue); outline-offset: 1px; }
.dc-count { margin-left: auto; background: var(--linq-orange); color: #fff; font-size: 10px; border-radius: 999px; padding: 1px 6px; }
.dc-menu-foot { margin-top: auto; padding-top: 14px; }
.dc-main { flex: 1; min-width: 0; padding: 20px 22px 40px; }
.dc-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dc-head h2 { margin: 0; font-size: 20px; font-weight: 800; color: var(--text); }
.dc-sub { font-size: 12px; color: var(--text3); }
.dc-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); margin: 4px 0 8px; }
.dc-funnel { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.dc-tile { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; position: relative; }
.dc-tile span { font-size: 12px; color: var(--text3); font-weight: 600; }
.dc-tile b { display: block; font-size: 26px; font-weight: 800; color: var(--text); margin: 2px 0; line-height: 1.15; }
.dc-tile small { font-size: 11px; color: var(--text3); }
.dc-tile:not(:last-child)::after { content: '›'; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); color: var(--text3); font-size: 16px; }
.dc-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 14px; align-items: start; }
.dc-side { display: flex; flex-direction: column; gap: 14px; }
.dc-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.dc-side .dc-card, .dc-grid > .dc-card { margin-bottom: 0; }
.dc-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.dc-pill { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: var(--bg3); color: var(--text3); white-space: nowrap; }
.dc-pill.good { background: var(--linq-green-lt, #e8f5e9); color: var(--linq-green, #2e7d32); }
.dc-pill.warn { background: var(--linq-orange-lt, #fff3e0); color: var(--linq-orange, #e65100); }
.dc-pill.bad { background: var(--red-lt, #fdecea); color: var(--red, #c62828); }
.dc-big { font-size: 26px; font-weight: 800; color: var(--text); }
.dc-big small { font-size: 12px; font-weight: 500; color: var(--text3); }
.dc-note { font-size: 12px; color: var(--text3); margin-top: 4px; line-height: 1.5; }
.dc-need { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 13px; color: var(--text2); }
.dc-need:hover { background: var(--bg3); }
.dc-need b { font-size: 16px; color: var(--text); }
.dc-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; border-top: 1px solid var(--border); }
.dc-row:first-of-type { border-top: 0; }
.dc-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--linq-green, #2e7d32); flex: none; }
.dc-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text2); margin-bottom: 6px; }
.dc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.dc-chart { width: 100%; height: auto; display: block; }
.dc-grid-line { stroke: var(--border); stroke-width: 1; }
.dc-axis { fill: var(--text3); font-size: 10px; font-family: inherit; }
.dc-empty-chart { height: 180px; display: flex; align-items: center; justify-content: center; color: var(--text3); font-size: 13px; background: var(--bg3); border-radius: 10px; }
.dc-table th { white-space: nowrap; }
.dc-table td, .dc-table th { padding: 9px 12px; }
.dc-total td { background: var(--bg3); font-weight: 700; }
.dc-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--text2); line-height: 1.7; }
.dc-reply-row { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border); }
.dc-reply-row:first-child { border-top: 0; }
.dc-reply { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; font: inherit; text-align: left; padding: 10px 14px; cursor: pointer; color: var(--text); }
.dc-reply:hover { background: var(--bg3); }
.dc-reply-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dc-reply-main span { font-size: 12px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-av { width: 34px; height: 34px; border-radius: 50%; background: var(--linq-blue-lt); color: var(--linq-blue); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex: none; }
.btn-sold { font-size: 11px; padding: 3px 9px; background: var(--linq-green-lt, #e8f5e9); color: var(--linq-green, #2e7d32); border-color: var(--linq-green, #2e7d32); font-weight: 700; white-space: nowrap; }
.btn-drip { background: var(--linq-blue-lt); color: var(--linq-blue); border: 1px solid var(--linq-blue); font-weight: 700; }
@media (max-width: 1100px) { .dc-funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dc-tile:nth-child(3)::after { display: none; } .dc-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .dc-wrap { flex-direction: column; min-height: 0; }
  .dc-menu { width: auto; min-height: 0; position: sticky; top: 0; z-index: 5; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px; gap: 4px; scrollbar-width: none; }
  .dc-brand, .dc-menu-foot { display: none; }
  .dc-item { width: auto; flex: none; padding: 7px 10px; }
  .dc-main { padding: 14px 12px 30px; }
  .dc-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-tile::after { display: none; }
}

/* ─── Drips hub v2: grouped menu + dashboard panels ─── */
.dc-group { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text3); padding: 14px 10px 4px; }
.dc-new { margin-left: auto; font-size: 9px; font-weight: 700; background: var(--linq-orange-lt, #fff3e0); color: var(--linq-orange, #e65100); border-radius: 999px; padding: 1px 6px; }
.dc-panel { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.dc-panel-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); margin-bottom: 8px; }
.dc-panel-title span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.dc-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dc-panel.dc-strip { padding: 4px 0; }
.dc-strip-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dc-strip-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dc-stat { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-width: 0; border-left: 1px solid var(--border); }
.dc-strip > .dc-stat:first-child { border-left: 0; }
.dc-stat > div { min-width: 0; }
.dc-stat > div > span { display: block; font-size: 12px; color: var(--text3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-stat b { display: block; font-size: 19px; font-weight: 800; color: var(--text); line-height: 1.2; white-space: nowrap; }
.dc-stat small { display: block; font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-ico { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dc-ico svg { width: 18px; height: 18px; }
.c-green { background: #e7f6ec; color: #16a34a; } .c-blue { background: #e6f0fd; color: #1565c0; } .c-purple { background: #f1eafe; color: #7c3aed; }
.c-amber { background: #fdf3e2; color: #d97706; } .c-pink { background: #fdeaf3; color: #db2777; } .c-teal { background: #e3f6f5; color: #0d9488; }
.c-indigo { background: #ecedfd; color: #6366f1; } .c-red { background: #fdecec; color: #dc2626; }
.t-indigo { color: #6366f1 !important; } .t-green { color: #16a34a !important; } .t-red { color: #dc2626 !important; }
.dc-range { display: inline-flex; align-items: center; gap: 6px; }
.dc-range input { width: auto; padding: 5px 8px; font-size: 12px; }
.dc-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text2); background: color-mix(in srgb, var(--c) 10%, transparent); border-radius: 999px; padding: 3px 10px 3px 8px; }
.dc-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.dc-chip b { color: var(--c); }
.dc-legend-foot { justify-content: center; margin: 6px 0 0; }
.dc-grid-line.v { stroke-dasharray: 3 4; opacity: .7; }
/* pipeline board */
.dc-board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.dc-col { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; min-height: 240px; display: flex; flex-direction: column; }
.dc-col.over { outline: 2px dashed var(--linq-blue); outline-offset: -2px; }
.dc-col-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: 13px; }
.dc-col-head span { background: var(--bg2); border-radius: 999px; padding: 1px 8px; font-size: 11px; color: var(--text3); font-weight: 700; }
.dc-col-body { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 8px; }
.dc-card-p { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; cursor: grab; font-size: 13px; }
.dc-card-p:hover { border-color: var(--linq-blue); }
.dc-card-p.dragging { opacity: .5; }
.dc-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
/* library */
.dc-lib { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; align-items: start; }
.dc-lib-nav { display: flex; flex-direction: column; gap: 4px; }
.dc-lib-nav button { text-align: left; border: 1px solid transparent; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--text2); padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.dc-lib-nav button.on { background: var(--bg2); border-color: var(--border); color: var(--linq-blue); }
.dc-lib-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.dc-tpl { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.dc-tpl summary { cursor: pointer; list-style: none; }
.dc-tpl summary::-webkit-details-marker { display: none; }
.dc-tpl summary::before { content: '›'; display: inline-block; margin-right: 8px; transition: transform .15s; color: var(--text3); }
.dc-tpl[open] summary::before { transform: rotate(90deg); }
.dc-tpl-body { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 13px; }
@media (max-width: 1200px) { .dc-strip-7 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .dc-strip-7 .dc-stat:nth-child(5) { border-left: 0; } }
@media (max-width: 1000px) { .dc-panel.dc-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dc-panel.dc-strip .dc-stat:nth-child(4) { border-left: 0; } }
@media (max-width: 760px) {
  .dc-group { display: none; }
  .dc-strip, .dc-strip-4, .dc-strip-7, .dc-panel.dc-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-stat { border-left: 0; border-top: 1px solid var(--border); }
  .dc-lib { grid-template-columns: 1fr; } .dc-lib-nav { flex-direction: row; overflow-x: auto; }
  .dc-range input { width: 132px; }
}
.dc-table a:not(.btn) { color: var(--text); text-decoration: none; }
.dc-table a:not(.btn):hover { color: var(--linq-blue); text-decoration: underline; }
.dc-table a.btn { text-decoration: none; }
.dc-ico svg { stroke-width: 2.2; }

/* ─── Drips v3: conversations, contacts, pipeline, calls, numbers, workflow editor, library, settings ─── */
.dcv-seg { display: inline-flex; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.dcv-seg button { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--text2); padding: 5px 12px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.dcv-seg button.on { background: var(--bg2); color: var(--linq-blue); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.dcc-tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.dcc-tabs button:not(.btn) { border: 1px solid transparent; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--text2); padding: 6px 12px; border-radius: 9px; cursor: pointer; }
.dcc-tabs button:not(.btn).on { background: var(--bg2); border-color: var(--border); color: var(--linq-blue); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.dcc-tabs button b { font-size: 11px; color: var(--text3); margin-left: 2px; }
/* conversations */
#page-drips .dc-view[data-view="conversations"] { margin: -6px 0 0; }
.dcv-wrap { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 12px; height: calc(100vh - 150px); min-height: 520px; }
.dcv-list { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.dcv-top { padding: 10px 10px 4px; display: flex; flex-direction: column; gap: 8px; }
.dcv-top .dcv-seg { display: grid; grid-template-columns: 1fr 1fr; }
.dcv-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dcv-chips button { border: 1px solid var(--border); background: var(--bg); font: inherit; font-size: 11px; font-weight: 600; color: var(--text2); padding: 3px 9px; border-radius: 999px; cursor: pointer; }
.dcv-chips button.on { border-color: var(--linq-blue); color: var(--linq-blue); background: var(--linq-blue-lt); }
.dcv-chips b { background: var(--linq-orange); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 10px; }
.dcv-chips b:empty { display: none; }
.dcv-search { display: flex; gap: 6px; padding: 4px 10px; }
.dcv-search .form-input { padding: 7px 10px; font-size: 13px; }
.dcv-filters { display: flex; flex-direction: column; gap: 6px; padding: 4px 10px; }
.dcv-filters .form-input { padding: 6px 8px; font-size: 12px; }
.dcv-bulk { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text3); }
.dcv-actions { position: relative; }
.dcv-actions .btn { font-size: 12px; padding: 4px 10px; }
.dcv-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 50; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 4px; min-width: 190px; }
.dcv-menu button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; font: inherit; font-size: 13px; color: var(--text); padding: 7px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.dcv-menu button:hover { background: var(--bg3); }
.dcv-menu button.danger { color: var(--red); }
.dcv-menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.dcv-rows { flex: 1; overflow-y: auto; }
.dcv-row { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: flex-start; border-left: 3px solid transparent; }
.dcv-row:hover { background: var(--bg3); }
.dcv-row.on { background: var(--linq-blue-lt); border-left-color: var(--red); }
.dcv-row.unread .dcv-prev { color: var(--text); font-weight: 600; }
.dcv-check { margin-top: 10px; }
.dcv-row-main { flex: 1; min-width: 0; }
.dcv-row-top { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 13px; }
.dcv-row-flags { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.dcv-tag { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; border-radius: 6px; padding: 1px 6px; white-space: nowrap; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.dcv-tag.none { background: none; color: var(--text3); border: 1px solid var(--border); text-shadow: none; font-weight: 500; }
.dcv-unread { background: var(--red); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.dcv-prev { font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.dcv-meta { font-size: 11px; color: var(--text3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcv-right { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; }
.dcv-right > div { flex: 1; min-width: 0; }
.dc-auto { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.dc-auto-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; background: var(--bg2); border: 1px dashed var(--linq-orange); border-radius: 10px; padding: 7px 10px; }
/* contacts */
.dcc-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dcc-bar .form-input { padding: 6px 9px; font-size: 13px; }
.dcc-pager { display: inline-flex; gap: 2px; }
.dcc-pager .btn { padding: 4px 9px; font-size: 13px; }
.dcc-filt { display: grid; grid-template-columns: 70px repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; margin-top: 6px; }
.dcc-filt .form-input { padding: 6px 9px; font-size: 12px; }
.dcc-table td { vertical-align: middle; }
.dcc-phone { color: var(--red) !important; font-weight: 600; font-family: var(--mono, monospace); }
.dcc-wf { display: inline-block; background: #f97316; color: #fff; font-size: 10px; font-weight: 700; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.dcc-acts { text-align: right; white-space: nowrap; }
.dcc-acts button:not(.btn) { border: 0; background: none; cursor: pointer; font-size: 14px; padding: 2px 3px; opacity: .75; }
.dcc-acts button:not(.btn):hover { opacity: 1; }
/* pipeline */
.dp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; }
.dp-bar .form-input { padding: 6px 9px; font-size: 13px; }
.dp-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.dp-col { background: var(--bg3); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 240px); min-height: 300px; }
.dp-col.over { outline: 2px dashed var(--linq-blue); outline-offset: -2px; }
.dp-col-head { display: flex; align-items: center; gap: 7px; padding: 10px 12px 2px; font-size: 13px; }
.dp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dp-n { background: var(--bg2); border-radius: 999px; padding: 0 8px; font-size: 11px; font-weight: 700; color: var(--text3); }
.dp-col-sum { font-size: 11px; color: var(--text3); padding: 0 12px 8px; }
.dp-col-body { overflow-y: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 8px; }
.dp-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; cursor: grab; font-size: 13px; }
.dp-card:hover { border-color: var(--linq-blue); }
.dp-card.dragging { opacity: .5; }
.dp-card-top { display: flex; align-items: center; gap: 6px; }
.dp-card-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.dp-kebab { border: 0; background: none; cursor: pointer; font-size: 16px; color: var(--text3); padding: 0 4px; line-height: 1; }
.dp-quote { font-size: 12px; margin: 3px 0; }
.dp-card-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.dp-auto { font-size: 10px; font-weight: 700; color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 40%, transparent); border-radius: 6px; padding: 0 6px; }
.dp-auto.stale { color: var(--linq-orange); border-color: color-mix(in srgb, var(--linq-orange) 40%, transparent); }
.dp-menu { position: fixed; }
.dp-sub-wrap { position: relative; }
.dp-sub { display: none; position: absolute; left: 100%; top: 0; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 4px; min-width: 170px; }
.dp-sub-wrap:hover .dp-sub, .dp-sub-wrap:focus-within .dp-sub { display: block; }
/* numbers */
.dn-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; }
.dn-cap { display: inline-flex; gap: 3px; } .dn-cap i { width: 18px; height: 6px; border-radius: 3px; background: var(--border); } .dn-cap i.on { background: var(--red); }
.dn-rate { display: inline-block; width: 120px; height: 6px; background: var(--border); border-radius: 3px; vertical-align: middle; overflow: hidden; } .dn-rate i { display: block; height: 100%; }
/* workflow list + editor */
.wf-table td { vertical-align: middle; }
.wf-name { cursor: pointer; } .wf-name:hover { color: var(--linq-blue); }
.wf-n { text-align: center; } .wf-n b { display: block; font-size: 15px; } .wf-n span { font-size: 10px; color: var(--text3); }
.wf-ico { padding: 4px 8px; font-size: 13px; }
.wf-ico.danger, .wf-mini.danger { color: var(--red); }
.wf-head { padding: 12px 14px; }
.wf-head-top { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.wf-title { font: inherit; font-size: 19px; font-weight: 800; color: var(--text); border: 1px solid transparent; background: none; border-radius: 8px; padding: 2px 6px; min-width: 200px; max-width: 100%; }
.wf-title:hover, .wf-title:focus { border-color: var(--border); background: var(--bg); outline: none; }
.wf-stats { border-top: 1px solid var(--border); padding-top: 4px; }
.wf-stats .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.wf-tabs { display: flex; align-items: center; margin: 4px 0 12px; }
.wf-canvas { background: var(--bg2); background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 18px 18px; border: 1px solid var(--border); border-radius: 14px; padding: 22px 18px; overflow-x: auto; }
.wf-row { display: flex; align-items: flex-start; gap: 0; width: max-content; }
.wf-node { width: 300px; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.wf-node-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.wf-node-head b { font-size: 15px; }
.wf-node-tools { margin-left: auto; display: flex; gap: 2px; }
.wf-mini { border: 1px solid var(--border); background: var(--bg); border-radius: 6px; font: inherit; font-size: 11px; padding: 1px 6px; cursor: pointer; color: var(--text2); }
.wf-mini.wide { padding: 2px 8px; }
.wf-node textarea { font-size: 13px; resize: vertical; }
.wf-meter { font-size: 11px; color: var(--text3); margin: 6px 0; }
.wf-badges { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.wf-b { font-size: 10px; font-weight: 600; border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; color: var(--text3); }
.wf-b.on { border-color: var(--linq-blue); color: var(--linq-blue); background: var(--linq-blue-lt); }
.wf-ins { font-size: 11px; padding: 1px 4px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text2); }
.wf-preview { margin-top: 8px; background: var(--bg3); border-radius: 10px; padding: 8px; }
.wf-spam { margin-top: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 7px 9px; font-size: 12px; }
.wf-spam.good { border-color: color-mix(in srgb, #16a34a 35%, transparent); } .wf-spam.warn { border-color: color-mix(in srgb, #d97706 40%, transparent); } .wf-spam.bad { border-color: color-mix(in srgb, #dc2626 40%, transparent); }
.wf-spam ul { margin: 4px 0 0; padding-left: 18px; color: var(--text2); }
.wf-delay { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.wf-delay-lab { font-size: 12px; color: var(--text2); background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; }
.wf-delay .form-input { width: 70px; padding: 4px 6px; font-size: 12px; } .wf-delay select.form-input { width: auto; }
.wf-arrow { align-self: center; color: var(--text3); font-size: 22px; padding: 0 8px; }
.wf-end { width: 230px; align-self: center; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.wf-end b { font-size: 17px; }
.wf-kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13px; }
.wf-kv > span { color: var(--text3); font-weight: 600; }
/* library */
.dl-tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.dl-tag { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.dl-sw { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.dl-sec { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.dl-preview { font-size: 13px; background: var(--bg3); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.dl-kw { display: inline-block; background: var(--red); color: #fff; border-radius: 5px; padding: 0 6px; font-weight: 700; }
.dl-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.dl-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; border: 1px solid var(--border); border-radius: 999px; padding: 3px 4px 3px 10px; }
.dl-chip.lock { background: var(--linq-orange-lt, #fff3e0); color: var(--linq-orange, #e65100); border-color: transparent; padding-right: 10px; }
.dl-chip button { border: 0; background: var(--bg3); border-radius: 50%; width: 18px; height: 18px; cursor: pointer; font-size: 12px; line-height: 1; color: var(--text2); }
.ds-who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
@media (max-width: 900px) {
  .dcv-wrap { grid-template-columns: 1fr; height: auto; }
  .dcv-right { min-height: 480px; }
  .dcc-filt { grid-template-columns: 1fr; }
  .wf-kv { grid-template-columns: 1fr; gap: 4px; }
}
.dcv-right, .dcv-right > div { position: relative; }
.dcv-right .empty-panel { background: var(--bg2); }

/* intake: add-a-line lists (family, doctors, medications) */
.isec-count { font-size: 10px; font-weight: 600; color: var(--text3); margin-left: 6px; text-transform: none; letter-spacing: 0; }
.iadd-wrap { position: relative; display: inline-block; }
.iadd { font: inherit; font-size: 12px; font-weight: 700; color: var(--linq-blue); background: var(--linq-blue-lt); border: 1px dashed rgba(21,101,192,.4); border-radius: 8px; padding: 7px 12px; cursor: pointer; margin: 2px 0 6px; }
.iadd:hover:not(:disabled) { border-style: solid; }
.iadd:disabled { opacity: .5; cursor: not-allowed; }
.iadd-menu { position: absolute; left: 0; top: 100%; z-index: 20; background: var(--bg2); border: 1px solid var(--border2); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 4px; display: flex; flex-direction: column; min-width: 150px; }
.iadd-menu[hidden] { display: none; }
.iadd-menu button { font: inherit; font-size: 13px; font-weight: 600; text-align: left; color: var(--text); background: none; border: 0; border-radius: 7px; padding: 8px 10px; cursor: pointer; }
.iadd-menu button:hover:not(:disabled) { background: var(--bg3); }
.iadd-menu button:disabled { color: var(--text3); cursor: not-allowed; }
.irow-del { width: 28px; height: 28px; flex: none; font-size: 12px; color: var(--text3); background: none; border: 1px solid var(--border); border-radius: 7px; cursor: pointer; align-self: center; }
.irow-del:hover { color: var(--red); border-color: var(--red); }

/* client popup: full screen, info left, plans right */
.cpop { position: fixed; inset: 0; z-index: 95; background: var(--bg); display: flex; flex-direction: column; }
.cpop[hidden] { display: none; }
body.cpop-on { overflow: hidden; }
.cpop-head { display: flex; align-items: center; gap: 14px; padding: 14px 22px; background: var(--bg2); border-bottom: 1px solid var(--border2); flex-shrink: 0; flex-wrap: wrap; }
.cpop-id { flex: 1; min-width: 220px; }
.cpop-name { font-size: 20px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cpop-sub { font-size: 12px; color: var(--text3); font-family: var(--mono); margin-top: 3px; }
.cpop-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cpop-acts .btn { font-size: 12px; }
.cpop-step { display: inline-flex; gap: 4px; margin-left: 6px; }
.cpop-step .btn { padding: 6px 11px; font-size: 15px; }
.cpop-x { width: 36px; height: 36px; margin-left: 6px; font-size: 16px; color: var(--text2); background: var(--bg3); border: 1px solid var(--border2); border-radius: 10px; cursor: pointer; }
.cpop-x:hover { color: var(--red); border-color: var(--red); }
.cpop-body { flex: 1; display: flex; min-height: 0; }
.cpop-info { flex: 1; min-width: 0; overflow-y: auto; padding: 18px 22px 28px; display: flex; flex-direction: column; gap: 14px; }
.cpop-plans { width: 400px; min-width: 340px; max-width: 36vw; border-left: 1px solid var(--border2); background: var(--bg2); display: flex; flex-direction: column; min-height: 0; }
.cpop-plans-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 800; color: var(--text); }
.cpop-plans-head .btn { font-size: 12px; padding: 6px 12px; }
.cpop-plans-box { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cpop-n { font-size: 11px; font-weight: 600; color: var(--text3); margin-left: 4px; }
.cpop-card { background: var(--bg2); border: 1px solid var(--border2); border-radius: 14px; padding: 14px 16px; }
.cpop-card-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--linq-blue); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; }
.cpop-link { margin-left: auto; font: inherit; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--linq-blue); background: none; border: 0; cursor: pointer; }
.cpop-link:hover { text-decoration: underline; }
.cpop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; }
.cpop-k { font-size: 11px; color: var(--text3); margin-bottom: 2px; }
.cpop-v { font-size: 13px; font-weight: 600; color: var(--text); word-wrap: break-word; }
.cpop-none { color: var(--text3); font-weight: 400; }
.cpop-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.cpop-t th { text-align: left; font-size: 10px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .6px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.cpop-t td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cpop-t tr:last-child td { border-bottom: 0; }
.cpop-t .mono { font-family: var(--mono); font-size: 12px; }
.rel-pill { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.rel-pill.sp { background: #ede9fe; color: #6d28d9; }
.rel-pill.ch { background: #e0f2fe; color: #0369a1; }
.cpop-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.cpop-li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.cpop-li:last-child { border-bottom: 0; }
.cpop-muted { color: var(--text3); font-size: 12px; font-weight: 400; }
.cpop-empty { font-size: 12px; color: var(--text3); padding: 4px 0; }
.cpop-notes { font-size: 13px; white-space: pre-wrap; line-height: 1.6; color: var(--text2); }
@media (min-width: 1100px) {
  .intake #fam-rows .irow, .intake .fam-head { flex-wrap: nowrap; }
  .intake #fam-rows .irow > div { min-width: 0; }
  .intake #fam-rows .ichk { white-space: nowrap; }
}
/* the edit form inside the client full screen */
.cpop-info { display: block; padding: 16px 20px 28px; }
.cpop-info .modal.intake { width: auto; max-width: none; margin: 0; box-shadow: none; }
.cpop-info .modal.intake .modal-header img, .cpop-info .modal.intake .modal-header .modal-close { display: none; }
.cpop-info .modal.intake .modal-header { margin-bottom: 12px; }
@media (max-width: 900px) {
  .cpop-body { flex-direction: column; overflow-y: auto; }
  .cpop-info { overflow: visible; padding: 10px; }
  .cpop-plans { width: auto; max-width: none; min-width: 0; border-left: 0; border-top: 1px solid var(--border2); }
}
.intake #fam-rows .irow, .intake .ifam-wrap .fam-head { gap: 6px; }
.intake #fam-rows .ichk { font-size: 11.5px; gap: 3px; }
.cpop-plans { width: 340px; min-width: 300px; }
.cpop-info #intake-form .irow > .ichk { font-size: 12px; }
.cpop-info .form-group:has(#f-ssn) { width: 126px !important; } .cpop-info .form-group:has(#f-height), .cpop-info .form-group:has(#f-sex) { width: 60px !important; } .cpop-info .form-group:has(#f-weight) { width: 66px !important; }
/* client full screen: compact so the whole client fits without scrolling */
.cpop-head { padding: 8px 18px; }
.cpop-info { padding: 10px 14px 0; }
.cpop-info .modal.intake { padding: 10px 16px 0; border-radius: 12px; }
.cpop-info .modal.intake .modal-header { margin-bottom: 4px; }
.cpop-info .isec { margin: 8px 0 5px; padding: 3px 10px; }
.cpop-info .irow { margin-bottom: 5px; gap: 6px; }
.cpop-info .iinput { padding: 5px 8px; }
.cpop-info .ilabel { margin-bottom: 2px; font-size: 9.5px; }
.cpop-info .ichk { padding-bottom: 6px; }
.cpop-info .sep-row { padding: 5px 10px 0; }
.cpop-info .iadd { padding: 4px 10px; margin: 0 0 3px; }
.cpop-info #f-addr-check, .cpop-info #f-mail-check, .cpop-info #f-mail-toggle { height: 29px !important; }
.cpop-info .fam-head { margin-bottom: 2px; }
.cpop-info .i2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.cpop-info .i2col > div { min-width: 0; }
.cpop-info .i2col .irow { flex-wrap: nowrap; }
.cpop-info .i2col .irow > div { min-width: 0; }
.cpop-info #f-notes { min-height: 34px; }
.cpop-info .isave { position: sticky; bottom: 0; background: var(--bg2); padding: 8px 0 10px; margin-top: 4px !important; border-top: 1px solid var(--border); z-index: 2; }
.cpop-info .isave .btn { padding: 8px !important; }
.isave .iassign { flex: 1 1 100%; margin-bottom: 4px; }
.cpop-info .isec-primary, .cpop-info .isec-assign { display: none; }
.cpop-info .isave .iassign { flex: 3 1 480px; margin: 0; }
.cpop-info .isave > .btn { flex: 0 1 130px !important; height: 32px; }
.cpop-x { background: #111827; color: #fff; border-color: #111827; }
.cpop-x:hover { background: #000; color: #fff; border-color: #000; }
@media (max-height: 820px) {
  .cpop-head { padding: 5px 16px; }
  .cpop-info { padding-top: 6px; }
  .cpop-info .iinput { padding: 3px 7px; font-size: 11.5px; }
  .cpop-info .isec { margin: 5px 0 3px; padding: 2px 10px; }
  .cpop-info .irow { margin-bottom: 3px; }
  .cpop-info .ilabel { font-size: 9px; margin-bottom: 1px; }
  .cpop-info .ichk { padding-bottom: 4px; }
  .cpop-info .iadd { padding: 2px 9px; }
  .cpop-info .modal.intake .modal-header { margin-bottom: 2px; }
  .cpop-info .modal.intake .modal-header .iinput { padding: 3px 7px; }
  .cpop-info #f-addr-check, .cpop-info #f-mail-check, .cpop-info #f-mail-toggle { height: 25px !important; }
  .cpop-info .irow-del { width: 24px; height: 24px; }
  .cpop-info #f-notes { min-height: 28px; }
}
/* SEP pick-list */
.sep-pick { position: relative; }
.sep-btn { text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sep-menu { padding: 6px 8px; gap: 2px; min-width: 190px; }
.sep-menu .ichk { padding: 4px 2px; }

/* ── client full screen: navy theme ── */
.cpop { --bg:#ffffff; --bg2:#ffffff; --bg3:#ffffff; --border:#dadde3; --border2:#a3a9b3; --text:#1b1f2a; --text2:#3b4150; --text3:#5f6673; --linq-blue:#002677; --linq-blue-lt:#eef3fb; font-family: Inter, var(--font); }
.cpop .iinput { border: 1px solid #8c929c; border-radius: 4px; font-size: 13px; color: #1b1f2a; }
.cpop .iinput::placeholder { color: #8a8f98; }
.cpop .iinput:focus { border-color: #196ecf; box-shadow: 0 0 0 2px rgba(25,110,207,.25); }
.cpop input[type=checkbox], .cpop input[type=radio] { accent-color: #196ecf; }
.cpop .ilabel, .cpop .fam-head { font-family: Inter, var(--font); color: #2b2f38; font-size: 11px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.cpop .isec { background: none; border: 0; border-top: 1px solid #dadde3; border-radius: 0; padding: 6px 0 0; color: #002677; font-family: Inter, var(--font); font-size: 14px; font-weight: 800; letter-spacing: 0; text-transform: none; margin: 6px 0 4px; }
.cpop .iadd { background: none; border: 0; color: #196ecf; text-decoration: underline; font-weight: 700; padding: 2px 0; }
.cpop .iadd-menu .ichk, .cpop .iadd-menu button { text-decoration: none; }
.cpop #f-addr-check, .cpop #f-mail-check { background: #fff !important; border: 1px solid #196ecf !important; color: #196ecf !important; border-radius: 4px; }
.cpop .irow-del { border-radius: 50%; background: #196ecf; color: #fff; border: 0; width: 20px !important; height: 20px !important; font-size: 10px; }
.cpop .irow-del:hover { background: #c62828; color: #fff; }
.cpop .modal.intake { border-radius: 6px; border-color: #dadde3; }
.cpop .modal.intake .modal-title { display: none; }
.cpop .btn { border-radius: 4px; }
.cpop .isave .btn-primary { background: #ff612b; border-color: #ff612b; color: #fff; }
.cpop #intake-save-stay { background: #002677 !important; color: #fff !important; border-color: #002677 !important; }
.cpop .cpop-head { background: #002677; border-bottom: 0; }
.cpop .cpop-name, .cpop .cpop-sub { color: #fff; }
.cpop .cpop-acts .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.cpop .cpop-acts .btn:disabled { opacity: .4; }
.cpop .cpop-acts .btn-callgreen { background: #ff612b; border-color: #ff612b; color: #fff; }
.cpop .cpop-x { background: #000; border-color: #000; color: #fff; }
.cpop .cpop-plans { background: #f5f7fb; border-left: 1px solid #dadde3; }
.cpop .cpop-plans-head { color: #002677; font-size: 16px; }
.cpop .cpop-plans-head .btn-primary, .cpop #client-policies-panel .btn-primary { background: #ff612b; border-color: #ff612b; }
.cpop .sep-btn { color: #1b1f2a; }
/* full screen sits on top of everything in the app */
.cpop { z-index: 99; }
@media (max-height: 820px) {
  .cpop .isec { margin: 3px 0 2px; padding-top: 3px; font-size: 13px; }
  .cpop .iinput { font-size: 12px; }
}
.xrows { display: contents; }
.isecq { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cpop .modal.intake .modal-header { gap: 8px; }
.iadd:disabled { display: none; }
.cpop-hint { font-size: 11px; font-weight: 600; color: var(--linq-blue); cursor: pointer; margin-top: 2px; }
.cpop-hint:hover { text-decoration: underline; }
/* policies: one card full width, two per row once there are more */
.pol-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.pol-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pol-grid .pol-card { margin-bottom: 0; min-width: 0; }
.pol-grid.two .pol-card { padding: 10px; }
.pol-grid.two .pol-card > div:nth-child(2) { gap: 4px 8px !important; font-size: 10.5px !important; }
.pol-grid.two .pol-card > div:nth-child(2) > div:nth-child(3) { display: none; }   /* app date: on the full card only */
.pol-grid.two .pol-card > div:first-child { flex-wrap: wrap; row-gap: 4px; }
.cpop .cpop-plans { width: 390px; }
.cpop-info .irow:has(#f-first) { flex-wrap: nowrap !important; }
.cpop-info .irow:has(#f-first) > .form-group { min-width: 0 !important; }
.cpop-info .irow:has(#f-first) .ichk { font-size: 11.5px; gap: 3px; }
.ihead-row .form-group { margin-bottom: 0; } .ihead-row .modal-title { align-self: center; }
.pol-divider { display: flex; align-items: center; gap: 8px; margin: 14px 0 10px; font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .6px; }
.pol-divider::before, .pol-divider::after { content: ""; flex: 1; height: 1px; background: var(--border2); }
.pol-card.off { opacity: .72; }
/* details found in texts */
.xt-card { margin: 8px 12px 0; background: #f5f9ff; border: 1px solid #bcd3f5; border-left: 4px solid #1565c0; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--text); }
.xt-h { font-weight: 800; color: #1565c0; font-size: 13px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.xt-h span { font-weight: 500; font-size: 11px; color: var(--text3); }
.xt-q { font-style: italic; color: var(--text2); margin: 4px 0 2px; font-size: 12px; }
.xt-list { display: flex; flex-direction: column; gap: 3px; margin: 6px 0 8px; }
.xt-i { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.xt-i b { min-width: 104px; }
.xt-b { display: flex; gap: 6px; }
.xt-b .btn { padding: 5px 14px; font-size: 12px; }
.xt-filled, .xt-filled .iinput { background: #fffbe6 !important; border-color: #f5b400 !important; }
.cpop-info .isecq-row { margin: 0 0 2px; }
.cpop-info .isecq-row .iinput { padding-top: 4px; padding-bottom: 4px; }
.cpop-info .isec { margin-top: 4px; }
@media (max-height: 820px) {
  .cpop-info .isec { margin: 2px 0 1px; }
  .cpop-info .isecq-row .iinput { padding-top: 2px; padding-bottom: 2px; }
  .cpop-info .pe-row, .cpop-info .isecq-row { margin-bottom: 1px; }
}
/* dated notes on the client form */
.fn-list { max-height: 74px; overflow-y: auto; border: 1px solid var(--border2); border-radius: 6px; padding: 2px 8px; background: var(--bg3); }
.fn-item { padding: 4px 0; border-bottom: 1px solid var(--border); }
.fn-item:last-child { border-bottom: 0; }
.fn-meta { font-size: 10.5px; color: var(--text3); font-weight: 600; }
.fn-body { font-size: 12.5px; white-space: pre-wrap; color: var(--text); }
.fn-empty { font-size: 12px; color: var(--text3); padding: 6px 0; }
.fn-new { margin-top: 4px; }
.fn-btns { display: flex; gap: 6px; margin-top: 4px; }
.fn-btns .btn { padding: 4px 12px; font-size: 12px; }
#fn-add { margin-top: 3px; }
.isecq .iinput { font-size: 12.5px; }
.isec .fn-add-h { float: right; margin: -2px 0 0 !important; padding: 0 !important; font-size: 12px; text-transform: none; letter-spacing: 0; font-family: var(--font); }
.cpop .fn-list { max-height: 54px; }
#fn-add.fn-add-h { margin-top: 0; }
.ph-ic { filter: grayscale(1) brightness(0); }
.cpop-info .irow { margin-bottom: 4px; }
.cpop .fn-list { max-height: 50px; }
.cpop-info .i2col .isec { margin-top: 2px; }
@media (max-height: 820px) {
  .cpop-info .irow { margin-bottom: 2px; }
  .cpop-info .isec, .cpop-info .i2col .isec { margin: 2px 0 1px; padding-top: 2px; }
  .cpop .fn-list { max-height: 40px; }
  .cpop-info .ilabel { margin-bottom: 0; }
}
.iflags { display: grid; grid-template-columns: auto auto; gap: 0 10px; align-self: center; }
.iflags .ichk { padding-bottom: 0 !important; line-height: 1.35; }
.flagp.prv { background: #ede9fe; color: #6d28d9; }
.cond-grp { display: flex; gap: 4px; min-width: 0; }
.cond-grp .cond-who { width: 150px; flex: none; }
.cond-grp .cond-input { flex: 1; min-width: 0; }

.cond-grp { align-items: center; margin-bottom: 4px; flex-wrap: nowrap !important; }
/* payment info */
.pay-tag { align-self: flex-end; font-size: 11px; font-weight: 800; color: var(--linq-blue); width: 62px; padding-bottom: 7px; }
.pay-row .form-group { margin-bottom: 0; }
.pay-input { font-family: var(--mono); letter-spacing: .3px; }
/* flags beside the SSN box sit level with the boxes, not the labels */
.iflags { align-self: flex-end !important; margin-bottom: -2px; }
.pay-sep { width: 1px; align-self: stretch; background: var(--border2); margin: 0 4px; }
.pay-row .pay-rel { padding-left: 6px; padding-right: 16px; }
/* payment info: checking on the left half, card on the right half */
.pay-row { display: flex; gap: 0 !important; align-items: stretch !important; flex-wrap: nowrap !important; }
.pay-half { flex: 1 1 50%; min-width: 0; display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; row-gap: 6px; }
.pay-half > .form-group { min-width: 0; }
.pay-half-card { border-left: 1px solid var(--border2); padding-left: 10px; margin-left: 10px; }
@media (max-width: 900px) { .pay-row { flex-wrap: wrap !important; } .pay-half { flex-basis: 100%; } .pay-half-card { border-left: 0; padding-left: 0; margin: 6px 0 0; } }
.pay-eye { font-size: 11px; padding: 2px 10px; }
.pay-half { align-content: flex-start; align-self: flex-start; }
/* auto-save status by the Save buttons */
.autosave-note { flex: 1 1 100%; font-size: 11.5px; color: var(--text3); text-align: right; min-height: 14px; }
.autosave-note.ok { color: #2e7d32; }
.autosave-note.ok::before { content: "✓ "; }
.autosave-note.busy { color: var(--text3); }
.autosave-note.warn { color: #c62828; font-weight: 600; }
.cpop-info .isave .autosave-note { flex: 0 1 180px; align-self: center; text-align: left; }
