/* WOTTT 04.55.2 r5 — Opportunities workspace, presentation ONLY.
   No JS, API, status, value, stage, activity, refresh or access changes.
   Scoped to .opportunities-shell; functional controls remain in the accepted r4 modules. */
.opportunities-shell{
  --op-ink:var(--ui-ink,#26364f);--op-muted:var(--ui-muted,#66778e);
  --op-line:color-mix(in srgb,var(--ui-line,#dce4f0) 86%,#b7c9eb);
  --op-shadow:0 10px 30px rgba(42,73,121,.065);
  --op-blue:#4d73d8;--op-purple:#8262c9;--op-teal:#168c95;
  --op-orange:#c17b27;--op-red:#cf5368;--op-green:#268866;
  font-family:Inter,'Segoe UI',system-ui,sans-serif;color:var(--op-ink);
}
.opportunities-shell .ow-main{background:var(--ui-bg,#f7f9fd)}
.opportunities-shell .ow-header{
  height:auto;min-height:106px;padding:19px clamp(16px,2.5vw,38px);
  background:radial-gradient(ellipse 23% 150% at 83% 0%,color-mix(in srgb,#b4a8f6 20%,transparent),transparent),
  linear-gradient(110deg,color-mix(in srgb,var(--ui-surface,#fff) 71%,#e1efff),color-mix(in srgb,var(--ui-surface,#fff) 89%,#f5eeff));
  border-bottom:1px solid var(--op-line);gap:18px;
}
.opportunities-shell .ow-header .eyebrow{font-weight:800;letter-spacing:.16em;color:color-mix(in srgb,var(--op-blue) 85%,var(--op-muted));font-size:10px}
.opportunities-shell .ow-header h1{font-weight:800;font-size:clamp(22px,2.05vw,28px);letter-spacing:-.6px;gap:11px}
.opportunities-shell .ow-header h1::before{
 content:"";width:41px;height:41px;flex:none;border-radius:13px;
 background-color:#e9efff;background-repeat:no-repeat;background-size:23px;background-position:center;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234d73d8' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='14' rx='2'/%3E%3Cpath d='M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2M3 12h18'/%3E%3C/svg%3E");
 box-shadow:0 4px 12px #4d73d817;border:1px solid #cad9fc;
}
.opportunities-shell .ow-header-tools :is(select,.icon-button){border:1px solid var(--op-line);border-radius:11px;background:var(--ui-surface);box-shadow:0 3px 12px #4664940a}
.opportunities-shell .ow-header-tools :is(select,.icon-button):focus-visible{outline:3px solid #8faeec;outline-offset:2px}
.opportunities-shell .ow-scroll{
 padding:24px clamp(16px,2.5vw,38px) 30px;
 background:radial-gradient(ellipse 42% 28% at 99% 0%,#879fff0b,transparent 90%),var(--ui-bg,#f8fafd);
}
/* Secondary Opportunity navigation */
.opportunities-shell .ow-sidebar{background:color-mix(in srgb,var(--ui-surface) 92%,#edf3ff);border-right:1px solid var(--op-line);width:181px;min-width:181px}
.opportunities-shell .ow-sidebar-head{height:84px;font-size:13px;color:var(--op-ink);gap:10px}
.opportunities-shell .ow-sidebar-head>.ui-icon{width:32px;height:32px;flex:none;padding:7px;border-radius:11px;color:#5577c8;background:color-mix(in srgb,var(--ui-surface) 60%,#dce9ff)}
.opportunities-shell .ow-nav-item{min-height:42px;border-radius:11px;padding:11px 10px;margin:4px 0;font-weight:650;color:var(--op-muted);transition:background-color .15s,color .15s}
.opportunities-shell .ow-nav-item .ui-icon{color:var(--op-blue)}
.opportunities-shell .ow-nav-item[data-value=won] .ui-icon{color:var(--op-green)}
.opportunities-shell .ow-nav-item[data-value=lost] .ui-icon{color:var(--op-red)}
.opportunities-shell .ow-nav-item.active{color:var(--op-blue);background:color-mix(in srgb,var(--ui-surface) 63%,#e2eaff);box-shadow:inset 3px 0 var(--op-blue)}
.opportunities-shell .ow-nav-item[data-value=won].active{color:var(--op-green);box-shadow:inset 3px 0 var(--op-green)}
.opportunities-shell .ow-nav-item[data-value=lost].active{color:var(--op-red);box-shadow:inset 3px 0 var(--op-red)}
.opportunities-shell .ow-sidebar-note{font-size:11px;line-height:1.65;border-top:1px solid var(--op-line)}
/* Follow-up summary: status colors only, not computed status changes */
.opportunities-shell .ow-metrics{gap:14px}
.opportunities-shell .ow-metric{
 --op-tone:var(--op-blue);--op-tint:#eaf1ff;position:relative;min-height:113px;padding:19px 19px 17px;
 border-radius:17px;background:linear-gradient(145deg,color-mix(in srgb,var(--ui-surface,#fff) 88%,var(--op-tint)),var(--ui-surface,#fff) 86%);
 border:1px solid color-mix(in srgb,var(--op-tone) 23%,var(--op-line));border-top:3px solid var(--op-tone);
 box-shadow:var(--op-shadow);gap:12px;overflow:hidden;transition:transform .15s,box-shadow .15s;
}
.opportunities-shell .ow-metric:nth-child(1){--op-tone:#d05765;--op-tint:#fff0f2}
.opportunities-shell .ow-metric:nth-child(2){--op-tone:#c58424;--op-tint:#fff3dc}
.opportunities-shell .ow-metric:nth-child(3){--op-tone:#7e68be;--op-tint:#f2edff}
.opportunities-shell .ow-metric::after{content:"";position:absolute;right:-20px;top:-24px;width:100px;height:100px;border-radius:50%;background:color-mix(in srgb,var(--op-tone) 7%,transparent);pointer-events:none}
.opportunities-shell .ow-metric>span{font-size:12px;font-weight:730;color:var(--op-ink);gap:10px;line-height:1.4}
.opportunities-shell .ow-metric>span .ui-icon{width:32px;height:32px;padding:8px;background:color-mix(in srgb,var(--op-tone) 11%,var(--ui-surface));color:var(--op-tone);border-radius:11px;flex:none}
.opportunities-shell .ow-metric strong{font-size:31px;font-weight:780;color:var(--op-tone);letter-spacing:-.05em}
.opportunities-shell .ow-metric.active{outline:2px solid color-mix(in srgb,var(--op-tone) 65%,transparent);outline-offset:1px}
.opportunities-shell .ow-metric:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 16px 32px rgba(42,73,121,.12)}
.opportunities-shell .ow-scope{margin:12px 2px 21px;padding:9px 12px;line-height:1.55;border-left:3px solid #9eb7e7;background:color-mix(in srgb,var(--ui-surface) 81%,#e4efff);border-radius:0 9px 9px 0;font-size:11px}
/* Filters remain unchanged functionally; emphasis is purely typographic */
.opportunities-shell .ow-filter-group{padding:17px 18px 15px;background:var(--ui-surface);border:1px solid var(--op-line);border-radius:16px;box-shadow:var(--op-shadow)}
.opportunities-shell .ow-filter>span,.opportunities-shell .ow-search>label{font-weight:700;font-size:11px;color:var(--op-muted)}
.opportunities-shell .ow-filter select,.opportunities-shell .ow-search>div{
 height:41px;border:1px solid var(--op-line);border-radius:10px;background:color-mix(in srgb,var(--ui-surface) 95%,#e6efff);box-shadow:0 1px 3px #445a7407;
}
.opportunities-shell .ow-filter select{padding:8px 10px;font-size:12px;color:var(--op-ink)}
.opportunities-shell .ow-search input{font-size:12px;color:var(--op-ink)}
.opportunities-shell .ow-filter :is(select,input):focus-visible,.opportunities-shell .ow-search:focus-within>div{outline:2px solid #8badeb;outline-offset:2px}
.opportunities-shell .ow-filter-extra{margin:12px 0 0}
.opportunities-shell .ow-results-toolbar{border-top:0;padding-top:15px;margin-top:13px;gap:12px}
.opportunities-shell .ow-results-toolbar>p strong{color:var(--op-blue);font-weight:850}
.opportunities-shell .ow-view-switch{padding:4px;border-radius:12px;background:color-mix(in srgb,var(--ui-surface) 65%,#e6ecf8);border:1px solid var(--op-line);gap:3px}
.opportunities-shell .ow-view-switch button{font-weight:720;border-radius:8px;min-height:31px;padding:6px 12px}
.opportunities-shell .ow-view-switch button[aria-pressed=true]{background:var(--ui-surface);color:var(--op-blue);box-shadow:0 3px 8px #334c7617}
.opportunities-shell .ow-board-hint{padding:7px 10px;border-left:2px solid #a4baf2;background:color-mix(in srgb,var(--ui-surface) 85%,#edf2ff);border-radius:0 8px 8px 0;line-height:1.55}
/* List/table and common compact identity */
.opportunities-shell .ow-table-wrap{border-radius:17px;border-color:var(--op-line);background:var(--ui-surface);box-shadow:var(--op-shadow)}
.opportunities-shell .ow-table th{padding:14px 12px;background:color-mix(in srgb,var(--ui-surface) 54%,#e4edff);font-size:10px;color:var(--op-muted);font-weight:790;letter-spacing:.035em}
.opportunities-shell .ow-table td{padding:17px 12px;border-top:1px solid var(--op-line)}
.opportunities-shell .ow-table tbody tr:hover{background:color-mix(in srgb,var(--ui-surface) 85%,#e7efff)}
.opportunities-shell .ow-person>.avatar{border-radius:12px!important;background:color-mix(in srgb,var(--ui-surface) 52%,#dfe9ff)!important;color:var(--op-blue)!important;border:1px solid color-mix(in srgb,var(--op-blue) 15%,transparent);font-weight:800}
.opportunities-shell .ow-person strong{color:var(--op-ink);font-weight:730}
.opportunities-shell .ow-stage-name{font-weight:800;color:var(--op-blue)}
.opportunities-shell .ow-amount{font-weight:760;color:var(--op-ink);font-variant-numeric:tabular-nums}
.opportunities-shell .ow-followup.overdue{color:var(--op-red)}
.opportunities-shell .ow-followup.overdue strong{color:var(--op-red)}
.opportunities-shell .ow-followup.scheduled .ui-icon{color:var(--op-green)}
.opportunities-shell .wf-outcome[data-outcome=open]{background:color-mix(in srgb,var(--ui-surface) 55%,#dfeeff);color:#3767bd;border-color:#aec9f4}
.opportunities-shell .wf-outcome[data-outcome=won]{background:color-mix(in srgb,var(--ui-surface) 35%,#c8f7df);color:#147c54;border-color:#94ddba}
.opportunities-shell .wf-outcome[data-outcome=lost]{background:color-mix(in srgb,var(--ui-surface) 35%,#ffdae1);color:#ad3652;border-color:#eaa2b2}
/* Board: stage names always come from pipeline; do not invent stages */
.opportunities-shell .ow-board{gap:14px;padding-top:11px;scrollbar-gutter:stable;margin-top:8px}
.opportunities-shell .ow-lane{
 --op-stage:#527be1;--op-stage-soft:#eaf1ff;min-width:252px;width:252px;
 background:linear-gradient(180deg,color-mix(in srgb,var(--ui-surface) 45%,var(--op-stage-soft)),var(--ui-surface) 180px);
 border:1px solid var(--op-line);border-top:3px solid var(--op-stage);border-radius:15px;padding:13px;
 box-shadow:0 6px 22px rgba(34,58,110,.042);
}
.opportunities-shell .ow-lane:nth-child(4n + 2){--op-stage:#8d68cb;--op-stage-soft:#f1ebfc}
.opportunities-shell .ow-lane:nth-child(4n + 3){--op-stage:#1a9597;--op-stage-soft:#e2f8f5}
.opportunities-shell .ow-lane:nth-child(4n + 4){--op-stage:#b98633;--op-stage-soft:#fff4df}
.opportunities-shell .ow-lane:has(.ow-stage-dot.won){--op-stage:#209265;--op-stage-soft:#dff8e8}
.opportunities-shell .ow-lane:has(.ow-stage-dot.lost){--op-stage:#ce556a;--op-stage-soft:#ffe8ec}
.opportunities-shell .ow-lane>header{min-height:31px;gap:9px}
.opportunities-shell .ow-lane>header h3{font-size:12px;font-weight:780;color:var(--op-ink);line-height:1.4}
.opportunities-shell .ow-stage-dot{width:22px;height:22px;flex:none;border-radius:8px;background:color-mix(in srgb,var(--op-stage) 11%,var(--ui-surface));border:1px solid color-mix(in srgb,var(--op-stage) 20%,transparent);display:grid;place-items:center}
.opportunities-shell .ow-stage-dot::after{content:"";width:8px;height:8px;border-radius:50%;background:var(--op-stage)}
.opportunities-shell .ow-lane>header .badge{border-radius:999px}
.opportunities-shell .ow-lane-count{margin:8px 0 14px;color:var(--op-muted);font-size:10px}
.opportunities-shell .ow-card{padding:14px;border-radius:13px;border:1px solid var(--op-line);box-shadow:0 6px 20px #3c5e9210;transition:box-shadow .16s,transform .16s}
.opportunities-shell .ow-card:hover{box-shadow:0 12px 27px #3c5e9224;transform:translateY(-2px)}
.opportunities-shell .ow-card-meta{margin:14px 0 10px;font-size:10px;gap:10px}
.opportunities-shell .ow-card-meta>span:last-child{font-weight:800;color:var(--op-ink);text-align:right}
.opportunities-shell .ow-card .ow-followup{padding-top:10px;border-top:1px solid var(--op-line)}
.opportunities-shell .ow-card-foot{border-top:1px solid var(--op-line);padding-top:10px;align-items:center}
.opportunities-shell .ow-lane-empty{padding:22px 8px;border:1px dashed color-mix(in srgb,var(--op-stage) 28%,var(--op-line));background:color-mix(in srgb,var(--ui-surface) 70%,var(--op-stage-soft));border-radius:11px;line-height:1.6}
/* Detail dialog / record editing: existing controls and protections retained */
.opportunities-shell .ow-detail .re-hero{border-bottom:1px solid var(--op-line);padding:8px 0 17px;align-items:center}
.opportunities-shell .ow-detail .re-hero .ow-person .avatar{width:39px;height:39px;border-radius:13px!important}
.opportunities-shell .ow-detail .re-facts{gap:11px}
.opportunities-shell .ow-detail .re-facts>div{border-radius:12px;border:1px solid var(--op-line);padding:13px 14px;background:color-mix(in srgb,var(--ui-surface) 67%,#eef3ff)}
.opportunities-shell .ow-detail .re-facts dt{font-weight:700;font-size:10px;color:var(--op-muted);margin-bottom:6px}
.opportunities-shell .ow-detail .re-facts dd{font-size:12px;color:var(--op-ink)}
.opportunities-shell .ow-detail :is(.re-section,.re-lineage){border-radius:13px;border-color:var(--op-line);padding:14px;background:var(--ui-surface)}
.opportunities-shell .ow-detail .re-lineage{background:color-mix(in srgb,var(--ui-surface) 83%,#e9f2ff);border-left:3px solid #8ca7df}
.opportunities-shell .ow-detail :is(.re-section,.re-lineage)>h4{font-weight:780;font-size:12px;color:var(--op-ink)}
.opportunities-shell .ow-detail :is(.re-section,.re-lineage)>p{color:var(--op-muted);font-size:11px;line-height:1.6}
.opportunities-shell .ow-detail .re-form{padding:16px;border:1px solid var(--op-line);background:color-mix(in srgb,var(--ui-surface) 88%,#ebf3ff);border-radius:14px}
.opportunities-shell .ow-detail .re-protected{border-radius:12px}
.opportunities-shell .ow-detail .re-tag{border-radius:999px;background:color-mix(in srgb,var(--ui-surface) 65%,#eee7ff);color:var(--op-purple);border-color:color-mix(in srgb,var(--op-purple) 26%,transparent)}
.opportunities-shell .ow-empty{border:1px dashed var(--op-line);border-radius:16px;background:var(--ui-surface);margin-top:15px}
.opportunities-shell :is(.ow-metric,.ow-nav-item,.ow-name,.ow-view-switch button,.ow-card button):focus-visible{outline:3px solid #7da6e9;outline-offset:2px}
/* Responsive: preserve existing mobile card substitution and board scrolling */
@media(max-width:1150px){.opportunities-shell .ow-scroll{padding:18px 19px}.opportunities-shell .ow-header{padding:14px 20px}.opportunities-shell .ow-sidebar{width:153px;min-width:153px}}
@media(max-width:800px){.opportunities-shell .ow-header{min-height:94px}.opportunities-shell .ow-metric{padding:13px}.opportunities-shell .ow-metric strong{font-size:26px}.opportunities-shell .ow-metric>span{font-size:11px}.opportunities-shell .ow-filter-group{padding:13px}}
@media(max-width:600px){.opportunities-shell .ow-header{padding:13px;gap:8px}.opportunities-shell .ow-header h1{font-size:21px}.opportunities-shell .ow-header h1:before{width:33px;height:33px;background-size:18px;border-radius:10px}.opportunities-shell .ow-scroll{padding:14px 12px}.opportunities-shell .ow-metrics{gap:7px}.opportunities-shell .ow-metric{padding:11px 9px;min-height:105px;gap:9px}.opportunities-shell .ow-metric>span{font-size:10px;min-height:28px;display:flex;align-items:center}.opportunities-shell .ow-metric>span .ui-icon{display:none}.opportunities-shell .ow-metric strong{font-size:26px}.opportunities-shell .ow-filter-group.open{display:block;margin-top:10px}.opportunities-shell .ow-lane{min-width:244px;width:244px}.opportunities-shell .ow-card{padding:13px}.opportunities-shell .ow-mobile-cards{gap:12px}.opportunities-shell .ow-results-toolbar{margin-top:10px}}
html[data-theme=dark] .opportunities-shell{--op-ink:#e3eaf8;--op-muted:#adbbd1;--op-line:#3b475e;--op-shadow:0 9px 24px #0004}
html[data-theme=dark] .opportunities-shell .ow-main,html[data-theme=dark] .opportunities-shell .ow-scroll{background:var(--ui-bg,#111927)}
html[data-theme=dark] .opportunities-shell .ow-header{background:linear-gradient(105deg,#253753,#28273d 86%);border-color:#41506a}
html[data-theme=dark] .opportunities-shell .ow-header h1::before{background-color:#2b426e;border-color:#425989}
html[data-theme=dark] .opportunities-shell .ow-sidebar{background:color-mix(in srgb,var(--ui-surface) 91%,#25344e)}
html[data-theme=dark] .opportunities-shell .ow-metric{background:linear-gradient(125deg,color-mix(in srgb,var(--ui-surface) 87%,var(--op-tone)),var(--ui-surface) 85%)}
html[data-theme=dark] .opportunities-shell .ow-metric strong{color:color-mix(in srgb,var(--op-tone) 65%,#fff)}
html[data-theme=dark] .opportunities-shell .ow-filter-group{background:var(--ui-surface)}
html[data-theme=dark] .opportunities-shell .ow-scope{background:var(--ui-surface)}
html[data-theme=dark] .opportunities-shell .ow-stage-name{color:#adc5ff}
html[data-theme=dark] .opportunities-shell .wf-outcome[data-outcome=open]{color:#c1d6ff;border-color:#4065a3;background:#263857}
html[data-theme=dark] .opportunities-shell .wf-outcome[data-outcome=won]{color:#b4f0d3;border-color:#31745d;background:#214a3f}
html[data-theme=dark] .opportunities-shell .wf-outcome[data-outcome=lost]{color:#ffd2da;border-color:#874355;background:#562d3f}
html[data-theme=dark] .opportunities-shell .ow-lane{background:linear-gradient(180deg,color-mix(in srgb,var(--ui-surface) 83%,var(--op-stage)),var(--ui-surface) 180px)}
html[data-theme=dark] .opportunities-shell .ow-lane-empty{background:color-mix(in srgb,var(--ui-surface) 94%,var(--op-stage))}
html[data-theme=dark] .opportunities-shell .ow-detail .re-facts>div{background:color-mix(in srgb,var(--ui-surface) 90%,#4e75ae)}
html[data-theme=dark] .opportunities-shell .ow-detail .re-lineage{background:color-mix(in srgb,var(--ui-surface) 89%,#4c70b7)}
html[data-theme=dark] .opportunities-shell .ow-detail .re-form{background:var(--ui-surface)}
@media(prefers-reduced-motion:reduce){.opportunities-shell .ow-metric,.opportunities-shell .ow-card,.opportunities-shell .ow-nav-item{transition:none!important}.opportunities-shell .ow-metric:hover,.opportunities-shell .ow-card:hover{transform:none!important}}
