/* OFFICE PLUS — design of the reference system (office-system-lime): top nav, process sidebar, expandable cards, pill filters */
:root {
  --red: #e31e24;
  --red-dark: #c4161c;
  --navy: #2b5797;
  --navy-dark: #1f4378;
  --navy-soft: #eaf1fb;
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #e4e9f0;
  --line-strong: #cfd8e3;
  --text: #1c2736;
  --muted: #6b7a8f;
  --ok: #18a058;
  --warn: #f08c00;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 40, 80, .05), 0 2px 8px rgba(20, 40, 80, .04);
  --font: "Rubik", "Segoe UI", Tahoma, Arial, sans-serif;
  --c-blue: #3b6fd8; --c-green: #22a06b; --c-orange: #f08c00; --c-purple: #8e5bd8;
  --c-pink: #e0559b; --c-teal: #14a3a3; --c-gray: #6b7a90; --c-red: #e31e24;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.header { position: sticky; top: 0; z-index: 30; background: #fff; }
.header::after { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--navy), #7a5aa8 45%, var(--red)); }
.header-in { max-width: 1240px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; flex-shrink: 0; }
.brand img { height: 34px; display: block; }
.brand .sep { width: 1px; height: 26px; background: var(--line-strong); }
.brand b { color: var(--navy); font-weight: 800; letter-spacing: .3px; font-size: 15px; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; align-items: center; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; padding: 7px 12px; border-radius: 10px; color: #34445a; font-weight: 500; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.nav a:hover { background: #f2f5f9; }
.nav a.active { background: var(--navy-soft); color: var(--navy); font-weight: 700; }
/* icon toolbar (icon above label) */
.nav a.tool { flex-direction: column; gap: 2px; min-width: 64px; padding: 5px 8px 4px; border: 1px solid transparent; }
.nav a.tool .ic { font-size: 21px; line-height: 1.15; height: 24px; display: grid; place-items: center; }
.nav a.tool .ic svg { width: 22px; height: 22px; }
.nav a.tool .lb { font-size: 12px; }
.nav a.tool:hover { background: #f5f8fc; border-color: var(--line); }
.nav a.tool.active { background: var(--navy-soft); border-color: #c9d9f0; box-shadow: inset 0 -3px 0 var(--red); }
.nav .dot { position: absolute; top: 2px; left: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 700; }
/* main areas (סליבי אופיס / בית סוכן / סליבי תפעול) + the office's tabs under them */
.areas { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.areas::-webkit-scrollbar { display: none; }
.areas .area { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: #34445a; font-weight: 600; white-space: nowrap; text-decoration: none; background: #fff; }
.areas .area:hover { background: #f5f8fc; }
.areas .area.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.subnav-in { max-width: 1240px; margin: 0 auto; padding: 0 16px 6px; display: flex; }
.head-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: none; background: none; border-radius: 10px; cursor: pointer; color: #4a5a70; }
.icon-btn:hover { background: #f2f5f9; }
.menu { position: relative; }
.menu-pop { position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(20,40,80,.14); padding: 6px; z-index: 40; }
.menu-pop a, .menu-pop button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; border: none; background: none; cursor: pointer; text-align: right; color: var(--text); text-decoration: none; }
.menu-pop a:hover, .menu-pop button:hover { background: #f2f5f9; }
.menu-pop hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
.menu-pop .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-pop .who small { color: var(--muted); display: block; }

/* ---------- layout ---------- */
.page { max-width: 1240px; margin: 0 auto; padding: 18px 16px 80px; }
.page.narrow { max-width: 900px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.cols { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.stack { display: grid; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
/* ---- the new look (data-theme=new, chosen per browser in the user menu): line icons, softer cards, a calmer header */
.ico { width: 20px; height: 20px; display: inline-block; vertical-align: -4px; flex: none; }
h1 .ico { width: 26px; height: 26px; vertical-align: -5px; color: var(--navy); }
.btn .ico { width: 17px; height: 17px; vertical-align: -3px; }
.areas .area .ico { width: 16px; height: 16px; vertical-align: -3px; }
[data-theme=new] .areas .area { display: inline-flex; align-items: center; gap: 6px; }
[data-theme=new] .areas .area.active { background: linear-gradient(135deg, #1d3a66, #35609f); box-shadow: 0 3px 10px rgba(29, 58, 102, .22); }
[data-theme=new] .nav a.tool { min-width: 66px; gap: 3px; }
[data-theme=new] .nav a.tool .ic { width: 38px; height: 32px; border-radius: 11px; background: #f1f5fb; color: #33507c; transition: background .15s, color .15s; }
[data-theme=new] .nav a.tool:hover { background: transparent; border-color: transparent; }
[data-theme=new] .nav a.tool:hover .ic { background: #e4ecf8; }
[data-theme=new] .nav a.tool.active { background: transparent; border-color: transparent; box-shadow: none; }
[data-theme=new] .nav a.tool.active .ic { background: linear-gradient(135deg, #1d3a66, #35609f); color: #fff; box-shadow: 0 4px 10px rgba(29, 58, 102, .25); }
[data-theme=new] .nav a.tool.active .lb { color: var(--navy); font-weight: 700; }
[data-theme=new] .nav a.tool .ic img { filter: none; }
[data-theme=new] .card { border-radius: 16px; border-color: #e6ebf2; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 18px rgba(16, 24, 40, .05); }
[data-theme=new] .btn { border-radius: 10px; }
[data-theme=new] .header::after { height: 2px; }
.theme-btn { border: 1px solid #d9c9f3; background: linear-gradient(135deg, #f6f1ff, #eef4ff); color: #4b2e8f; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.theme-btn:hover { background: #ece3ff; }
@media (max-width: 900px) { .theme-btn span { display: none; } .theme-btn { padding: 6px 9px; } }
.theme-strip { position: fixed; bottom: 14px; left: 14px; z-index: 40; background: #1d3a66; color: #fff; border-radius: 999px; padding: 6px 8px 6px 14px; font-size: 13px; display: flex; align-items: center; gap: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.theme-strip button { background: #fff; color: #1d3a66; border: 0; border-radius: 999px; padding: 4px 10px; font: inherit; font-weight: 600; cursor: pointer; }
@media print { .theme-strip { display: none; } }
.card.pad, .pad { padding: 16px; }
.card h3 { font-size: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; }
.empty { padding: 26px; text-align: center; color: var(--muted); }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; font-weight: 500; white-space: nowrap; text-decoration: none !important; color: var(--text); }
.btn:hover { border-color: var(--navy); background: #fafcff; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.btn.red:hover { background: var(--red-dark); }
.btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.btn.navy:hover { background: var(--navy-dark); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: #f2f5f9; }
.btn.danger { color: var(--red); border-color: #f3c4c6; }
.btn.danger:hover { background: #fff3f3; border-color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; background: #fff; min-width: 0; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(43, 87, 151, .14); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--navy); padding: 0; }
textarea { resize: vertical; min-height: 80px; }
label.f { display: grid; gap: 5px; font-weight: 600; font-size: 13px; color: #3a4a60; }
label.f .req { color: var(--red); }
.flabel { font-weight: 600; font-size: 13px; color: #3a4a60; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 500; }
.search { position: relative; }
.search input { padding-inline-start: 38px; height: 44px; border-radius: 12px; }
.search::before { content: "🔍"; position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .7; }

/* ---------- pills ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pills .lbl { font-weight: 700; font-size: 13px; color: #3a4a60; margin-inline-end: 2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; color: var(--text); }
.pill:hover { border-color: var(--navy); }
.pill.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.pill.urgent.on { background: var(--red); border-color: var(--red); }
.pill select { border: none; padding: 0; background: none; width: auto; font-size: 13px; color: inherit; }
.pill select:focus { box-shadow: none; }
.cdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.st { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid; white-space: nowrap; }
.st-open { color: #c4161c; background: #fdecec; border-color: #f6c9cb; }
.st-today { color: #7a3fc4; background: #f3ecfd; border-color: #ddc9f7; }
.st-in_progress { color: #b56500; background: #fff4e3; border-color: #f7d9a8; }
.st-done { color: #127a43; background: #e6f6ed; border-color: #b6e3c8; }
.st-lead { color: var(--navy); background: var(--navy-soft); border-color: #c9d9f0; }
.st-closed { color: var(--muted); background: #f1f3f6; border-color: var(--line-strong); }
.urgent-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: var(--red); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: #f2f5f9; font-size: 12px; color: #4a5a70; white-space: nowrap; }

/* ---------- avatar ---------- */
.av { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex-shrink: 0; position: relative; }
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.av.lg { width: 56px; height: 56px; font-size: 20px; }
.av.xl { width: 96px; height: 96px; font-size: 32px; }
.av.xs { width: 22px; height: 22px; font-size: 10px; }
.av.on::after { content: ""; position: absolute; bottom: 0; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); border: 2px solid #fff; }
.who-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; border-radius: 999px; background: var(--navy-soft); font-weight: 600; font-size: 13px; color: var(--navy-dark); }

/* ---------- sidebar (processes / projects) ---------- */
.side h3 { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px 8px; }
.side h3 a, .side h3 button { font-size: 12px; font-weight: 500; }
.side ul { list-style: none; margin: 0; padding: 0 8px 10px; }
.side li a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 500; }
.side li a:hover { background: #f2f5f9; }
.side li a.on { background: var(--navy); color: #fff; font-weight: 700; }
.side li a .n { margin-inline-start: auto; min-width: 24px; text-align: center; font-size: 12px; padding: 1px 7px; border-radius: 999px; background: #eef2f7; color: #4a5a70; white-space: nowrap; }
.side li a.on .n { background: rgba(255,255,255,.22); color: #fff; }
.side li a .closed { opacity: .55; }
.side li.sub a { padding-inline-start: 26px; font-size: 13.5px; }
.side li a.drop { outline: 2px dashed var(--red); background: #fff1f1; }
#list .item[draggable=true]:not(.open) .item-sum { cursor: grab; }

/* ---------- task / lead cards ---------- */
.item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .15s; scroll-margin-top: 72px; }
.item:hover { border-color: #b9c9de; }
.item.open { border-color: var(--navy); box-shadow: 0 4px 18px rgba(43,87,151,.12); }
.item.is-urgent { border-inline-start: 4px solid var(--red); }
.item-sum { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; cursor: pointer; }
.item-sum .t { font-weight: 700; font-size: 15px; }
.item-sum .c { color: #4a5a70; font-size: 13px; }
.item-sum .badges { display: flex; gap: 6px; align-items: flex-start; }
.item-sum .meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--muted); }
.item-sum .meta .overdue { color: var(--red); font-weight: 600; }
.item-body { border-top: 1px solid var(--line); padding: 14px 16px 16px; background: #fbfcfe; border-radius: 0 0 var(--radius) var(--radius); }
.item-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.detail { display: grid; grid-template-columns: 1fr 340px; gap: 14px; align-items: start; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.box + .box { margin-top: 12px; }
.box h4 { font-size: 15px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; margin: 10px 0; }
.kv div small { display: block; color: var(--muted); font-size: 12px; }
.kv div b { font-weight: 600; word-break: break-word; }
.voice { background: var(--navy-soft); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.voice audio { width: 100%; height: 36px; margin: 6px 0; }
.voice p { margin: 4px 0 0; font-size: 13px; white-space: pre-wrap; }
.desc { white-space: pre-wrap; line-height: 1.6; margin: 8px 0; }
details.edit { margin: 10px 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
details.edit summary { padding: 9px 12px; cursor: pointer; font-weight: 600; }
details.edit .form-grid { padding: 4px 12px 12px; }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 340px; overflow: auto; }
.log li { font-size: 13px; border-inline-start: 3px solid var(--navy-soft); padding: 2px 10px; }
.log li b { font-weight: 600; }
.log li small { display: block; color: var(--muted); font-size: 11px; }
.log li p { margin: 2px 0; white-space: pre-wrap; }
.comments li { border-color: #ffe3c2; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.steps label { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: #f6f8fb; cursor: pointer; }
.steps label.done { background: #e9f7ef; }
.steps label.done span { text-decoration: line-through; color: var(--muted); }
.steps small { display: block; color: var(--muted); font-size: 11px; }
.progress-mini { display: inline-flex; align-items: center; gap: 4px; }
.progress-mini i { display: inline-block; width: 44px; height: 6px; border-radius: 3px; background: #e7ecf3; overflow: hidden; position: relative; }
.progress-mini i b { position: absolute; inset: 0 auto 0 0; background: var(--ok); }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.files li { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 10px; background: #f6f8fb; }
.files li a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files li a.thumb { flex: none; display: flex; align-items: center; justify-content: center; width: 84px; height: 108px; border-radius: 8px; overflow: hidden; background: #fff; border: 1px solid #dfe5ee; }
.files li a.thumb img { width: 100%; height: 100%; object-fit: cover; }
.files li a.thumb canvas { display: none; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.files li a.thumb canvas.ok { display: block; }
.files li a.thumb canvas.ok + .ficon { display: none; }
.files li .ficon { font-size: 40px; line-height: 1; text-align: center; }
.files li a { font-size: 15px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; margin-top: 10px; padding: 22px 12px; border: 2px dashed #9fb3cc; border-radius: 14px; background: #f6f9fd; cursor: pointer; text-align: center; transition: background .15s, border-color .15s; }
.drop:hover, .drop.over { background: #e6f0fb; border-color: #2c6db5; }
.drop .drop-ic { font-size: 40px; line-height: 1; }
.drop b { font-size: 15px; }
.files li { flex-wrap: wrap; }
.bafi { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.bafi.ok { background: #e3f6ea; color: #17803d; }
.bafi.bad { background: #fde8e8; color: #b42318; white-space: normal; }

/* ---------- smart record ---------- */
.smart { display: grid; place-items: center; gap: 2px; padding: 18px; border-radius: var(--radius); border: none; width: 100%; cursor: pointer;
  background: linear-gradient(110deg, var(--red-dark), var(--red)); color: #fff; text-align: center; box-shadow: 0 6px 18px rgba(227,30,36,.25); }
.smart b { font-size: 17px; }
.smart span { opacity: .9; font-size: 13px; }
.smart.rec { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(227,30,36,.18); } }
.rec-btn { width: 100%; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 600; }
.rec-btn.rec { border-color: var(--red); color: var(--red); background: #fff6f6; }
.divider-text { text-align: center; color: var(--muted); font-size: 12px; margin: 10px 0; }
.choose { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat small { color: #4a5a70; font-weight: 500; }
.stat b { display: block; font-size: 28px; font-weight: 800; color: var(--navy); line-height: 1.2; }
.stat.red { background: linear-gradient(120deg, #fff, #fff1f1); }
.stat.red b { color: var(--red); }
.stat.green b { color: var(--ok); }
button.stat { font: inherit; text-align: start; cursor: pointer; width: 100%; }
button.stat:hover { border-color: var(--navy); }

/* ---------- home ---------- */
.hello { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: var(--radius); border: 1px solid #f0d9dc;
  background: linear-gradient(110deg, #fff 30%, #fff3f4 70%, #eef3fb); box-shadow: var(--shadow); }
.hello h2 { font-size: 19px; }
.group-title { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; font-weight: 700; }
.home-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; gap: 8px; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.mini-list li:hover { background: #fafcff; }

/* ---------- tables ---------- */
.tbl-wrap { overflow: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: right; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; background: #fbfcfe; position: sticky; top: 0; }
.tbl th.sorted::after { content: " ▲"; font-size: 9px; }
.tbl th.sorted.desc::after { content: " ▼"; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid #eef1f5; white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.tbl th .th-l { cursor: pointer; }
.tbl th .th-menu { border: 1px solid transparent; background: none; cursor: pointer; padding: 0 4px; margin-inline-start: 4px; border-radius: 4px; color: var(--muted); font-size: 11px; }
.tbl th .th-menu:hover { border-color: var(--line-strong); background: #fff; }
.tbl th.filtered { color: var(--navy); background: var(--navy-soft); }
.tbl th.filtered .th-menu { color: var(--navy); font-weight: 800; }
.filter-bar { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--navy-soft); color: var(--navy-dark); font-size: 13px; font-weight: 600; }
.colmenu { position: fixed; z-index: 70; width: 260px; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 12px 32px rgba(20,40,80,.18); padding: 6px; display: grid; gap: 2px; }
.colmenu > button { border: none; background: none; text-align: right; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-weight: 500; }
.colmenu > button:hover, .colmenu > button.on { background: var(--navy-soft); color: var(--navy); }
.colmenu hr { border: none; border-top: 1px solid var(--line); margin: 4px 0; }
.colmenu input[type=search] { padding: 6px 10px; }
.colmenu .cm-all { display: flex; gap: 6px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.colmenu .cm-list { max-height: 240px; overflow: auto; }
.colmenu .cm-list label { display: flex; gap: 6px; align-items: center; padding: 4px; cursor: pointer; border-radius: 6px; }
.colmenu .cm-list label:hover { background: #f6f8fb; }
.colmenu .cm-list label span:first-of-type { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: #f7faff; }
.tbl.plain tbody tr { cursor: default; }
.pager { display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--muted); font-size: 13px; }

/* ---------- client card ---------- */
.profile-card { text-align: center; }
.profile-card .av { margin: 0 auto 8px; }
.profile-card h2 { font-size: 18px; margin-bottom: 4px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tabs button { padding: 9px 14px; border: none; background: none; cursor: pointer; font-weight: 500; color: #4a5a70; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--navy); border-color: var(--navy); font-weight: 700; }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.mini { width: 100%; border-collapse: collapse; }
.mini caption { display: flex; justify-content: space-between; align-items: center; padding: 4px 2px 8px; font-weight: 700; }
.mini caption button { border: none; background: none; cursor: pointer; font-size: 15px; padding: 2px 8px; border-radius: 6px; }
.mini caption button:hover { background: #f2f5f9; }
.mini th { font-size: 11px; color: var(--muted); padding: 4px 0; font-weight: 600; }
.mini td { text-align: center; padding: 5px 0; cursor: pointer; border-radius: 8px; font-size: 13px; }
.mini td:hover { background: #f2f5f9; }
.mini td.other { color: #b8c2cf; }
.mini td.inweek { background: var(--navy-soft); }
.mini td.today { background: var(--red); color: #fff; font-weight: 700; }
.gcal { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.gcal .gbadge { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.week { overflow: auto; max-height: calc(100vh - 210px); border-radius: var(--radius); }
.week-grid { display: grid; grid-template-columns: 52px repeat(7, minmax(105px, 1fr)); min-width: 790px; }
.week-grid .hd { position: sticky; top: 0; z-index: 2; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 4px; text-align: center; font-weight: 600; font-size: 13px; }
.week-grid .hd small { display: block; font-size: 20px; font-weight: 700; }
.week-grid .hd.today small { color: #fff; background: var(--red); border-radius: 50%; width: 34px; height: 34px; line-height: 34px; margin: 2px auto 0; }
.week-grid .hour { height: 48px; font-size: 11px; color: var(--muted); text-align: center; transform: translateY(-7px); }
.week-grid .day { position: relative; border-inline-start: 1px solid var(--line); background: repeating-linear-gradient(#fff 0 47px, #eef1f5 47px 48px); cursor: cell; }
.week-grid .day.today { background: repeating-linear-gradient(#fffafa 0 47px, #f3e6e6 47px 48px); }
.ev { display: block; border: 0; text-align: start; font-family: inherit; line-height: inherit; position: absolute; inset-inline: 3px; border-radius: 8px; padding: 3px 6px; font-size: 12px; color: #fff; overflow: hidden; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.ev b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .g { float: left; font-weight: 800; background: #fff; color: #4285f4; border-radius: 4px; padding: 0 3px; font-size: 10px; margin: 1px; }
.now-line { position: absolute; inset-inline: 0; height: 2px; background: var(--red); z-index: 1; }

/* ---------- team & chat ---------- */
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: none; }
.list li.click { cursor: pointer; }
.list li.click:hover { background: #fafcff; }
.list li .txt { flex: 1; min-width: 0; }
.list li .txt b { display: block; }
.list li .txt small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list li.sel { background: var(--navy-soft); }
.unread { min-width: 20px; height: 20px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.chat { display: flex; flex-direction: column; height: calc(100vh - 170px); min-height: 420px; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.msgs { flex: 1; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; background: #f7f9fc; }
.msg { max-width: 78%; padding: 8px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); align-self: flex-end; }
.msg.note { align-self: center; max-width: 86%; background: #fff8e1; border: 1px dashed #e0b84a; color: #5a4300; }
.msg.me { align-self: flex-start; background: var(--navy); color: #fff; border-color: var(--navy); }
.msg small { display: block; font-size: 11px; opacity: .7; margin-top: 2px; }
.msg .from { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.msg p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 42px; height: 42px; resize: none; }

/* floating team-chat windows (several side by side, narrow and tall) */
#chat-dock { position: fixed; bottom: 0; left: 16px; z-index: 45; display: flex; flex-direction: row-reverse; gap: 10px; align-items: flex-end; pointer-events: none; }
.cw { width: 300px; height: 440px; background: #fff; border: 1px solid var(--line-strong); border-bottom: none; border-radius: 12px 12px 0 0; box-shadow: 0 -4px 24px rgba(20,40,80,.18); display: flex; flex-direction: column; pointer-events: auto; }
.cw.min { height: 46px; }
.cw .cw-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--navy); color: #fff; border-radius: 12px 12px 0 0; cursor: pointer; flex-shrink: 0; }
.cw .cw-head b { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw .cw-head small { opacity: .8; font-size: 11px; }
.cw .cw-head button { border: none; background: rgba(255,255,255,.15); color: #fff; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; }
.cw .cw-head .unread { background: var(--red); }
.cw .msgs { padding: 10px; gap: 6px; }
.cw .msg { max-width: 88%; font-size: 13px; padding: 6px 10px; }
.cw .chat-form { padding: 8px; }
.cw .chat-form textarea { min-height: 36px; height: 36px; padding: 7px 10px; }
.cw.min .msgs, .cw.min .chat-form, .cw.min .emoji-pop, .cw.min .rec-bar, .cw.min .cw-members { display: none !important; }
.cw .cw-members { background: #f6f8fb; border-bottom: 1px solid var(--line); padding: 4px 10px; font-size: 12px; flex-shrink: 0; }
.cw-mtoggle { border: none; background: none; cursor: pointer; font-size: 12px; color: var(--navy); font-weight: 600; padding: 2px 0; }
.cw-mlist { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 0 4px; max-height: 84px; overflow: auto; }
.cw-members[data-hidden] .cw-mlist { display: none; }
.cw-mchip { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px 2px 2px; }
.cw.max { width: min(620px, calc(100vw - 32px)); height: min(78vh, 760px); }
.cw .chat-form { align-items: flex-end; }
.cw-tools { display: flex; gap: 2px; }
.cw-tools button, .cw-tools label { border: none; background: none; cursor: pointer; font-size: 18px; width: 30px; height: 34px; display: grid; place-items: center; border-radius: 8px; }
.cw-tools button:hover, .cw-tools label:hover { background: #f2f5f9; }
.emoji-pop { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 6px; border-top: 1px solid var(--line); max-height: 150px; overflow: auto; background: #fff; }
.emoji-pop button { border: none; background: none; font-size: 20px; cursor: pointer; border-radius: 6px; padding: 3px 0; }
.emoji-pop button:hover { background: #f2f5f9; }
.rec-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); background: #fff6f6; color: var(--red); font-weight: 600; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.msg audio { width: 220px; max-width: 100%; height: 36px; display: block; }
.cw.max .msg audio { width: 300px; }
.chat-img { max-width: 220px; max-height: 220px; border-radius: 8px; display: block; }
.cw.max .chat-img { max-width: 360px; max-height: 360px; }
.chat-file { color: inherit; text-decoration: underline; word-break: break-all; }

/* ---------- import ---------- */
.import-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 12px; }
.preview { max-height: 230px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.preview table { border-collapse: collapse; width: 100%; font-size: 12px; }
.preview th, .preview td { padding: 5px 8px; border-bottom: 1px solid #eef1f5; white-space: nowrap; text-align: right; }
.preview th { background: #f6f8fb; position: sticky; top: 0; }
.closed-group { background: #f6f8fb; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 10px 14px; }
.closed-group summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; list-style: none; }
.closed-group summary::before { content: "▸"; color: var(--muted); }
.closed-group[open] summary::before { content: "▾"; }
.closed-group .item { opacity: .85; }
.project-box { border-color: #d6e2f3; background: linear-gradient(120deg, #fff, #f3f7fd); }

/* ---------- admin ---------- */
.admin-item { padding: 14px 16px; }
.admin-item + .admin-item { border-top: 1px solid var(--line); }
.sub-box { background: #f7fbf8; border: 1px solid #d9eedf; border-radius: 12px; padding: 12px; margin-top: 12px; }
.sub-box.blue { background: #f6f9fe; border-color: #dbe6f5; }
.opt-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.opt-row .num { width: 22px; color: var(--muted); font-size: 12px; text-align: center; }
.opt-row input[type=text] { flex: 1; }
.opt-row.archived input[type=text] { opacity: .5; }
.color-sel { width: auto; }
.bi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.bi .ar textarea, .bi .ar input { direction: rtl; font-family: "Segoe UI", Tahoma, Arial, sans-serif; }

/* ---------- modal & toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20, 35, 60, .4); display: grid; place-items: center; z-index: 60; padding: 16px; backdrop-filter: blur(2px); }
.dialog { background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.25); width: 100%; max-width: 640px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.dialog.lg { max-width: 920px; }
.dialog.sm { max-width: 420px; }
.dialog header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 16px; }
.dialog .body { padding: 16px 18px; overflow: auto; }
.dialog footer { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); justify-content: flex-start; }
.form-err { color: var(--red); padding: 0 18px; min-height: 0; font-weight: 600; }
.form-err:not(:empty) { padding-bottom: 8px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 99; display: grid; gap: 6px; }
#toast div { background: #1c2736; color: #fff; padding: 10px 18px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-weight: 500; }
#toast div.err { background: var(--red); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 80% 0%, #fde7e8, transparent 45%), radial-gradient(circle at 0% 100%, #e3ecf9, transparent 50%), var(--bg); }
.login-box { width: 100%; max-width: 380px; padding: 28px; display: grid; gap: 14px; }
.login-box img { height: 64px; margin: 0 auto; }
.login-box h1 { text-align: center; color: var(--navy); font-size: 18px; letter-spacing: .5px; }
.login-box p { text-align: center; margin: -8px 0 4px; color: var(--muted); }

@media (max-width: 900px) {
  .cols, .detail, .home-grid, .team-grid, .cal, .bi { grid-template-columns: 1fr !important; }
  .cal aside .mini { display: none; }
  .cols.side-page > .side-col { position: static; }
  .side-page .side ul { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
  .side-page .side li a, .side-page .side li.sub a { padding: 6px 10px; padding-inline-start: 10px; }
  .side-page .side li a:not(.on) { background: #f2f5f9; }
  .brand .sep, .brand b { display: none; }
  .wa-has-conv .wa-list { display: none; }
}
@media (max-width: 560px) {
  .header-in { gap: 6px; padding: 6px 10px; }
  .subnav-in { padding: 0 6px 4px; }
  .areas .area { padding: 6px 10px; font-size: 13px; }
  .brand img { height: 28px; }
  .page { padding: 12px 10px 70px; }
  .item-sum { grid-template-columns: 1fr; }
  #chat-dock { left: 0; right: 0; justify-content: center; }
  .cw { width: 100vw; }
  .cw:not(:first-child) { display: none; }
}
@media print {
  .header, .no-print, #chat-dock { display: none !important; }
  body { background: #fff; }
}

/* lead that became a client (a task was opened on it) */
.item-sum .t.converted { text-decoration: line-through; color: var(--muted); }

/* task list groups (urgent / today / not started / in progress / done), each can be hidden */
.task-group > summary { cursor: pointer; list-style: none; user-select: none; }
.task-group > summary::-webkit-details-marker { display: none; }
.task-group > summary::before { content: "▾"; color: var(--muted); }
.task-group:not([open]) > summary::before { content: "▸"; }
.task-group > summary .tg-hint::after { content: "הסתרה"; }
.task-group:not([open]) > summary .tg-hint::after { content: "הצגה"; }
.task-group:first-child > summary { margin-top: 0; }

.item-close { display: flex; justify-content: center; padding: 6px 0 10px; border-top: 1px solid var(--line); }
.item-close .btn { min-width: 140px; }

.cover { display: flex; flex-wrap: wrap; gap: 6px; }
.cover span { padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.cover .yes { background: #e6f6ec; color: #1b7a3d; }
.cover .no { background: #f3f4f6; color: #8a94a3; }
.bafi-folder { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; background: #fff; }
.bafi-folder .files { margin-top: 8px; }

/* clients: three search boxes side by side, filters folded under "סינון" */
.client-search { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .client-search { grid-template-columns: 1fr; } }
details.filters { margin: 0; }
details.filters .badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 12px; text-align: center; }

.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* new task: the client already has open tasks */
.open-warn { background: #fff6e0; border: 1px solid #f0c75e; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.open-warn .mini-list li, .dialog .mini-list li { padding: 8px 4px; cursor: default; }
.open-warn .mini-list li:hover, .dialog .mini-list li:hover { background: none; }
/* partner who referred a lead: partner, premium, reward (managers) */
.partner-box { margin-top: 12px; padding: 12px; border: 1px dashed #c9d6ea; border-radius: 12px; background: #f7faff; }
.tag.partner { background: #eaf1fb; color: var(--navy); }
/* Salebi Operations: salary months reported per employer */
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 8px; }
.month { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; border: 1px solid #f3c3c5; background: #fff5f5; color: var(--red); cursor: pointer; font: inherit; }
.month b { color: var(--text); font-size: 13px; }
.month span { font-size: 12px; font-weight: 600; }
.month small { color: var(--muted); font-size: 11px; }
.month.on { border-color: #b7e2c4; background: #effaf2; color: #17803d; }
.bafi-link { padding: 10px 12px; border-radius: 10px; background: #f7faff; border: 1px dashed #c9d6ea; }
/* Salebi Operations ledgers: employers × months */
.month.na { border-color: var(--line-strong); background: #f6f7f9; color: var(--muted); }
.month.warn { border-color: #f5d49a; background: #fff8eb; color: #a15c00; }
.month .fee.on { color: #17803d; } .month .fee.bad { color: var(--red); } .month .fee.warn { color: #a15c00; }
.ledger td, .ledger th { padding: 7px 6px; }
.ledger .c { text-align: center; min-width: 46px; white-space: nowrap; font-size: 13px; }
.ledger td.c { cursor: pointer; border-inline-start: 1px solid var(--line); }
.ledger td.c:hover { outline: 2px solid var(--navy); outline-offset: -2px; }
.ledger td.c i { color: var(--navy); font-style: normal; margin-inline-start: 2px; }
.ledger td.on { background: #effaf2; color: #17803d; font-weight: 600; }
.ledger td.na { color: var(--muted); }
.ledger td.warn { background: #fff8eb; color: #a15c00; font-size: 12px; }
.ledger td.bad { background: #fff5f5; color: var(--red); }
.ledger td.miss { background: #fff1f1; }
/* one ledger (owner 2026-11-26): report on top, fee below */
.ledger td.two { padding: 4px 4px; line-height: 1.25; }
.ledger td.two span { display: block; }
.ledger td.two .fee { font-size: 11.5px; font-weight: 500; color: #2a5d8f; border-top: 1px dashed var(--line); margin-top: 2px; padding-top: 2px; }
.ledger td.two .fee.na { color: var(--muted); }
.ledger td.two .fee.warn { color: #a15c00; }
.ledger td.two .fee.miss { color: var(--red); font-weight: 700; }
.ledger tr.grp td { background: #f4f6fa; }
.ledger td.two .rep, .ledger td.two .fee { cursor: pointer; border-radius: 4px; }
.ledger td.two .rep:hover, .ledger td.two .fee:hover { box-shadow: inset 0 0 0 2px var(--navy); }
.ledger td.two:hover { outline: none; }
.cell-menu { position: fixed; z-index: 1000; background: #fff; border: 1px solid var(--line-strong, #d5dbe5); border-radius: 10px; box-shadow: 0 10px 30px rgba(20, 40, 80, .18); padding: 6px; min-width: 190px; display: flex; flex-direction: column; gap: 2px; }
.cell-menu .cm-title { font-size: 12px; color: var(--muted); padding: 4px 8px; font-weight: 600; }
.cell-menu button[data-v] { all: unset; cursor: pointer; padding: 7px 10px; border-radius: 6px; font-size: 14px; }
.cell-menu button[data-v]:hover, .cell-menu button[data-v]:focus-visible { background: var(--navy-soft, #eef3fb); }
.cell-menu button[data-v].on { background: #effaf2; color: #17803d; font-weight: 600; }
.cell-menu .cm-free { display: flex; gap: 4px; padding: 4px 6px; border-top: 1px solid var(--line); margin-top: 2px; }
.cell-menu .cm-free input { flex: 1; min-width: 0; padding: 6px 8px; font-size: 14px; }
.cell-menu .cm-more { color: var(--navy); font-size: 13px !important; border-top: 1px solid var(--line); border-radius: 0 !important; }
/* the ledger scrolls inside its own box (owner 2026-11-26): header row on top, totals at the bottom, employer column on the side */
.ledger-scroll { overflow: auto; overscroll-behavior: contain; }
/* wide tables (owner 2026-11-29): scroll inside their box, first column fixed, compact rows */
.wide-scroll { overflow: auto; overscroll-behavior: contain; }
.wide-scroll thead th { position: sticky; top: 0; z-index: 2; }
.tbl.stick1 > * > tr > :first-child { position: sticky; right: 0; background: var(--card, #fff); z-index: 1; }
.tbl.stick1 > thead > tr > th:first-child { z-index: 3; background: #fbfcfe; }
.tbl.stick1 > tbody > tr.xrow > td, .tbl.stick1 > tbody > tr.grp > td { position: static; background: transparent; }
/* tables like Excel (owner 2026-11-29): filter ▾, drag the edge of a header to resize, hide a column */
.tbl.xl > thead th { position: sticky; top: 0; z-index: 2; }
.tbl.xl th .xl-r { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: 7px; cursor: col-resize; touch-action: none; z-index: 5; }
.tbl.xl th .xl-r:hover, .tbl.xl th .xl-r:active { background: var(--navy-soft, #e8eef7); border-inline-end: 2px solid var(--navy, #25496a); }
.tbl.xl th .th-menu.on { color: var(--navy); font-weight: 800; }
.tbl.xl-fixed > * > tr > td, .tbl.xl-fixed > * > tr > th { overflow: hidden; text-overflow: ellipsis; }
.tbl.xl-fixed > tbody > tr.xrow > td, .tbl.xl-fixed > tbody > tr.grp > td { overflow: visible; }
.xl-bar { position: sticky; right: 0; margin: 0; }
/* employers + their ledger row */
.tbl tr.xopen > td { background: var(--navy-soft, #eef3f9); }
.xcaret { color: var(--muted); font-size: 11px; }
.emp-ledger { position: sticky; right: 0; padding: 8px 4px 10px; }
.emp-ledger .tbl.ledger th, .emp-ledger .tbl.ledger td { min-width: 62px; }
.tbl.compact th, .tbl.compact td { padding: 6px 8px; }
.tbl.compact select { padding: 4px 26px 4px 6px; font-size: 13px; min-height: 0; height: auto; max-width: 160px; }
.tbl.compact .notes-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger thead th { position: sticky; top: 0; z-index: 2; }
.ledger thead th.emp { z-index: 3; }
.ledger tfoot td { position: sticky; bottom: 0; background: #fbfcfe; z-index: 1; border-top: 1px solid var(--line); }
.ledger tfoot tr:first-child:not(:last-child) td { bottom: 37px; }
.ledger tfoot td.emp { z-index: 3; }
.ledger .emp { position: sticky; right: 0; background: #fff; z-index: 1; min-width: 150px; max-width: 220px; }
.ledger th.emp { background: #fbfcfe; z-index: 2; }
.ledger .emp small { display: block; color: var(--muted); font-size: 11px; }
.ledger tfoot td { border-top: 2px solid var(--line-strong); background: #fbfcfe; }
.ledger td.info { cursor: pointer; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.ledger td.info:hover { background: #f3f6fb; }
.ledger td.info .tag { font-size: 11px; padding: 1px 6px; margin: 1px 0; }
@media (max-width: 700px) { .ledger .ins { display: none; } .ledger .emp { min-width: 110px; max-width: 140px; font-size: 13px; } }
.totals-row { display: flex; flex-wrap: wrap; gap: 18px; margin: 0 0 10px; font-size: 14px; }

/* month divider inside task / lead lists */
.month-sep { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--navy); margin: 6px 2px -2px; }
.month-sep::after { content: ''; flex: 1; height: 1px; background: var(--line-strong, #d5dbe4); }
/* tasks sidebar: processes and follow-ups are two separate boxes */
.side-col { display: flex; flex-direction: column; gap: 14px; }
/* a page with a side menu (sideShell / opsHead): the content column may hold wide tables that scroll inside it */
.cols.side-page { grid-template-columns: 230px minmax(0, 1fr); }
.cols.side-page > .side-col { position: sticky; top: 76px; }
.side-ops { border-top: 4px solid #25496a; }
.side-ops li a.on { background: #25496a; }
.side-ai { border-top: 4px solid #6d4bd1; }
.side-ai li a.on { background: #6d4bd1; }
.side-proc { border-top: 4px solid var(--red); }
.side-fu { border-top: 4px solid #1f7aa8; background: #f4f9fc; }
.side-fu h3 { color: #155a7d; }
.side-fu li a:hover { background: #e3f0f7; }
.side-fu li a.on { background: #1f7aa8; }
.st-fu-open { color: #155a7d; background: #e6f2f9; border-color: #b9d9ea; }
.st-fu-urgent { color: #c4161c; background: #fdecec; border-color: #f6c9cb; }
.st-fu-closed { color: #127a43; background: #e6f6ed; border-color: #b6e3c8; }
.task-group.fu-bottom > summary { color: #155a7d; border-top: 2px solid #b9d9ea; padding-top: 10px; }
.fu-box > summary { cursor: pointer; list-style: revert; color: #155a7d; }
.fu-box .pill { padding: 3px 9px; font-size: 12px; }
.tbl tr.grp td { background: #f4f6fa; padding-top: 10px; }

/* AI assistant */
.ai-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
@media (max-width: 900px) { .ai-layout { grid-template-columns: 1fr; } }
.ai-chat { height: calc(100vh - 150px); }
.msg.ai-msg { max-width: 92%; align-self: flex-end; }
/* answers read like a letter: roomy lines, clear headings, space between parts */
.ai-text { font-size: 15px; line-height: 1.75; }
.ai-text p { white-space: normal; margin: 0 0 10px; }
.ai-text h4 { margin: 18px 0 8px; color: var(--navy); font-size: 16px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.ai-text h4:first-child { margin-top: 4px; }
.ai-text ul, .ai-text ol { margin: 6px 0 12px; padding-right: 22px; }
.ai-text li { margin-bottom: 6px; }
.ai-text a { color: var(--navy); text-decoration: underline; }
.ai-table { border-collapse: collapse; margin: 10px 0 14px; font-size: 14px; line-height: 1.5; }
.ai-table th, .ai-table td { border: 1px solid var(--line); padding: 6px 10px; text-align: right; }
.ai-table th { background: #eef2f8; }
.ai-side h4 { margin: 0; }
.ai-chat.drag-over { outline: 3px dashed var(--navy); outline-offset: -6px; background: #eef4ff; }
.ai-chat.drag-over::after { content: '📂 שחררו כאן כדי לצרף את המסמך'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; color: var(--navy); background: rgba(238,244,255,.85); pointer-events: none; border-radius: inherit; }
.ai-chat { position: relative; }

/* בית סוכן: projects (course lectures, chapters) */
.hp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.hp-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; border-top: 3px solid #3b78be; }
.hp-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.hp-bar { display: block; height: 6px; background: var(--line, #e5e7eb); border-radius: 4px; overflow: hidden; min-width: 60px; }
.hp-bar i { display: block; height: 100%; background: #2e9e5b; }
.hp-sec-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; flex-wrap: wrap; }
.hp-sec.on { border: 2px solid #3b78be; }
.hp-num { width: 26px; height: 26px; border-radius: 50%; background: #25496a; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex: none; }
.hp-sec-b { padding: 0 14px 14px; border-top: 1px solid var(--line, #e5e7eb); padding-top: 12px; }
.hp-st-draft { background: #fff4e0; color: #a35b00; } .hp-st-review { background: #e8eef9; color: #25496a; } .hp-st-done { background: #e3f5ea; color: #1d7a45; }
.hp-doc { font-size: 15px; line-height: 1.75; overflow-x: auto; }
.hp-doc h2, .hp-doc h3 { color: #25496a; margin: 16px 0 8px; } .hp-doc h4 { margin: 12px 0 6px; }
.hp-doc p { margin: 0 0 10px; } .hp-doc ul, .hp-doc ol { padding-right: 22px; margin: 6px 0 12px; } .hp-doc li p { margin: 0 0 4px; }
.hp-doc table { border-collapse: collapse; width: 100%; margin: 8px 0 14px; font-size: 14px; }
.hp-doc td, .hp-doc th { border: 1px solid #cfd6e0; padding: 6px 8px; vertical-align: top; text-align: right; }
.hp-doc th { background: #eef3fa; }
.hp-doc mark { background: #fff3a0; }
.hp-edit { border: 1px solid #3b78be; border-radius: 8px; padding: 12px; min-height: 220px; max-height: 70vh; overflow: auto; background: #fff; outline: none; }
.hp-tools { display: flex; gap: 4px; flex-wrap: wrap; margin: 8px 0 6px; position: sticky; top: 0; z-index: 2; background: var(--card, #fff); padding: 4px 0; }
@media (max-width: 640px) { .hide-sm { display: none; } }
.hp-final .hp-doc > h2 { border-bottom: 2px solid #e5e9f0; padding-bottom: 6px; margin-top: 26px; font-size: 20px; }
.hp-final .hp-doc > h2:first-child { margin-top: 4px; }

.hp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.hp-side { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
.hp-side textarea { width: 100%; }
.hp-notes { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.hp-notes li { border-right: 3px solid #3b78be; padding: 4px 8px 4px 0; font-size: 14px; }
.hp-notes li.auto { border-right-color: #c9d2de; color: #5b6575; font-size: 13px; }
.linkish { background: none; border: 0; color: var(--red, #c4161c); cursor: pointer; padding: 0; }
@media (max-width: 900px) { .hp-layout { grid-template-columns: 1fr; } .hp-side { position: static; max-height: none; } }
.hp-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.hp-file { display: flex; flex-direction: column; overflow: hidden; }
.hp-file-prev { height: 200px; border: 0; background: #f2f5f9; display: flex; align-items: center; justify-content: center; cursor: zoom-in; padding: 0; position: relative; overflow: hidden; }
.hp-file-prev img { width: 100%; height: 100%; object-fit: contain; }
.hp-file-prev canvas { max-width: 100%; max-height: 100%; display: none; } .hp-file-prev canvas.ok { display: block; } .hp-file-prev canvas.ok + .ficon { display: none; }
.hp-file-prev .ficon { font-size: 64px; }
.hp-file-info { padding: 10px; font-size: 14px; }
.hp-sec-files { margin-top: 16px; padding-top: 12px; border-top: 1px dashed #d5dce6; }
.hp-readtext { white-space: pre-wrap; font-size: 15px; line-height: 1.8; max-height: 70vh; overflow: auto; background: #fafbfd; border: 1px solid #e3e8ef; border-radius: 8px; padding: 14px; }

/* topics: the quick line under a task, products (owner 2026-11-22) */
.quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 14px 10px; }
.quick .q select { height: 30px; padding: 0 8px; font-size: 13px; border-radius: 8px; border: 1px solid var(--line); background: #f8fafc; max-width: 190px; width: auto; }
.quick .q select:hover { border-color: #b9c6d6; background: #fff; }
.quick .tag.prod, .tag.kind { background: #eef6ee; color: #2c6b35; border-color: #cfe5d1; }
.side-proc li.cat a { padding-top: 8px; }
.side-proc li.sub a { padding-inline-start: 22px; }
.prod-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fafcfe; }
.prod-row > b { min-width: 110px; align-self: center; }
.prod-row .pfield { display: flex; flex-direction: column; gap: 2px; }
.prod-row .pfield input { height: 32px; width: 130px; }
@media (max-width: 560px) { .quick { padding: 0 10px 8px; } .quick .q select { max-width: 150px; } .prod-row .pfield input { width: 110px; } }

/* חברות ביטוח */
.ins-co { margin-bottom: 10px; }
.ins-co > summary { padding: 12px 16px; cursor: pointer; list-style: none; }
.ins-co > summary h3 { display: inline; font-size: 17px; }
.ins-co > summary::before { content: '▸ '; color: var(--muted); }
.ins-co[open] > summary::before { content: '▾ '; }
.ins-sec { padding: 6px 16px; background: #f3f6fa; font-weight: 700; font-size: 13px; color: #3b5170; border-top: 1px solid var(--line); }
.ins-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: center; padding: 8px 16px; border-top: 1px solid var(--line); }
.ins-v { display: flex; flex-wrap: wrap; gap: 6px; }
.ins-chip { display: inline-flex; gap: 4px; align-items: center; padding: 3px 8px; border-radius: 8px; background: #f2f6fb; font-size: 13px; direction: ltr; }
.ins-chip a { color: var(--navy); }
.ins-tbl td, .ins-tbl th { white-space: nowrap; }
.ins-tbl tr.grp td { background: #eef3f9; font-weight: 700; }
.ins-hist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ins-hist li { border-right: 3px solid #c9d6e6; padding: 2px 8px 2px 0; }
.ins-hist s { color: #a33; }
@media (max-width: 700px) { .ins-row { grid-template-columns: 1fr auto; } .ins-v { grid-column: 1 / -1; } }
@media (max-width: 600px) { .ins-drop { display: none; } }
.ins-ro [data-iedit], .ins-ro [data-undo] { display: none !important; }
.ins-rows { display: grid; gap: 8px; margin-bottom: 12px; }
.ins-rows .pills .lbl { font-weight: 600; }
.ins-badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 700; margin-inline-end: 6px; vertical-align: middle; flex: none; letter-spacing: -.3px; }
.ins-badge.lg { width: 30px; height: 30px; font-size: 12px; }
.ins-pill { display: inline-flex; align-items: center; }
.who-edit { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; border-radius: 8px; padding: 1px 6px; border: 1px dashed transparent; background: none; font: inherit; color: inherit; }
.who-edit:hover { border-color: var(--line, #cbd5e1); background: var(--bg-soft, #f1f5f9); }
.who-edit select { font-size: 13px; padding: 2px 6px; }

/* staging copy banner (see /api/env) */
#env-banner { position: sticky; top: 0; z-index: 100; background: #f08c00; color: #fff; text-align: center; font-weight: 700; font-size: 13px; padding: 5px 10px; }

/* ---------- keyboard and unsaved text ---------- */
/* one visible focus mark everywhere; it wins over the fields' own soft ring */
:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .pill select:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.dialog:focus-visible { outline: none; }
/* a row's title is a real button that looks like the title it was */
.rowtitle { display: inline-block; justify-self: start; max-width: 100%; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.item-sum .rowtitle { display: block; width: fit-content; }
.daybtn { display: block; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; cursor: pointer; }
/* file pickers: out of sight but reachable; the box around them shows where the keyboard is */
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; opacity: 0; }
label:has(> .vh) { position: relative; }
label:has(> .vh:focus-visible) { outline: 2px solid var(--navy); outline-offset: 2px; }
.draft-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; grid-column: 1 / -1; padding: 8px 10px; border: 1px solid #e8c98a; border-radius: 8px; background: #fff7e6; color: #6b4300; font-size: 13px; }
.draft-note.card { margin-bottom: 10px; }

/* ---------- task rows: one scannable block, each thing said once ---------- */
.item.task.is-urgent:not(.open) { border-inline-start: 1px solid var(--line); }   /* the badge says it */
.item.task.open { border-color: var(--navy); }
.item.task .item-sum { padding: 9px 14px; gap: 2px 12px; }
.item-sum .head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.item-sum .head .rowtitle { width: auto; }
.item-sum .head .c { font-size: 13px; }
.item.task .item-sum .meta { margin-top: 0; gap: 4px 10px; color: #55657c; }
.item.compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.item.compact > .item-body, .item.compact > .item-close { grid-column: 1 / -1; }
.item.compact > .quick { flex-wrap: nowrap; padding: 0; padding-inline-end: 14px; }
.item.compact.open > .quick { display: none; }   /* the opened card has these controls */
#list .stack:has(> .item.compact) { gap: 6px; }
.quick .q select { height: 34px; color: var(--text); }
.quick .q.st-q-open select { background: #fdecec; border-color: #efb9bb; }
.quick .q.st-q-in_progress select { background: #fff3e0; border-color: #ecc98f; }
.quick .q.st-q-done select { background: #e8f6ee; border-color: #b4dcc4; }
.quick .who-edit { min-height: 34px; white-space: nowrap; }
/* the two controls line up from row to row, so status and owner can be read down the list */
.item.compact > .quick .q { width: 190px; }
.item.compact > .quick .q select { width: 100%; max-width: none; }
.item.compact > .quick .who-edit { position: relative; width: 190px; overflow: hidden; }
.item.compact > .quick .who-edit .who-chip { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.quick .who-edit .muted { color: #55657c; }

/* ---------- the opened task: what changes first, then the notes; the rest folded ---------- */
.task-card { display: flex; flex-direction: column; gap: 12px; }
.task-card .muted { color: #55657c; }
.task-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.task-act .pill .cdot { margin-inline-end: 6px; }
.inline-f { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.inline-f select { width: auto; min-width: 150px; }
.task-who { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-block: 1px solid var(--line); }
.task-card .detail { gap: 24px; }
.task-card .sec { padding: 10px 0; border-top: 1px solid var(--line); }
.task-card .detail > div > .sec:first-child { padding-top: 0; border-top: 0; }
.task-card .sec h4 { margin: 0 0 8px; font-size: 15px; }
.task-card details.sec > summary { cursor: pointer; padding: 2px 0; }
.task-card details.sec > summary h4 { display: inline; }
.task-card details.sec[open] > summary { margin-bottom: 8px; }
.task-card .drop { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px 10px; padding: 12px; }
.task-card .drop .drop-ic { font-size: 20px; }
.task-card .drop b { font-size: 13px; }
.task-card .log li small { display: inline; color: #55657c; }
.note-del { margin-inline-start: 4px; padding: 0 6px; vertical-align: baseline; }
.task-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.print-only { display: none; }
@media print { .print-only { display: block; } }

@media (max-width: 700px) {
  .item.compact { grid-template-columns: minmax(0, 1fr); }
  .item.compact > .quick { flex-wrap: wrap; padding: 0 14px 10px; }
  .item.compact > .quick .q { width: auto; flex: 1 1 140px; }
  .item.compact > .quick .who-edit { width: auto; flex: 1 1 170px; }
  /* the owner's name needs the room: the word "owner" stays for screen readers only */
  .item.compact > .quick .who-edit > .muted { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .task-card .btn { min-height: 44px; }
  .task-card .files .btn { min-width: 44px; }
  .quick .q select, .quick .who-edit { height: 44px; min-height: 44px; font-size: 16px; }
  .task-act .pill, .task-foot .btn, .task-who .btn { min-height: 44px; }
  .inline-f { flex: 1 1 100%; }
  .inline-f select { flex: 1; min-height: 44px; }
  .task-card textarea, .task-card input, .task-card select { font-size: 16px; }
}
.tbl.stick1 > tbody > tr.xopen > td:first-child { background: var(--navy-soft, #eef3f9); }
.tbl.compact select { min-width: 120px; }
.tbl.compact select[data-qs] { min-width: 150px; }
.act-mark { font-weight: 800; font-size: 15px; min-width: 28px; }
.act-mark.on { color: #17803d; }
.act-mark.off { color: var(--red); }
/* sales in a task and the תפוקות page (owner 2026-11-30) */
.sale-row { flex-direction: row; }
.sale-row .sale-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.sale-row.late { background: #fff1f1; border-color: #f3b4b4; }
.sale-row.sdone { background: #f1faf3; border-color: #cfe9d6; }
.tag.late, .quick .tag.prod.late, .tag.prod.late { background: #fde8e8; color: #b42318; border-color: #f3b4b4; }
.tag.prod.sdone { background: #e8f6ec; color: #1f7a3a; }
select.sale-st { height: 32px; border-radius: 8px; font-weight: 600; }
select.sale-st.st-open { background: #fdecec; color: #b42318; }
select.sale-st.st-in_progress { background: #fff4e5; color: #b45309; }
select.sale-st.st-done { background: #e8f6ec; color: #1f7a3a; }
.pcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.pcard .pnum { font-size: 28px; font-weight: 800; margin: 2px 0 4px; }
.pcard.pc-pension { border-top: 4px solid #2f6fd6; } .pcard.pc-finance { border-top: 4px solid #1f9d55; } .pcard.pc-insurance { border-top: 4px solid #8b5cf6; }
.pyear { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; margin-top: 10px; }
.pyear .pm { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: none; padding: 6px 2px; cursor: pointer; font: inherit; }
.pyear .pm.on { border-color: var(--navy); background: var(--navy-soft, #eef3f9); }
.pyear .pbar { position: relative; width: 60%; height: 70px; display: flex; align-items: flex-end; }
.pyear .pbar i { position: absolute; bottom: 0; inset-inline: 0; background: #c9d7ec; border-radius: 4px 4px 0 0; }
.pyear .pbar i.d { background: #1f9d55; inset-inline: 25%; }
.pyear small { font-size: 11px; color: var(--muted, #6b7785); }
i.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: #c9d7ec; vertical-align: middle; } i.lg.d { background: #1f9d55; }
.late-box { background: #fff1f1; border: 1px solid #f3b4b4; }
.prod-tbl tr.late td { background: #fff1f1; }
.prod-tbl tr.sdone td { background: #f6fcf7; }
@media (max-width: 700px) { .pyear { grid-template-columns: repeat(6, 1fr); } }
.prod-head select, .prod-head input[type=month], .pfilters select { width: auto; min-width: 150px; }
select.sale-st { width: auto; min-width: 140px; }
.sale-row .pfield select { width: 150px; height: 32px; }
.sale-row select, select.sale-st, .prod-tbl select { height: 34px; padding: 0 10px; padding-inline-end: 28px; line-height: 1.2; font-size: 14px; }
.sale-tbl td { overflow: visible; padding: 6px 6px; }
.sale-tbl input, .sale-tbl select { height: 34px; padding: 0 8px; font-size: 14px; }
.sale-tbl input[data-pv=company], .sale-tbl input[data-pv=from_companies] { width: 120px; }
.sale-tbl input[inputmode=decimal] { width: 105px; }
.sale-tbl input[type=date] { width: 140px; }
.sale-tbl select[data-pv=name] { width: 170px; padding-inline-end: 26px; }
.sale-tbl select[data-pv=seller_id] { width: 130px; padding-inline-end: 26px; }
.task-card .detail > div { min-width: 0; }
.sales-sec .tbl-wrap { max-width: 100%; overflow-x: auto; }
.task-card .sales-sec { margin-top: 6px; }
.sale-tbl th, .sale-tbl td { padding: 6px 4px; }
.sale-tbl input[data-pv=company], .sale-tbl input[data-pv=from_companies] { width: 105px; }
.sale-tbl input[inputmode=decimal] { width: 90px; }
.sale-tbl input[type=date] { width: 128px; padding: 0 4px; }
.sale-tbl select[data-pv=name] { width: 160px; }
.sale-tbl select[data-pv=seller_id] { width: 115px; }
.sale-tbl select.sale-st { min-width: 0; width: 125px; }
.sale-tbl th, .sale-tbl td { padding: 6px 3px; font-size: 13px; }
.sale-tbl input[type=date] { width: 120px; }
.sale-tbl select[data-pv=name] { width: 140px; }
.sale-tbl select.sale-st { width: 118px; }
.sale-tbl input[data-pv=company], .sale-tbl input[data-pv=from_companies] { width: 95px; }
.sale-tbl input[inputmode=decimal] { width: 82px; }
.sale-tbl select[data-pv=seller_id] { width: 105px; }
.sale-tbl td { vertical-align: top; }
.sale-tbl input[type=date] { width: 116px; display: block; }
.sale-tbl select.sale-seller { display: block; width: 116px; height: 28px; margin-top: 4px; font-size: 12px; padding: 0 6px; padding-inline-end: 22px; }
.sale-tbl select[data-pv=name] { width: 130px; }
.sale-tbl select.sale-st { width: 108px; }
.sale-tbl input[data-pv=company], .sale-tbl input[data-pv=from_companies] { width: 86px; }
.sale-tbl input[inputmode=decimal] { width: 68px; }
.sale-tbl th, .sale-tbl td { padding: 6px 2px; }
.sale-tbl input, .sale-tbl select { font-size: 13px; padding-inline-start: 5px; padding-inline-end: 4px; }
.sale-tbl select { padding-inline-end: 18px; background-position: left 4px center; }
.sale-tbl select.sale-st { font-size: 12.5px; }
.sale-tbl select[data-pv=name] { width: 148px; }
.sale-tbl select.sale-st { width: 116px; }
.sale-tbl input[data-pv=company], .sale-tbl input[data-pv=from_companies] { width: 82px; }
/* sales: cancelled (owner 2026-11-30: red, with an X), pension insurance and agent appointment */
.prod-tbl tr.scancel td { background: #fdecec; }
.prod-tbl tr.scancel td, .prod-tbl tr.scancel input, .prod-tbl tr.scancel select:not(.sale-st) { color: #8a1c1c; text-decoration: line-through; }
.tag.prod.scancel { background: #fdecec; color: #b42318; text-decoration: line-through; }
select.sale-st.st-cancelled { background: #fdecec; color: #b42318; border-color: #f3b4b4; }
.pcard.pc-pension_ins { border-top: 4px solid #e07b12; } .pcard.pc-agent { border-top: 4px solid #d4a307; }
/* a task's documents: at the bottom, side by side (owner 2026-12-02); also the knowledge-base files */
.files.doc-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; margin-bottom: 10px; }
.files.doc-grid li { flex-wrap: nowrap; align-items: center; }
.files.doc-grid li a.thumb { width: 54px; height: 70px; }
.files.doc-grid li .ficon { font-size: 28px; }
.files.doc-grid .doc-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.files.doc-grid .doc-meta a { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files.doc-grid .doc-meta .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-sec { margin-top: 14px; }
.kb-topic h4 { margin: 12px 0 6px; }
.sale-fu { color: #a35b00; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
/* spelling */
.spell-fab { position: fixed; z-index: 60; font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid #cfd8e6; background: #fff; color: #25496a; box-shadow: 0 2px 6px rgba(0,0,0,.12); cursor: pointer; }
.spell-fab:hover { background: #f1f5fb; }
.spell-out { white-space: pre-wrap; line-height: 1.7; padding: 10px; background: #f6f8fb; border-radius: 10px; }
.spell-out mark { background: #fff1b8; border-radius: 3px; padding: 0 2px; }
