/* Modern layout: the prospect workbench and a lighter look. Only active with <html data-ui="modern">; classic keeps app.css as it was. */
html[data-ui="classic"] .wb, html[data-ui="classic"] .ui-modern-only { display: none; }
.wb { display: flex; flex-direction: column; gap: 12px; }
.wb-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.wb-title h1 { margin: 0; }
.wb-title .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wb-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wb-bar input[type=search] { flex: 1 1 260px; max-width: 380px; padding: 9px 14px; border: 1px solid var(--sage, #cdd9d3); border-radius: 999px; background: var(--white); font: inherit; }
.pill { border: 1px solid #cdd9d3; background: var(--white); color: var(--navy); padding: 6px 14px; border-radius: 999px; font: inherit; font-size: .85rem; cursor: pointer; }
.pill:hover { border-color: var(--mid-navy); }
.pill.on { background: var(--navy); color: var(--white); border-color: var(--navy); }
.wb-sort { margin-left: auto; font-size: .85rem; color: var(--mid-navy); display: flex; gap: 6px; align-items: center; }
.wb-sort select, .wb-f select, .wb-f input { padding: 6px 8px; border: 1px solid #cdd9d3; border-radius: 8px; background: var(--white); font: inherit; }
.wb-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 14px; padding: 14px; background: var(--white); border-radius: 12px; box-shadow: 0 1px 3px rgba(26,41,45,.08); align-items: end; }
.wb-panel[hidden], .wb-bulk[hidden] { display: none; }
.wb-f { display: flex; flex-direction: column; gap: 3px; font-size: .75rem; color: var(--mid-navy); }
.wb-f.wide { grid-column: span 2; }
.wb-bulk { display: flex; gap: 10px; align-items: center; padding: 8px 14px; background: var(--teal-soft); border-radius: 10px; flex-wrap: wrap; }
.wb-cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.wb-list { background: var(--white); border-radius: 12px; box-shadow: 0 1px 3px rgba(26,41,45,.08); overflow: hidden; }
.wb-hd, .wb-row { display: grid; grid-template-columns: 28px minmax(150px, 1.3fr) minmax(160px, 1.6fr) 80px 64px 96px; gap: 12px; align-items: center; padding: 0 14px; }
.wb-hd { height: 34px; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mid-navy); border-bottom: 1px solid #e3ebe6; background: var(--off-white); }
.wb-row { min-height: 58px; padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid #eef3ee; cursor: pointer; outline: none; }
.wb-row:hover { background: #f7faf7; }
.wb-row:focus-visible { box-shadow: inset 0 0 0 2px var(--teal); }
.wb-row.open { background: var(--lavender-light); box-shadow: inset 3px 0 0 var(--teal); }
.wb-co .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-co .sub, .wb-signal { overflow: hidden; }
.wb-co .sub { white-space: nowrap; text-overflow: ellipsis; font-size: .78rem; color: var(--mid-navy); }
.sig { display: block; font-size: .82rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sig b { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; background: var(--teal-soft); margin-right: 4px; }
.sig.none { color: #9aa9a3; }
.sig.k-incident b, .sig.k-deal b { background: #f4e1da; }
.sig.k-people b { background: #e8e1c9; }
.sig-date { font-size: .72rem; color: var(--mid-navy); }
.wb-stage .jbadge { margin-right: 4px; }
.wb-size { font-variant-numeric: tabular-nums; text-align: right; font-size: .85rem; }
.wbars { display: flex; flex-direction: column; gap: 3px; }
.wbar { display: block; height: 5px; border-radius: 3px; background: #e3ebe6; overflow: hidden; }
.wbar i { display: block; height: 100%; background: var(--teal); }
.wbar.tim i { background: var(--lavender); }
.wbnum { font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.wbnum small { font-weight: 400; color: var(--mid-navy); }
.wb-fit { display: grid; gap: 3px; }
.wb-more { padding: 12px; text-align: center; }
.wb-more:empty { display: none; }
.wb-drawer { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; background: var(--white); border-radius: 12px; box-shadow: 0 1px 3px rgba(26,41,45,.08), 0 8px 24px rgba(26,41,45,.06); padding: 18px; }
.wb-empty { color: var(--mid-navy); text-align: center; padding: 40px 10px; }
.wb-dr-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.wb-dr-head h2 { margin: 0 0 2px; font-size: 1.15rem; }
.wb-dr-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.wb-drawer h3 { margin: 16px 0 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mid-navy); }
.wb-hook { display: grid; grid-template-columns: 70px 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid #eef3ee; font-size: .85rem; }
.wb-evo { display: flex; gap: 10px; align-items: center; padding: 4px 0; }
.wb-fig { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wb-fig > div { background: var(--off-white); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.wb-fig b { font-size: 1.3rem; }
.wb-fig i { font-style: normal; font-size: .75rem; color: var(--mid-navy); }
.wb-fig i.neg { color: var(--alert, #b4453a); }
.wb-fitrow { display: grid; grid-template-columns: 1fr 70px 56px; gap: 8px; align-items: center; padding: 4px 0; font-size: .85rem; }
.wb-person { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: .85rem; }
.wb-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
@media (max-width: 1100px) { .wb-cols { grid-template-columns: 1fr; } .wb-drawer { position: static; max-height: none; } }
@media (max-width: 760px) { .wb-hd { display: none; } .wb-row { grid-template-columns: 24px 1fr 90px; } .wb-signal, .wb-stage, .wb-size { display: none; } }
.ui-switch { font-size: .75rem; padding: 4px 10px; opacity: .8; }

/* ---- dashboard ---- */
html[data-ui="modern"] .c-only, html[data-ui="classic"] .m-only { display: none; }
html[data-ui="modern"] .kpis { grid-template-columns: 1.2fr repeat(3, 1fr); gap: 12px; }
html[data-ui="modern"] .kpi-main { padding: 14px 18px; }
html[data-ui="modern"] .ring { border: 0; background: var(--white); box-shadow: 0 1px 3px rgba(26,41,45,.08); border-radius: 12px; }
html[data-ui="modern"] .ring svg { width: 56px; height: 56px; }
html[data-ui="modern"] .section-head { border-bottom: 0; padding-bottom: 0; margin-bottom: 10px; }
html[data-ui="modern"] .section-head h2 { font-size: 1.05rem; }
html[data-ui="modern"] .section { margin-top: 26px; }
.today { margin-bottom: 4px; background: var(--white); border-radius: 12px; box-shadow: 0 1px 3px rgba(26,41,45,.08); overflow: hidden; margin-bottom: 8px; }
.today-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(200px, 2fr) 140px; gap: 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid #eef3ee; color: inherit; text-decoration: none; }
.today-row:hover { background: #f7faf7; }
.today-row .nm { font-weight: 600; display: flex; flex-direction: column; }
.today-row .nm .sub { font-weight: 400; font-size: .78rem; color: var(--mid-navy); }
@media (max-width: 760px) { .today-row { grid-template-columns: 1fr; gap: 4px; } html[data-ui="modern"] .kpis { grid-template-columns: 1fr 1fr; } }

/* ---- company page ---- */
html[data-ui="modern"] .company-head { background: var(--white); border-radius: 14px; box-shadow: 0 1px 3px rgba(26,41,45,.08); padding: 18px 22px; margin-bottom: 18px; }
html[data-ui="modern"] .co-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
html[data-ui="modern"] .co-title h1 { margin: 0; }
html[data-ui="modern"] .co-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
html[data-ui="modern"] .co-main > .section:first-child { margin-top: 0; }
html[data-ui="modern"] .co-side { display: flex; flex-direction: column; gap: 14px; }
html[data-ui="modern"] .co-side > * { background: var(--white); border-radius: 12px; box-shadow: 0 1px 3px rgba(26,41,45,.08); padding: 14px 16px; margin: 0; }
html[data-ui="modern"] .co-side .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border: 0; }
html[data-ui="modern"] .co-side .fact { border: 0; padding: 0; }
html[data-ui="modern"] .co-main .section { margin-top: 22px; }
html[data-ui="modern"] .co-main .section-head, html[data-ui="modern"] .co-side .section-head { border-bottom: 0; }
@media (max-width: 1100px) { html[data-ui="modern"] .co-grid { grid-template-columns: 1fr; } html[data-ui="modern"] .co-side { position: static; max-height: none; } }
html[data-ui="modern"] #today-slot + .kpis { margin-top: 18px; }
.today + .info-line { display: inline-block; margin: 6px 0 14px; }
html[data-ui="modern"] .co-grid { margin-top: 18px; }
html[data-ui="modern"] .co-side .fit { overflow: hidden; }
html[data-ui="modern"] .co-side .fit > summary { grid-template-columns: minmax(0, 1fr) 90px auto; gap: 10px; padding: 12px; }
html[data-ui="modern"] .co-side .fit-toggle { display: none; }

/* ---- feedback buttons ---- */
.fb { display: inline-flex; gap: 2px; margin-left: 8px; flex: none; opacity: .35; transition: opacity .15s; }
.hook:hover .fb, .wb-hook:hover .fb, .fit:hover .fb, .fb:focus-within, .actions .fb { opacity: 1; }
.fb-b { border: 1px solid transparent; background: transparent; color: var(--mid-navy); border-radius: 6px; width: 22px; height: 22px; font-size: .65rem; cursor: pointer; line-height: 1; padding: 0; }
.fb-b:hover { border-color: #cdd9d3; background: var(--white); }
.fb-b[aria-pressed="true"] { background: var(--teal-soft); color: var(--navy); border-color: var(--teal); }
.fb-b[data-fb-v="not_useful"][aria-pressed="true"] { background: #f4e1da; border-color: #d9a597; }
.wb-hook { grid-template-columns: 70px 1fr auto; }
.hook { grid-template-columns: 84px 1fr auto; }
