:root {
  color-scheme: light;
  --ink: #202b2f;
  --muted: #6b7280;
  --line: #dfe3e7;
  --surface: #ffffff;
  --canvas: #f3f4f6;
  --navy: #222a32;
  --blue: #475569;
  --blue-soft: #edf0f3;
  --green: #2d7964;
  --shadow: 0 8px 24px rgba(31, 43, 39, 0.07);
  --font-body: clamp(14px, calc(13px + .18vw), 16px);
  --font-control: clamp(13px, calc(12.4px + .16vw), 15px);
  --font-label: clamp(12px, calc(11.5px + .12vw), 13px);
  --font-small: clamp(11px, calc(10.6px + .1vw), 12px);
  --control-height: clamp(42px, calc(39px + .35vw), 46px);
  --control-pad-x: clamp(11px, calc(8px + .5vw), 16px);
  --control-pad-y: clamp(9px, calc(7px + .3vw), 12px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: var(--font-body); }
body.drawer-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.user-curator-name { grid-column: 1/-1; display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.call-guard-installations-heading { margin: 22px 0 0; font-size: 16px; }
.call-center-results { margin: 0 0 16px; padding: 14px; border: 1px solid #cde4ed; border-radius: 12px; background: #f1f9fc; }
.call-center-results h3 { margin: 0 0 10px; font-size: 16px; }
.call-center-result { display: grid; gap: 4px; padding: 8px 0; }
.call-center-report-comment { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.call-center-result + .call-center-result { border-top: 1px solid #dcebf1; }
.call-center-import-result { overflow: auto; max-height: 44vh; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.call-center-preview-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.call-center-preview-table th, .call-center-preview-table td { padding: 7px; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%,#e1e9ff 0,transparent 38%),var(--canvas); }
.login-card { width: min(440px,100%); background: white; border: 1px solid var(--line); border-radius: 22px; padding: 32px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.login-brand strong,.login-brand small { display:block; }.login-brand small{color:var(--muted);margin-top:2px}.login-card h1{font-size:28px}.login-card>p{color:var(--muted);line-height:1.5;margin:8px 0 24px}
.login-card label,.candidate-form label,.questionnaire label { display:grid; gap:7px; color:#526079; font-size:12px; font-weight:700; }
.login-card label{margin-bottom:15px}.login-card input,.candidate-form input,.questionnaire input,.questionnaire select,.questionnaire textarea{width:100%;border:1px solid #d7deea;border-radius:10px;background:white;color:var(--ink);padding:11px 12px;outline:0}.login-card input:focus,.candidate-form input:focus,.questionnaire input:focus,.questionnaire select:focus,.questionnaire textarea:focus{border-color:#7794ff;box-shadow:0 0 0 3px rgba(49,94,251,.1)}
.login-card .primary{width:100%;margin-top:8px}.form-error{display:block;color:#b93440;font-size:12px;min-height:18px;margin-top:10px}
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { background: var(--navy); color: white; padding: 28px 20px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 8px 42px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg,#4f75ff,#2f54e8); font-weight: 800; }
.brand strong, .brand small, .sidebar-footer strong, .sidebar-footer small { display: block; }
.brand strong { font-size: 18px; }
.brand small, .sidebar-footer small { color: #9eacc6; margin-top: 2px; }
nav { display: grid; gap: 8px; }
.nav-item { width: 100%; border: 0; background: transparent; color: #b8c4d9; text-align: left; padding: 13px 14px; border-radius: 11px; font-weight: 600; display: flex; gap: 12px; }
.nav-item span { width: 20px; text-align: center; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.1); color: white; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 20px 8px 0; display: flex; gap: 10px; align-items: center; font-size: 13px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #42d6a4; box-shadow: 0 0 0 5px rgba(66,214,164,.12); }
main { padding: 28px 34px 42px; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eyebrow { color: var(--muted); margin: 0 0 5px; font-size: 13px; }
h1 { font-size: 30px; margin: 0; letter-spacing: -.5px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.max-extension-install.connected { background: #e4f7ed; color: #16764f; }
.search { height: 44px; width: min(360px, 32vw); background: white; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; gap: 9px; padding: 0 13px; }
.search input { border: 0; outline: 0; width: 100%; min-width: 0; flex: 1; color: var(--ink); }
.top-actions .search-clear { flex: 0 0 28px; width: 28px; min-width: 28px; height: 28px; min-height: 28px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 23px; line-height: 1; }
.top-actions .search-clear:hover { background: var(--canvas); color: var(--ink); }
.top-actions .search-clear:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.search input::placeholder { color: #98a3b7; }
.primary, .secondary { border: 0; border-radius: 11px; padding: 12px 16px; font-weight: 700; }
.primary { background: var(--blue); color: white; box-shadow: 0 7px 16px rgba(49,94,251,.22); }
.secondary { background: white; color: #56647c; border: 1px solid var(--line); }
.avatar, .person { display: grid; place-items: center; border-radius: 50%; font-weight: 800; }
.avatar { width: 42px; height: 42px; border: 0; background: #dfe7ff; color: #2648b9; }
.summary-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin: 26px 0 22px; }
.summary-grid article { background: white; border: 1px solid var(--line); border-radius: 15px; padding: 18px 20px; box-shadow: 0 4px 15px rgba(34,50,80,.035); }
.summary-grid span, .summary-grid small { display: block; color: var(--muted); }
.summary-grid strong { font-size: 28px; display: block; margin: 8px 0 5px; }
.summary-grid small { font-size: 12px; }
.summary-grid .accent { background: linear-gradient(140deg,#315efb,#2747be); border-color: transparent; color: white; }
.summary-grid .accent span, .summary-grid .accent small { color: #dce4ff; }
.board-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 15px; flex-wrap: wrap; }
.board-toolbar > select { border: 1px solid var(--line); border-radius: 10px; background: white; color: #56647c; padding: 9px 12px; min-height: 40px; }
.archive-filter { display: flex; align-items: center; gap: 7px; color: #66738a; font-size: 13px; font-weight: 700; background: white; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.view-switch { display: flex; background: #e8ecf4; padding: 4px; border-radius: 10px; }
.view-switch button { border: 0; background: transparent; padding: 8px 14px; color: #6f7b90; border-radius: 8px; font-weight: 700; }
.view-switch .active { background: white; color: var(--ink); box-shadow: 0 2px 7px rgba(35,49,74,.08); }
.filter-count { background: var(--blue-soft); color: var(--blue); padding: 2px 6px; border-radius: 7px; }
.muted { color: var(--muted); margin-left: auto; font-size: 13px; }
.stage-workspace { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 16px; align-items: start; }
.stage-rail { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; background: white; border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-shadow: 0 4px 16px rgba(34,50,80,.04); }
.stage-rail-heading { padding: 5px 8px 11px; color: var(--ink); font-size: 16px; font-weight: 800; }
.stage-group + .stage-group { border-top: 1px solid #edf0f5; margin-top: 10px; padding-top: 10px; }
.stage-group h3 { margin: 0 8px 6px; color: #8994a7; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stage-button { width: 100%; display: grid; grid-template-columns: 9px minmax(0,1fr) auto; gap: 9px; align-items: center; border: 0; border-radius: 10px; padding: 9px 10px; background: transparent; color: #536078; text-align: left; cursor: pointer; }
.stage-button:hover { background: #f3f6fc; color: var(--ink); }
.stage-button.active { background: var(--blue-soft); color: #2549bc; box-shadow: inset 3px 0 0 var(--blue); }
.stage-button-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.stage-button-count, .stage-total { min-width: 25px; border-radius: 8px; padding: 3px 7px; background: #e9edf5; color: #637089; font-size: 11px; text-align: center; }
.stage-button.active .stage-button-count { background: white; color: #315efb; }
.stage-main { min-width: 0; background: #edf0f6; border-radius: 16px; padding: 14px; }
.stage-main-header { min-height: 46px; display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 12px; padding: 0 3px; }
.stage-main-title, .stage-main-actions { display: flex; align-items: center; gap: 9px; }
.stage-main-title h2 { margin: 0; color: var(--ink); font-size: 18px; }
.stage-nav-button { width: 38px; height: 38px; border: 1px solid #d6ddea; border-radius: 10px; background: white; color: #4f5f78; font-size: 18px; }
.stage-nav-button:disabled { opacity: .4; }
.stage-add-button { padding: 10px 14px; }
.stage-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; align-items: start; }
.stage-card-grid .candidate-card { height: 100%; margin: 0; }
.stage-empty { grid-column: 1/-1; min-height: 250px; display: grid; place-items: center; align-content: center; gap: 8px; border: 1px dashed #c6cfdd; border-radius: 14px; background: rgba(255,255,255,.55); color: #8490a5; text-align: center; }
.stage-empty strong { color: #536078; }
.stage-empty button { margin-top: 8px; }
.column-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.blue { background:#3f69fb; }.amber{background:#f2a63b}.violet{background:#8561e8}.green{background:#27a77a}
.candidate-card { background: white; border: 1px solid #e0e5ee; border-radius: 13px; padding: 14px; margin-bottom: 10px; box-shadow: 0 3px 10px rgba(33,48,75,.045); }
.candidate-card.archived { opacity: .72; border-style: dashed; }
.candidate-card.selected { border-color: #7190ff; box-shadow: 0 0 0 2px rgba(49,94,251,.09); }
.card-head { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.card-head strong { font-size: 14px; }
.card-head span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.candidate-card p { color: #66738a; font-size: 12px; margin: 8px 0 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags span { font-size: 10px; padding: 5px 7px; border-radius: 7px; background: var(--blue-soft); color: #4561b7; }
.candidate-card footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #eef1f6; margin-top: 13px; padding-top: 10px; }
.candidate-card footer small { color: #929db0; }
.person { width: 24px; height: 24px; background: #e9edf5; color: #61708a; font-size: 9px; }
.notice, .result-line, .document-line { border-radius: 8px; padding: 8px 9px; font-size: 11px; }
.notice { background: #fff5e4; color: #ad6c15; }
.result-line { background: #eaf8f2; color: #28765f; }
.document-line { background: #f1edff; color: #7057b7; }
.add-card { width: 100%; border: 1px dashed #bdc7d8; color: #718097; background: transparent; border-radius: 11px; padding: 11px; }
dialog { border: 0; padding: 0; border-radius: 20px; width: min(680px,calc(100vw - 30px)); box-shadow: 0 22px 80px rgba(21,35,60,.25); }
dialog::backdrop { background: rgba(15,27,49,.52); backdrop-filter: blur(3px); }
.candidate-form { padding: 26px; }
.candidate-form>header,.drawer-header { display:flex;align-items:flex-start;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:20px}.candidate-form h2,.drawer-header h2{margin:0;font-size:23px}.icon-button{width:36px;height:36px;border:0;border-radius:10px;background:#eef1f6;color:#64728a;font-size:24px;line-height:1}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.form-grid .wide{grid-column:1/-1}.candidate-form>footer{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}
.max-extension-dialog { width: min(620px, calc(100vw - 30px)); }
.max-extension-browser { display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid #dce6f6;border-radius:12px;background:#f4f8ff;padding:14px 16px; }
.max-extension-browser span { color:var(--muted);font-size:12px; }
.max-extension-browser strong { color:var(--ink); }
.max-extension-summary { margin:18px 0 12px;line-height:1.55; }
.max-extension-steps { display:grid;gap:9px;margin:0;padding-left:24px;color:#405069;line-height:1.45; }
.max-extension-note { margin:16px 0 0;line-height:1.5; }
.max-extension-download { display:inline-flex;align-items:center;justify-content:center;color:white;text-decoration:none; }
.matrix-info{background:#eef3ff;color:#3f568e;border-radius:11px;padding:13px 15px;margin-bottom:16px;font-size:13px}.upload-zone{border:1px dashed #aebbd2;border-radius:13px;padding:18px;background:#f8faff}.upload-zone input{margin-top:10px}.upload-zone small{font-weight:400;color:var(--muted);line-height:1.45}
.drawer { position:fixed;inset:0;z-index:60;background:rgba(15,27,49,.42);opacity:0;visibility:hidden;transition:.2s; }
.drawer.open { opacity:1;visibility:visible; }
.drawer-panel { position:absolute;right:0;top:0;height:100%;width:min(800px,96vw);background:#f8f9fc;box-shadow:-20px 0 60px rgba(21,35,60,.18);padding:26px 30px 50px;overflow:auto;transform:translateX(30px);transition:.2s; }
.drawer.open .drawer-panel{transform:none}.drawer-tabs{display:flex;gap:7px;border-bottom:1px solid var(--line);margin-bottom:20px}.drawer-tabs button{border:0;background:transparent;color:var(--muted);font-weight:700;padding:10px 13px;border-bottom:2px solid transparent}.drawer-tabs .active{color:var(--blue);border-color:var(--blue)}
.questionnaire{background:white;border:1px solid var(--line);border-radius:16px;padding:20px;display:grid;grid-template-columns:1fr 1fr;gap:15px}.questionnaire .wide{grid-column:1/-1}.form-section{grid-column:1/-1;margin:10px 0 0;padding-top:15px;border-top:1px solid var(--line);font-size:14px;color:#273855}.form-section:first-child{margin-top:0;padding-top:0;border:0}.questionnaire-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;padding-top:10px}.questionnaire textarea{min-height:76px;resize:vertical}.radio-group{display:flex;gap:12px;align-items:center;min-height:42px}.radio-group label{display:flex;align-items:center;gap:6px;font-weight:500;color:var(--ink)}.radio-group input{width:auto}
.analysis-panel{margin-top:18px}.analysis-empty,.analysis-summary{background:white;border:1px solid var(--line);border-radius:15px;padding:18px;color:#5e6b82}.analysis-summary h3{margin:0 0 5px;color:var(--ink)}.recommendations{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.offer-card{background:white;border:1px solid #dce3ef;border-left:3px solid var(--blue);border-radius:13px;padding:14px}.offer-card header{display:flex;justify-content:space-between;gap:10px;align-items:start}.offer-card h4{margin:0}.offer-number{background:var(--blue-soft);color:var(--blue);border-radius:7px;padding:4px 7px;font-size:11px}.money-row{display:flex;gap:8px;margin-top:11px}.money-row span{flex:1;background:#f3f5f9;border-radius:8px;padding:8px;color:var(--muted);font-size:10px}.money-row strong{display:block;color:var(--ink);font-size:13px;margin-top:3px}.specialties{font-size:11px;color:#56647c;line-height:1.45;background:#f5f7fb;border-radius:8px;padding:9px;margin-top:9px}.analysis-warning{background:#fff5e4;color:#975e10;border-radius:10px;padding:10px;margin-top:12px;font-size:12px}.empty-column{color:#8a95a8;font-size:12px;text-align:center;padding:24px 8px}.toast{position:fixed;z-index:40;right:24px;bottom:24px;max-width:420px;background:#172743;color:white;border-radius:11px;padding:12px 16px;box-shadow:var(--shadow);opacity:0;transform:translateY(12px);pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:none}.toast.error{background:#a62e3a}
.calls-panel{background:white;border:1px solid var(--line);border-radius:16px;padding:20px}.calls-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;font-weight:800;margin-bottom:16px}.calls-heading-text{display:grid;gap:5px}.call-sync-status{color:#66758c;font-size:12px;font-weight:600}.call-actions{display:flex;align-items:stretch;gap:8px;min-width:0;flex-wrap:wrap}.call-actions .call-link,.call-actions .max-link{display:inline-flex;justify-content:center;flex:1 1 auto;width:auto;white-space:nowrap}.call-link{text-decoration:none}.call-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#f6f8fc;border-radius:13px;padding:16px;margin-bottom:18px}.call-form label{display:grid;gap:7px;color:#526079;font-size:12px;font-weight:700}.call-form input,.call-form select,.call-form textarea{width:100%;border:1px solid #d7deea;border-radius:10px;background:white;padding:11px 12px}.call-form .wide{grid-column:1/-1}.call-form textarea{min-height:72px}.call-form>button{justify-self:end;grid-column:1/-1}.calls-list{display:grid;gap:9px}.call-item{border:1px solid #e1e6ef;border-radius:11px;padding:12px}.call-item.provider-call{border-left:3px solid var(--cyan);padding-left:14px}.call-item strong,.call-item small{display:block}.call-item small{color:var(--muted);margin-top:4px}.call-item p{margin:8px 0 0}.call-facts{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:10px;color:#526079;font-size:12px}.call-item audio{display:block;width:min(100%,520px);height:38px;margin-top:12px}.call-recording-pending{margin-top:10px;color:#77859a;font-size:12px}.call-recording-note{margin-top:6px!important}.call-reminder{margin-top:8px;background:#fff2d7;color:#8c5a13;border-radius:8px;padding:7px 9px;font-size:11px;font-weight:700}
.fit-reason{font-size:11px;line-height:1.4;margin-top:9px;padding:9px;border-radius:8px;background:#edf3ff;color:#35558f;font-weight:700}.exclusions{margin-top:14px;background:white;border:1px solid var(--line);border-radius:15px;padding:18px}.exclusions h3{margin:0 0 12px;font-size:15px}.exclusions ul{margin:0;padding-left:20px;display:grid;gap:8px}.exclusions li{font-size:12px;line-height:1.45;color:#5b687e}.exclusions li strong{color:#33435f}
.candidate-card{cursor:pointer}.candidate-card:focus-visible{outline:3px solid rgba(49,94,251,.25);outline-offset:2px}.loading{opacity:.55;pointer-events:none}
.danger-link{border:0;background:#fff0f1;color:#ad3340;border-radius:10px;padding:11px 14px;font-weight:700;margin-right:auto}
.candidate-list{min-width:0;background:white;border:1px solid var(--line);border-radius:15px;overflow:auto}.list-row{width:100%;min-width:900px;display:grid;grid-template-columns:1.2fr .45fr 1fr 1fr .85fr .9fr .75fr;gap:12px;text-align:left;padding:13px 16px;border:0;border-bottom:1px solid #edf0f5;background:white;color:#536078;align-items:center}.list-row:not(.list-header):hover{background:#f7f9fd}.list-row span:first-child{color:var(--ink);font-weight:700}.list-header{background:#f3f5f9;color:#68758b;font-size:12px;position:sticky;top:0;z-index:1}
.documents-panel{margin-top:18px;background:white;border:1px solid var(--line);border-radius:16px;padding:20px}.documents-panel>.form-section{display:block;border:0;margin:0 0 14px;padding:0}.documents-list{display:grid;gap:8px}.document-item{display:flex;justify-content:space-between;align-items:center;gap:14px;border:1px solid #e5eaf2;border-radius:11px;padding:11px 12px}.document-item strong,.document-item small{display:block}.document-item small{color:var(--muted);margin-top:4px}.document-item a{text-decoration:none;font-size:12px;padding:8px 12px}.document-upload{display:inline-flex!important;margin-top:12px;background:var(--blue-soft);color:var(--blue)!important;border-radius:9px;padding:10px 13px;cursor:pointer}.document-upload input{display:none}
.password-create{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:7px}.password-create button{white-space:nowrap}.user-hint{margin:8px 0 18px}.text-link{color:var(--blue);font-weight:700;text-decoration:none}
.history-panel{background:white;border:1px solid var(--line);border-radius:16px;padding:8px 20px}.history-item{position:relative;display:grid;grid-template-columns:18px 1fr;column-gap:10px;padding:16px 0;border-bottom:1px solid #edf0f5}.history-item:last-child{border:0}.history-item strong,.history-item small{grid-column:2}.history-item small{color:var(--muted);margin-top:4px}.history-dot{grid-row:1/3;width:10px;height:10px;margin-top:4px;border-radius:50%;background:var(--blue);box-shadow:0 0 0 4px var(--blue-soft)}
.max-template-panel{max-width:820px;border:1px solid var(--line);border-radius:16px;background:#fff;padding:24px}.max-template-panel form{display:grid;gap:18px}.max-template-panel h3{margin:4px 0 7px;font-size:21px}.max-template-panel label{display:grid;gap:8px;color:#526079;font-size:12px;font-weight:750}.max-template-panel textarea{width:100%;min-height:260px;resize:vertical;border:1px solid #d7deea;border-radius:12px;background:#fbfcfe;padding:15px;color:var(--ink);font:inherit;line-height:1.55}.max-template-panel textarea:focus{outline:2px solid rgba(0,184,230,.18);border-color:var(--cyan)}.max-template-footer{display:flex;align-items:center;justify-content:space-between;gap:14px}.max-template-footer small{color:var(--muted)}
.call-guard-panel{max-width:900px;border:1px solid var(--line);border-radius:16px;background:#fff;padding:24px}.call-guard-heading,.call-guard-phone-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}.call-guard-heading{margin-bottom:18px}.call-guard-heading h3{margin:4px 0 0;font-size:21px}.call-guard-status,.call-guard-code-card,.call-guard-form{border:1px solid var(--line);border-radius:14px;padding:18px;margin-top:14px}.call-guard-status{display:grid;gap:6px;background:#f7f9fd}.call-guard-status strong{font-size:18px}.call-guard-status p,.call-guard-status small{margin:0;color:var(--muted);line-height:1.45}.call-guard-status.active{background:#effaf4;border-color:#bce5cf}.call-guard-status.disabled,.call-guard-status.offline{background:#fff7ed;border-color:#fed7aa}.call-guard-code-card{display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:#f4f7ff}.call-guard-code-card code{font-size:25px;font-weight:800;letter-spacing:.08em;color:var(--blue)}.call-guard-code-card small{width:100%;color:var(--muted)}.call-guard-form{display:grid;gap:16px}.call-guard-form>label{display:grid;gap:7px;color:#526079;font-size:12px;font-weight:700}.call-guard-form input[type="text"],.call-guard-form input:not([type]){width:100%;border:1px solid #d7deea;border-radius:10px;background:#fff;color:var(--ink);padding:11px 12px}.call-guard-phone-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.call-guard-phone-option{display:flex!important;align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:12px;background:#fbfcfe;cursor:pointer}.call-guard-phone-option input{width:18px;height:18px;flex:0 0 auto}.call-guard-phone-option span{display:grid;gap:3px}.call-guard-phone-option small{color:var(--muted)}#call-guard-numbers-dialog{width:min(720px,calc(100vw - 24px))}.call-guard-number-form{display:grid;grid-template-columns:1fr 1.25fr auto;gap:12px;align-items:end}.call-guard-number-list{display:grid;gap:9px;margin-top:18px}.call-guard-number-item{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid var(--line);border-radius:12px;padding:12px 14px}.call-guard-number-item>div:first-child{display:grid;gap:3px}.call-guard-number-item small{color:var(--muted)}.call-guard-number-actions{display:flex;gap:8px}
.max-template-footer #max-template-save{min-width:190px;transition:background-color .18s ease,color .18s ease,box-shadow .18s ease,transform .12s ease}
.max-template-footer #max-template-save:active:not(:disabled){transform:translateY(1px)}
.max-template-footer #max-template-save.is-saving{background:#6b7b88;cursor:wait}
.max-template-footer #max-template-save.is-saved{background:#16845b;box-shadow:0 0 0 3px rgba(22,132,91,.14)}
.max-template-footer #max-template-save.is-saved:hover{background:#126f4c}
.max-template-footer #max-template-save.is-error{background:#c83f49}
.max-template-footer #max-template-save.is-error:hover{background:#ad303a}
.version-list{margin-top:20px;border-top:1px solid var(--line);padding-top:16px}.version-list h3{font-size:15px}.version-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #edf0f5}.version-item strong,.version-item small{display:block}.version-item small{color:var(--muted);margin-top:4px}.active-badge{background:#eaf8f2;color:#28765f;border-radius:8px;padding:6px 9px;font-size:11px;font-weight:800}
.wide-dialog{width:min(1000px,calc(100vw - 30px))}.report-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.report-card,.report-wide,.report-half{background:#f7f9fd;border:1px solid var(--line);border-radius:13px;padding:16px}.report-card span,.report-card small{display:block;color:var(--muted)}.report-card strong{font-size:26px;display:block;margin:7px 0}.report-wide{grid-column:1/-1}.report-half{grid-column:span 2}.report-wide h3,.report-half h3{margin:0 0 14px;font-size:15px}.bar-chart{height:160px;display:grid;grid-template-columns:repeat(14,1fr);gap:8px;align-items:end}.bar-chart>div{height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:5px}.bar-chart i{display:block;width:100%;max-width:30px;background:linear-gradient(#6f8bff,#315efb);border-radius:6px 6px 2px 2px;min-height:4px}.bar-chart small{color:var(--muted)}.metric-row{display:flex;justify-content:space-between;gap:15px;padding:8px 0;border-bottom:1px solid var(--line)}
.user-create{display:grid;grid-template-columns:1.1fr 1fr .85fr 1.4fr auto;gap:9px;background:#f5f7fb;border-radius:13px;padding:13px}.user-create input,.user-create select,.user-row input,.user-row select{width:100%;border:1px solid #d7deea;border-radius:9px;background:white;padding:10px;color:var(--ink)}.users-list{display:grid;gap:8px;margin-top:14px}.user-row{display:grid;grid-template-columns:1.1fr .8fr .85fr .7fr 1.3fr auto;gap:9px;align-items:center;border:1px solid var(--line);border-radius:11px;padding:10px}.user-row>strong{font-size:12px;color:#66738a}.check-label{display:flex!important;align-items:center;gap:6px}.check-label input{width:auto}.user-row .secondary{padding:10px 12px}
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 78px minmax(0,1fr); }
  .sidebar { padding: 24px 12px; }.brand div,.nav-item:not(.active){font-size:0}.nav-item{justify-content:center}.sidebar-footer div{display:none}
  .summary-grid { grid-template-columns: repeat(2,1fr); }.stage-workspace{grid-template-columns:210px minmax(0,1fr)}.stage-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.report-grid{grid-template-columns:repeat(2,1fr)}.user-create,.user-row{grid-template-columns:1fr 1fr}.user-create>button,.user-row button{grid-column:span 2}
}
@media (max-width: 700px) {
  .app-shell{display:block}.sidebar{display:none}main{padding:20px 16px}.topbar{align-items:flex-start}.top-actions{flex-wrap:wrap;justify-content:flex-end}.search{order:3;width:100%}.summary-grid{grid-template-columns:1fr 1fr}.board-toolbar{overflow:auto}.stage-workspace{grid-template-columns:1fr}.stage-rail{position:static;max-height:none;display:grid;grid-template-columns:1fr 1fr;gap:4px}.stage-rail-heading{grid-column:1/-1}.stage-group{display:contents}.stage-group h3{grid-column:1/-1;margin-top:8px}.stage-button{padding:9px 8px}.stage-card-grid{grid-template-columns:1fr}.stage-main-header{align-items:flex-start}.stage-main-actions{flex-wrap:wrap;justify-content:flex-end}.stage-add-button{order:3;width:100%}
  .form-grid,.questionnaire,.recommendations,.call-form{grid-template-columns:1fr}.questionnaire .wide,.form-grid .wide,.call-form .wide,.call-form>button{grid-column:auto}.drawer-panel{padding:20px 16px 40px}.summary-grid article{padding:14px}.summary-grid strong{font-size:23px}.report-half{grid-column:1/-1}.report-grid{grid-template-columns:1fr 1fr}.bar-chart{gap:3px}.document-item{align-items:flex-start}.user-create,.user-row{grid-template-columns:1fr}.user-create button,.user-row button{grid-column:auto}.password-create{grid-template-columns:1fr}
}

.call-reminder.overdue { background: #fff0f1; color: #ad3340; }
.card-phone { display: inline-block; margin-top: 8px; color: var(--blue); font-size: 11px; font-weight: 700; text-decoration: none; }
.analysis-time { display: block; color: var(--muted); margin-top: 7px; }
.required-field { color: #a83845 !important; }
.completeness { grid-column: 1/-1; display: flex; justify-content: space-between; gap: 12px; background: #fff7e8; color: #905e17; border-radius: 10px; padding: 10px 12px; font-size: 12px; }
.completeness span { font-weight: 500; }
.completeness.complete { background: #eaf8f2; color: #28765f; }
.import-help { margin: 0 0 16px; line-height: 1.5; }
.import-assignee { margin-top: 14px; }
.import-assignee select { width: 100%; border: 1px solid #d7deea; border-radius: 10px; background: white; color: var(--ink); padding: 11px 12px; }
.import-result { background: #eaf8f2; color: #28765f; border-radius: 11px; padding: 13px 15px; margin-top: 14px; display: grid; gap: 5px; }
.import-result span { font-size: 12px; }
.import-result ul { margin: 4px 0 0; padding-left: 18px; color: #8d3b43; font-size: 12px; }
.credential-result { display: flex; justify-content: space-between; gap: 14px; align-items: center; background: #eef3ff; border: 1px solid #d7e1ff; border-radius: 12px; padding: 13px 15px; margin: 12px 0; }
.credential-result strong, .credential-result code { display: block; }
.credential-result code { white-space: pre-wrap; margin-top: 6px; color: #294a9f; }

@media (max-width: 700px) {
  .completeness, .credential-result { align-items: flex-start; flex-direction: column; }
}

/* 2026-08-24: compact workspace, table workflow and configurable questionnaire */
.app-shell { grid-template-columns: 72px minmax(0,1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 72px; padding: 24px 12px; overflow: hidden; box-shadow: 8px 0 28px rgba(12,27,54,.12); transition: width .2s ease; }
.sidebar.open { width: 248px; }
.sidebar .brand { margin: 0 4px 38px; min-width: 210px; }
.sidebar .brand-mark { flex: 0 0 40px; }
.sidebar .nav-label { opacity: 0; visibility: hidden; white-space: nowrap; transition: opacity .14s ease; }
.sidebar.open .nav-label { opacity: 1; visibility: visible; }
.sidebar nav { min-width: 224px; }
.sidebar .nav-item { align-items: center; padding: 13px 14px; }
.sidebar .nav-item>span:first-child { flex: 0 0 20px; }
.sidebar .nav-item .nav-icon-aiup {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: -.5px;
}
.sidebar .nav-item .nav-label { width: auto; text-align: left; }
.sidebar-toggle { position: absolute; right: 7px; top: 30px; width: 28px; height: 28px; border: 0; border-radius: 8px; color: white; background: rgba(255,255,255,.12); font-size: 20px; }
.sidebar.open .sidebar-toggle { transform: rotate(180deg); }
.sidebar-footer { min-width: 210px; }
main { grid-column: 2; }

.operator-view-bar { position: sticky; top: 0; z-index: 40; min-height: 52px; display: flex; align-items: center; gap: 18px; padding: 7px 24px; border-bottom: 1px solid #cbd8ff; background: #edf3ff; box-shadow: 0 5px 18px rgba(37,70,155,.1); }
.operator-view-bar>div { display: grid; gap: 2px; min-width: 220px; }.operator-view-bar strong { color: #2449ad; font-size: 12px; }.operator-view-bar span { color: #60718d; font-size: 11px; }
.operator-view-bar label { display: flex; align-items: center; gap: 8px; color: #526079; font-size: 11px; font-weight: 800; }.operator-view-bar select { min-width: 220px; border: 1px solid #c7d3ef; border-radius: 9px; padding: 8px 10px; background: white; color: var(--ink); }
.operator-view-bar .secondary { margin-left: auto; padding: 8px 12px; }
.operator-view-close { width: 34px; height: 34px; margin-left: auto; border: 0; border-radius: 9px; background: rgba(49,94,251,.08); color: #4f6190; font-size: 22px; line-height: 1; }
.operator-view-close:hover { background: rgba(49,94,251,.15); color: #2449ad; }
body.operator-workspace .app-shell { grid-template-columns: minmax(0,1fr); }
body.operator-workspace .sidebar { display: none; }
body.operator-workspace main { grid-column: 1; }
body.operator-workspace .summary-grid { display: none; }
body.operator-workspace .board-toolbar { justify-content: flex-end; }
body.operator-workspace .board-toolbar > :not(#refresh-board) { display: none !important; }

.stage-overview { margin: 12px 0 10px; padding: 8px; border: 1px solid #e0e6f0; border-radius: 13px; background: rgba(255,255,255,.94); box-shadow: 0 3px 12px rgba(31,48,78,.035); }
.stage-overview-items { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); min-width: 0; gap: 6px; }
.stage-overview-button { display: flex; min-width: 0; min-height: 40px; height: auto; align-items: center; justify-content: space-between; gap: 6px; border: 1px solid #e8edf5; border-radius: 9px; padding: 6px 8px; background: #f5f7fb; color: #42516a; font-size: 10px; font-weight: 750; text-align: left; }
.stage-overview-button span { display: -webkit-box; min-width: 0; overflow: hidden; white-space: normal; line-height: 1.15; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.stage-overview-button b { flex: 0 0 auto; display: inline-grid; min-width: 20px; height: 20px; place-items: center; border-radius: 6px; background: white; color: #31415d; }
.stage-overview-button.blue { border-left: 3px solid #3e6cff; }.stage-overview-button.amber { border-left: 3px solid #efa62c; }.stage-overview-button.green { border-left: 3px solid #31a779; }.stage-overview-button.violet { border-left: 3px solid #805bca; }
.stage-overview-button:hover,.stage-overview-button.active { background: #e9efff; color: #2149bf; border-top-color: #b9c9ff; border-right-color: #b9c9ff; border-bottom-color: #b9c9ff; }

.bulk-toolbar { position: sticky; top: 8px; z-index: 8; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: -3px 0 12px; padding: 10px 12px; border: 1px solid #cfdcff; border-radius: 13px; background: #edf3ff; box-shadow: 0 8px 20px rgba(35,61,130,.1); }
.bulk-toolbar strong { color: #294a9f; margin-right: 5px; }
.bulk-toolbar select { border: 1px solid #cdd7e8; border-radius: 9px; padding: 9px 11px; background: white; color: var(--ink); }
.danger { border: 0; border-radius: 10px; padding: 11px 14px; background: #b93440; color: white; font-weight: 800; }
.text-button,.deal-title { border: 0; background: transparent; color: var(--blue); padding: 4px; font-weight: 750; }
.deal-title { padding: 0; color: var(--ink); text-align: left; font-size: 14px; }
.deal-title:hover,.text-button:hover { color: #173ec4; text-decoration: underline; }

.deals-table-wrap { min-width: 0; overflow: auto; max-height: calc(100vh - 315px); border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 5px 18px rgba(34,50,80,.04); }
.deals-table { width: 100%; min-width: 1120px; border-collapse: separate; border-spacing: 0; }
.deals-table th { position: sticky; top: 0; z-index: 3; padding: 13px 12px; background: #f0f3f8; color: #67748a; font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .035em; border-bottom: 1px solid #dfe5ee; }
.deals-table th:first-child,.deals-table td:first-child { width: 44px; text-align: center; }
.deals-table td { padding: 12px; border-bottom: 1px solid #edf0f5; vertical-align: middle; color: #526079; font-size: 12px; }
.deals-table tbody tr:hover { background: #f8faff; }
.deals-table tbody tr.archived { opacity: .65; background: #fafafa; }
.deal-subtitle { display: -webkit-box; max-width: 320px; margin-top: 5px; overflow: hidden; color: #8994a7; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.date-cell { white-space: nowrap; color: #75829a !important; }
.row-select { width: 100%; min-width: 145px; border: 1px solid #d7deea; border-radius: 8px; background: white; color: var(--ink); padding: 8px; font-size: 12px; }
.stage-select { min-width: 170px; }
.stage-pill { display: inline-block; border-radius: 8px; padding: 6px 9px; color: white; font-weight: 800; }
.robocall-queue-badge, .voice-pitch-badge { display: block; width: fit-content; max-width: 100%; margin-top: 5px; border: 1px solid #c8ced5; border-radius: 7px; padding: 3px 6px; background: #f1f3f5; color: #4f5964; font-size: 10px; font-weight: 750; line-height: 1.25; }
.robocall-error-detail { display: block; margin-top: 3px; font-weight: 400; line-height: 1.35; }
.robocall-claimed,.robocall-dialing,.robocall-in_call { border-color: #9eb8d6; background: #edf5ff; color: #315f91; }
.robocall-qualified { border-color: #9ac8ae; background: #eaf6ee; color: #2f6d45; }
.robocall-machine,.robocall-no_answer,.robocall-failed { border-color: #d7c2a0; background: #fff7e8; color: #765c2d; }
.robocall-cancelled { opacity: .72; }
.robocall-schedule-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.robocall-schedule-options label { display: flex; align-items: center; gap: 8px; }
.robocall-schedule-options .wide { grid-column: 1 / -1; display: grid; }
.robocall-schedule-progress:not(:empty) { display: block; color: var(--muted); font-size: 13px; }
.robocall-aiup-rule-form { display: grid; grid-template-columns: minmax(0,2fr) minmax(150px,1fr) minmax(170px,1fr) minmax(160px,1fr) auto; gap: 12px; align-items: end; margin: 22px 0 15px; }
.robocall-aiup-rule-form label { display: grid; gap: 7px; color: #526079; font-size: 12px; font-weight: 700; }
.robocall-aiup-rule-form select,.robocall-aiup-rule-form input { width: 100%; min-height: 42px; border: 1px solid #d7deea; border-radius: 10px; background: white; color: var(--ink); padding: 9px 11px; }
.robocall-aiup-rule-form button { min-height: 42px; white-space: nowrap; }
.robocall-aiup-rules-list { display: grid; gap: 9px; margin-top: 16px; }
.robocall-aiup-rule { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafd; }
.robocall-aiup-rule.inactive { opacity: .66; }
.robocall-aiup-rule strong,.robocall-aiup-rule small { display: block; }
.robocall-aiup-rule small { margin-top: 4px; color: var(--muted); }
.robocall-finance-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 20px 0; }
.robocall-finance-summary > div { display: grid; gap: 7px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafd; }
.robocall-finance-summary strong { font-size: 25px; color: var(--ink); }
.robocall-finance-summary small { color: var(--muted); }
.robocall-finance-balance-form { display: flex; align-items: end; gap: 12px; }
.robocall-finance-balance-form label { display: grid; gap: 7px; min-width: 230px; font-size: 12px; font-weight: 700; color: #526079; }
.robocall-finance-balance-form input { min-height: 42px; border: 1px solid #d7deea; border-radius: 10px; padding: 9px 11px; }
@media (max-width: 760px) { .robocall-aiup-rule-form { grid-template-columns: 1fr; } .robocall-aiup-rule { align-items: flex-start; flex-direction: column; } }
@media (max-width: 760px) { .robocall-finance-summary { grid-template-columns: 1fr; } .robocall-finance-balance-form { align-items: stretch; flex-direction: column; } }
.row-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.pagination-summary { color: var(--muted); font-size: 12px; font-weight: 700; }.pagination-controls { display: flex; align-items: center; gap: 9px; }.pagination-controls .secondary { padding: 9px 12px; }.pagination-page { min-width: 120px; color: #46556e; font-size: 12px; text-align: center; }

.marks-view,.marks-editor { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.mark { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 8px; background: #f0f3f8; font-size: 18px; }
.mark.heavy { color: #d11f32; background: #fff0f1; font-family: Arial,sans-serif; font-size: 23px; font-weight: 900; line-height: 1; }
.mark.urgent { color: #a76500; background: #fff4bf; }
.mark-option { display: flex !important; grid-template-columns: auto auto auto; align-items: center; gap: 7px !important; border: 1px solid #dfe5ef; border-radius: 10px; padding: 9px 11px; color: #42516a !important; cursor: pointer; }
.mark-option input { width: auto !important; }.mark-symbol { font-size: 20px; }.mark-option.heavy .mark-symbol { color: #d11f32; font-family: Arial,sans-serif; font-size: 24px; font-weight: 900; line-height: 1; }.mark-option.urgent .mark-symbol { color: #a76500; }
.special-marks-field { display: grid; gap: 8px; color: #526079; font-size: 12px; font-weight: 700; }

.protected-badge,.visible-badge,.hidden-badge { display: inline-block; margin-top: 6px; border-radius: 7px; padding: 4px 7px; font-size: 10px; font-weight: 800; }

.questionnaire label,.radio-field,.special-marks-field { position: relative; }
.protected-field { color: #5972b8; font-size: 9px; font-weight: 700; }
.typeahead-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; max-height: 250px; overflow: auto; margin-top: 4px; padding: 5px; border: 1px solid #d7deea; border-radius: 11px; background: white; box-shadow: 0 12px 30px rgba(26,42,71,.18); }
.typeahead-option { width: 100%; border: 0; border-radius: 7px; padding: 9px 10px; background: white; color: #33435f; text-align: left; font-size: 12px; }
.typeahead-option:hover { background: var(--blue-soft); color: #2648b9; }
.multi-input { position: relative; min-height: 46px; border: 1px solid #d7deea; border-radius: 10px; padding: 7px; background: white; }
.multi-input>input { border: 0 !important; box-shadow: none !important; padding: 6px !important; }
.multi-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.multi-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; padding: 6px 8px; background: #edf3ff; color: #294a9f; font-size: 11px; font-weight: 700; }
.chip-remove { border: 0; background: transparent; color: #7185ba; padding: 0; font-size: 16px; line-height: 1; }
.questionnaire-actions { flex-wrap: wrap; }
.sunsim-call-help { flex: 1 0 100%; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: right; }

.settings-dialog { width: min(1180px,calc(100vw - 30px)); }
.settings-tabs { display: flex; gap: 7px; margin: -4px 0 18px; border-bottom: 1px solid var(--line); }
.settings-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); padding: 10px 13px; font-weight: 800; }
.settings-tabs button.active { color: var(--blue); border-color: var(--blue); }
.user-create { grid-template-columns: 1.05fr .9fr .75fr 1.35fr auto; }
.user-row { grid-template-columns: 1.05fr .7fr .75fr .65fr 1.2fr auto auto; }
.user-color-label{display:flex;align-items:center;gap:8px;font-size:12px}.user-color-label input{width:42px;height:34px;padding:2px}.comment-color-preview{white-space:pre-wrap;margin-top:6px;font-size:12px}.comment-color-preview small{display:block;color:#64748b;margin-bottom:4px}
.field-editor { display: grid; grid-template-columns: 1.4fr 1fr .8fr .45fr; gap: 10px; padding: 14px; border-radius: 13px; background: #f5f7fb; }
.field-editor label { display: grid; gap: 6px; color: #526079; font-size: 11px; font-weight: 750; }
.field-editor input,.field-editor select,.field-editor textarea { width: 100%; border: 1px solid #d7deea; border-radius: 9px; background: white; padding: 10px; color: var(--ink); }
.field-editor .wide { grid-column: 1/-1; }.field-editor .check-line { display: flex; align-items: center; gap: 7px; }.field-editor .check-line input { width: auto; }.field-editor footer { display: flex; justify-content: flex-end; gap: 8px; }
.fields-list { display: grid; gap: 8px; max-height: 48vh; overflow: auto; margin-top: 14px; }
.field-setting { display: flex; justify-content: space-between; gap: 15px; align-items: center; border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; }
.field-setting.inactive { opacity: .55; }.field-setting strong,.field-setting small { display: block; }.field-setting small { margin-top: 4px; color: var(--muted); }.field-flags,.field-actions { display: flex; gap: 6px; flex-wrap: wrap; }.protected-badge { background: #edf3ff; color: #3456ad; }.visible-badge { background: #eaf8f2; color: #28765f; }.hidden-badge { background: #f0f1f4; color: #6d7685; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 64px minmax(0,1fr); }
  .sidebar { display: flex; width: 64px; padding: 20px 8px; }
  .sidebar.open { width: 238px; }
  .sidebar.open .nav-item { justify-content: flex-start; font-size: 13px; }
  .sidebar.open .brand .nav-label { font-size: 13px; }
  .sidebar.open .sidebar-footer .nav-label { display: block; }
  .summary-grid { grid-template-columns: repeat(2,1fr); }
  .user-create,.user-row,.field-editor { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .app-shell { display: grid; grid-template-columns: 54px minmax(0,1fr); }
  .sidebar { display: flex; width: 54px; padding: 16px 6px; }
  .sidebar.open { width: min(238px,82vw); }
  main { grid-column: 2; padding: 18px 12px 32px; }
  .topbar { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; align-items: start; }
  .top-actions { display: grid; width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)) 42px; gap: 8px; justify-content: stretch; }
  .top-actions .search { grid-column: 1/-1; width: 100%; order: 0; }
  .top-actions .secondary,.top-actions .primary { width: 100%; min-width: 0; padding: 11px 8px; }
  #operator-view-open { grid-column: 1; }
  #max-extension-install { grid-column: 2; }
  #operator-view-open[hidden] + #max-extension-install { grid-column: 1/3; }
  #import-leads { grid-column: 1; }
  #new-candidate { grid-column: 2; }
  #profile-button { grid-column: 3; grid-row: 2/span 2; width: 42px; height: 42px; align-self: center; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .board-toolbar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; overflow: visible; }
  .board-toolbar>select { width: 100%; min-width: 0; }
  #call-filter,.board-toolbar .muted { grid-column: 1/-1; }
  .board-toolbar .muted { margin-left: 0; text-align: right; }
  .deals-table-wrap { max-height: calc(100vh - 360px); }
  .questionnaire-actions>* { flex: 1 1 170px; }
  .user-create,.user-row,.field-editor { grid-template-columns: 1fr; }
  .field-editor .wide { grid-column: auto; }
  .operator-view-bar { align-items: stretch; flex-direction: column; gap: 6px; padding: 8px 12px; }.operator-view-bar>div { min-width: 0; }.operator-view-bar label { justify-content: space-between; }.operator-view-bar select { min-width: 0; width: min(320px,65vw); }.operator-view-bar .secondary { margin-left: 0; }.operator-view-close { position: absolute; top: 8px; right: 10px; }
  .stage-overview-items { width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); }.stage-overview-button { min-height: 42px; gap: 4px; padding: 5px 6px; font-size: 9px; }.stage-overview-button span { line-height: 1.08; }.stage-overview-button b { min-width: 18px; height: 18px; font-size: 9px; }.pagination { align-items: stretch; flex-direction: column; }.pagination-controls { justify-content: space-between; }
}

/* 2026-08-24: fluid typography and controls for phone, tablet and desktop */
.login-card h1 { font-size: clamp(25px, calc(22px + .7vw), 30px); }
.eyebrow { font-size: var(--font-label); }
h1 { font-size: clamp(24px, calc(20px + .7vw), 32px); }
.candidate-form h2,.drawer-header h2 { font-size: clamp(20px, calc(18px + .45vw), 24px); }
.stage-main-title h2 { font-size: clamp(17px, calc(15px + .35vw), 20px); }
.login-card label,.candidate-form label,.questionnaire label,.call-form label,.field-editor label,.special-marks-field { font-size: var(--font-label); }
.summary-grid strong { font-size: clamp(23px, calc(20px + .6vw), 30px); }
.summary-grid small,.form-error,.pagination-summary,.pagination-page { font-size: var(--font-small); }

button,input,select,textarea { font-size: var(--font-control); }
.primary,.secondary,.danger,.danger-link {
  min-height: var(--control-height);
  padding: var(--control-pad-y) var(--control-pad-x);
}
.search { height: var(--control-height); padding-inline: var(--control-pad-x); }
.avatar,.icon-button {
  width: var(--control-height);
  height: var(--control-height);
  flex: 0 0 var(--control-height);
}
.login-card input,
.candidate-form input,
.questionnaire input:not([type="radio"]):not([type="checkbox"]),
.questionnaire select,
.call-form input,
.call-form select,
.board-toolbar>select,
.bulk-toolbar select,
.operator-view-bar select,
.user-create input,.user-create select,.user-row input,.user-row select,
.field-editor input,.field-editor select,
.row-select,.import-assignee select {
  min-height: var(--control-height);
  padding: var(--control-pad-y) var(--control-pad-x);
}
.questionnaire textarea,.call-form textarea,.field-editor textarea {
  padding: var(--control-pad-y) var(--control-pad-x);
}
.radio-group input,.check-label input,.mark-option input,.field-editor .check-line input { min-height: 0; }
.archive-filter,.view-switch button,.document-upload,.typeahead-option { font-size: var(--font-control); }
.stage-overview-button {
  min-height: clamp(40px, calc(38px + .3vw), 44px);
  height: auto;
  font-size: clamp(10px, calc(9.5px + .08vw), 11px);
}
.deals-table th { font-size: clamp(11px, calc(10.5px + .08vw), 12px); }
.deals-table td,.row-select { font-size: clamp(12px, calc(11.4px + .12vw), 13px); }
.deal-title { font-size: clamp(13px, calc(12px + .18vw), 15px); }
.row-actions .text-button { min-height: 36px; padding: 7px 6px; }
.sidebar .nav-item { min-height: clamp(42px, calc(39px + .3vw), 45px); font-size: var(--font-control); }
.top-actions .primary,.top-actions .secondary { white-space: nowrap; }

@media (min-width: 701px) and (max-width: 1100px) {
  .topbar { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; align-items: start; }
  .top-actions { display: grid; width: 100%; grid-template-columns: minmax(120px,1fr) auto auto auto var(--control-height); }
  .top-actions .search { width: 100%; }
}

@media (max-width: 700px) {
  .stage-overview-button { min-height: 42px; height: auto; font-size: clamp(9px, calc(8.7px + .15vw), 10px); }
  #profile-button { width: var(--control-height); height: var(--control-height); }
}

@media (max-width: 380px) {
  main { padding-inline: 9px; }
  .top-actions { grid-template-columns: minmax(0,1fr) var(--control-height); }
  #operator-view-open,#import-leads,#new-candidate { grid-column: 1; }
  #profile-button { grid-column: 2; grid-row: 2 / span 3; }
  .summary-grid { grid-template-columns: 1fr; }
}

/* 2026-08-24: compact responsive deals table without nested scrolling */
.deals-table-wrap {
  max-height: none;
  overflow: visible;
}
.deals-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}
.deals-table th { padding: 9px 8px; font-size: clamp(10px, calc(9.7px + .08vw), 11px); }
.deals-table td { padding: 8px; font-size: clamp(11px, calc(10.6px + .08vw), 12px); }
.candidate-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}
.candidate-sort-button:hover,.candidate-sort-button.active { color: var(--blue); }
.candidate-sort-button:focus-visible { outline: 2px solid rgba(0,186,242,.35); outline-offset: 3px; }
.candidate-sort-arrow { flex: 0 0 auto; font-size: 1.1em; line-height: 1; }
.candidate-sort-button > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.deals-table th:nth-child(1),.deals-table td:nth-child(1) { width: 3.5%; }
.deals-table th:nth-child(2),.deals-table td:nth-child(2) { width: 33.5%; }
.deals-table th:nth-child(3),.deals-table td:nth-child(3),
.deals-table th:nth-child(4),.deals-table td:nth-child(4) { width: 9%; }
.deals-table th:nth-child(5),.deals-table td:nth-child(5) { width: 13%; }
.deals-table th:nth-child(6),.deals-table td:nth-child(6) { width: 8%; }
.deals-table th:nth-child(7),.deals-table td:nth-child(7) { width: 16%; }
.deals-table th:nth-child(8),.deals-table td:nth-child(8) { width: 8%; }
.deals-table.admin-domain-table th:nth-child(1),.deals-table.admin-domain-table td:nth-child(1) { width: 3.5%; }
.deals-table.admin-domain-table th:nth-child(2),.deals-table.admin-domain-table td:nth-child(2) { width: 24%; }
.deals-table.admin-domain-table th:nth-child(3),.deals-table.admin-domain-table td:nth-child(3) { width: 7%; }
.deals-table.admin-domain-table th:nth-child(4),.deals-table.admin-domain-table td:nth-child(4) { width: 10.5%; }
.deals-table.admin-domain-table th:nth-child(5),.deals-table.admin-domain-table td:nth-child(5),
.deals-table.admin-domain-table th:nth-child(6),.deals-table.admin-domain-table td:nth-child(6) { width: 8.5%; }
.deals-table.admin-domain-table th:nth-child(7),.deals-table.admin-domain-table td:nth-child(7) { width: 13%; }
.deals-table.admin-domain-table th:nth-child(8),.deals-table.admin-domain-table td:nth-child(8) { width: 7%; }
.deals-table.admin-domain-table th:nth-child(9),.deals-table.admin-domain-table td:nth-child(9) { width: 11%; }
.deals-table.admin-domain-table th:nth-child(10),.deals-table.admin-domain-table td:nth-child(10) { width: 7%; }
.timezone-offset-cell { color: #40566c; font-weight: 800; white-space: nowrap; }
.deals-table td.timezone-ahead { color: #c62828; }
.workspace-call-history-item { margin-top: 7px; padding-top: 5px; border-top: 1px solid #e3e8ef; font-size: 10px; line-height: 1.35; }
.workspace-call-history-item .call-center-status-badge { font-size: inherit; }
.workspace-call-history-item small { display: block; margin-top: 2px; color: #61748a; font-size: inherit; }
.workspace-call-history { margin-top: 5px; }
.workspace-call-history summary { color: #526b86; font-size: 10px; font-weight: 500; cursor: pointer; user-select: none; }
.deals-table button.workspace-recording-toggle { display: inline; width: auto; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.deals-table button.workspace-recording-toggle.playing { color: #087f68; font-weight: 700; }
.workspace-recording-toggle:focus-visible { outline: 2px solid #168bc0; outline-offset: 2px; }
.owner-row-actions { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 64px; }
.owner-row-messengers, .owner-row-main { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.owner-row-button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 4px; border: 0; border-radius: 50%; font-size: 9px; font-weight: 800; cursor: pointer; }
.owner-row-button svg { width: 17px; height: 17px; fill: currentColor; }
.owner-row-button:disabled { opacity: .4; cursor: not-allowed; }
.owner-row-button:focus-visible { outline: 2px solid #168bc0; outline-offset: 2px; }
.owner-row-complete { background: #e9edf2; color: #64748b; }
.owner-row-robocall { background: #171717; color: white; }
.owner-row-robocall.active { background: #e87821; color: white; font-size: 7px; letter-spacing: -.02em; }
.owner-row-max { background: #4178d5; color: white; }
.owner-row-whatsapp { background: #25a968; color: white; }
.owner-row-transcript { background: #e7f2fa; color: #25638b; }
.owner-row-transcript[aria-expanded="true"] { background: #25638b; color: white; }
.workspace-transcript-panel { position: fixed; z-index: 80; top: 88px; bottom: 18px; right: 18px; width: min(460px, calc(100vw - 36px)); overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 10px 32px #10243a33; }
.workspace-transcript-panel > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.workspace-transcript-panel h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
@media print {
  .workspace-transcript-panel, .owner-row-actions { display: none !important; }
  .deals-table col.workspace-actions-column { width: 40px !important; }
  body.print-workspace-table #kanban button.workspace-recording-toggle { width: auto !important; display: inline !important; text-decoration: none; }
}
.source-domain-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-domain-badge { display: inline-block; max-width: 100%; padding: 3px 6px; border: 1px solid; border-radius: 6px; font-weight: 700; line-height: 1.35; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-phone-place { display: block; max-width: 100%; margin-top: 2px; color: #788594; font-size: 10px; font-weight: 400; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source-channel { display: block; max-width: 100%; margin-top: 3px; color: #536171; font-size: 10px; font-weight: 650; line-height: 1.15; white-space: normal; overflow-wrap: anywhere; }
.source-directory-open { padding: 6px 9px; font-size: 12px; }
.undo-last-action { display: grid; place-items: center; flex: 0 0 32px; width: 32px; min-width: 32px; height: 32px; min-height: 32px; margin-right: 8px; padding: 0; border: 1px solid #cf7b8a; border-radius: 7px; background: #d98796; color: #fff; font-family: "Segoe UI Symbol", sans-serif; font-size: 20px; font-weight: 700; line-height: 1; box-shadow: none; }
.undo-last-action:hover { border-color: #bd6878; background: #ca7383; color: #fff; }
.undo-last-action:focus-visible { outline: 2px solid #c77584; outline-offset: 2px; }
#source-directory-dialog { width: min(850px, calc(100vw - 24px)); max-height: calc(100vh - 32px); }
#source-directory-dialog[data-kind="phone"] { width: min(1100px, calc(100vw - 24px)); }
.source-directory-copy-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.directory-drag-handle { display: block; color: #8796a3; font-size: 18px; line-height: 20px; cursor: grab; user-select: none; }
.directory-drag-handle:active { cursor: grabbing; }
.directory-drag-handle:focus-visible { outline: 2px solid #0085a8; }
.directory-dragging { opacity: .55; }
#source-directory-delete { color: #a33b43; }
.source-counts { display: inline-grid; grid-auto-flow: column; grid-auto-columns: minmax(32px, 1fr); gap: 0; border: 1px solid #000; white-space: nowrap; font-size: 14px; font-variant-numeric: tabular-nums; vertical-align: middle; }
.source-counts .source-count { display: flex; align-items: center; justify-content: center; min-width: 32px; height: 30px; padding: 0 6px; border: 0; border-radius: 0; font-weight: 800; line-height: 1; }
.source-counts .source-count + .source-count { border-left: 1px solid #000; }
.source-counts .source-count.total { color: #171717; background: #fff; }
.source-counts .source-count.mint { color: #315f57; background: #eaf7f3; }
.source-counts .source-count.green { color: #24633b; background: #dcefdc; }
.source-counts .source-count.red { color: #85535b; background: #f5eff0; }
.source-counts .source-count.yellow { color: #756025; background: #fff9df; }
.source-directory-table .source-directory-select-cell { width: 30px; padding: 8px 4px; text-align: center; }
.source-directory-table input[type="checkbox"] { width: 14px; min-width: 14px; height: 14px; margin: 4px 0 0; padding: 0; }
.source-directory-add { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.source-directory-add input { flex: 1; min-width: 160px; }
#source-directory-preview { width: 100%; }
#source-directory-content { overflow-x: auto; }
.source-directory-table { width: 100%; border-collapse: collapse; }
.source-directory-table th,.source-directory-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.source-directory-table input,.source-directory-table textarea { width: 100%; min-width: 150px; padding: 7px; border: 1px solid #d7deea; border-radius: 6px; font: inherit; }
.source-directory-table textarea { min-height: 58px; resize: vertical; }
.source-directory-table .directory-offset { white-space: nowrap; }
#source-directory-feedback { min-height: 1.4em; color: #16764f; }
.source-rating { padding: 7px; border: 1px solid #d7deea; border-radius: 6px; color: #61748a; background: #f6f8fb; font: inherit; }
.source-rating.productive { color: #17623d; border-color: #a2d4b9; background: #e7f7ee; }
.source-rating.unproductive { color: #a3313b; border-color: #e5b0b6; background: #fceced; }
.deal-title { font-size: clamp(12px, calc(11.5px + .1vw), 13.5px); line-height: 1.2; }
.deal-subtitle { max-width: 100%; margin-top: 3px; font-size: clamp(9.5px, calc(9.2px + .08vw), 10.5px); -webkit-line-clamp: 1; }
.deals-table .row-select {
  min-width: 0;
  min-height: clamp(34px, calc(32px + .25vw), 38px);
  padding: 5px 7px;
  font-size: clamp(10.5px, calc(10.2px + .08vw), 11.5px);
}
.operator-cell-content {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.operator-cell-content .operator-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.operator-cell-content .row-select {
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
}
.deals-table .stage-select { min-width: 0; }
.deals-table .row-actions { flex-wrap: nowrap; align-items: center; }
.deals-table .row-actions .text-button {
  min-height: 30px;
  padding: 5px 4px;
  font-size: clamp(10.5px, calc(10.2px + .08vw), 11.5px);
  white-space: nowrap;
}
.deals-table .table-action {
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: background-color .15s ease,border-color .15s ease,color .15s ease,transform .15s ease;
}
.deals-table .table-action:hover { text-decoration: none; transform: translateY(-1px); }
.deals-table .table-action-open { border-color: #d4dfff; background: #edf2ff; color: #2b53c5; }
.deals-table .table-action-open:hover { border-color: #b9c9ff; background: #dfe8ff; color: #173fb2; }
@media (max-width: 900px) {
  .deals-table-wrap { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .deals-table,.deals-table tbody { display: block; }
  .deals-table thead { display: none; }
  .deals-table tbody { display: grid; gap: 8px; }
  .deals-table tbody tr {
    display: grid;
    grid-template-columns: 28px repeat(2,minmax(0,1fr));
    gap: 8px 10px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    box-shadow: 0 3px 10px rgba(33,48,75,.035);
  }
  .deals-table tbody tr:hover { background: white; }
  .deals-table td { display: grid; width: auto !important; min-width: 0; gap: 4px; padding: 0; border: 0; }
  .deals-table td:nth-child(1) { grid-column: 1; grid-row: 1 / span 6; align-content: start; padding-top: 3px; }
  .deals-table td:nth-child(2) { grid-column: 2 / 4; }
  .deals-table td:nth-child(3) { grid-column: 2; }
  .deals-table td:nth-child(4) { grid-column: 3; }
  .deals-table td:nth-child(5),.deals-table td:nth-child(6),
  .deals-table td:nth-child(7),.deals-table td:nth-child(8) { grid-column: 2 / 4; }
  .deals-table td.empty-marks { display: none; }
  .deals-table td:nth-child(3)::before { content: "Создана"; }
  .deals-table td:nth-child(4)::before { content: "Изменена"; }
  .deals-table td:nth-child(5)::before { content: "Оператор"; }
  .deals-table td:nth-child(6)::before { content: "Особые отметки"; }
  .deals-table td:nth-child(7)::before { content: "Этап"; }
  .deals-table td:nth-child(n+3):nth-child(-n+7)::before {
    color: #8994a7;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .deals-table .deal-subtitle { -webkit-line-clamp: 2; }
  .deals-table .row-actions { justify-content: flex-start; gap: 8px; }
  .deals-table.admin-domain-table td:nth-child(1) { grid-row: 1 / span 8; }
  .deals-table.admin-domain-table td:nth-child(2) { grid-column: 2 / 4; }
  .deals-table.admin-domain-table td:nth-child(3) { grid-column: 2 / 4; }
  .deals-table.admin-domain-table td:nth-child(4) { grid-column: 2 / 4; }
  .deals-table.admin-domain-table td:nth-child(5) { grid-column: 2; }
  .deals-table.admin-domain-table td:nth-child(6) { grid-column: 3; }
  .deals-table.admin-domain-table td:nth-child(7),
  .deals-table.admin-domain-table td:nth-child(8),
  .deals-table.admin-domain-table td:nth-child(9),
  .deals-table.admin-domain-table td:nth-child(10) { grid-column: 2 / 4; }
  .deals-table.admin-domain-table td:nth-child(3)::before { content: "Разница с Москвой"; }
  .deals-table.admin-domain-table td:nth-child(4)::before { content: "Источник"; }
  .deals-table.admin-domain-table td:nth-child(5)::before { content: "Создана"; }
  .deals-table.admin-domain-table td:nth-child(6)::before { content: "Изменена"; }
  .deals-table.admin-domain-table td:nth-child(7)::before { content: "Оператор"; }
  .deals-table.admin-domain-table td:nth-child(8)::before { content: "Особые отметки"; }
  .deals-table.admin-domain-table td:nth-child(9)::before { content: "Этап"; }
  .deals-table.admin-domain-table td:nth-child(n+3):nth-child(-n+9)::before {
    color: #8994a7;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .deals-table.admin-domain-table td:nth-child(8).empty-marks { display: none; }
  .deals-table.admin-domain-table .source-domain-cell { white-space: normal; overflow-wrap: anywhere; }
  .deals-table.operator-timezone-table td:nth-child(1) { grid-row: 1 / span 7; }
  .deals-table.operator-timezone-table td:nth-child(2),
  .deals-table.operator-timezone-table td:nth-child(3) { grid-column: 2 / 4; }
  .deals-table.operator-timezone-table td:nth-child(4) { grid-column: 2; }
  .deals-table.operator-timezone-table td:nth-child(5) { grid-column: 3; }
  .deals-table.operator-timezone-table td:nth-child(6),
  .deals-table.operator-timezone-table td:nth-child(7),
  .deals-table.operator-timezone-table td:nth-child(8) { grid-column: 2 / 4; }
  .deals-table.operator-timezone-table td:nth-child(3)::before { content: "Разница с Москвой"; }
  .deals-table.operator-timezone-table td:nth-child(4)::before { content: "Создана"; }
  .deals-table.operator-timezone-table td:nth-child(5)::before { content: "Изменена"; }
  .deals-table.operator-timezone-table td:nth-child(6)::before { content: "Оператор"; }
  .deals-table.operator-timezone-table td:nth-child(7)::before { content: "Особые отметки"; }
  .deals-table.operator-timezone-table td:nth-child(8)::before { content: "Этап"; }
  .deals-table.operator-timezone-table td:nth-child(n+3):nth-child(-n+8)::before {
    color: #8994a7;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .deals-table.operator-timezone-table td:nth-child(7).empty-marks { display: none; }
  .source-domain-badge { white-space: normal; overflow-wrap: anywhere; }
}

/* 2026-08-24: restrained business theme */
body { background: #f3f4f6; }
.login-screen { background: #eef0f2; }
.sidebar { background: #222a32; box-shadow: 6px 0 20px rgba(24,31,38,.12); }
.brand-mark { border-radius: 9px; background: #b47a35; color: #fff; font-size: 13px; letter-spacing: -.025em; }
.sidebar-toggle { background: rgba(255,255,255,.09); }
.nav-item:hover,.nav-item.active { background: rgba(255,255,255,.08); }
.primary { background: #3f4f5c; box-shadow: 0 4px 11px rgba(43,55,65,.17); }
.primary:hover { background: #323f49; }
.secondary { border-color: #d8dfdc; background: #fff; color: #4f5d5f; }
.secondary:hover { border-color: #bcc8c3; background: #f8faf8; color: #263537; }
.search,.board-toolbar>select,.row-select,.operator-view-bar select,
.login-card input,.candidate-form input,.questionnaire input,.questionnaire select,.questionnaire textarea,
.call-form input,.call-form select,.call-form textarea { border-color: #d7dfdb; border-radius: 8px; }
.login-card input:focus,.candidate-form input:focus,.questionnaire input:focus,
.questionnaire select:focus,.questionnaire textarea:focus {
  border-color: #84929d;
  box-shadow: 0 0 0 3px rgba(71,85,105,.11);
}
.avatar { background: #e6e9ed; color: #465461; }
.summary-grid article { border-radius: 10px; border-color: #e0e5e2; box-shadow: 0 2px 9px rgba(31,43,39,.035); }
.summary-grid .accent { border-color: #3a4652; background: #3a4652; }
.summary-grid .accent span,.summary-grid .accent small { color: #e1e5e9; }
.stage-overview { border-radius: 10px; border-color: #dce2df; box-shadow: none; }
.stage-overview-button { border-radius: 7px; border-color: #e2e7e4; background: #f7f8f7; color: #3f4d50; }
.stage-overview-button.blue { border-left-color: #587a80; }
.stage-overview-button.amber { border-left-color: #b9863d; }
.stage-overview-button.green { border-left-color: #43816f; }
.stage-overview-button.violet { border-left-color: #796d8d; }
.stage-overview-button:hover,.stage-overview-button.active {
  border-top-color: #b7c0c8;
  border-right-color: #b7c0c8;
  border-bottom-color: #b7c0c8;
  background: #edf0f3;
  color: #34424f;
}
.stage-overview-button b { color: #344245; background: #fff; }
.archive-filter,.view-switch,.bulk-toolbar,.pagination { border-color: #dce2df; border-radius: 9px; }
.view-switch { background: #e7ebe8; }
.filter-count { background: #edf0f3; color: #475569; }
.operator-view-bar { border-color: #cbd2d8; background: #eef1f3; box-shadow: 0 4px 14px rgba(50,63,74,.07); }
.operator-view-bar strong { color: #475569; }
.operator-view-close { background: rgba(71,85,105,.09); color: #52616e; }
.deals-table-wrap { border-color: #dce2df; border-radius: 10px; box-shadow: 0 2px 10px rgba(31,43,39,.035); }
.deals-table th { background: #ecefed; color: #5d696b; }
.deals-table td { border-bottom-color: #e7ebe8; color: #536063; }
.deals-table tbody tr:hover { background: #f7f9f7; }
.deal-title { color: #202b2f; }
.deal-title:hover { color: #475569; }
.deals-table .table-action-open { border-color: #d0d6dc; background: #edf0f3; color: #455564; }
.deals-table .table-action-open:hover { border-color: #aeb8c1; background: #e2e6ea; color: #2f3c47; }
.candidate-card,.questionnaire,.calls-panel,.documents-panel,.analysis-empty,.analysis-summary,
.offer-card,.exclusions,.login-card { border-radius: 11px; border-color: #dfe4e1; box-shadow: none; }
dialog { border-radius: 13px; }
.drawer-panel { background: #f5f6f4; }
.typeahead-option:hover { background: #edf0f3; color: #475569; }
.multi-chip { background: #edf0f3; color: #475569; }
.toast { background: #263532; }
.questionnaire-save-status {
  flex: 1 1 100%;
  color: #657174;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}
.questionnaire-save-status.saving,.questionnaire-save-status.pending { color: #765925; }
.questionnaire-save-status.error { color: #9a343a; }
.close-card-button { min-width: 112px; margin-left: auto; }
.refresh-success { color: #215b42; border-color: #8bb8a1; background: #e8f3ed; }
.refresh-error { color: #8f2f35; border-color: #d9a1a5; background: #f8e9ea; }
.settings-save-feedback { min-width: 110px; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.settings-save-feedback.settings-save-success { color: #215b42; border-color: #8bb8a1; background: #e8f3ed; }
.settings-save-feedback.settings-save-error { color: #8f2f35; border-color: #d9a1a5; background: #f8e9ea; }
.user-delete { min-height: var(--control-height); padding: var(--control-pad-y) var(--control-pad-x); }
button,
[role="button"],
.mark-option,
.radio-group label,
.check-line,
.check-label {
  -webkit-user-select: none;
  user-select: none;
}

/* 2026-08-25: SUNSIM-inspired visual theme; layout and behavior stay unchanged */
:root {
  --ink: #06192d;
  --muted: #6f7987;
  --line: #e2e6eb;
  --surface: #ffffff;
  --canvas: #f4f5f7;
  --navy: #031321;
  --blue: #00baf2;
  --blue-soft: #e7f8fd;
  --green: #00a94f;
  --shadow: 0 6px 20px rgba(3, 19, 33, 0.07);
}

body,
.login-screen {
  background: var(--canvas);
  color: var(--ink);
}

.sidebar {
  background: var(--navy);
  box-shadow: 6px 0 22px rgba(3, 19, 33, 0.14);
}
.brand-mark {
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
}
.brand small,
.sidebar-footer small { color: #91a2b2; }
.sidebar-toggle {
  background: transparent;
  color: #ffffff;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.1); }
.nav-item { color: #edf5fa; }
.nav-item:hover {
  background: rgba(255,255,255,.07);
  color: #ffffff;
}
.nav-item.active {
  background: transparent;
  color: #ffa51f;
}
.sidebar-footer { border-top-color: rgba(255,255,255,.12); }
.status-dot {
  background: #00bd55;
  box-shadow: 0 0 0 5px rgba(0,189,85,.12);
}

.login-card,
.summary-grid article,
.stage-rail,
.stage-overview,
.deals-table-wrap,
.pagination,
.candidate-card,
.candidate-list,
.questionnaire,
.calls-panel,
.documents-panel,
.history-panel,
.analysis-empty,
.analysis-summary,
.offer-card,
.exclusions,
.report-card,
.report-wide,
.report-half,
.user-row,
.field-setting {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: none;
}

.login-card { border-radius: 14px; }
.primary {
  background: var(--blue);
  color: #ffffff;
  box-shadow: none;
}
.primary:hover { background: #00a9dc; }
.secondary {
  border-color: #dce2e8;
  background: #ffffff;
  color: #10243a;
}
.secondary:hover {
  border-color: var(--blue);
  background: #f3fbfe;
  color: #008dbb;
}
.danger { background: #d9454f; }
.danger-link {
  background: #fff1f1;
  color: #bc303b;
}
.avatar {
  background: var(--blue);
  color: #ffffff;
}

.search,
.board-toolbar>select,
.row-select,
.operator-view-bar select,
.login-card input,
.candidate-form input,
.questionnaire input,
.questionnaire select,
.questionnaire textarea,
.call-form input,
.call-form select,
.call-form textarea,
.user-create input,
.user-create select,
.user-row input,
.user-row select,
.field-editor input,
.field-editor select,
.field-editor textarea,
.import-assignee select,
.multi-input {
  border-color: #dce2e8;
  background: #ffffff;
  color: var(--ink);
}
.search:focus-within,
.login-card input:focus,
.candidate-form input:focus,
.questionnaire input:focus,
.questionnaire select:focus,
.questionnaire textarea:focus,
.call-form input:focus,
.call-form select:focus,
.call-form textarea:focus,
.field-editor input:focus,
.field-editor select:focus,
.field-editor textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,186,242,.12);
}

.summary-grid article { border-radius: 14px; padding-top: 10px; padding-bottom: 10px; }
.summary-grid strong { margin: 3px 0 2px; line-height: 1.1; }
.summary-grid .accent {
  border-color: #ffd7a0;
  background: #ffe8c4;
  color: var(--ink);
}
.summary-grid .accent span,
.summary-grid .accent small { color: #705b3c; }

.archive-filter,
.view-switch,
.bulk-toolbar,
.pagination {
  border-color: var(--line);
  background: #ffffff;
}
.view-switch { background: #e9edf1; }
.view-switch .active {
  background: var(--blue);
  color: #ffffff;
  box-shadow: none;
}
.filter-count,
.stage-button.active .stage-button-count {
  background: var(--blue-soft);
  color: #008dbb;
}
.stage-main { background: #edf0f3; }
.stage-button:hover { background: #f2f8fa; }
.stage-button.active {
  background: var(--blue-soft);
  color: #008dbb;
  box-shadow: inset 3px 0 0 var(--blue);
}
.stage-nav-button {
  border-color: #dce2e8;
  color: #10243a;
}
.stage-empty {
  border-color: #ccd5dd;
  background: rgba(255,255,255,.72);
}

.stage-overview { border-radius: 12px; }
.stage-overview-button {
  border-color: #e1e6eb;
  border-radius: 0;
  background: #f7f8fa;
  color: #314257;
}
.stage-overview-button.blue { border-left-color: var(--blue); }
.stage-overview-button.amber { border-left-color: #ffa51f; }
.stage-overview-button.green { border-left-color: #00a94f; }
.stage-overview-button.violet { border-left-color: #7f66b4; }
.stage-overview-button:hover,
.stage-overview-button.active {
  border-top-color: #9edff4;
  border-right-color: #9edff4;
  border-bottom-color: #9edff4;
  background: var(--blue-soft);
  color: #007fa9;
}
.stage-overview-button b {
  background: #ffffff;
  border-radius: 0;
  color: #10243a;
}

.operator-view-bar,
.bulk-toolbar {
  border-color: #bcebf9;
  background: #eaf9fe;
  box-shadow: none;
}
.operator-view-bar strong,
.bulk-toolbar strong { color: #007fa9; }
.operator-view-close {
  background: rgba(0,186,242,.1);
  color: #008dbb;
}
.operator-view-close:hover {
  background: rgba(0,186,242,.18);
  color: #006e91;
}

.deals-table-wrap { border-radius: 12px; }
.deals-table th,
.list-header {
  border-color: #e1e6eb;
  background: #f0f2f4;
  color: #5d6b7a;
}
.deals-table td,
.list-row {
  border-color: #edf0f3;
  color: #526172;
}
.deals-table tbody tr:hover,
.list-row:not(.list-header):hover { background: #f3fbfe; }
.deal-title { color: var(--ink); }
.deal-title:hover,
.text-button:hover { color: #008dbb; }
.text-button,
.text-link,
.card-phone { color: #009fd1; }
.deals-table .table-action-open {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}
.deals-table .table-action-open:hover {
  border-color: #00a9dc;
  background: #00a9dc;
  color: #ffffff;
}
.candidate-card.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(0,186,242,.1);
}
.candidate-card:focus-visible {
  outline-color: rgba(0,186,242,.3);
}
.tags span,
.document-upload,
.offer-number,
.fit-reason,
.multi-chip,
.protected-badge,
.credential-result {
  background: var(--blue-soft);
  color: #007fa9;
}
.notice,
.analysis-warning,
.completeness,
.call-reminder {
  background: #fff0d2;
  color: #8a5a0a;
}
.result-line,
.completeness.complete,
.import-result,
.active-badge,
.visible-badge {
  background: #e6f7ee;
  color: #087743;
}
.document-line {
  background: #f1edf8;
  color: #6c5593;
}
.money-row span,
.specialties,
.call-form,
.report-card,
.report-wide,
.report-half,
.user-create,
.field-editor {
  background: #f5f6f8;
}
.offer-card { border-left-color: var(--blue); }
.drawer-panel { background: var(--canvas); }
.drawer,
dialog::backdrop { background: rgba(3,19,33,.5); }
.drawer-tabs .active,
.settings-tabs button.active {
  border-color: var(--blue);
  color: #008dbb;
}
.icon-button {
  background: #edf1f4;
  color: #536274;
}
.icon-button:hover {
  background: var(--blue-soft);
  color: #008dbb;
}
.typeahead-menu { border-color: #dce2e8; }
.typeahead-option:hover {
  background: var(--blue-soft);
  color: #007fa9;
}
.history-dot {
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}
.bar-chart i { background: var(--blue); }
.toast { background: var(--navy); }
.refresh-success,
.settings-save-feedback.settings-save-success {
  border-color: #8fd4b2;
  background: #e6f7ee;
  color: #087743;
}
.refresh-error,
.settings-save-feedback.settings-save-error {
  border-color: #e4aab0;
  background: #fff0f1;
  color: #a62d37;
}

.integration-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.integration-heading h3 { margin: 3px 0 7px; font-size: 20px; }
.integration-heading .muted { max-width: 720px; margin: 0; line-height: 1.55; }
.integration-status {
  flex: 0 0 auto;
  border: 1px solid #d9e0e6;
  border-radius: 999px;
  background: #f1f3f5;
  color: #5d6b7a;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
}
.integration-status.connected {
  border-color: #8fd4b2;
  background: #e6f7ee;
  color: #087743;
}
.integration-status.warning {
  border-color: #edc785;
  background: #fff5df;
  color: #8a5a0a;
}
.integration-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}
.integration-facts div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f6f8;
  padding: 12px 14px;
}
.integration-facts dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.integration-facts dd { margin: 0; color: var(--ink); font-weight: 700; }
.integration-form {
  max-width: 820px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.integration-form label { display: grid; gap: 7px; font-weight: 700; }
.integration-form input { width: 100%; }
.integration-form .muted { margin: 8px 0 14px; }
.integration-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.telephony-routing {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.telephony-routing-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}
.telephony-routing-heading h3 { margin: 3px 0 0; font-size: 18px; }

.telephony-readiness {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.telephony-check {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid #d9e2ec;
  border-left: 3px solid #12a16f;
  border-radius: 9px;
  background: #f7fafc;
}

.telephony-check.warning {
  border-left-color: #d88a18;
  background: #fff8eb;
}

.telephony-check small { color: #66758a; line-height: 1.45; }

@media (max-width: 760px) {
  .telephony-readiness { grid-template-columns: 1fr; }
}
.telephony-number-list { display: grid; gap: 9px; margin-top: 15px; }
.telephony-number-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 340px);
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7f8fa;
  padding: 12px 14px;
}
.telephony-number-info { display: grid; gap: 4px; min-width: 0; }
.telephony-number-info strong { font-size: 15px; }
.telephony-number-info small { color: var(--muted); line-height: 1.4; }
.telephony-number-row select { width: 100%; }
.telephony-number-list > button { justify-self: end; margin-top: 4px; }
.telephony-routing-note {
  margin: 13px 0 0;
  border-radius: 8px;
  background: #eef5f8;
  color: #385467;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
}
.telephony-routing-note.warning { background: #fff4de; color: #81520b; }

.callback-status-dock {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 5px;
  border: 1px solid #d9e1e8;
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  padding: 17px 44px 17px 18px;
  box-shadow: 0 20px 52px rgba(3,19,33,.18);
}
.callback-status-dock.error { border-color: #efc7ca; background: #fff8f8; }
.callback-status-dock small { color: #007fa8; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.callback-status-dock.error small { color: #b32f3a; }
.callback-status-dock strong { font-size: 17px; line-height: 1.25; }
.callback-status-dock span { color: var(--muted); font-size: 12px; }
.callback-status-dock p { margin: 7px 0 0; color: #42516a; font-size: 13px; line-height: 1.45; }
.callback-status-close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #738095; font-size: 22px; line-height: 1; }
.callback-status-close:hover { background: #eef1f5; color: var(--ink); }

@media (max-width: 900px) {
  .deals-table tbody tr {
    border-color: var(--line);
    background: #ffffff;
    box-shadow: none;
  }
  .deals-table tbody tr:hover { background: #f3fbfe; }
  .integration-heading { align-items: stretch; flex-direction: column; gap: 12px; }
  .integration-status { align-self: flex-start; }
  .integration-facts { grid-template-columns: 1fr; }
  .telephony-number-row { grid-template-columns: 1fr; }
  .callback-status-dock { right: 16px; bottom: 16px; }
}

/* 2026-08-30: unified candidate workspace and administrator expenses */
.drawer-panel {
  width: min(1800px, calc(100vw - 18px));
  padding: 22px 26px 42px;
}
.drawer-header {
  margin-bottom: 8px;
  border-bottom: 0;
  padding-bottom: 0;
}
.candidate-main-grid {
  display: grid;
  grid-template-columns: minmax(470px, 1.05fr) minmax(330px, .72fr) minmax(440px, 1fr);
  gap: 18px;
  align-items: start;
}
.candidate-main-grid .questionnaire,
.candidate-main-grid .calls-panel,
.candidate-current-information,
.candidate-side-panel { min-width: 0; }
.questionnaire-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 16px;
}
.questionnaire-section .form-section {
  margin: 0;
  border: 0;
  padding: 0 0 2px;
}
.questionnaire-section-1 { border-color: #e7f0f8; background: #f8fbfe; }
.questionnaire-section-2 { border-color: #e5f0e9; background: #f8fcfa; }
.questionnaire-section-3 { border-color: #f1e9df; background: #fdfaf6; }
.candidate-main-grid .calls-panel { position: sticky; top: 0; }
.candidate-main-grid .calls-heading { align-items: flex-start; flex-wrap: wrap; }
.candidate-main-grid .call-link { white-space: nowrap; }
.call-actions .max-template-link,.call-actions .aiup-call-history-link{display:inline-flex;justify-content:center;flex:1 1 auto;width:auto;white-space:nowrap}
.candidate-side-panel { position: sticky; top: 0; display: grid; gap: 12px; min-height: 0; }
.candidate-current-information {
  position: relative;
  border: 1px solid #ead9b7;
  border-radius: 16px;
  background: #fffaf0;
  padding: 0;
  box-shadow: 0 7px 20px rgba(82, 61, 25, .06);
  overflow: hidden;
}
.candidate-current-information summary { cursor: pointer; padding: 10px 16px; color: #8b611a; font-size: 12px; font-weight: 800; letter-spacing: .055em; }
.candidate-current-information summary:focus-visible { outline: 2px solid #b98a2f; outline-offset: -3px; }
.candidate-current-information[open] .candidate-information-body { max-height: min(62vh, 680px); overflow: auto; padding: 0 20px 20px; }
.candidate-information-heading { min-height: 0; }
.candidate-dialogue-panel { min-width: 0; max-height: calc(100vh - 230px); overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: white; padding: 17px 18px; }
.candidate-dialogue-panel h3 { margin: 0 0 12px; font-size: 15px; }
.candidate-dialogue-item { border-top: 1px solid #e7ebf0; padding: 12px 0 4px; }
.candidate-dialogue-item:first-child { border-top: 0; padding-top: 0; }
.candidate-dialogue-item small { display: block; color: var(--muted); margin-bottom: 8px; }
.candidate-dialogue-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13px; line-height: 1.55; }
.questionnaire textarea.auto-grow-questionnaire { min-height: 54px; overflow-y: hidden; resize: none; }
.questionnaire-actions .candidate-telegram-button { margin-left: auto; }
.questionnaire-actions .close-card-button { margin-left: 0; }
.candidate-current-information .eyebrow {
  margin: 0;
  color: #8b611a;
  font-size: 12px;
  letter-spacing: .055em;
}
.candidate-information-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.candidate-information-add {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  border: 1px solid #d8c18e;
  border-radius: 9px;
  background: rgba(255,255,255,.8);
  color: #8b611a;
  font-size: 20px;
  line-height: 1;
}
.candidate-information-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 13px 0 18px;
  border-bottom: 1px solid #ead9b7;
  padding-bottom: 10px;
}
.candidate-information-tab {
  border: 1px solid #ddcda9;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  color: #6d5a35;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 800;
}
.candidate-information-tab.active { border-color: #b98a2f; background: #fff0c7; color: #68460c; }
.candidate-information-subtab-bar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -7px 0 17px;
}
.candidate-information-subtab-bar[hidden] { display: none; }
.candidate-information-subtabs { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 6px; }
.candidate-information-subtab,
.candidate-information-subtab-add {
  border: 1px solid #dfcfae;
  border-radius: 8px;
  background: rgba(255,255,255,.68);
  color: #735d31;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 800;
}
.candidate-information-subtab.active {
  border-color: #a87b25;
  background: #f5dfab;
  color: #5e3e08;
}
.candidate-information-subtab-add { flex: 0 0 auto; color: #8b611a; }
#candidate-current-information-text {
  color: #26384d;
  font-size: clamp(18px, 1.25vw, 22px);
  font-weight: 750;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.candidate-information-line { margin: 0 0 7px; }
.candidate-information-line.bullet { padding-left: .25em; }
.candidate-information-list {
  margin: 0 0 10px;
  padding-left: 1.35em;
  list-style-position: outside;
}
.candidate-information-list li {
  margin: 0 0 5px;
  padding: 0 0 0 .1em;
  border: 0;
  color: inherit;
  line-height: 1.5;
}
.candidate-information-list li::marker { color: inherit; font-size: .9em; }
h3.candidate-information-line {
  margin: 22px 0 11px;
  border-top: 1px solid rgba(139, 97, 26, .2);
  padding-top: 15px;
  color: #7b5515;
  font-size: 1.05em;
  line-height: 1.3;
  letter-spacing: .018em;
}
h3.candidate-information-line:first-child { margin-top: 0; border-top: 0; padding-top: 0; font-size: 1.18em; }
.candidate-information-line strong { font-weight: 850; }
.candidate-information-spacer { height: 9px; }
.candidate-information-image {
  margin: 20px 0 4px;
  border: 1px solid rgba(139, 97, 26, .2);
  border-radius: 13px;
  background: #fff;
  padding: 9px;
}
.candidate-information-image img {
  display: block;
  width: 100%;
  max-height: 540px;
  border-radius: 8px;
  object-fit: contain;
}
.candidate-information-image figcaption {
  margin-top: 7px;
  color: #725f3d;
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}
.candidate-information-edit {
  display: block;
  width: 34px;
  height: 34px;
  margin: 16px 0 0 auto;
  border: 1px solid #d8c18e;
  border-radius: 10px;
  background: rgba(255,255,255,.82);
  color: #8b611a;
  font-size: 19px;
  line-height: 1;
}
.candidate-information-add:hover,.candidate-information-edit:hover { border-color: #b98a2f; background: #fff0c7; }
.candidate-current-information.empty #candidate-current-information-text {
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
}
.candidate-information-settings {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  border: 1px solid #ead9b7;
  border-radius: 13px;
  background: #fffaf0;
  padding: 17px;
}
.candidate-information-settings h3 { margin: 0 0 5px; font-size: 17px; }
.candidate-information-settings p { margin: 0; }
.candidate-information-settings label {
  display: grid;
  gap: 7px;
  color: #526079;
  font-size: 12px;
  font-weight: 700;
}
.candidate-information-settings textarea,
.candidate-information-settings input,
.candidate-information-settings select {
  width: 100%;
  border: 1px solid #d7deea;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  padding: 11px 12px;
  outline: 0;
}
.candidate-information-settings textarea { min-height: 360px; resize: vertical; }
.candidate-information-settings input[type="color"] { min-height: 42px; padding: 4px 6px; }
.candidate-information-settings textarea:focus,
.candidate-information-settings input:focus,
.candidate-information-settings select:focus {
  border-color: #7794ff;
  box-shadow: 0 0 0 3px rgba(49, 94, 251, .1);
}
.candidate-information-format {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  align-items: end;
}
.candidate-information-format-scope { display: flex; gap: 18px; align-items: center; }
.candidate-information-format-scope > label { flex: 0 0 220px; }
.candidate-information-format-scope > p { color: #725f3d; font-size: 12px; line-height: 1.5; }
.candidate-information-format input:disabled,
.candidate-information-format select:disabled { opacity: .5; cursor: not-allowed; }
.candidate-information-clear-format { justify-self: start; }
.candidate-information-format .check-line {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 8px;
  min-height: 42px;
}
.candidate-information-format .check-line input { width: auto; }
.candidate-information-preview {
  display: grid;
  gap: 8px;
  border: 1px dashed #d7c59f;
  border-radius: 11px;
  background: rgba(255, 255, 255, .7);
  padding: 13px 15px;
}
.candidate-information-preview small {
  color: #8b611a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
#candidate-information-preview-text {
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.candidate-information-settings-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.candidate-information-settings-tab.active { border-color: var(--blue); background: #e8f4ff; color: #145b91; }
.candidate-information-settings-subtab-block {
  display: grid;
  gap: 9px;
  border-left: 3px solid #d8c18e;
  padding: 3px 0 3px 12px;
}
.candidate-information-settings-subtab-block[hidden] { display: none; }
.candidate-information-settings-subtab-block > strong { color: #725f3d; font-size: 12px; }
.candidate-information-settings-subtabs { display: flex; flex-wrap: wrap; gap: 7px; }
.candidate-information-settings-subtab.active { border-color: #b98a2f; background: #fff0c7; color: #68460c; }
.candidate-information-subtab-new { justify-self: start; }
.candidate-information-editor-kind {
  justify-self: start;
  border-radius: 999px;
  background: #f4e6c8;
  color: #77551a;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
}
.candidate-information-new { justify-self: start; }
.candidate-information-settings footer { display: flex; justify-content: space-between; gap: 10px; }

.expenses-dialog { width: min(1280px, calc(100vw - 30px)); }
.expense-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(150px, .7fr) minmax(170px, .7fr) minmax(170px, .7fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f9fa;
}
.expense-form label { display: grid; gap: 7px; color: #526079; font-size: 12px; font-weight: 700; }
.expense-form input,.expense-form select,.expense-form textarea {
  width: 100%; border: 1px solid #d7deea; border-radius: 9px; background: white;
  color: var(--ink); padding: 10px 11px; outline: 0;
}
.expense-form textarea { min-height: 68px; resize: vertical; }
.expense-form .wide { grid-column: 1 / -1; }
.expense-form footer { display: flex; justify-content: flex-end; gap: 9px; }
.expenses-table-wrap { margin-top: 18px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.expenses-table { width: 100%; min-width: 900px; border-collapse: collapse; background: white; }
.expenses-table th,.expenses-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.expenses-table th { background: #f1f4f6; color: #5f6d7e; font-size: 11px; text-transform: uppercase; letter-spacing: .035em; }
.expenses-table tbody tr:last-child td { border-bottom: 0; }
.activity-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.activity-toolbar p { margin: 0; }
.activity-search { flex: 1 1 340px; max-width: 520px; color: var(--muted); font-size: 12px; }
.activity-search input { width: 100%; margin-top: 5px; }
.activity-table-wrap { margin-top: 16px; max-height: min(68vh, 680px); overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.activity-table { width: 100%; min-width: 780px; border-collapse: collapse; background: white; }
.activity-table th,.activity-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.activity-table th { position: sticky; top: 0; z-index: 1; background: #f1f4f6; color: #5f6d7e; font-size: 11px; text-transform: uppercase; letter-spacing: .035em; }
.activity-table tbody tr:last-child td { border-bottom: 0; }
.activity-more-row { display: flex; justify-content: center; margin-top: 12px; }
.activity-date { white-space: nowrap; color: var(--muted); }
.activity-actor,.activity-action { font-weight: 600; color: var(--ink); }
.activity-object { color: #5f6d7e; }
.activity-object-link { color: #0b6f91; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.activity-object-link:hover { color: #07566f; }
.activity-outcome { white-space: nowrap; font-weight: 700; }
.activity-outcome.success { color: #18864b; }
.activity-outcome.failure { color: #b52e3d; }
.expense-name { min-width: 190px; font-weight: 750; }
.expense-date,.expense-amount { white-space: nowrap; }
.expense-amount { font-weight: 750; }
.expense-comment { min-width: 230px; color: #556477; white-space: pre-wrap; }
.expense-status { white-space: nowrap; font-weight: 750; }
.expense-status.paid { color: #167a56; }
.expense-status.unpaid { color: #a13c32; }
.expense-edit { padding: 8px 11px; font-size: 12px; }
.expenses-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 18px; padding: 16px 4px 0; color: #526079; }
.expenses-total strong { color: var(--ink); font-size: 22px; }

.aiup-dialog { width: min(1500px, calc(100vw - 30px)); }
.aiup-settings-form {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(240px, .8fr) minmax(220px, .8fr);
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f9fa;
}
.aiup-settings-form label { display: grid; gap: 7px; color: #526079; font-size: 12px; font-weight: 700; }
.aiup-settings-form input,.aiup-settings-form select {
  width: 100%; border: 1px solid #d7deea; border-radius: 9px; background: white;
  color: var(--ink); padding: 10px 11px; outline: 0;
}
.aiup-settings-form .wide { grid-column: 1 / -1; margin: 0; }
.aiup-webhook {
  display: grid; grid-template-columns: minmax(280px, .7fr) minmax(420px, 1.3fr);
  gap: 18px; align-items: center; margin-top: 18px; padding: 16px;
  border: 1px solid #bce5d3; border-radius: 12px; background: #f1fbf7;
}
.aiup-webhook[hidden] { display: none; }
.aiup-webhook strong,.aiup-webhook small { display: block; }
.aiup-webhook small { margin-top: 5px; color: #5e6d78; line-height: 1.45; }
.aiup-webhook-copy { display: flex; gap: 9px; min-width: 0; }
.aiup-webhook-copy input { min-width: 0; flex: 1; font-family: ui-monospace,Consolas,monospace; font-size: 12px; }
.aiup-analytics { margin-top: 20px; }
.aiup-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.aiup-summary article { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #f7f9fd; }
.aiup-summary span,.aiup-summary small { display: block; color: var(--muted); }
.aiup-summary strong { display: block; margin: 5px 0; font-size: 24px; color: var(--ink); }
.aiup-table-wrap { margin-top: 15px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.aiup-table { width: 100%; min-width: 1250px; border-collapse: collapse; background: white; }
.aiup-table th,.aiup-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.aiup-table th { background: #f1f4f6; color: #5f6d7e; font-size: 10px; text-transform: uppercase; letter-spacing: .035em; }
.aiup-table tbody tr:last-child td { border-bottom: 0; }
.aiup-source { min-width: 180px; font-weight: 750; overflow-wrap: anywhere; }
.aiup-channel { white-space: nowrap; }
.aiup-channel small,.aiup-recommendation small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.aiup-metric { text-align: right!important; white-space: nowrap; }
.aiup-recommendation { min-width: 180px; }
.aiup-action { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.aiup-action.collect { background: #eef2f7; color: #5b6879; }
.aiup-action.increase { background: #e3f7ed; color: #12704d; }
.aiup-action.hold { background: #e8f3ff; color: #1a5f9f; }
.aiup-action.decrease { background: #fff3d8; color: #8a5c0b; }
.aiup-action.pause { background: #fde8e8; color: #a4313b; }
.aiup-method-note { margin: 12px 3px 0; line-height: 1.5; }
.lead-signal-pill { display: inline-flex; margin-top: 6px; padding: 4px 7px; border-radius: 999px; background: #fff0d8; color: #8a5000; font-size: 10px; font-weight: 850; white-space: nowrap; }

@media (max-width: 1320px) {
  .candidate-main-grid { grid-template-columns: 1fr; }
  .candidate-main-grid .calls-panel,
  .candidate-current-information,
  .candidate-side-panel { position: static; }
  .expense-form { grid-template-columns: 1fr 1fr; }
  .aiup-settings-form { grid-template-columns: 1fr 1fr; }
  .aiup-webhook { grid-template-columns: 1fr; }
  .aiup-summary { grid-template-columns: 1fr 1fr; }
  .candidate-information-format { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}
@media (max-width: 680px) {
  .candidate-information-format-scope { align-items: stretch; flex-direction: column; gap: 8px; }
  .candidate-information-format-scope > label { flex-basis: auto; }
  .drawer-panel { width: 100vw; padding: 18px 12px 32px; }
  .questionnaire-section { grid-template-columns: 1fr; padding: 13px; }
  .expense-form { grid-template-columns: 1fr; }
  .expense-form .wide { grid-column: auto; }
  .expenses-total { justify-content: space-between; }
  .aiup-settings-form { grid-template-columns: 1fr; }
  .aiup-settings-form .wide { grid-column: auto; }
  .aiup-summary { grid-template-columns: 1fr; }
  .aiup-webhook-copy { flex-direction: column; }
  .candidate-information-format { grid-template-columns: 1fr; }
}
.mfa-card {
  border-top: 1px solid var(--line, #dbe4ec);
  margin-top: 0;
}

.mfa-secret code,
#mfa-recovery-value {
  display: block;
  margin-top: 8px;
  padding: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: all;
}

/* Keep the report upload and existing actions inside the viewport. */
@media (min-width: 701px) {
  .topbar > div:first-child { flex-shrink: 0; }
  .top-actions { display: flex; flex: 1; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
  .top-actions .search { flex: 1 1 240px; max-width: 360px; order: 0; }
}
@media (max-width: 700px) {
  .top-actions { grid-template-columns: repeat(2,minmax(0,1fr)) 42px; }
  .top-actions .secondary, .top-actions .primary { white-space: normal; }
  #import-call-center { grid-column: 1/-1; grid-row: 4; }
  #new-candidate { grid-column: 2; }
  #profile-button { grid-column: 3; grid-row: 2/span 2; }
}

.call-center-status-cell { color: #40566c; font-weight: 700; overflow-wrap: anywhere; }
.call-center-recording-duration { display: block; margin-top: 4px; color: #61748a; font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 400; }
.history-item { grid-template-columns: 18px minmax(0, 1fr); }
.history-details { grid-column: 2; min-width: 0; margin: 8px 0 0; overflow-wrap: anywhere; }
.callback-time-cell { color: #40566c; font-variant-numeric: tabular-nums; }
.deals-table .telegram-bot-cell { padding: 4px; text-align: center; }
.telegram-bot-button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 3px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.telegram-bot-button:hover:not(:disabled) { background: #e2f3fb; }
.telegram-bot-button:focus-visible { outline: 2px solid #168bc0; outline-offset: 2px; }
.telegram-bot-button:disabled { opacity: .35; cursor: not-allowed; }
.telegram-logo { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #229ed9; }
.telegram-logo::before { content: ""; display: block; width: 16px; height: 16px; background: #fff; clip-path: polygon(3% 42%, 96% 9%, 78% 92%, 50% 69%, 37% 83%, 37% 57%, 76% 29%, 28% 51%); }
#telegram-bot-dialog { width: min(520px, calc(100vw - 24px)); }
#telegram-bot-dialog .muted { margin: 0; line-height: 1.5; }
#telegram-bot-feedback { color: #16764f; font-weight: 700; }
.callback-time-value { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.callback-due-indicator { flex: 0 0 auto; font-size: 12px; line-height: 1; }
.source-analytics-dialog { width: min(1600px, calc(100vw - 28px)); max-height: calc(100vh - 28px); }
.source-analytics-toolbar { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.source-analytics-toolbar p { margin: 0; max-width: 1000px; line-height: 1.5; }
.source-analytics-toolbar button { flex: 0 0 auto; }
.source-analytics-toolbar { justify-content: flex-start; align-items: end; flex-wrap: wrap; padding: 12px; border: 1px solid #dce4e9; background: #f7f9fb; border-radius: 8px; }
.source-analytics-toolbar label { display: grid; gap: 5px; color: #526476; font-size: 11px; }
.source-analytics-toolbar select,.source-analytics-toolbar input { border: 1px solid #c7d3dd; border-radius: 6px; padding: 8px 10px; background: white; color: #20364b; font: inherit; font-size: 12px; }
#source-analytics-dates:not([hidden]) { display: flex; gap: 10px; }
.source-analytics-period-label { color: #263e55; font-size: 13px; font-weight: 700; margin: 12px 0; }
.source-analytics-note { font-size: 12px; line-height: 1.5; color: #6c788b; margin: 12px 0; }
.source-analytics-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.source-analytics-summary .report-card { padding: 12px; border: 1px solid #dce4e9; border-radius: 8px; }
.source-analytics-summary .mint { background: #eaf7f3; }
.source-analytics-summary .positive { background: #eef7f1; }
.source-analytics-summary .negative { background: #fbf0f1; }
.source-analytics-summary .neutral { background: #faf5e9; }
.source-matrix-scroll { overflow: auto; max-height: 60vh; border: 1px solid var(--line); border-radius: 12px; }
.source-matrix-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.source-matrix { width: 100%; min-width: 2160px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 11px; line-height: 1.3; }
.source-matrix caption { text-align: left; padding: 8px; color: #657387; }
.source-matrix th, .source-matrix td { padding: 5px 4px; border-right: 1px solid #e6ebef; border-bottom: 1px solid #e6ebef; text-align: center; overflow-wrap: break-word; }
.source-matrix thead th { position: sticky; z-index: 2; background: #f2f5f8; font-size: 10px; }
.source-matrix thead tr:nth-child(2) th { overflow-wrap: normal; word-break: normal; }
.source-matrix thead tr:first-child th { top: 0; height: 28px; line-height: 16px; }
.source-matrix thead tr:nth-child(2) th { top: 28px; }
.source-matrix th.positive { color: #246442; background: #e5f2e9; }
.source-matrix th.negative { color: #8d424c; background: #f6e7e9; }
.source-matrix th.neutral { color: #816526; background: #f5eedc; }
.source-matrix th.mint { color: #315f57; background: #dcefe8; }
.source-matrix th.other { color: #47576a; background: #edf1f5; }
.source-matrix td.mint.has-value { background: rgba(56, 142, 115, var(--matrix-alpha)); }
.source-matrix td.other.has-value { background: rgba(102, 122, 145, var(--matrix-alpha)); }
.source-matrix tbody tr:nth-child(even) { background: #f8fafb; }
.source-matrix tbody tr:hover { outline: 1px solid #8bb5c8; outline-offset: -1px; }
.source-matrix th,.source-matrix td { border-color: #d7e0e7; }
.source-matrix .source-matrix-name { position: sticky; left: 0; z-index: 1; width: 175px; text-align: left; background: white; box-shadow: 1px 0 #dce3e9; }
.source-matrix thead .source-matrix-name { z-index: 3; background: #f2f5f8; }
.source-matrix-phone { color: #000; }
.source-matrix-received { display: block; margin-top: 3px; color: #6c788b; font-weight: 500; font-size: 10px; }
.source-matrix .source-matrix-total { width: 55px; font-weight: 800; }
.source-matrix td { color: #9ca7b5; font-variant-numeric: tabular-nums; }
.source-matrix td.has-value, .source-matrix td.source-matrix-total { color: #263e55; font-weight: 700; }
.source-matrix td.positive.has-value { background: rgba(48, 147, 86, var(--matrix-alpha)); }
.source-matrix td.negative.has-value { background: rgba(184, 69, 88, var(--matrix-alpha)); }
.source-matrix td.neutral.has-value { background: rgba(194, 155, 66, var(--matrix-alpha)); }
.source-matrix tfoot { font-weight: 800; background: #f2f5f8; }
@media (max-width: 700px) {
  .source-analytics-dialog .candidate-form { padding: 16px; }
  .source-analytics-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .source-analytics-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .source-matrix .source-matrix-name { width: 150px; }
}
.operator-cell-content .row-select,
.operator-cell-content .row-select option,
.operator-cell-content .operator-name { font-weight: 700; }
.call-center-attempts-cell { font-variant-numeric: tabular-nums; }
.call-center-edit-status { border: 0; background: none; padding: 0; text-align: left; font: inherit; cursor: pointer; max-width: 100%; }
.call-center-edit-status:hover { filter: brightness(.95); }
.call-center-manual-label { display: block; margin-top: 4px; color: #61748a; font-size: 10px; font-weight: 400; }
.leadgen-substatus-select { display: block; width: 100%; max-width: 150px; margin-top: 4px; padding: 2px 18px 2px 3px; border: 1px solid transparent; border-radius: 4px; font: inherit; font-size: 10px; font-weight: 700; line-height: 1.25; cursor: pointer; }
.leadgen-substatus-label { display: block; margin-top: 4px; font-size: 10px; font-weight: 700; line-height: 1.3; }
.leadgen-substatus-select.empty { color: #6f7c8e; background: #f1f3f5; border-color: #dfe3e8; font-weight: 500; }
.leadgen-substatus-select.blue,.leadgen-substatus-label.blue { color: #1f5f9f; background: #e7f2ff; border-color: #bdd8f3; }
.leadgen-substatus-select.green,.leadgen-substatus-label.green { color: #24653f; background: #e8f5ec; border-color: #bfddc8; }
.leadgen-substatus-select.yellow,.leadgen-substatus-label.yellow { color: #80600e; background: #fff5cf; border-color: #e9d783; }
.leadgen-substatus-select.red,.leadgen-substatus-label.red { color: #963741; background: #fbe9eb; border-color: #e7bcc1; }
.leadgen-substatus-label { width: fit-content; max-width: 100%; padding: 2px 4px; border-radius: 4px; overflow-wrap: anywhere; }
.candidate-comment-button, .candidate-comment-text { display: block; width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; font: inherit; line-height: 1.5; }
.candidate-comment-button { background: none; border: 0; color: #40566c; padding: 0; cursor: pointer; }
.candidate-comment-scroll { min-height: 1.5em; height: auto; line-height: 1.5; overflow: visible; }
.candidate-comment-scroll:focus-visible { outline: 2px solid #0085a8; outline-offset: 2px; border-radius: 3px; }
.candidate-comment-button:hover { color: #0085a8; }
.candidate-comment-cell { vertical-align: top; }
.deal-phone-details { color: #40566c; font-size: 11.5px; font-weight: 650; }
.deal-phone-link { color: inherit; font: inherit; text-decoration: none; }
.deal-phone-link:hover { text-decoration: underline; }
.deal-phone-link:focus-visible { outline: 2px solid #315efb; outline-offset: 2px; }
.deal-title-line { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.deal-title-line .deal-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-duplicate-badge { flex: 0 0 auto; appearance: none; padding: 2px 5px; border: 1px solid #dbaea6; border-radius: 5px; background: #fff9f7; color: #985246; font: inherit; font-size: 9px; font-weight: 800; line-height: 1.25; white-space: nowrap; cursor: pointer; }
.phone-duplicate-badge:hover { background: #ffe9e4; border-color: #c97f72; }
.phone-duplicate-badge:focus-visible { outline: 2px solid #985246; outline-offset: 1px; }
.phone-duplicate-badge:disabled { cursor: wait; opacity: .7; }
.deal-phone-details { -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.deal-row-number { flex: 0 0 auto; color: #718095; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.deal-selection-stack { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.deal-selection-stack .deal-row-number { line-height: 1; }
.deal-selection-stack input[type="checkbox"] { margin: 0; }
.deals-table .personal-stop-cell { padding: 4px; text-align: center; vertical-align: middle; }
.personal-stop-icon { display: inline-block; position: relative; box-sizing: border-box; width: 24px; height: 24px; border: 2px solid #dc3545; border-radius: 50%; vertical-align: middle; }
.personal-stop-icon::after { content: ""; position: absolute; width: 100%; height: 2px; background: #dc3545; left: 0; top: 50%; transform: translateY(-50%) rotate(-45deg); }
.deals-table th.personal-stop-cell .personal-stop-icon { width: 15px; height: 15px; }
.personal-stop-button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; min-width: 28px; padding: 0; border: 1px solid #c8d0db; border-radius: 4px; background: white; line-height: 1; cursor: pointer; }
.personal-stop-button:not(.marked) .personal-stop-icon { visibility: hidden; }
.personal-stop-button.marked { border-color: transparent; background: transparent; }
.personal-stop-icon.approved { border: 0; color: #16803c; }
.personal-stop-icon.approved::after { content: "✓"; width: auto; height: auto; left: 50%; top: 50%; background: transparent; color: #16803c; font-size: 23px; font-weight: 900; line-height: 1; transform: translate(-50%, -54%); }
.personal-stop-button:focus-visible { outline: 2px solid #0085a8; outline-offset: 2px; }
.personal-stop-button:disabled { opacity: .5; cursor: wait; }
@media (max-width: 900px) {
  .deals-table td.personal-stop-cell { grid-column: 2/4; justify-items: end; padding: 0; }
}
.stage-overview-button.red { color: #85535b; background: #f5eff0; border-color: #e2d2d5; border-left: 3px solid #b3828b; }
.stage-overview-button.red b { color: #85535b; background: #fbf8f9; }
.stage-overview-button.red:hover, .stage-overview-button.red.active { background: #ecdee1; border-color: #bd969e; color: #75434b; }
.stage-pill.red { background: #f5eff0; color: #85535b; }
.stage-overview-button.pale-yellow { color: #756025; background: #fff9df; border-color: #eee2ad; border-left: 3px solid #d5bd62; }
.stage-overview-button.pale-yellow b { color: #756025; background: #fffdf3; }
.stage-overview-button.pale-yellow:hover, .stage-overview-button.pale-yellow.active { color: #655018; background: #fff0bb; border-color: #d5bd62; }
.stage-pill.pale-yellow { color: #756025; background: #fff9df; }
.stage-overview-button.soft-menthol { color: #315f57; background: #eaf7f3; border-color: #cce6dc; border-left-color: #8cbeb0; }
.stage-overview-button.soft-menthol b { color: #315f57; background: #f7fcfa; }
.stage-overview-button.soft-menthol:hover, .stage-overview-button.soft-menthol.active { color: #254e46; background: #d4eee4; border-color: #80b7a6; }
.stage-overview-button.progress-green { color: #24633b; background: #dcefdc; border-color: #b9d9bc; border-left-color: #65a774; }
.stage-overview-button.progress-green b { color: #24633b; background: #f3faf3; }
.stage-overview-button.progress-green:hover, .stage-overview-button.progress-green.active { color: #194e2c; background: #c4e3c8; border-color: #619d6d; }
.mark.attention { color: #c2253b; background: #ffe8ec; font-size: 22px; font-weight: 900; }
.mark-option.attention .mark-symbol { color: #c2253b; font-size: 22px; font-weight: 900; }
.recording-upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.recording-upload label { display: grid; gap: 8px; min-width: 0; width: 100%; font-size: 13px; font-weight: 700; }
.recording-upload input { max-width: 100%; font: inherit; }
.recording-upload-status { width: 100%; font-size: 13px; overflow-wrap: anywhere; }
.recording-comment-form { display: grid; gap: 8px; margin-top: 12px; }
.recording-comment-form label { display: grid; gap: 7px; font-size: 12px; color: #526079; font-weight: 700; }
.recording-comment-form textarea { width: 100%; min-height: 66px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 9px; font: inherit; color: var(--ink); }
.recording-comment-form button { justify-self: end; }
.recording-comment-status { font-size: 12px; color: #526079; }
.candidate-comment-button:focus-visible, .call-center-edit-status:focus-visible { outline: 2px solid #0085a8; outline-offset: 3px; border-radius: 4px; }
.call-center-status-badge { display: inline-block; justify-self: start; max-width: 100%; padding: 4px 7px; border-radius: 7px; line-height: 1.35; font-weight: 700; white-space: normal; overflow-wrap: anywhere; }
.call-center-status-badge.positive { background: #e4f6eb; color: #176b3a; }
.call-center-status-badge.waiting { background: #fff3d6; color: #89520a; }
.call-center-status-badge.negative { background: #fdeaea; color: #9b2c2c; }
.call-center-status-badge.neutral { background: #eef2f7; color: #4a5568; }
.call-center-status-badge.leadgen { background: transparent; color: #c45d00; }
.deals-table .marks-view { gap: 4px; }
.deals-table .mark { min-width: 19px; height: 19px; border-radius: 5px; font-size: 12px; }
.deals-table .mark.heavy { font-size: 15px; }
.deals-table .mark.attention { font-size: 15px; }
.deals-table th.special-marks-heading { font-size: 9px; letter-spacing: 0; padding-left: 4px; padding-right: 4px; }
.deals-table td.special-marks-cell { padding-left: 4px; padding-right: 4px; }
.deals-table .call-center-status-badge { border-radius: 0; border: 0; background: transparent; padding: 0; }
.deals-table tbody tr.created-today { background: #f0f2f4; }
.deals-table tbody tr.created-today:hover { background: #e9ecef; }
.deals-table tbody tr.duplicate-phone { background: #fff1ed; box-shadow: inset 3px 0 #c97868; }
.deals-table tbody tr.duplicate-phone:hover { background: #ffe7e1; }

/* Restricted operator beta workspace: the browser receives and renders only
   the compact assignment list and the approved card sections. */
body.beta-operator-workspace .app-shell { grid-template-columns: minmax(0, 1fr); }
body.beta-operator-workspace {
  min-width: 0;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.beta-operator-workspace .sidebar,
body.beta-operator-workspace .topbar > :first-child,
body.beta-operator-workspace .top-actions > :not(#profile-button):not(#new-candidate),
body.beta-operator-workspace .summary-grid,
body.beta-operator-workspace .stage-overview,
  body.beta-operator-workspace .bulk-toolbar,
  body.beta-operator-workspace .candidate-side-panel { display: none !important; }
body.beta-operator-workspace #history-tab,
body.beta-operator-workspace #max-template-tab { display:none !important; }
body.beta-operator-workspace main { grid-column: 1; padding-top: 22px; }
body.beta-operator-workspace .topbar { justify-content: flex-end; min-height: 42px; }
body.beta-operator-workspace .top-actions { width: 100%; justify-content: flex-end; }
body.beta-operator-workspace .candidate-main-grid { display: block; }
body.beta-operator-workspace .candidate-main-grid .calls-panel {
  position: static;
  margin-top: 16px;
}
body.beta-operator-workspace .drawer-panel { width: min(980px, 98vw); }
body.beta-operator-workspace .questionnaire { grid-template-columns: 1fr 1fr; }
body.beta-operator-workspace .questionnaire-actions { justify-content: flex-end; }
.beta-operator-table-wrap {
  max-height: calc(var(--app-viewport-height, 100vh) - 126px);
  overflow: auto;
  overscroll-behavior: contain;
}
.beta-operator-table { min-width: 900px; table-layout: auto; }
.beta-operator-table th:nth-child(1),.beta-operator-table td:nth-child(1) { width: 42px; }
.beta-operator-table th:nth-child(2),.beta-operator-table td:nth-child(2) { width: 25%; }
.beta-operator-table th:nth-child(3),.beta-operator-table td:nth-child(3) { width: 9%; }
.beta-operator-table th:nth-child(4),.beta-operator-table td:nth-child(4),
.beta-operator-table th:nth-child(5),.beta-operator-table td:nth-child(5) { width: 10%; }
.beta-operator-table th:nth-child(6),.beta-operator-table td:nth-child(6) { width: 16%; }
.beta-operator-table th:nth-child(7),.beta-operator-table td:nth-child(7) { width: auto; }
.beta-operator-table tbody tr { background: #f3f8fc; }
.beta-operator-table tbody tr:hover { background: #e8f3fa; }
.beta-row-number { color: #718095; font-variant-numeric: tabular-nums; }
.beta-candidate-title-cell { min-width: 260px; }
.beta-candidate-title {
  display: block;
  width: 100%;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.beta-candidate-context { display: block; margin-top: 4px; color: #6d7b8d; }
.beta-candidate-phone {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  align-items: center;
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  text-align: left;
  cursor: pointer;
}

.admin-visibility-scope {
  grid-column: 1 / -1;
  display: grid;
  gap: 9px;
  margin: 2px 0 0;
  padding: 11px 12px;
  border: 1px solid #dce3ee;
  border-radius: 10px;
  background: #f8fafc;
}
.admin-visibility-scope[hidden] { display: none; }
.admin-visibility-scope legend { padding: 0 5px; color: #40526a; font-size: 12px; font-weight: 800; }
.admin-visibility-unrestricted,
.admin-visibility-user { display: inline-flex; align-items: center; gap: 7px; color: #53647a; font-size: 12px; font-weight: 700; }
.admin-visibility-unrestricted input,
.admin-visibility-user input { width: auto; margin: 0; }
.admin-visibility-users { display: flex; flex-wrap: wrap; gap: 7px 14px; }

@media print {
  @page { size: A4 landscape; margin: 4mm; }
  body.print-workspace-table {
    background: #fff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body.print-workspace-table .app-shell { display: block !important; }
  body.print-workspace-table .sidebar,
  body.print-workspace-table main > :not(#kanban) { display: none !important; }
  body.print-workspace-table main { display: block !important; padding: 0 !important; }
  body.print-workspace-table #kanban {
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
  body.print-workspace-table #kanban table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    font-size: 5.8pt !important;
    line-height: 1.2 !important;
  }
  body.print-workspace-table #kanban table * {
    box-sizing: border-box !important;
    max-width: 100% !important;
    font-size: inherit !important;
    line-height: inherit !important;
  }
  body.print-workspace-table #kanban colgroup { display: table-column-group !important; }
  body.print-workspace-table #kanban thead { display: table-header-group; }
  body.print-workspace-table #kanban tr {
    break-inside: avoid-page !important;
    page-break-inside: avoid !important;
  }
  body.print-workspace-table #kanban th,
  body.print-workspace-table #kanban td {
    padding: 2px 3px !important;
    border: 1px solid #d8dee7 !important;
    box-shadow: none !important;
    vertical-align: top !important;
  }
  body.print-workspace-table #kanban th {
    position: static !important;
    background: #f0f3f8 !important;
    color: #67748a !important;
  }
  body.print-workspace-table #kanban td { background: transparent !important; }
  body.print-workspace-table #kanban td,
  body.print-workspace-table #kanban td * {
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }
  body.print-workspace-table #kanban input,
  body.print-workspace-table #kanban .telegram-bot-button,
  body.print-workspace-table #kanban .callback-due-indicator { display: none !important; }
  body.print-workspace-table #kanban button,
  body.print-workspace-table #kanban select {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    appearance: none;
  }
  body.print-workspace-table #kanban .candidate-comment-scroll {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
  }
  body.print-workspace-table #kanban .candidate-comment-button,
  body.print-workspace-table #kanban .candidate-comment-text {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: pre-wrap !important;
    -webkit-line-clamp: unset !important;
  }
  body.print-workspace-table #kanban .date-cell { white-space: normal !important; }
  body.print-workspace-table #kanban .lead-signal-pill,
  body.print-workspace-table #kanban .call-center-status-badge,
  body.print-workspace-table #kanban .leadgen-substatus-label { white-space: normal !important; }
  body.print-workspace-table #kanban .marks-view,
  body.print-workspace-table #kanban .mark {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 !important;
  }
}
.beta-candidate-phone:hover { color: #245bd6; text-decoration: underline; }
.beta-candidate-phone:focus-visible { outline: 2px solid #315efb; outline-offset: 3px; border-radius: 2px; }
.beta-leadgen-status-cell .leadgen-substatus-select { max-width: 100%; margin-top: 0; }
.beta-timezone-cell { font-weight: 800; color: #315f72; white-space: nowrap; }
.beta-comment-cell { min-width: 300px; vertical-align: top !important; }
.beta-comment-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  overflow: hidden;
  resize: none;
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #fff;
  color: #33475b;
  font: inherit;
  line-height: 1.45;
}
.beta-comment-input:focus { outline: 2px solid rgba(49,94,251,.18); border-color: #7794ff; }
.beta-auto-grow-field {
  min-height: 54px !important;
  overflow: hidden;
  resize: none !important;
}
.beta-call-recordings { display: grid; gap: 10px; }
.beta-call-recordings h3 { margin: 0 0 4px; }
.beta-call-recording { display: grid; gap: 6px; }
.beta-call-recording audio { width: min(100%, 560px); }
.call-item audio[hidden] { display: none; }
.call-item .call-delete { float: right; margin: 0 0 6px 10px; padding: 3px 7px; font-size: 11px; color: #9b4450; }
.call-recording-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.call-recording-speeds { display: inline-flex; align-items: center; gap: 4px; }
.call-recording-speeds button { min-width: 38px; padding: 7px 8px; font-size: 12px; }
.call-recording-speeds button.active { background: #e8efff; border-color: #8aa8ec; color: #244ca0; font-weight: 700; }

@media (max-width: 840px) {
  body.beta-operator-workspace main {
    padding: 12px max(10px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }
  body.beta-operator-workspace .topbar { min-height: 44px; }
  body.beta-operator-workspace #profile-button { min-width: 44px; min-height: 44px; }
  body.beta-operator-workspace .drawer-panel {
    box-sizing: border-box;
    width: 100vw;
    max-width: none;
    height: var(--app-viewport-height, 100dvh);
    padding: max(14px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    overscroll-behavior: contain;
    transition: transform .2s;
  }
  body.beta-operator-workspace .questionnaire,
  body.beta-operator-workspace .questionnaire-section { grid-template-columns: 1fr; }
  body.beta-operator-workspace .questionnaire input,
  body.beta-operator-workspace .questionnaire select,
  body.beta-operator-workspace .questionnaire textarea,
  body.beta-operator-workspace .beta-comment-input,
  body.beta-operator-workspace .leadgen-substatus-select { font-size: 16px; }
  body.beta-operator-workspace .questionnaire button,
  body.beta-operator-workspace .drawer-header button { min-width: 44px; min-height: 44px; }
  .beta-operator-table-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .deals-table.beta-operator-table {
    display: block;
    width: 100%;
    min-width: 0;
    background: transparent;
  }
  .deals-table.beta-operator-table thead { display: none; }
  .deals-table.beta-operator-table tbody { display: grid; gap: 12px; }
  .deals-table.beta-operator-table tbody tr {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f3f8fc;
    box-shadow: 0 3px 10px rgba(33,48,75,.035);
  }
  .deals-table.beta-operator-table tbody tr:hover { background: #e8f3fa; }
  .deals-table.beta-operator-table td {
    display: grid;
    grid-column: 1 / -1;
    width: auto !important;
    min-width: 0;
    gap: 4px;
    padding: 0;
    border: 0;
  }
  .deals-table.beta-operator-table td.beta-row-number {
    grid-column: 1;
    grid-row: 1;
    align-content: start;
    padding-top: 4px;
  }
  .deals-table.beta-operator-table td.beta-candidate-title-cell {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
  .deals-table.beta-operator-table td.beta-created-cell,
  .deals-table.beta-operator-table td.beta-updated-cell,
  .deals-table.beta-operator-table td.beta-timezone-cell,
  .deals-table.beta-operator-table td.beta-leadgen-status-cell,
  .deals-table.beta-operator-table td.beta-comment-cell {
    grid-template-columns: minmax(76px, 24%) minmax(0, 1fr);
    align-items: start;
  }
  .deals-table.beta-operator-table td::before {
    color: #8994a7;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.4;
    text-transform: uppercase;
  }
  .deals-table.beta-operator-table td.beta-created-cell::before { content: "Создано"; }
  .deals-table.beta-operator-table td.beta-updated-cell::before { content: "Изменено"; }
  .deals-table.beta-operator-table td.beta-timezone-cell::before { content: "Разница с Москвой"; }
  .deals-table.beta-operator-table td.beta-leadgen-status-cell::before { content: "Статус"; }
  .deals-table.beta-operator-table td.beta-comment-cell::before { content: "Комментарий"; }
  .beta-candidate-title { min-height: 44px; text-align: left; }
  .beta-candidate-phone {
    display: inline-flex;
    width: fit-content;
    min-height: 44px;
    align-items: center;
    font-size: 16px;
  }
  .beta-leadgen-status-cell .leadgen-substatus-select { width: 100%; min-height: 44px; }
  .beta-comment-cell { min-width: 0; }
  .beta-comment-input { min-height: 88px; }
  .beta-call-recording audio { width: 100%; }
}
@media (max-width: 480px) {
  .deals-table.beta-operator-table td.beta-created-cell,
  .deals-table.beta-operator-table td.beta-updated-cell,
  .deals-table.beta-operator-table td.beta-timezone-cell,
  .deals-table.beta-operator-table td.beta-leadgen-status-cell,
  .deals-table.beta-operator-table td.beta-comment-cell { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  #call-center-status-filter { grid-column: 1/-1; }
  #telegram-bot-open { grid-column: 1/3; }
  #import-call-center { grid-row: auto; }
}
@media (min-width: 901px) {
  .deals-table th:nth-child(n), .deals-table td:nth-child(n),
  .deals-table.admin-domain-table th:nth-child(n), .deals-table.admin-domain-table td:nth-child(n),
  .deals-table.operator-timezone-table th:nth-child(n), .deals-table.operator-timezone-table td:nth-child(n) { width: auto; }
  .deals-table { min-width: 1050px; }
  .deals-table.admin-domain-table { min-width: 1180px; }
  .deals-table.operator-timezone-table { min-width: 1120px; }
  .deals-table td, .deals-table th { padding-left: 6px; padding-right: 6px; }
  .deals-table td.candidate-comment-cell { font-size: 13px; color: #263e55; }
  .deals-table .candidate-comment-button { color: #263e55; }
  .deals-table td.telegram-bot-cell, .deals-table th.telegram-bot-cell { padding: 4px; }
}
@media (max-width: 900px) {
  .deals-table colgroup { display: none; }
  .deals-table td.call-center-status-cell,
  .deals-table td.call-center-attempts-cell,
  .deals-table td.callback-time-cell,
  .deals-table td.candidate-comment-cell { grid-column: 2/4; }
  .deals-table td.call-center-status-cell::before { content: "Статус колл-центра"; }
  .deals-table td.call-center-attempts-cell::before { content: "Попытки"; }
  .deals-table td.callback-time-cell::before { content: "Когда перезвонить"; }
  .deals-table td.call-center-status-cell::before,
  .deals-table td.call-center-attempts-cell::before,
  .deals-table td.callback-time-cell::before,
  .deals-table td.candidate-comment-cell::before {
    color: #8994a7; font-size: 9px; font-weight: 800;
    letter-spacing: .04em; text-transform: uppercase;
  }
  .deals-table td.candidate-comment-cell::before { content: "Комментарий"; }
  .deals-table td.telegram-bot-cell { grid-column: 2/4; justify-items: start; padding: 0; }
  .telegram-bot-button { width: 40px; height: 40px; }
}
.csv-reports-dialog { width: min(1500px, 97vw); }
.csv-report-toolbar { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.csv-report-toolbar label { display: grid; gap: 6px; flex: 1 1 210px; min-width: 0; color: #53647a; font-size: 12px; font-weight: 700; }
.csv-report-toolbar input, .csv-report-toolbar select { width: 100%; min-height: 38px; border: 1px solid #d3dde7; border-radius: 5px; padding: 8px; font: inherit; color: #172c43; background: white; }
.csv-report-toolbar button { flex: 0 0 auto; }
#csv-report-message { display: block; min-height: 20px; color: #315f57; font-size: 13px; }
.csv-report-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.csv-report-summary article { padding: 10px 14px; border: 1px solid #dbe4ec; border-radius: 5px; background: #f7fafc; }
.csv-report-summary small { display: block; color: #607086; }
.csv-report-summary strong { display: block; margin-top: 4px; font-size: 22px; }
.csv-report-scroll { overflow: auto; max-height: 55vh; border: 1px solid #dbe4ec; }
.csv-report-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.csv-report-table th { position: sticky; top: 0; background: #edf3f8; z-index: 1; text-align: left; }
.csv-report-table td, .csv-report-table th { padding: 8px 10px; border-bottom: 1px solid #e3e9ef; vertical-align: top; }
.csv-report-table td { min-width: 100px; max-width: 250px; overflow-wrap: anywhere; }
.csv-report-table td:first-child { min-width: 35px; }
.csv-report-table tbody tr:nth-child(even) { background: #f8fafc; }
.csv-report-table .csv-comment { min-width: 230px; white-space: pre-wrap; }
.csv-comment textarea { width: 100%; min-height: 64px; border: 1px solid #ced9e4; border-radius: 4px; padding: 6px; resize: vertical; font: inherit; }
.csv-comment button { padding: 5px 8px; margin-top: 5px; font-size: 11px; }
.csv-sort { border: 0; border-radius: 0; padding: 0; background: transparent; font: inherit; font-weight: 700; color: #17364e; text-align: left; cursor: pointer; }
.csv-sort:focus-visible { outline: 2px solid #0085a8; outline-offset: 3px; }
.csv-report-pagination { display: flex; align-items: center; justify-content: end; gap: 14px; margin-top: 12px; font-size: 12px; }
.leadgen-report-dialog { width: min(880px, calc(100vw - 24px)); }
.call-guard-candidate-link { display: grid; gap: 8px; margin-bottom: 18px; }
.call-guard-candidate-link label { color: var(--muted); font-size: var(--font-label); font-weight: 700; }
.call-guard-link-actions { display: flex; gap: 10px; }
.call-guard-link-actions input { flex: 1; min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; background: #f7f9fd; color: var(--ink); font: inherit; }
.call-guard-link-actions button { flex-shrink: 0; }
.call-guard-iphone-guide { padding: 16px 18px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f7f9fd; }
.call-guard-iphone-guide h4 { margin: 0 0 10px; font-size: 17px; }
.call-guard-iphone-guide ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--ink); line-height: 1.5; }
@media (max-width: 720px) {
  .call-guard-panel { padding: 16px; }
  .call-guard-heading,.call-guard-phone-heading { align-items:flex-start; flex-direction:column; }
  .call-guard-phone-options,.call-guard-number-form { grid-template-columns:1fr; }
  .call-guard-number-item { align-items:flex-start; flex-direction:column; }
  .call-guard-link-actions { flex-direction: column; }
}
.leadgen-report-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 18px 0; }
.leadgen-report-card { min-height: 104px; display: grid; align-content: center; gap: 5px; padding: 16px; border: 1px solid #d8e0e8; border-radius: 9px; background: #f8fafc; color: #24384c; text-align: left; }
button.leadgen-report-card { width: 100%; cursor: pointer; font: inherit; }
.leadgen-report-card small,.leadgen-report-card span { color: #66778a; font-size: 12px; }
.leadgen-report-card strong { font-size: 30px; line-height: 1; }
.leadgen-report-card.approved { background: #eef9f2; border-color: #b8dfc5; }
.leadgen-report-card.approved strong { color: #188348; }
.leadgen-report-card.stop { background: #fff2f3; border-color: #efc5ca; }
.leadgen-report-card.stop strong { color: #bf3142; }
.leadgen-report-card.yesterday-stop { background: #fff8ee; border-color: #edcfaa; }
.leadgen-report-card.yesterday-stop strong { color: #ad5b18; }
.leadgen-report-list { margin-top: 16px; padding: 15px; border: 1px solid #d8e0e8; border-radius: 9px; background: #fbfcfd; }
.leadgen-report-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.leadgen-report-list-heading strong,.leadgen-report-list-heading small { display: block; }
.leadgen-report-list-heading small { margin-top: 3px; color: #66778a; }
#leadgen-report-text { min-height: 110px; max-height: 48vh; overflow: auto; margin: 0; padding: 14px; border: 1px solid #dce3e9; border-radius: 6px; background: white; color: #142a3e; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.55 ui-monospace, Consolas, monospace; }

/* Text remains selectable for every role, including read-only workspaces. */
.deals-table td,
.deal-title,
.deal-subtitle,
.candidate-comment-button,
.candidate-comment-text,
.drawer-panel,
.candidate-form,
#leadgen-report-text {
  -webkit-user-select: text;
  user-select: text;
}
@media (max-width: 700px) {
  .csv-report-summary { grid-template-columns: repeat(2, 1fr); }
  .csv-reports-dialog .candidate-form { padding: 16px; }
  .leadgen-report-summary { grid-template-columns: 1fr; }
  .leadgen-report-list-heading { align-items: stretch; flex-direction: column; }
}

/* Keep the desktop table layout in browser print previews, whose viewport is often mobile-sized. */
@media print {
  body.print-workspace-table #kanban .deals-table {
    display: table !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }
  body.print-workspace-table #kanban .deals-table colgroup { display: table-column-group !important; }
  body.print-workspace-table #kanban .deals-table thead { display: table-header-group !important; }
  body.print-workspace-table #kanban .deals-table tbody {
    display: table-row-group !important;
  }
  body.print-workspace-table #kanban .deals-table tr {
    display: table-row !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
  body.print-workspace-table #kanban .deals-table th,
  body.print-workspace-table #kanban .deals-table td,
  body.print-workspace-table #kanban .deals-table td.empty-marks,
  body.print-workspace-table #kanban .deals-table.admin-domain-table td.empty-marks {
    display: table-cell !important;
    grid-column: auto !important;
    grid-row: auto !important;
    width: auto !important;
    min-width: 0 !important;
  }
  body.print-workspace-table #kanban .deals-table td::before { display: none !important; content: none !important; }
  body.print-workspace-table #kanban .source-domain-badge {
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }
}

/* Keep the intake automation stage neutral after all theme overrides. */
.stage-overview-button.gray { border-left: 3px solid #8a939f; background: #f1f3f5; color: #525b66; }
.stage-overview-button.gray b { color: #525b66; background: #fff; }
.stage-overview-button.gray:hover,
.stage-overview-button.gray.active { background: #e2e6ea; border-color: #aab1b9; color: #343b43; }
.stage-pill.gray { background: #8a939f; color: #fff; }

body.alex-operator-workspace .alex-stage-overview { padding: 10px; }
body.alex-operator-workspace .alex-stage-overview-items {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
}
body.alex-operator-workspace .alex-stage-button {
  min-height: 66px;
  padding: 10px 12px;
  border-width: 1px 1px 1px 4px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .015em;
}
body.alex-operator-workspace .alex-stage-button span {
  display: block;
  -webkit-line-clamp: unset;
  line-height: 1.25;
}
body.alex-operator-workspace .alex-stage-button b {
  min-width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 12px;
}
body.alex-operator-workspace .alex-stage-button.alex-gray {
  color: #4f5965; background: #eef1f4; border-color: #c7cdd4; border-left-color: #7d8792;
}
body.alex-operator-workspace .alex-stage-button.alex-yellow {
  color: #755913; background: #fff4c9; border-color: #ead58a; border-left-color: #d6a91f;
}
body.alex-operator-workspace .alex-stage-button.alex-orange {
  color: #864b14; background: #ffead6; border-color: #ecc39e; border-left-color: #dc7d27;
}
body.alex-operator-workspace .alex-stage-button.alex-red {
  color: #8c3640; background: #f9e5e8; border-color: #e2b8bd; border-left-color: #bd5965;
}
body.alex-operator-workspace .alex-stage-button.alex-green {
  color: #235f38; background: #dff0e3; border-color: #b6d8bf; border-left-color: #4d9a65;
}
body.alex-operator-workspace .alex-stage-button:is(:hover, .active) {
  color: #20334b;
  border-color: #6f8ba5;
  box-shadow: 0 0 0 2px rgba(50, 94, 137, .14);
  filter: saturate(1.08) brightness(.98);
}
@media (max-width: 1100px) {
  body.alex-operator-workspace .alex-stage-overview-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.alex-operator-workspace .alex-stage-button:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  body.alex-operator-workspace .alex-stage-overview-items { grid-template-columns: 1fr; }
  body.alex-operator-workspace .alex-stage-button:last-child { grid-column: auto; }
}

.numbers-dialog { width: min(1180px, 96vw); max-height: 92vh; }
.numbers-dialog .candidate-form { gap: 16px; }
.numbers-toolbar, .numbers-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.numbers-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line, #dde3e9); border-radius: 12px; }
.numbers-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.numbers-table th { text-align: left; background: #f4f6f9; color: #566171; }
.numbers-table th, .numbers-table td { padding: 14px 12px; vertical-align: top; border-bottom: 1px solid #e8edf2; }
.numbers-table td:first-child { white-space: nowrap; }
.numbers-table td small { display: block; margin-top: 6px; }
.numbers-table td:last-child { display: flex; flex-wrap: wrap; gap: 6px; }
.numbers-table a { display: inline-block; margin-top: 5px; }
.numbers-table button { font-size: 12px; padding: 8px 10px; }
.number-status { display: inline-block; border-radius: 7px; padding: 5px 8px; background: #eef1f5; color: #536074; }
.number-status.flagged, .number-status.error { color: #933b2b; background: #fff0ea; }
.number-status.no_reports, .number-status.useful { color: #245684; background: #edf4fc; }
.numbers-dialog .number-search-link { display: inline-flex; align-items: center; padding: 8px 10px; margin: 0; border: 1px solid #dce2e8; border-radius: 9px; text-decoration: none; font-size: 12px; }
.numbers-section { padding-top: 14px; border-top: 1px solid #e3e8ed; }
.numbers-section h3 { margin: 0 0 12px; }
.numbers-section p { line-height: 1.55; }
.numbers-section textarea { display: block; width: 100%; margin: 12px 0; resize: vertical; }
.numbers-settings label { display: flex; gap: 8px; align-items: center; }
.numbers-settings .numbers-consent { flex: 1 1 400px; }
.numbers-consent input { width: auto; }
.numbers-progress { padding: 10px 14px; border-radius: 8px; background: #edf4fc; }
.numbers-capability-note { padding: 12px 16px; border-radius: 8px; background: #f3f5f7; color: #526071; }
@media(max-width: 700px) {
  .numbers-dialog { width: 97vw; }
  .numbers-toolbar { align-items: stretch; }
  .numbers-table { min-width: 800px; }
  .numbers-settings { align-items: flex-start; }
}

/* Compact, keyboard-accessible call transcript strips. */
.candidate-dialogue-item { margin: 8px 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.candidate-dialogue-item:first-child { border-top: 1px solid var(--line); padding-top: 0; }
.candidate-dialogue-item > summary { cursor: pointer; padding: 12px; background: #f3f6fa; font-weight: 600; }
.candidate-dialogue-item > summary:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; }
.candidate-dialogue-body { padding: 12px; }
.candidate-dialogue-body p { margin: 8px 0; }
