
/* THREESIXOH_STRUCTURAL_UI_V1 */
:root{
  --tso-navy-950:#081a34;--tso-navy-900:#0b1d3a;--tso-navy-800:#142f46;
  --tso-teal:#00a7a5;--tso-teal-dark:#008b8d;--tso-teal-soft:#e8fbfa;
  --tso-orange:#f59e0b;--tso-bg:#f4f7fa;--tso-surface:#fff;
  --tso-line:#e2e8f0;--tso-line-strong:#cbd5e1;--tso-text:#172033;
  --tso-muted:#64748b;--tso-danger:#dc2626;--tso-success:#16a34a;
  --tso-warning:#d97706;--tso-module:#00a7a5;--tso-sidebar-width:264px;
  --tso-topbar-height:78px;--tso-radius:14px;
  --tso-shadow:0 8px 28px rgba(15,23,42,.055);
  --nav:var(--tso-navy-900);--accent:var(--tso-teal);--bg:var(--tso-bg);
  --panel:var(--tso-surface);--text:var(--tso-text);--muted:var(--tso-muted);
  --line:var(--tso-line);--danger:var(--tso-danger)
}
*{box-sizing:border-box}
html{min-height:100%;background:var(--tso-bg);color-scheme:light}
body{min-height:100vh;margin:0;background:var(--tso-bg)!important;color:var(--tso-text);
font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;
line-height:1.45;-webkit-font-smoothing:antialiased}
body[data-tso-module^="sales"]{--tso-module:#f59e0b}
body[data-tso-module^="production"],body[data-tso-module^="field"]{--tso-module:#22c55e}
body[data-tso-module^="customer"],body[data-tso-module^="document"]{--tso-module:#00a7a5}
body[data-tso-module^="report"]{--tso-module:#6366f1}
body[data-tso-module^="admin"],body[data-tso-module^="setting"]{--tso-module:#7c3aed}
body[data-tso-module^="alert"],body[data-tso-module^="warranty"],body[data-tso-module^="service"]{--tso-module:#f43f5e}

/* Shell */
.tso-app-shell{min-height:100vh}
.tso-sidebar{position:fixed;inset:0 auto 0 0;z-index:1100;display:flex;flex-direction:column;
width:var(--tso-sidebar-width);overflow:hidden;background:
radial-gradient(circle at 28% 0%,rgba(0,167,165,.23),transparent 28%),
linear-gradient(180deg,var(--tso-navy-800),var(--tso-navy-950));color:#fff;
box-shadow:10px 0 34px rgba(8,26,52,.12)}
.tso-sidebar-brand{display:flex;align-items:center;gap:11px;min-height:var(--tso-topbar-height);
padding:15px 20px;color:#fff!important;text-decoration:none!important;
border-bottom:1px solid rgba(255,255,255,.1)}
.tso-sidebar-brand img{width:43px;height:43px;flex:0 0 43px;border-radius:11px;
box-shadow:0 7px 20px rgba(0,0,0,.2)}
.tso-wordmark{display:inline-flex;align-items:baseline;color:#fff;font-size:21px;font-weight:760;
letter-spacing:-.045em;white-space:nowrap}
.tso-wordmark-oh{color:#29cbc5}.tso-wordmark-bang{color:var(--tso-orange);padding-left:1px}
.tso-sidebar-tagline{padding:14px 20px 10px;color:#9fc2d7;font-size:11px;font-weight:650;
letter-spacing:.035em}
.tso-sidebar-nav.primary-navigation{display:flex!important;flex:1 1 auto;flex-direction:column;
align-items:stretch!important;justify-content:flex-start!important;gap:3px!important;min-width:0;
width:100%;padding:8px 12px 18px;overflow-x:hidden!important;overflow-y:auto!important;
scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent}
.tso-sidebar-nav .nav-group,.tso-sidebar-nav .nav-utility{flex:0 0 auto;width:100%;min-width:0;margin:0!important}
.tso-sidebar-nav .nav-account{margin-top:auto!important;padding-top:8px;border-top:1px solid rgba(255,255,255,.1)}
.tso-sidebar-nav .nav-group-toggle,.tso-sidebar-nav .nav-utility{display:flex;align-items:center;
justify-content:flex-start;gap:9px;width:100%;min-height:43px;padding:10px 12px;
border:1px solid transparent;border-radius:10px;color:#dce8f1!important;font-size:13px!important;
font-weight:720;line-height:1.1;text-decoration:none!important;cursor:pointer}
.tso-sidebar-nav .nav-group-toggle::before,.tso-sidebar-nav .nav-utility::before{
display:inline-grid;place-items:center;width:22px;height:22px;flex:0 0 22px;color:#7de2de;
font-size:15px;font-weight:500}
.tso-sidebar-nav .nav-work>.nav-group-toggle::before{content:"⌂"}
.tso-sidebar-nav .nav-customers>.nav-group-toggle::before{content:"◎"}
.tso-sidebar-nav .nav-sales>.nav-group-toggle::before{content:"↗"}
.tso-sidebar-nav .nav-production>.nav-group-toggle::before{content:"◇"}
.tso-sidebar-nav .nav-reports>.nav-group-toggle::before{content:"▥"}
.tso-sidebar-nav .nav-admin>.nav-group-toggle::before{content:"⚙"}
.tso-sidebar-nav .nav-account>.nav-group-toggle::before{display:none}
.tso-sidebar-nav .nav-utility::before{content:"·"}
.tso-sidebar-nav .nav-group-toggle:hover,.tso-sidebar-nav .nav-group-toggle:focus-visible,
.tso-sidebar-nav .nav-utility:hover,.tso-sidebar-nav .nav-utility:focus-visible,
.tso-sidebar-nav .nav-group[open]>.nav-group-toggle{background:rgba(255,255,255,.085);
border-color:rgba(255,255,255,.06);color:#fff!important;outline:none}
.tso-sidebar-nav .nav-group.active>.nav-group-toggle,.tso-sidebar-nav .nav-utility.active{
background:linear-gradient(90deg,rgba(0,167,165,.92),rgba(0,167,165,.62));color:#fff!important;
box-shadow:inset 3px 0 0 #9ff4ef,0 6px 18px rgba(0,167,165,.16)}
.tso-sidebar-nav .nav-chevron{margin-left:auto;opacity:.65}
.tso-sidebar-nav .nav-count{margin-left:auto;background:rgba(255,255,255,.92);color:var(--tso-navy-900)}
.tso-sidebar-nav .nav-count+.nav-chevron{margin-left:0}
.tso-sidebar-nav .nav-dropdown,.tso-sidebar-nav .nav-dropdown.nav-dropdown-align-right,
.tso-sidebar-nav .nav-dropdown-align-right>.nav-dropdown{position:static;top:auto;right:auto;left:auto;
width:100%;margin:3px 0 7px;padding:5px;background:rgba(3,17,35,.26);border:0;border-radius:10px;
box-shadow:none;color:#fff}
.tso-sidebar-nav .nav-dropdown::before{display:none}.tso-sidebar-nav .nav-grid{display:grid;grid-template-columns:1fr;gap:4px}
.tso-sidebar-nav .nav-section-divided{margin-top:5px;padding-top:6px;border-top-color:rgba(255,255,255,.09)}
.tso-sidebar-nav .nav-section-title{padding:7px 9px 4px;color:#78a0b8;font-size:9px;letter-spacing:.11em}
.tso-sidebar-nav .nav-subitem{padding:8px 10px 8px 12px;border-radius:8px;color:#d5e3ed!important}
.tso-sidebar-nav .nav-subitem:hover,.tso-sidebar-nav .nav-subitem:focus-visible{
background:rgba(255,255,255,.075)!important;color:#fff!important;outline:none}
.tso-sidebar-nav .nav-subitem.active{background:rgba(0,167,165,.19)!important;
box-shadow:inset 3px 0 0 var(--tso-teal)!important}
.tso-sidebar-nav .nav-subitem strong{color:inherit!important;font-size:12px}
.tso-sidebar-nav .nav-subitem small{color:#7fa2b9;font-size:10px}
.tso-sidebar-nav .nav-account-card{border-bottom-color:rgba(255,255,255,.09)}
.tso-sidebar-nav .nav-account-card strong{color:#fff}.tso-sidebar-nav .nav-account-card small{color:#85a9bf}
.tso-sidebar-nav .nav-logout-button{background:rgba(244,63,94,.1);color:#fecdd3}
.tso-sidebar-nav .nav-logout-button:hover{background:rgba(244,63,94,.2)}
.tso-app-main{min-height:100vh;margin-left:var(--tso-sidebar-width)}
.tso-app-topbar{position:sticky;top:0;z-index:1000;display:grid;
grid-template-columns:minmax(210px,.65fr) minmax(280px,1fr) auto;align-items:center;gap:22px;
min-height:var(--tso-topbar-height);padding:12px 28px;background:rgba(255,255,255,.96);
border-bottom:1px solid var(--tso-line);box-shadow:0 1px 10px rgba(15,23,42,.04);
backdrop-filter:blur(12px)}
.tso-mobile-nav-toggle{display:none;width:42px;min-height:42px;padding:0;border:1px solid var(--tso-line);
background:#fff;color:var(--tso-navy-900);font-size:22px}
.tso-topbar-copy{min-width:0}.tso-topbar-copy strong,.tso-topbar-copy span{display:block}
.tso-topbar-copy strong{overflow:hidden;color:var(--tso-navy-800);font-size:16px;text-overflow:ellipsis;white-space:nowrap}
.tso-topbar-copy span{overflow:hidden;margin-top:3px;color:var(--tso-muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.tso-search-wrap{position:relative}.tso-search-wrap::before{content:"⌕";position:absolute;z-index:1;top:50%;left:15px;
color:#64748b;font-size:20px;transform:translateY(-52%);pointer-events:none}
.tso-app-topbar .global-search{width:100%;min-width:0}
.tso-app-topbar .global-search input{width:100%;max-width:620px;min-height:44px;margin:0;padding-left:42px;
background:#fff!important;border:1px solid var(--tso-line)!important;border-radius:11px!important;
box-shadow:0 2px 8px rgba(15,23,42,.035)}
.tso-topbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}
.tso-topbar-icon,.tso-quick-add,.tso-user-chip{min-height:42px;border-radius:10px;text-decoration:none!important}
.tso-topbar-icon{position:relative;display:grid;place-items:center;width:42px;border:1px solid var(--tso-line);
background:#fff;color:var(--tso-navy-800)!important;font-size:18px}
.tso-topbar-icon:hover{border-color:#9ddbd9;background:var(--tso-teal-soft)}
.tso-topbar-count{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;padding:0 4px;
border-radius:999px;background:var(--tso-danger);color:#fff;font-size:9px;font-weight:800;line-height:18px;text-align:center}
.tso-quick-add{display:inline-grid;place-items:center;width:42px;border:0;background:var(--tso-teal);
color:#fff!important;font-size:23px;font-weight:500;box-shadow:0 7px 18px rgba(0,167,165,.18)}
.tso-quick-add:hover{background:var(--tso-teal-dark)}
.tso-user-chip{display:grid;grid-template-columns:34px auto;grid-template-rows:auto auto;column-gap:9px;
align-items:center;min-width:150px;padding:4px 10px 4px 5px;border:1px solid var(--tso-line);background:#fff;color:var(--tso-text)!important}
.tso-user-chip .user-initial{grid-row:1/3;width:34px;height:34px;background:var(--tso-navy-800);color:#fff}
.tso-user-chip strong{overflow:hidden;align-self:end;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.tso-user-chip small{overflow:hidden;align-self:start;margin:0;color:var(--tso-muted);font-size:9px;text-overflow:ellipsis;white-space:nowrap}
.tso-content.container{width:100%;max-width:1680px;margin:0 auto;padding:28px 32px 48px}

/* Shared content */
h1,h2,h3,h4,.page-title,.section-title{color:var(--tso-text);letter-spacing:-.022em}
h1,.page-title{font-weight:760}a{color:var(--tso-teal-dark)}a:hover{color:var(--tso-navy-800)}
.page-head{align-items:flex-start;padding:0 0 16px!important;border-bottom:1px solid var(--tso-line)!important}
.page-head::before{display:none!important}
.panel,.card,.metric-card,.stat-card,.record-card,.dashboard-card,section.panel{
background:var(--tso-surface)!important;border:1px solid var(--tso-line)!important;
border-radius:var(--tso-radius)!important;box-shadow:var(--tso-shadow)}
.panel{padding:20px}.stats{gap:14px}.stat{position:relative;overflow:hidden;min-height:104px;
padding:18px 18px 17px 20px;border:1px solid var(--tso-line);border-radius:13px;background:#fff;
box-shadow:0 5px 18px rgba(15,23,42,.035)}
.stat::before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:var(--tso-module)}
.stat span{color:var(--tso-muted);font-size:11px;font-weight:650}.stat strong{color:var(--tso-navy-900);font-size:26px;letter-spacing:-.035em}
.stat.danger strong{color:var(--tso-danger)}
.button,button,input[type=submit],input[type=button]{min-height:40px;border-radius:9px!important;font:inherit;font-weight:680}
.button.primary,button.primary,input[type=submit].primary{border-color:var(--tso-navy-800)!important;background:var(--tso-navy-800)!important;color:#fff!important;box-shadow:0 6px 15px rgba(20,47,70,.13)}
.button.primary:hover,button.primary:hover,input[type=submit].primary:hover{border-color:var(--tso-navy-950)!important;background:var(--tso-navy-950)!important}
input,select,textarea{min-height:42px;border:1px solid var(--tso-line-strong)!important;border-radius:9px!important;background:#fff!important;color:var(--tso-text)!important}
input:focus,select:focus,textarea:focus{border-color:var(--tso-teal)!important;box-shadow:0 0 0 3px rgba(0,167,165,.13)!important;outline:none}
table{border-collapse:separate;border-spacing:0}thead th{background:#f8fafc!important;color:#536175!important;border-bottom:1px solid var(--tso-line)!important;font-size:10px;font-weight:800;letter-spacing:.055em}
tbody td{border-bottom-color:#edf1f5!important}tbody tr:hover td{background:#f8fbfc}
.badge,.status,.status-badge,.chip,.pill,.tag{border-radius:999px!important;font-weight:700}

/* Command Center */
.tso-dashboard-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:22px;margin-bottom:22px}
.tso-dashboard-hero h1{margin:0;color:var(--tso-navy-900);font-size:clamp(27px,3vw,38px)}
.tso-dashboard-hero p{margin:6px 0 0;color:var(--tso-muted)}
.tso-dashboard-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.tso-dashboard-actions .button+.button{margin-left:0}
.tso-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:14px;margin-bottom:18px}
.tso-kpi-card{position:relative;display:block;min-height:116px;overflow:hidden;padding:17px 18px;
border:1px solid var(--tso-line);border-radius:13px;background:#fff;color:var(--tso-text)!important;
text-decoration:none!important;box-shadow:0 5px 18px rgba(15,23,42,.035);
transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease}
.tso-kpi-card:hover{transform:translateY(-2px);border-color:#b8deda;box-shadow:0 10px 26px rgba(15,23,42,.075)}
.tso-kpi-card::after{content:"";position:absolute;right:-28px;bottom:-43px;width:112px;height:112px;
border:20px solid var(--kpi-color,var(--tso-teal));border-radius:50%;opacity:.055}
.tso-kpi-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tso-kpi-label{color:var(--tso-muted);font-size:10px;font-weight:760;letter-spacing:.03em;text-transform:uppercase}
.tso-kpi-icon{display:grid;place-items:center;width:29px;height:29px;border-radius:9px;
background:color-mix(in srgb,var(--kpi-color,var(--tso-teal)) 12%,white);
color:var(--kpi-color,var(--tso-teal));font-size:14px;font-weight:850}
.tso-kpi-value{display:block;margin-top:11px;color:var(--tso-navy-900);font-size:27px;font-weight:790;letter-spacing:-.045em}
.tso-kpi-note{display:block;margin-top:5px;color:var(--tso-muted);font-size:10px}
.tso-dashboard-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}
.tso-dashboard-card{grid-column:span 3;min-width:0;margin:0;padding:18px}
.tso-dashboard-card.span-4{grid-column:span 4}.tso-dashboard-card.span-5{grid-column:span 5}
.tso-dashboard-card.span-6{grid-column:span 6}.tso-dashboard-card.span-7{grid-column:span 7}
.tso-dashboard-card.span-8{grid-column:span 8}.tso-dashboard-card.span-12{grid-column:span 12}
.tso-card-head{display:flex;align-items:center;justify-content:space-between;gap:13px;margin-bottom:14px}
.tso-card-head h2{margin:0;color:var(--tso-navy-900);font-size:15px}.tso-card-head a,.tso-card-head span{color:var(--tso-teal-dark);font-size:10px;font-weight:720}
.tso-empty-state{display:grid;place-items:center;min-height:130px;padding:20px;color:var(--tso-muted);text-align:center;border:1px dashed #d7e0e8;border-radius:11px;background:#fbfcfd}
.tso-empty-small{min-height:92px}.tso-spaced{margin-top:12px}
.tso-queue-list{display:grid;gap:9px}.tso-queue-row{display:grid;grid-template-columns:35px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:52px;padding:8px 10px;border:1px solid #edf1f5;border-radius:10px;background:#fff;text-decoration:none!important}
.tso-queue-row:hover{border-color:#cce4e2;background:#fbfefe}.tso-queue-dot{display:grid;place-items:center;width:35px;height:35px;border-radius:10px;background:var(--tso-teal-soft);color:var(--tso-teal-dark);font-size:13px;font-weight:850}
.tso-danger-dot{background:#fff1f2;color:#dc2626}.tso-queue-main{min-width:0}.tso-queue-main strong,.tso-queue-main small{display:block}
.tso-queue-main strong{overflow:hidden;color:var(--tso-text);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.tso-queue-main small{overflow:hidden;margin-top:3px;color:var(--tso-muted);font-size:9px;text-overflow:ellipsis;white-space:nowrap}
.tso-queue-meta{color:var(--tso-muted);font-size:9px;white-space:nowrap}
.tso-mini-metrics{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.tso-mini-metric{padding:12px;border:1px solid #edf1f5;border-radius:10px;background:#fbfcfd}
.tso-mini-metric span,.tso-mini-metric strong{display:block}.tso-mini-metric span{color:var(--tso-muted);font-size:9px}.tso-mini-metric strong{margin-top:4px;color:var(--tso-navy-900);font-size:20px}
.tso-stage-list{display:grid;gap:10px}.tso-stage-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}
.tso-stage-row a{overflow:hidden;color:var(--tso-text);font-size:10px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
.tso-stage-count{display:grid;place-items:center;min-width:27px;height:25px;padding:0 7px;border-radius:999px;background:#eef2f7;color:var(--tso-navy-800);font-size:10px;font-weight:800}
.tso-alert-row{display:grid;grid-template-columns:8px minmax(0,1fr) auto;gap:9px;align-items:center;padding:10px 0;border-bottom:1px solid #edf1f5}
.tso-alert-row:last-child{border-bottom:0}.tso-alert-dot{width:8px;height:8px;border-radius:50%;background:var(--tso-warning)}
.tso-alert-row.critical .tso-alert-dot{background:var(--tso-danger)}.tso-alert-row strong{display:block;color:var(--tso-text);font-size:10px}
.tso-alert-row small{display:block;margin-top:3px;color:var(--tso-muted);font-size:9px}
.tso-activity-list{display:grid}.tso-activity-item{display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px;padding:10px 0;border-bottom:1px solid #edf1f5;font-size:10px}
.tso-activity-item:last-child{border-bottom:0}.tso-activity-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--tso-teal-soft);color:var(--tso-teal-dark);font-weight:850}
.tso-activity-item strong{color:var(--tso-navy-900)}.tso-activity-item small{margin-top:3px;color:var(--tso-muted);font-size:9px}

/* Login */
body:not(.tso-shell-enabled) .container{max-width:none;padding:0}
.tso-auth-page{display:grid;grid-template-columns:minmax(330px,.9fr) minmax(390px,1.1fr);
width:min(980px,calc(100vw - 36px));min-height:610px;margin:clamp(24px,6vh,70px) auto;
overflow:hidden;border:1px solid var(--tso-line);border-radius:24px;background:#fff;
box-shadow:0 28px 82px rgba(15,23,42,.15)}
.tso-auth-brand{position:relative;display:flex;flex-direction:column;justify-content:center;overflow:hidden;
padding:clamp(40px,6vw,72px);background:radial-gradient(circle at 10% 0%,rgba(0,167,165,.35),transparent 34%),
linear-gradient(155deg,#173653,#081a34 76%);color:#fff}
.tso-auth-brand::after{content:"";position:absolute;left:-80px;bottom:-110px;width:280px;height:280px;border:32px solid rgba(0,167,165,.16);border-radius:50%}
.tso-auth-logo{position:relative;z-index:1;display:flex;align-items:center;gap:12px}.tso-auth-logo img{width:58px;height:58px;border-radius:14px}
.tso-auth-logo .tso-wordmark{font-size:30px}.tso-auth-brand h1{position:relative;z-index:1;max-width:10ch;margin:40px 0 12px;color:#fff;font-size:clamp(34px,4.2vw,52px);line-height:1.05}
.tso-auth-brand p{position:relative;z-index:1;max-width:34ch;margin:0;color:#c9ddeb;font-size:15px}
.tso-auth-panel{display:flex;align-items:center;padding:clamp(38px,7vw,80px);background:#fff}
.tso-auth-form{width:100%;max-width:430px;margin:0 auto}.tso-auth-form h2{margin:0;color:var(--tso-navy-900);font-size:25px}
.tso-auth-form>p{margin:7px 0 28px;color:var(--tso-muted)}.tso-auth-form .stack{gap:16px}
.tso-auth-form button.primary{width:100%;min-height:46px;margin-top:4px}.tso-auth-support{margin-top:22px;color:var(--tso-muted);font-size:10px;text-align:center}
.tso-mobile-backdrop{display:none}

@media(max-width:1280px){
.tso-app-topbar{grid-template-columns:minmax(180px,.65fr) minmax(240px,1fr) auto;gap:14px;padding-right:20px;padding-left:20px}
.tso-user-chip{min-width:43px;width:43px;grid-template-columns:1fr;padding:4px}.tso-user-chip strong,.tso-user-chip small{display:none}
.tso-kpi-grid{grid-template-columns:repeat(2,minmax(170px,1fr))}
.tso-dashboard-card,.tso-dashboard-card.span-5,.tso-dashboard-card.span-7{grid-column:span 6}}
@media(max-width:920px){
.tso-sidebar{transform:translateX(-102%);transition:transform .2s ease}body.tso-nav-open .tso-sidebar{transform:translateX(0)}
.tso-app-main{margin-left:0}.tso-app-topbar{grid-template-columns:auto minmax(0,1fr) auto}.tso-mobile-nav-toggle{display:inline-grid;place-items:center}
.tso-topbar-copy{display:none}.tso-app-topbar .global-search{min-width:0}.tso-mobile-backdrop{position:fixed;inset:0;z-index:1050;display:block;background:rgba(8,26,52,.48);opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease}
body.tso-nav-open .tso-mobile-backdrop{opacity:1;visibility:visible}
.tso-dashboard-card,.tso-dashboard-card.span-4,.tso-dashboard-card.span-5,.tso-dashboard-card.span-6,.tso-dashboard-card.span-7,.tso-dashboard-card.span-8{grid-column:span 12}}
@media(max-width:700px){
:root{--tso-topbar-height:68px}.tso-app-topbar{gap:8px;padding:10px 12px}.tso-topbar-actions{gap:5px}
.tso-topbar-icon,.tso-quick-add{width:38px;min-height:38px}.tso-user-chip{display:none}.tso-content.container{padding:20px 13px 36px}
.tso-dashboard-hero{flex-direction:column}.tso-dashboard-actions{justify-content:flex-start}.tso-kpi-grid{grid-template-columns:1fr}
.tso-auth-page{grid-template-columns:1fr;width:min(100% - 18px,620px);margin:9px auto;border-radius:17px}
.tso-auth-brand,.tso-auth-panel{padding:30px 24px}.tso-auth-brand{min-height:270px}.tso-auth-brand h1{margin-top:28px}.tso-auth-panel{min-height:390px}}


/* THREESIXOH_LOGO_FIX_V1 */
.tso-sidebar-brand {
  padding: 14px 17px;
}

.tso-sidebar-brand img.tso-sidebar-wordmark {
  display: block;
  width: 205px;
  max-width: 100%;
  height: auto;
  flex: 0 1 auto;
  border-radius: 0;
  box-shadow: none;
}

.tso-auth-logo {
  display: block;
}

.tso-auth-logo img.tso-auth-wordmark {
  display: block;
  width: min(360px, 100%);
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 700px) {
  .tso-sidebar-brand img.tso-sidebar-wordmark {
    width: 190px;
  }
}


/* THREESIXOH_INLINE_LOGO_FIX_V1 */
.tso-sidebar-brand .tso-inline-wordmark {
  display: block;
  width: 205px;
  max-width: 100%;
  height: auto;
  flex: 0 1 auto;
  overflow: visible;
}

.tso-auth-logo .tso-inline-wordmark {
  display: block;
  width: min(360px, 100%);
  height: auto;
  overflow: visible;
}

@media (max-width: 700px) {
  .tso-sidebar-brand .tso-inline-wordmark {
    width: 190px;
  }
}


/* THREESIXOH_COMPACT_WORDMARK_V1 */
.tso-sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: var(--tso-topbar-height);
  padding: 15px 18px;
  overflow: visible;
}

.tso-compact-wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  max-width: 100%;
  overflow: visible;
  color: #ffffff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;
  font-size: 21px;
  font-weight: 780;
  line-height: 1;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.tso-compact-wordmark-main {
  color: #ffffff;
}

.tso-compact-o {
  display: block;
  width: 30px;
  height: 30px;
  margin: 0 -1px 0 2px;
  flex: 0 0 30px;
  overflow: visible;
}

.tso-compact-wordmark-h {
  color: #16bbb7;
}

.tso-compact-wordmark-bang {
  margin-left: 1px;
  color: #f59e0b;
  font-size: 1.12em;
  line-height: .9;
}

.tso-auth-logo {
  display: block;
}

.tso-auth-logo .tso-compact-wordmark {
  font-size: clamp(28px, 3.4vw, 39px);
  letter-spacing: -0.06em;
}

.tso-auth-logo .tso-compact-o {
  width: 46px;
  height: 46px;
  margin-left: 4px;
  flex-basis: 46px;
}

.tso-sidebar-brand > img,
.tso-sidebar-brand > .tso-inline-wordmark,
.tso-sidebar-brand > .tso-wordmark {
  display: none !important;
}

.tso-auth-logo > img,
.tso-auth-logo > .tso-inline-wordmark,
.tso-auth-logo > .tso-wordmark {
  display: none !important;
}

@media (max-width: 700px) {
  .tso-sidebar-brand {
    padding-right: 16px;
    padding-left: 16px;
  }

  .tso-compact-wordmark {
    font-size: 20px;
  }

  .tso-compact-o {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }
}

/* THREESIXOH_APPROVED_WORDMARK_V1 */
.tso-sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: var(--tso-topbar-height);
  padding: 14px 17px;
  overflow: visible;
}

.tso-sidebar-brand img.tso-approved-wordmark {
  display: block !important;
  width: 194px !important;
  max-width: 100% !important;
  height: auto !important;
  flex: 0 1 auto !important;
  object-fit: contain;
  object-position: left center;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

.tso-auth-logo {
  display: block;
}

.tso-auth-logo img.tso-approved-wordmark-auth {
  display: block !important;
  width: min(430px, 100%) !important;
  max-width: 100% !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

.tso-sidebar-brand > .tso-compact-wordmark,
.tso-sidebar-brand > .tso-inline-wordmark,
.tso-sidebar-brand > .tso-wordmark {
  display: none !important;
}

.tso-auth-logo > .tso-compact-wordmark,
.tso-auth-logo > .tso-inline-wordmark,
.tso-auth-logo > .tso-wordmark {
  display: none !important;
}

@media (max-width: 700px) {
  .tso-sidebar-brand img.tso-approved-wordmark {
    width: 188px !important;
  }
}

/* THREESIXOH_CUSTOMER_PROPERTY_UI_V1
   Structural redesign for customers, customer 360°, properties, and forms.
*/

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.tso-record-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.tso-record-hero h1 {
  margin: 2px 0 6px;
  color: var(--tso-navy-900);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.06;
}

.tso-record-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--tso-muted);
}

.tso-eyebrow {
  color: var(--tso-teal-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.tso-record-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.tso-record-actions .button + .button {
  margin-left: 0;
}

.tso-record-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tso-record-avatar,
.tso-customer-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background:
    linear-gradient(145deg, var(--tso-teal), var(--tso-teal-dark));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 7px 18px rgba(0,167,165,.18);
}

.tso-record-avatar {
  width: 54px;
  height: 54px;
  font-size: 21px;
}

.tso-customer-avatar {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.tso-property-avatar {
  background: linear-gradient(145deg, #22c55e, #0f9f4b);
}

.tso-record-contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--tso-muted);
  font-size: 12px;
}

.tso-record-contact-line a {
  font-weight: 650;
  text-decoration: none;
}

.tso-lifecycle-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #a9e0dd;
  border-radius: 999px;
  background: var(--tso-teal-soft);
  color: var(--tso-teal-dark);
  font-size: 11px;
  font-weight: 800;
}

.tso-record-kpis {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.tso-record-kpis-six {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.tso-record-kpis-five {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.tso-record-kpi {
  position: relative;
  min-height: 104px;
  overflow: hidden;
  padding: 16px 16px 14px 18px;
  border: 1px solid var(--tso-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(15,23,42,.035);
}

.tso-record-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--tso-teal);
}

.tso-record-kpi-warning::before {
  background: var(--tso-orange);
}

.tso-record-kpi span,
.tso-record-kpi strong,
.tso-record-kpi small {
  display: block;
}

.tso-record-kpi span {
  color: var(--tso-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.tso-record-kpi strong {
  overflow: hidden;
  margin-top: 8px;
  color: var(--tso-navy-900);
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
}

.tso-record-kpi small {
  margin-top: 7px;
  color: var(--tso-muted);
  font-size: 9px;
}

.tso-record-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.tso-record-main,
.tso-record-side {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.tso-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.tso-panel-heading h2 {
  margin: 0;
  color: var(--tso-navy-900);
  font-size: 15px;
}

.tso-panel-heading p {
  margin: 3px 0 0;
  color: var(--tso-muted);
  font-size: 10px;
}

.tso-panel-heading > span,
.tso-panel-heading > a {
  color: var(--tso-teal-dark);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.tso-timeline-heading {
  align-items: center;
}

.tso-timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--tso-line);
  border-radius: 10px;
  background: var(--tso-surface-soft);
}

.tso-timeline-filters a {
  padding: 6px 9px;
  border-radius: 7px;
  color: var(--tso-muted);
  font-size: 9px;
  font-weight: 750;
  text-decoration: none;
}

.tso-timeline-filters a:hover,
.tso-timeline-filters a.active {
  background: #fff;
  color: var(--tso-navy-900);
  box-shadow: 0 2px 7px rgba(15,23,42,.07);
}

.tso-timeline-list {
  display: grid;
}

.tso-timeline-event {
  display: grid;
  grid-template-columns: 20px 108px minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.tso-timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.tso-timeline-rail::after {
  content: "";
  position: absolute;
  top: 20px;
  bottom: -1px;
  width: 1px;
  background: var(--tso-line);
}

.tso-timeline-event:last-child .tso-timeline-rail::after {
  display: none;
}

.tso-timeline-rail span {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border: 3px solid #c9f0ed;
  border-radius: 50%;
  background: var(--tso-teal);
}

.tso-event-production .tso-timeline-rail span {
  border-color: #dcfce7;
  background: #22c55e;
}

.tso-event-task .tso-timeline-rail span,
.tso-event-document .tso-timeline-rail span {
  border-color: #ede9fe;
  background: #7c3aed;
}

.tso-timeline-time {
  padding: 1px 0 18px;
  color: var(--tso-muted);
  font-size: 9px;
  line-height: 1.4;
}

.tso-timeline-content {
  min-width: 0;
  padding: 0 0 18px;
  border-bottom: 1px solid #edf1f5;
}

.tso-timeline-event:last-child .tso-timeline-content {
  border-bottom: 0;
}

.tso-timeline-event-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tso-timeline-event-head > div {
  min-width: 0;
}

.tso-timeline-category {
  display: block;
  margin-bottom: 4px;
  color: var(--tso-teal-dark);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.tso-timeline-event-head strong {
  color: var(--tso-text);
  font-size: 11px;
}

.tso-timeline-event-head a {
  text-decoration: none;
}

.tso-timeline-content p {
  margin: 5px 0;
  color: #465569;
  font-size: 10px;
}

.tso-timeline-content small {
  color: var(--tso-muted);
  font-size: 9px;
}

.tso-related-grid,
.tso-work-grid {
  display: grid;
  gap: 18px;
}

.tso-related-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tso-work-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tso-related-panel,
.tso-work-panel,
.tso-side-panel,
.tso-timeline-panel {
  margin: 0;
}

.tso-related-list,
.tso-note-list,
.tso-task-list,
.tso-document-list,
.tso-property-list {
  display: grid;
  gap: 8px;
}

.tso-related-row,
.tso-document-row,
.tso-next-appointment,
.tso-customer-summary-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #edf1f5;
  border-radius: 10px;
  background: #fff;
  color: var(--tso-text);
  text-decoration: none;
  transition: border-color .14s ease, transform .14s ease, background .14s ease;
}

.tso-related-row:hover,
.tso-document-row:hover,
.tso-next-appointment:hover,
.tso-customer-summary-card:hover {
  transform: translateY(-1px);
  border-color: #b8deda;
  background: #fbfefe;
}

.tso-related-icon,
.tso-property-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 850;
}

.tso-related-sales {
  background: #fff7e6;
  color: #d97706;
}

.tso-related-production {
  background: #ecfdf3;
  color: #16a34a;
}

.tso-related-copy,
.tso-document-row > span:last-child,
.tso-next-appointment > span:last-child,
.tso-customer-summary-card > span:last-child {
  min-width: 0;
}

.tso-related-copy strong,
.tso-related-copy small,
.tso-document-row strong,
.tso-document-row small,
.tso-next-appointment strong,
.tso-next-appointment small,
.tso-customer-summary-card strong,
.tso-customer-summary-card small {
  display: block;
}

.tso-related-copy strong,
.tso-document-row strong,
.tso-next-appointment strong,
.tso-customer-summary-card strong {
  overflow: hidden;
  color: var(--tso-text);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tso-related-copy small,
.tso-document-row small,
.tso-next-appointment small,
.tso-customer-summary-card small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--tso-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tso-stage-chip,
.tso-soft-chip,
.tso-source-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.tso-stage-chip {
  background: #eef2ff;
  color: #4f46e5;
}

.tso-soft-chip {
  background: #f1f5f9;
  color: #475569;
}

.tso-source-chip {
  background: #e6f8f7;
  color: var(--tso-teal-dark);
}

.tso-source-native {
  background: #e8f1ff;
  color: #2563eb;
}

.tso-source-id {
  display: block;
  max-width: 170px;
  overflow: hidden;
  margin-top: 4px;
  color: var(--tso-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tso-note {
  padding: 11px;
  border: 1px solid #edf1f5;
  border-radius: 10px;
  background: #fbfcfd;
}

.tso-note p {
  margin: 0;
  color: #334155;
  font-size: 10px;
  white-space: pre-wrap;
}

.tso-note small {
  display: block;
  margin-top: 7px;
  color: var(--tso-muted);
  font-size: 8px;
}

.tso-task-item {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid #edf1f5;
}

.tso-task-item:last-child {
  border-bottom: 0;
}

.tso-task-toggle {
  display: grid;
  place-items: center;
  width: 29px;
  min-height: 29px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px !important;
  background: #fff;
  color: var(--tso-teal-dark);
}

.tso-task-item strong,
.tso-task-item small {
  display: block;
}

.tso-task-item strong {
  color: var(--tso-text);
  font-size: 10px;
}

.tso-task-item small {
  margin-top: 3px;
  color: var(--tso-muted);
  font-size: 8px;
}

.tso-document-row {
  grid-template-columns: 30px minmax(0, 1fr);
}

.tso-document-row > span:first-child {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #eef2ff;
  color: #6366f1;
}

.tso-property-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid #edf1f5;
  border-radius: 10px;
  color: var(--tso-text);
  text-decoration: none;
}

.tso-property-card:hover {
  border-color: #b8deda;
  background: #fbfefe;
}

.tso-property-icon {
  background: #ecfdf3;
  color: #16a34a;
}

.tso-property-card strong,
.tso-property-card small,
.tso-property-card em {
  display: block;
}

.tso-property-card strong {
  color: var(--tso-text);
  font-size: 10px;
}

.tso-property-card small {
  margin-top: 3px;
  color: var(--tso-muted);
  font-size: 8px;
}

.tso-property-card em {
  margin-top: 5px;
  color: var(--tso-teal-dark);
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
}

.tso-fact-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.tso-fact-list > div {
  display: grid;
  grid-template-columns: minmax(95px, .75fr) minmax(0, 1.25fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #edf1f5;
}

.tso-fact-list > div:last-child {
  border-bottom: 0;
}

.tso-fact-list dt {
  color: var(--tso-muted);
  font-size: 8px;
  font-weight: 750;
  text-transform: uppercase;
}

.tso-fact-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--tso-text);
  font-size: 9px;
  font-weight: 650;
  text-align: right;
}

.tso-fact-list-compact {
  margin-top: 10px;
}

.tso-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tso-inline-create {
  margin: 0 0 12px;
  border: 1px solid #dbe5ec;
  border-radius: 10px;
  background: #fbfcfd;
}

.tso-inline-create summary {
  padding: 9px 11px;
  color: var(--tso-teal-dark);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.tso-inline-create[open] summary {
  border-bottom: 1px solid #e6edf2;
}

.tso-inline-create form {
  padding: 11px;
}

.tso-form-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tso-form-inline-address {
  grid-template-columns: minmax(0, 1fr) 64px 90px;
}

.tso-record-empty {
  display: grid;
  place-items: center;
  min-height: 135px;
  padding: 22px;
  color: var(--tso-muted);
  text-align: center;
  border: 1px dashed #d5dfe7;
  border-radius: 11px;
  background: #fbfcfd;
}

.tso-record-empty span {
  color: var(--tso-teal);
  font-size: 22px;
}

.tso-record-empty strong {
  margin-top: 6px;
  color: var(--tso-text);
  font-size: 11px;
}

.tso-record-empty p {
  margin: 4px 0 0;
  font-size: 9px;
}

.tso-record-empty-small {
  min-height: 80px;
  padding: 14px;
}

.tso-customer-list-summary {
  display: grid;
  grid-template-columns: auto minmax(380px, 1fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.tso-customer-list-count {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 9px 15px;
  border: 1px solid var(--tso-line);
  border-radius: 12px;
  background: #fff;
}

.tso-customer-list-count-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--tso-teal-soft);
  color: var(--tso-teal-dark);
  font-size: 17px;
}

.tso-customer-list-count strong,
.tso-customer-list-count span {
  display: block;
}

.tso-customer-list-count strong {
  color: var(--tso-navy-900);
  font-size: 19px;
}

.tso-customer-list-count div span {
  color: var(--tso-muted);
  font-size: 9px;
}

.tso-customer-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.tso-customer-search-icon {
  position: absolute;
  z-index: 1;
  left: 15px;
  color: var(--tso-muted);
  font-size: 18px;
  pointer-events: none;
}

.tso-customer-search input {
  width: 100%;
  padding-left: 42px;
}

.tso-customer-table-panel {
  padding: 0;
  overflow: hidden;
}

.tso-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--tso-line);
}

.tso-table-toolbar h2 {
  margin: 0;
  color: var(--tso-navy-900);
  font-size: 15px;
}

.tso-table-toolbar p {
  margin: 3px 0 0;
  color: var(--tso-muted);
  font-size: 9px;
}

.tso-customer-table {
  width: 100%;
}

.tso-customer-table th,
.tso-customer-table td {
  vertical-align: middle;
}

.tso-select-column {
  width: 58px;
  text-align: center;
}

.tso-customer-identity {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 170px;
  color: var(--tso-text);
  text-decoration: none;
}

.tso-customer-identity strong,
.tso-customer-identity small,
.tso-contact-cell span,
.tso-contact-cell small {
  display: block;
}

.tso-customer-identity strong {
  overflow: hidden;
  color: var(--tso-text);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tso-customer-identity small,
.tso-contact-cell small {
  margin-top: 3px;
  color: var(--tso-muted);
  font-size: 8px;
}

.tso-contact-cell span {
  color: var(--tso-text);
  font-size: 9px;
}

.tso-table-number {
  color: var(--tso-navy-900);
  font-size: 13px;
}

.tso-row-open {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 8px;
  background: var(--tso-teal-soft);
  color: var(--tso-teal-dark);
  font-weight: 800;
  text-decoration: none;
}

.tso-empty-directory {
  display: grid;
  place-items: center;
  min-height: 230px;
  color: var(--tso-muted);
  text-align: center;
}

.tso-empty-directory > span {
  color: var(--tso-teal);
  font-size: 30px;
}

.tso-empty-directory strong {
  margin-top: 8px;
  color: var(--tso-text);
}

.tso-empty-directory p {
  margin: 5px 0 0;
  font-size: 10px;
}

.tso-customer-form {
  display: grid;
  gap: 16px;
  max-width: 1060px;
  margin: 0 auto;
}

.tso-form-section {
  margin: 0;
}

.tso-form-grid {
  display: grid;
  gap: 15px;
}

.tso-form-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tso-form-span-two {
  grid-column: span 2;
}

.tso-form-grid label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 10px;
  font-weight: 750;
}

.tso-form-grid label small {
  color: var(--tso-muted);
  font-size: 8px;
  font-weight: 500;
}

.tso-form-source-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}

.tso-form-source-facts > div {
  grid-template-columns: 120px minmax(0, 1fr);
}

.tso-sticky-save {
  position: sticky;
  bottom: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid #cfdce5;
  border-radius: 13px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 35px rgba(15,23,42,.14);
  backdrop-filter: blur(10px);
}

.tso-sticky-save strong,
.tso-sticky-save span {
  display: block;
}

.tso-sticky-save strong {
  color: var(--tso-navy-900);
  font-size: 11px;
}

.tso-sticky-save span {
  margin-top: 2px;
  color: var(--tso-muted);
  font-size: 8px;
}

.tso-sticky-save > div:last-child {
  display: flex;
  gap: 8px;
}

@media (max-width: 1380px) {
  .tso-record-kpis-six {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .tso-record-kpis-five {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .tso-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tso-work-grid > :last-child {
    grid-column: span 2;
  }
}

@media (max-width: 1100px) {
  .tso-record-layout {
    grid-template-columns: 1fr;
  }

  .tso-record-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tso-customer-list-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .tso-record-hero,
  .tso-table-toolbar,
  .tso-sticky-save {
    flex-direction: column;
    align-items: stretch;
  }

  .tso-record-actions {
    justify-content: flex-start;
  }

  .tso-record-kpis-six,
  .tso-record-kpis-five,
  .tso-related-grid,
  .tso-work-grid,
  .tso-record-side,
  .tso-form-grid-two,
  .tso-form-source-facts {
    grid-template-columns: 1fr;
  }

  .tso-work-grid > :last-child,
  .tso-form-span-two {
    grid-column: span 1;
  }

  .tso-timeline-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .tso-timeline-event {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .tso-timeline-time {
    display: none;
  }

  .tso-customer-search {
    grid-template-columns: 1fr;
  }

  .tso-customer-search-icon {
    top: 12px;
  }

  .tso-customer-search .button,
  .tso-customer-search button {
    width: 100%;
  }

  .tso-sticky-save > div:last-child {
    width: 100%;
  }

  .tso-sticky-save > div:last-child > * {
    flex: 1;
  }
}

/* THREESIXOH_SALES_UI_V1
   Sales pipeline, opportunity, calendar, follow-up, estimate, proposal,
   and handoff visual system.
*/

.tso-sales-hero,
.tso-sales-record-hero {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  margin-bottom:20px;
}
.tso-sales-hero h1,
.tso-sales-record-hero h1 {
  margin:2px 0 6px;
  color:var(--tso-navy-900);
  font-size:clamp(28px,3vw,40px);
  line-height:1.06;
}
.tso-sales-hero p,
.tso-sales-record-hero p {
  max-width:780px;
  margin:0;
  color:var(--tso-muted);
}
.tso-sales-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}
.tso-sales-actions .button + .button { margin-left:0; }

.tso-sales-kpis,
.tso-opportunity-kpis,
.tso-followup-kpis,
.tso-handoff-kpis {
  display:grid;
  gap:12px;
  margin-bottom:18px;
}
.tso-sales-kpis { grid-template-columns:repeat(6,minmax(140px,1fr)); }
.tso-opportunity-kpis { grid-template-columns:repeat(8,minmax(125px,1fr)); }
.tso-followup-kpis { grid-template-columns:repeat(4,minmax(160px,1fr)); }
.tso-handoff-kpis { grid-template-columns:repeat(6,minmax(140px,1fr)); }

.tso-sales-kpi,
.tso-opportunity-kpis article,
.tso-followup-kpis article,
.tso-handoff-kpis article {
  position:relative;
  display:block;
  min-height:104px;
  overflow:hidden;
  padding:16px 16px 14px 18px;
  border:1px solid var(--tso-line);
  border-radius:13px;
  background:#fff;
  color:var(--tso-text);
  text-decoration:none;
  box-shadow:0 5px 18px rgba(15,23,42,.035);
}
.tso-sales-kpi::before,
.tso-opportunity-kpis article::before,
.tso-followup-kpis article::before,
.tso-handoff-kpis article::before {
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:var(--sales-kpi,var(--handoff-color,var(--tso-teal)));
}
.tso-sales-kpi:hover {
  transform:translateY(-1px);
  border-color:#b8deda;
}
.tso-sales-kpi span,
.tso-sales-kpi strong,
.tso-sales-kpi small,
.tso-opportunity-kpis article span,
.tso-opportunity-kpis article strong,
.tso-opportunity-kpis article small,
.tso-followup-kpis article span,
.tso-followup-kpis article strong,
.tso-followup-kpis article small,
.tso-handoff-kpis article span,
.tso-handoff-kpis article strong,
.tso-handoff-kpis article small {
  display:block;
}
.tso-sales-kpi span,
.tso-opportunity-kpis article span,
.tso-followup-kpis article span,
.tso-handoff-kpis article span {
  color:var(--tso-muted);
  font-size:9px;
  font-weight:800;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.tso-sales-kpi strong,
.tso-opportunity-kpis article strong,
.tso-followup-kpis article strong,
.tso-handoff-kpis article strong {
  overflow:hidden;
  margin-top:8px;
  color:var(--tso-navy-900);
  font-size:22px;
  line-height:1.05;
  letter-spacing:-.035em;
  text-overflow:ellipsis;
}
.tso-sales-kpi small,
.tso-opportunity-kpis article small,
.tso-followup-kpis article small,
.tso-handoff-kpis article small {
  margin-top:7px;
  color:var(--tso-muted);
  font-size:8px;
}
.tso-sales-kpi.is-alert,
.tso-followup-kpis article.is-alert,
.tso-handoff-kpis article.is-alert,
.tso-opportunity-kpis article.is-warning {
  background:#fffafa;
  border-color:#fecaca;
}

.tso-sales-control-panel { padding:16px; }
.tso-sales-filters {
  display:grid;
  grid-template-columns:minmax(280px,1fr) 220px auto auto;
  gap:9px;
  align-items:center;
}
.tso-sales-search { position:relative; }
.tso-sales-search > span {
  position:absolute;
  z-index:1;
  top:50%;
  left:14px;
  color:var(--tso-muted);
  font-size:18px;
  transform:translateY(-50%);
}
.tso-sales-search input { width:100%; padding-left:40px; }

.tso-sales-upcoming {
  margin-top:15px;
  padding-top:15px;
  border-top:1px solid var(--tso-line);
}
.tso-sales-upcoming-head,
.tso-sales-panel-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.tso-sales-upcoming-head strong,
.tso-sales-upcoming-head small { display:block; }
.tso-sales-upcoming-head strong,
.tso-sales-panel-head h2 {
  margin:0;
  color:var(--tso-navy-900);
  font-size:15px;
}
.tso-sales-upcoming-head small,
.tso-sales-panel-head p {
  margin:3px 0 0;
  color:var(--tso-muted);
  font-size:9px;
}
.tso-sales-upcoming-head a,
.tso-sales-panel-head > a,
.tso-sales-panel-head > span {
  color:var(--tso-teal-dark);
  font-size:9px;
  font-weight:800;
  text-decoration:none;
}
.tso-sales-appointment-strip {
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding-bottom:4px;
}
.tso-sales-appointment-chip {
  display:grid;
  flex:0 0 210px;
  gap:3px;
  padding:10px 11px;
  border:1px solid #e4eaf0;
  border-radius:10px;
  background:#fbfcfd;
  text-decoration:none;
}
.tso-sales-appointment-chip time { color:var(--tso-teal-dark); font-size:8px; font-weight:800; }
.tso-sales-appointment-chip strong { overflow:hidden; color:var(--tso-text); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.tso-sales-appointment-chip small { color:var(--tso-muted); font-size:8px; }

.tso-sales-board-wrap { overflow:hidden; }
.tso-sales-board {
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(260px,1fr);
  gap:12px;
  overflow-x:auto;
  padding-bottom:12px;
  scroll-snap-type:x proximity;
}
.tso-sales-column {
  min-height:540px;
  border:1px solid var(--tso-line);
  border-radius:14px;
  background:#f8fafc;
  scroll-snap-align:start;
}
.tso-sales-column-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:13px 13px 11px;
  border-bottom:1px solid var(--tso-line);
}
.tso-sales-column-head > div { display:flex; align-items:center; gap:8px; }
.tso-sales-column-head h2 { margin:0; color:var(--tso-navy-900); font-size:11px; }
.tso-stage-dot { width:8px; height:8px; border-radius:50%; background:#64748b; }
.stage-new-lead .tso-stage-dot { background:#2563eb; }
.stage-contact-attempted .tso-stage-dot { background:#0891b2; }
.stage-qualified .tso-stage-dot { background:#7c3aed; }
.stage-appointment-set .tso-stage-dot { background:#f59e0b; }
.stage-proposal-sent .tso-stage-dot { background:#ec4899; }
.stage-sold .tso-stage-dot { background:#16a34a; }
.stage-lost .tso-stage-dot { background:#64748b; }
.tso-stage-count {
  display:grid;
  place-items:center;
  min-width:26px;
  height:25px;
  padding:0 7px;
  border-radius:999px;
  background:#fff;
  color:var(--tso-navy-800);
  font-size:9px;
  font-weight:800;
  box-shadow:0 2px 7px rgba(15,23,42,.06);
}
.tso-sales-column-body { display:grid; gap:9px; padding:10px; }
.tso-opportunity-card {
  display:grid;
  gap:9px;
  padding:12px;
  border:1px solid #e5eaf0;
  border-radius:11px;
  background:#fff;
  box-shadow:0 4px 14px rgba(15,23,42,.035);
}
.tso-opportunity-card.is-overdue { border-color:#fecaca; box-shadow:inset 3px 0 0 #dc2626; }
.tso-opportunity-card-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.tso-opportunity-card-head a { min-width:0; text-decoration:none; }
.tso-opportunity-card-head strong { display:block; overflow:hidden; color:var(--tso-text); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.tso-urgency-chip {
  padding:3px 6px;
  border-radius:999px;
  background:#fff7ed;
  color:#c2410c;
  font-size:7px;
  font-weight:850;
}
.tso-opportunity-customer {
  overflow:hidden;
  color:var(--tso-teal-dark);
  font-size:9px;
  font-weight:750;
  text-decoration:none;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tso-opportunity-scope span,
.tso-opportunity-scope small { display:block; }
.tso-opportunity-scope span { color:#334155; font-size:9px; font-weight:700; }
.tso-opportunity-scope small { overflow:hidden; margin-top:2px; color:var(--tso-muted); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.tso-opportunity-value {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:8px;
  padding-top:7px;
  border-top:1px solid #edf1f5;
}
.tso-opportunity-value strong { color:var(--tso-navy-900); font-size:16px; }
.tso-opportunity-value span { color:var(--tso-muted); font-size:8px; }
.tso-opportunity-followup {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:7px 8px;
  border-radius:8px;
  background:#f8fafc;
}
.tso-opportunity-followup span { color:var(--tso-muted); font-size:7px; text-transform:uppercase; }
.tso-opportunity-followup strong { color:#334155; font-size:8px; }
.tso-opportunity-followup.is-overdue { background:#fff1f2; }
.tso-opportunity-followup.is-overdue strong { color:#b91c1c; }
.tso-opportunity-card-footer {
  display:flex;
  justify-content:space-between;
  gap:8px;
  color:var(--tso-muted);
  font-size:7px;
}
.tso-sales-empty-column,
.tso-sales-empty {
  display:grid;
  place-items:center;
  min-height:92px;
  padding:15px;
  color:var(--tso-muted);
  text-align:center;
  border:1px dashed #d5dfe7;
  border-radius:10px;
  background:#fbfcfd;
  font-size:9px;
}
.tso-sales-empty-column span { color:var(--tso-teal); font-size:20px; }
.tso-sales-empty-column p { margin:3px 0 0; }

.tso-sales-record-title { display:flex; align-items:center; gap:13px; }
.tso-sales-record-icon {
  display:grid;
  place-items:center;
  width:51px;
  height:51px;
  border-radius:13px;
  background:linear-gradient(145deg,#f59e0b,#d97706);
  color:#fff;
  font-size:21px;
  font-weight:850;
  box-shadow:0 7px 18px rgba(245,158,11,.18);
}
.tso-sales-record-subtitle { display:flex; flex-wrap:wrap; gap:5px; color:var(--tso-muted); font-size:11px; }
.tso-sales-record-subtitle a { font-weight:700; text-decoration:none; }
.tso-sales-stage-badge {
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 12px;
  border:1px solid #dbe4eb;
  border-radius:999px;
  background:#f8fafc;
  color:var(--tso-navy-800);
  font-size:10px;
  font-weight:800;
}

.tso-sales-record-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:18px;
  align-items:start;
}
.tso-sales-record-main,
.tso-sales-record-side {
  display:grid;
  min-width:0;
  gap:18px;
}
.tso-sales-record-side > .panel { margin:0; }
.tso-sales-two-column {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}
.tso-sales-two-column > .panel { margin:0; }

.tso-workflow-options {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.tso-workflow-option {
  padding:11px;
  border:1px solid #e4eaf0;
  border-radius:10px;
  background:#fbfcfd;
}
.tso-workflow-option > div { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.tso-workflow-option strong { color:var(--tso-text); font-size:9px; }
.tso-workflow-option span { padding:3px 6px; border-radius:999px; font-size:7px; font-weight:800; }
.tso-workflow-option.is-ready span { background:#dcfce7; color:#166534; }
.tso-workflow-option.is-blocked span { background:#fee2e2; color:#991b1b; }
.tso-workflow-option p,
.tso-workflow-option ul { margin:8px 0 0; color:var(--tso-muted); font-size:8px; }
.tso-workflow-option ul { padding-left:15px; }

.tso-stage-update-form {
  display:grid;
  grid-template-columns:180px 180px minmax(240px,1fr) auto auto;
  gap:9px;
  align-items:end;
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid var(--tso-line);
}
.tso-stage-update-form label {
  display:grid;
  gap:5px;
  color:#475569;
  font-size:8px;
  font-weight:750;
}
.tso-stage-note { min-width:0; }
.tso-override-check { display:flex !important; align-items:center; min-height:40px; }
.tso-override-check input { min-height:0; }
.tso-scope-note {
  margin-top:14px;
  padding:12px;
  border-left:4px solid var(--tso-teal);
  border-radius:9px;
  background:#f6fcfc;
}
.tso-scope-note strong { color:var(--tso-navy-900); font-size:9px; }
.tso-scope-note p { margin:5px 0 0; color:#475569; font-size:9px; white-space:pre-wrap; }
.tso-converted-job-link {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:12px;
  padding:11px 12px;
  border:1px solid #bbf7d0;
  border-radius:10px;
  background:#f0fdf4;
  text-decoration:none;
}
.tso-converted-job-link span { color:#166534; font-size:8px; font-weight:700; }
.tso-converted-job-link strong { color:#166534; font-size:9px; }

.tso-sales-create-drawer {
  margin:0 0 13px;
  border:1px solid #dbe5ec;
  border-radius:10px;
  background:#fbfcfd;
}
.tso-sales-create-drawer summary {
  padding:9px 11px;
  color:var(--tso-teal-dark);
  font-size:9px;
  font-weight:800;
  cursor:pointer;
}
.tso-sales-create-drawer[open] summary { border-bottom:1px solid #e5edf2; }
.tso-sales-create-drawer > form,
.tso-sales-create-drawer > .smart-scheduling { margin:11px; }
.tso-sales-form-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.tso-sales-form-grid label,
.tso-opportunity-form label {
  display:grid;
  gap:5px;
  color:#475569;
  font-size:9px;
  font-weight:750;
}
.tso-sales-form-span-two { grid-column:span 2; }
.tso-sales-form-actions { display:flex; justify-content:flex-end; }

.tso-appointment-list { display:grid; gap:9px; }
.tso-appointment-card {
  display:grid;
  grid-template-columns:90px minmax(0,1fr) auto;
  gap:12px;
  align-items:start;
  padding:11px;
  border:1px solid #e5eaf0;
  border-left:4px solid #2563eb;
  border-radius:10px;
  background:#fff;
}
.tso-appointment-card.status-completed { border-left-color:#16a34a; }
.tso-appointment-card.status-cancelled,
.tso-appointment-card.status-no-show { border-left-color:#dc2626; }
.tso-appointment-date strong,
.tso-appointment-date span { display:block; }
.tso-appointment-date strong { color:var(--tso-navy-900); font-size:13px; }
.tso-appointment-date span { margin-top:3px; color:var(--tso-muted); font-size:8px; }
.tso-appointment-copy > div { display:flex; align-items:center; gap:8px; }
.tso-appointment-copy > div strong { color:var(--tso-text); font-size:10px; }
.tso-appointment-copy p { margin:4px 0; color:var(--tso-muted); font-size:8px; }
.tso-appointment-copy small { color:#475569; font-size:8px; }
.tso-appointment-update { min-width:130px; }
.tso-appointment-update summary { color:var(--tso-teal-dark); font-size:8px; font-weight:800; cursor:pointer; }
.tso-appointment-update form { min-width:260px; margin-top:8px; padding:10px; border:1px solid var(--tso-line); border-radius:9px; background:#fbfcfd; }

.tso-sales-activity-list { display:grid; }
.tso-sales-activity-list article {
  display:grid;
  grid-template-columns:32px minmax(0,1fr);
  gap:10px;
  padding:10px 0;
  border-bottom:1px solid #edf1f5;
}
.tso-sales-activity-list article:last-child { border-bottom:0; }
.tso-sales-activity-list article > span {
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border-radius:50%;
  background:var(--tso-teal-soft);
  color:var(--tso-teal-dark);
  font-size:9px;
  font-weight:850;
}
.tso-sales-activity-list article > div > div { display:flex; justify-content:space-between; gap:8px; }
.tso-sales-activity-list strong { color:var(--tso-text); font-size:9px; }
.tso-sales-activity-list small { color:var(--tso-muted); font-size:7px; }
.tso-sales-activity-list p { margin:4px 0; color:#475569; font-size:9px; }
.tso-sales-activity-list em { color:var(--tso-teal-dark); font-size:8px; font-style:normal; font-weight:700; }

.tso-sales-document-stack { display:grid; gap:8px; }
.tso-sales-doc-card {
  display:grid;
  grid-template-columns:36px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid #edf1f5;
  border-radius:10px;
  color:var(--tso-text);
  text-decoration:none;
}
.tso-sales-doc-card:hover { border-color:#b8deda; background:#fbfefe; }
.tso-sales-doc-icon {
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:9px;
  background:#eef2ff;
  color:#6366f1;
  font-size:11px;
  font-weight:850;
}
.tso-sales-doc-icon.is-proposal { background:#fff7ed; color:#d97706; }
.tso-sales-doc-icon.is-job { background:#ecfdf3; color:#16a34a; }
.tso-sales-doc-card span:nth-child(2) { min-width:0; }
.tso-sales-doc-card strong,
.tso-sales-doc-card small { display:block; }
.tso-sales-doc-card strong { overflow:hidden; color:var(--tso-text); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.tso-sales-doc-card small { overflow:hidden; margin-top:3px; color:var(--tso-muted); font-size:7px; text-overflow:ellipsis; white-space:nowrap; }
.tso-sales-doc-card em { color:var(--tso-navy-900); font-size:9px; font-style:normal; font-weight:800; }

.tso-sales-task-list { display:grid; }
.tso-sales-task {
  display:grid;
  grid-template-columns:30px minmax(0,1fr);
  gap:9px;
  align-items:start;
  padding:9px 0;
  border-bottom:1px solid #edf1f5;
}
.tso-sales-task:last-child { border-bottom:0; }
.tso-sales-task-toggle {
  display:grid;
  place-items:center;
  width:28px;
  min-height:28px;
  padding:0;
  border:1px solid #cbd5e1;
  border-radius:8px !important;
  background:#fff;
  color:var(--tso-teal-dark);
}
.tso-sales-task strong,
.tso-sales-task small { display:block; }
.tso-sales-task strong { color:var(--tso-text); font-size:9px; }
.tso-sales-task small { margin-top:3px; color:var(--tso-muted); font-size:7px; }

.tso-sales-customer-card {
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid #edf1f5;
  border-radius:10px;
  color:var(--tso-text);
  text-decoration:none;
}
.tso-sales-customer-card > span {
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:10px;
  background:linear-gradient(145deg,var(--tso-teal),var(--tso-teal-dark));
  color:#fff;
  font-size:12px;
  font-weight:850;
}
.tso-sales-customer-card strong,
.tso-sales-customer-card small { display:block; }
.tso-sales-customer-card strong { color:var(--tso-text); font-size:9px; }
.tso-sales-customer-card small { margin-top:3px; color:var(--tso-muted); font-size:7px; }

.tso-sales-facts {
  display:grid;
  margin:10px 0 0;
}
.tso-sales-facts > div {
  display:grid;
  grid-template-columns:minmax(85px,.75fr) minmax(0,1.25fr);
  gap:10px;
  padding:8px 0;
  border-bottom:1px solid #edf1f5;
}
.tso-sales-facts > div:last-child { border-bottom:0; }
.tso-sales-facts dt { color:var(--tso-muted); font-size:7px; font-weight:800; text-transform:uppercase; }
.tso-sales-facts dd { margin:0; color:var(--tso-text); font-size:8px; font-weight:650; text-align:right; overflow-wrap:anywhere; }

.tso-qualification-warning {
  margin-bottom:10px;
  padding:10px;
  border:1px solid #fed7aa;
  border-radius:9px;
  background:#fff7ed;
}
.tso-qualification-warning strong { color:#9a3412; font-size:8px; }
.tso-qualification-warning ul { margin:6px 0 0; padding-left:15px; color:#9a3412; font-size:7px; }
.tso-sales-check { display:flex !important; align-items:center; gap:7px; }
.tso-sales-check input { min-height:0; }
.tso-qualification-history { margin-top:10px; }
.tso-qualification-history summary { color:var(--tso-teal-dark); font-size:8px; font-weight:800; cursor:pointer; }
.tso-qualification-history > div {
  display:grid;
  padding:8px 0;
  border-bottom:1px solid #edf1f5;
}
.tso-qualification-history strong { color:var(--tso-text); font-size:8px; }
.tso-qualification-history span,
.tso-qualification-history small { color:var(--tso-muted); font-size:7px; }

.tso-followup-mini-list { display:grid; gap:7px; }
.tso-followup-mini-list > div {
  display:grid;
  grid-template-columns:25px minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  padding:8px;
  border:1px solid #edf1f5;
  border-radius:9px;
}
.tso-followup-mini-list > div > span {
  display:grid;
  place-items:center;
  width:25px;
  height:25px;
  border-radius:50%;
  background:#eef2ff;
  color:#4f46e5;
  font-size:8px;
  font-weight:850;
}
.tso-followup-mini-list strong,
.tso-followup-mini-list small { display:block; }
.tso-followup-mini-list strong { color:var(--tso-text); font-size:8px; }
.tso-followup-mini-list small { margin-top:2px; color:var(--tso-muted); font-size:7px; }
.tso-followup-mini-list em { color:#d97706; font-size:7px; font-style:normal; font-weight:800; }
.tso-followup-mini-list .is-complete { opacity:.62; }
.tso-followup-mini-list .is-complete em { color:#16a34a; }

.tso-handoff-summary-card {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px;
  border:1px solid #fde68a;
  border-radius:10px;
  background:#fffbeb;
  text-decoration:none;
}
.tso-handoff-summary-card.is-ready { border-color:#a7f3d0; background:#ecfdf5; }
.tso-handoff-summary-card span { color:#92400e; font-size:8px; font-weight:800; }
.tso-handoff-summary-card strong { color:#92400e; font-size:8px; }

.tso-calendar-section-tabs {
  display:inline-flex;
  gap:4px;
  margin-bottom:14px;
  padding:4px;
  border:1px solid var(--tso-line);
  border-radius:10px;
  background:#fff;
}
.tso-calendar-section-tabs a {
  padding:7px 10px;
  border-radius:7px;
  color:var(--tso-muted);
  font-size:8px;
  font-weight:800;
  text-decoration:none;
}
.tso-calendar-section-tabs a.active { background:var(--tso-navy-800); color:#fff; }
.tso-calendar-controls { padding:16px; margin-bottom:16px; }
.tso-calendar-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.tso-calendar-nav,
.tso-calendar-view-switch { display:flex; flex-wrap:wrap; gap:6px; }
.tso-calendar-view-switch .button.active { background:var(--tso-teal); border-color:var(--tso-teal); color:#fff; }
.tso-calendar-filters {
  display:grid;
  grid-template-columns:150px minmax(180px,1fr) 180px 190px auto;
  gap:9px;
  align-items:end;
  margin-top:13px;
  padding-top:13px;
  border-top:1px solid var(--tso-line);
}
.tso-calendar-filters label { display:grid; gap:5px; color:#475569; font-size:8px; font-weight:750; }
.tso-calendar-filter-actions { display:flex; gap:6px; }
.tso-calendar-legend { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.tso-calendar-legend span {
  padding:5px 7px;
  border-radius:999px;
  background:#eef2ff;
  color:#4f46e5;
  font-size:7px;
  font-weight:800;
}
.tso-calendar-legend .status-completed { background:#dcfce7; color:#166534; }
.tso-calendar-legend .status-cancelled,
.tso-calendar-legend .status-no-show { background:#fee2e2; color:#991b1b; }

.tso-calendar-scroll { overflow-x:auto; padding-bottom:8px; }
.tso-month-calendar {
  display:grid;
  grid-template-columns:repeat(7,minmax(145px,1fr));
  min-width:1015px;
  border-top:1px solid var(--tso-line);
  border-left:1px solid var(--tso-line);
  border-radius:12px;
  overflow:hidden;
}
.tso-calendar-weekday {
  padding:9px;
  background:var(--tso-navy-800);
  color:#fff;
  font-size:8px;
  font-weight:800;
  text-align:center;
  border-right:1px solid rgba(255,255,255,.1);
}
.tso-calendar-day-cell {
  min-height:145px;
  padding:8px;
  border-right:1px solid var(--tso-line);
  border-bottom:1px solid var(--tso-line);
  background:#fff;
}
.tso-calendar-day-cell.outside-month { background:#f8fafc; opacity:.65; }
.tso-calendar-day-cell.today { box-shadow:inset 0 0 0 2px var(--tso-teal); }
.tso-calendar-day-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.tso-calendar-day-head a { color:var(--tso-navy-900); font-size:9px; font-weight:850; text-decoration:none; }
.tso-calendar-day-head span { display:grid; place-items:center; min-width:20px; height:20px; border-radius:999px; background:#eef2f7; color:var(--tso-muted); font-size:7px; font-weight:800; }
.tso-calendar-day-appointments { display:grid; gap:4px; }
.tso-calendar-appointment {
  display:grid;
  gap:2px;
  padding:6px 7px;
  border-left:3px solid #2563eb;
  border-radius:7px;
  background:#eff6ff;
  color:var(--tso-text);
  text-decoration:none;
}
.tso-calendar-appointment.status-completed { border-left-color:#16a34a; background:#f0fdf4; }
.tso-calendar-appointment.status-cancelled,
.tso-calendar-appointment.status-no-show { border-left-color:#dc2626; background:#fff1f2; }
.tso-calendar-appointment time { color:#1d4ed8; font-size:7px; font-weight:850; }
.tso-calendar-appointment > span { overflow:hidden; font-size:8px; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }
.tso-calendar-appointment small { overflow:hidden; color:var(--tso-muted); font-size:7px; text-overflow:ellipsis; white-space:nowrap; }
.tso-calendar-more { color:var(--tso-teal-dark); font-size:7px; font-weight:750; text-decoration:none; }

.tso-week-calendar {
  display:grid;
  grid-template-columns:repeat(7,minmax(175px,1fr));
  gap:8px;
  min-width:1225px;
}
.tso-week-day-column {
  min-height:430px;
  border:1px solid var(--tso-line);
  border-radius:11px;
  background:#fff;
  overflow:hidden;
}
.tso-week-day-column.today { box-shadow:inset 0 0 0 2px var(--tso-teal); }
.tso-week-day-column header { padding:10px; border-bottom:1px solid var(--tso-line); background:#f8fafc; }
.tso-week-day-column header a { display:flex; justify-content:space-between; color:var(--tso-text); text-decoration:none; }
.tso-week-day-column header span { color:var(--tso-muted); font-size:8px; }
.tso-week-day-column header strong { font-size:9px; }
.tso-week-day-column header small { display:block; margin-top:4px; color:var(--tso-muted); font-size:7px; }
.tso-week-day-column > div { display:grid; gap:6px; padding:8px; }
.tso-calendar-empty { color:var(--tso-muted); font-size:8px; text-align:center; }

.tso-day-appointment-row,
.tso-agenda-row {
  display:grid;
  grid-template-columns:95px minmax(0,1fr) 150px;
  gap:13px;
  align-items:center;
  padding:11px 0;
  border-bottom:1px solid #edf1f5;
  color:var(--tso-text);
  text-decoration:none;
}
.tso-day-appointment-row:last-child,
.tso-agenda-row:last-child { border-bottom:0; }
.tso-day-appointment-time strong,
.tso-day-appointment-time span { display:block; }
.tso-day-appointment-time strong { color:var(--tso-navy-900); font-size:12px; }
.tso-day-appointment-time span { margin-top:3px; color:var(--tso-muted); font-size:8px; }
.tso-day-appointment-details strong,
.tso-day-appointment-details span,
.tso-day-appointment-details small,
.tso-agenda-row strong,
.tso-agenda-row span,
.tso-agenda-row small { display:block; }
.tso-day-appointment-details strong,
.tso-agenda-row strong { color:var(--tso-text); font-size:9px; }
.tso-day-appointment-details span,
.tso-agenda-row span { margin-top:2px; color:#475569; font-size:8px; }
.tso-day-appointment-details small,
.tso-agenda-row small { margin-top:2px; color:var(--tso-muted); font-size:7px; }
.tso-day-appointment-meta { display:grid; justify-items:end; gap:3px; color:var(--tso-muted); font-size:7px; }
.tso-appointment-agenda { display:grid; gap:14px; }
.tso-agenda-row time { color:var(--tso-teal-dark); font-size:8px; font-weight:800; }

.tso-followup-filter-panel { padding:13px; margin-bottom:14px; }
.tso-followup-filter { display:flex; gap:8px; align-items:center; }
.tso-followup-filter select { min-width:240px; }
.tso-followup-board {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  margin-bottom:16px;
}
.tso-followup-column { margin:0; }
.tso-followup-column.tone-danger { border-top:4px solid #dc2626 !important; }
.tso-followup-column.tone-warning { border-top:4px solid #f59e0b !important; }
.tso-followup-card-list { display:grid; gap:8px; }
.tso-followup-card {
  display:grid;
  gap:5px;
  padding:10px;
  border:1px solid #edf1f5;
  border-radius:10px;
  color:var(--tso-text);
  text-decoration:none;
}
.tso-followup-card:hover { border-color:#b8deda; background:#fbfefe; }
.tso-followup-card > div { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.tso-followup-card strong { overflow:hidden; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.tso-followup-card p { margin:0; color:#475569; font-size:8px; }
.tso-followup-card small { color:var(--tso-muted); font-size:7px; }
.tso-sequence-table tr.is-overdue td { background:#fff7f7; }
.tso-sequence-step { display:grid; place-items:center; width:24px; height:24px; border-radius:50%; background:#eef2ff; color:#4f46e5; font-size:8px; font-weight:850; }

.tso-opportunity-form {
  display:grid;
  gap:16px;
  max-width:1060px;
  margin:0 auto;
}
.tso-sales-form-section { margin:0; }
.tso-opportunity-form .tso-sales-form-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.tso-opportunity-form label { font-size:9px; }
.tso-sales-sticky-save {
  position:sticky;
  bottom:14px;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 16px;
  border:1px solid #cfdce5;
  border-radius:13px;
  background:rgba(255,255,255,.96);
  box-shadow:0 14px 35px rgba(15,23,42,.14);
  backdrop-filter:blur(10px);
}
.tso-sales-sticky-save strong,
.tso-sales-sticky-save span { display:block; }
.tso-sales-sticky-save strong { color:var(--tso-navy-900); font-size:10px; }
.tso-sales-sticky-save span { margin-top:2px; color:var(--tso-muted); font-size:8px; }
.tso-sales-sticky-save > div:last-child { display:flex; gap:8px; }
.tso-property-required {
  display:grid;
  grid-template-columns:45px minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
}
.tso-property-required > span {
  display:grid;
  place-items:center;
  width:45px;
  height:45px;
  border-radius:12px;
  background:#ecfdf3;
  color:#16a34a;
  font-size:17px;
}
.tso-property-required h2 { margin:0; color:var(--tso-navy-900); font-size:14px; }
.tso-property-required p { margin:3px 0 0; color:var(--tso-muted); font-size:9px; }

.tso-handoff-card-list { display:grid; gap:10px; }
.tso-handoff-card {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:15px;
  align-items:center;
  padding:14px;
  border:1px solid #e5eaf0;
  border-radius:11px;
  background:#fff;
}
.tso-handoff-card.is-overdue { border-color:#fecaca; box-shadow:inset 4px 0 0 #dc2626; }
.tso-handoff-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.tso-handoff-card-head h3 { margin:0; color:var(--tso-navy-900); font-size:11px; }
.tso-handoff-card-head p { margin:3px 0 0; color:var(--tso-muted); font-size:8px; }
.tso-handoff-summary {
  display:grid;
  grid-template-columns:repeat(6,minmax(90px,1fr));
  gap:8px;
  margin-top:11px;
}
.tso-handoff-summary-four { grid-template-columns:repeat(4,minmax(110px,1fr)); }
.tso-handoff-summary > div {
  padding:8px;
  border:1px solid #edf1f5;
  border-radius:8px;
  background:#fbfcfd;
}
.tso-handoff-summary span,
.tso-handoff-summary strong { display:block; }
.tso-handoff-summary span { color:var(--tso-muted); font-size:7px; text-transform:uppercase; }
.tso-handoff-summary strong { overflow:hidden; margin-top:3px; color:var(--tso-text); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.tso-handoff-warning {
  margin-top:9px;
  padding:8px 10px;
  border:1px solid #fed7aa;
  border-radius:8px;
  background:#fff7ed;
  color:#9a3412;
  font-size:8px;
}
.tso-accepted-handoffs summary { color:var(--tso-navy-900); font-size:10px; font-weight:800; cursor:pointer; }
.tso-accepted-handoffs[open] summary { margin-bottom:12px; }

.smart-scheduling.tso-smart-scheduling,
.smart-scheduling {
  border:1px solid #bfe7e4;
  border-radius:11px;
  background:#f4fcfb;
  box-shadow:none;
}
.smart-scheduling-head strong { color:var(--tso-navy-900); }
.smart-scheduling-status { color:var(--tso-muted); }

/* Existing estimate, proposal, and handoff-detail screens */
.estimate-metrics,
.proposal-summary-grid,
.handoff-summary-grid {
  display:grid;
  gap:12px;
}
.estimate-metrics { grid-template-columns:repeat(6,minmax(130px,1fr)); }
.proposal-summary-grid { grid-template-columns:repeat(6,minmax(130px,1fr)); }
.estimate-metrics .stat,
.proposal-summary-grid > div,
.handoff-summary-grid > div {
  min-height:92px;
  padding:14px;
  border:1px solid var(--tso-line);
  border-radius:11px;
  background:#fff;
  box-shadow:0 4px 15px rgba(15,23,42,.035);
}
.proposal-summary-grid span,
.proposal-summary-grid strong,
.handoff-summary-grid span,
.handoff-summary-grid strong { display:block; }
.proposal-summary-grid span,
.handoff-summary-grid span { color:var(--tso-muted); font-size:8px; text-transform:uppercase; }
.proposal-summary-grid strong,
.handoff-summary-grid strong { margin-top:6px; color:var(--tso-navy-900); font-size:13px; }
.approved-template-summary,
.proposal-scope-sections,
.estimate-actions,
.handoff-review-panel,
.handoff-form-section {
  border-top:4px solid var(--tso-teal) !important;
}
.estimate-items-table,
.guided-estimate-table { font-size:8px; }
.proposal-total-row td { background:#f8fafc !important; color:var(--tso-navy-900); font-weight:800; }
.proposal-section {
  margin-top:10px;
  padding:12px;
  border:1px solid #edf1f5;
  border-radius:10px;
  background:#fbfcfd;
}
.proposal-section h3 { margin:0 0 5px; color:var(--tso-navy-900); font-size:10px; }
.proposal-section p { margin:0; color:#475569; font-size:9px; white-space:pre-wrap; }

@media (max-width:1450px) {
  .tso-sales-kpis { grid-template-columns:repeat(3,minmax(150px,1fr)); }
  .tso-opportunity-kpis { grid-template-columns:repeat(4,minmax(140px,1fr)); }
  .tso-handoff-kpis { grid-template-columns:repeat(3,minmax(150px,1fr)); }
  .tso-workflow-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tso-stage-update-form { grid-template-columns:repeat(2,minmax(180px,1fr)); }
  .tso-stage-note { grid-column:span 2; }
  .estimate-metrics,
  .proposal-summary-grid { grid-template-columns:repeat(3,minmax(140px,1fr)); }
}
@media (max-width:1150px) {
  .tso-sales-record-layout { grid-template-columns:1fr; }
  .tso-sales-record-side { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tso-calendar-filters { grid-template-columns:repeat(2,minmax(180px,1fr)); }
  .tso-calendar-filter-actions { align-self:end; }
  .tso-handoff-summary { grid-template-columns:repeat(3,minmax(100px,1fr)); }
}
@media (max-width:820px) {
  .tso-sales-hero,
  .tso-sales-record-hero,
  .tso-sales-sticky-save { flex-direction:column; align-items:stretch; }
  .tso-sales-actions { justify-content:flex-start; }
  .tso-sales-kpis,
  .tso-opportunity-kpis,
  .tso-followup-kpis,
  .tso-handoff-kpis,
  .tso-sales-two-column,
  .tso-followup-board,
  .tso-sales-record-side,
  .tso-workflow-options,
  .tso-opportunity-form .tso-sales-form-grid,
  .tso-sales-form-grid,
  .tso-calendar-filters,
  .estimate-metrics,
  .proposal-summary-grid { grid-template-columns:1fr; }
  .tso-sales-form-span-two,
  .tso-stage-note { grid-column:span 1; }
  .tso-sales-filters { grid-template-columns:1fr; }
  .tso-stage-update-form { grid-template-columns:1fr; }
  .tso-appointment-card { grid-template-columns:72px minmax(0,1fr); }
  .tso-appointment-update { grid-column:1 / -1; }
  .tso-day-appointment-row,
  .tso-agenda-row { grid-template-columns:80px minmax(0,1fr); }
  .tso-day-appointment-meta,
  .tso-agenda-row > .tso-soft-chip { grid-column:2; justify-items:start; }
  .tso-handoff-card { grid-template-columns:1fr; }
  .tso-handoff-summary,
  .tso-handoff-summary-four { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tso-sales-sticky-save > div:last-child { width:100%; }
  .tso-sales-sticky-save > div:last-child > * { flex:1; }
  .tso-property-required { grid-template-columns:45px minmax(0,1fr); }
  .tso-property-required .button { grid-column:1 / -1; }
}

/* THREESIXOH_PRODUCTION_UI_V1
   Production board, job 360°, job directory, production calendar,
   scheduling queue, and field-production visual system.
*/

.tso-production-hero,
.tso-production-record-hero {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  margin-bottom:20px;
}
.tso-production-hero h1,
.tso-production-record-hero h1 {
  margin:2px 0 6px;
  color:var(--tso-navy-900);
  font-size:clamp(28px,3vw,40px);
  line-height:1.06;
}
.tso-production-hero p,
.tso-production-record-hero p {
  max-width:800px;
  margin:0;
  color:var(--tso-muted);
}
.tso-production-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}
.tso-production-actions .button + .button { margin-left:0; }

.tso-production-kpis,
.tso-job-kpis,
.tso-schedule-kpis,
.tso-field-kpis,
.tso-field-job-kpis {
  display:grid;
  gap:12px;
  margin-bottom:18px;
}
.tso-production-kpis { grid-template-columns:repeat(6,minmax(140px,1fr)); }
.tso-job-kpis { grid-template-columns:repeat(8,minmax(125px,1fr)); }
.tso-schedule-kpis { grid-template-columns:repeat(4,minmax(160px,1fr)); }
.tso-field-kpis { grid-template-columns:repeat(6,minmax(140px,1fr)); }
.tso-field-job-kpis { grid-template-columns:repeat(8,minmax(125px,1fr)); }

.tso-production-kpi,
.tso-job-kpis article,
.tso-schedule-kpis article,
.tso-field-kpis article,
.tso-field-job-kpis article {
  position:relative;
  display:block;
  min-height:104px;
  overflow:hidden;
  padding:16px 16px 14px 18px;
  border:1px solid var(--tso-line);
  border-radius:13px;
  background:#fff;
  color:var(--tso-text);
  text-decoration:none;
  box-shadow:0 5px 18px rgba(15,23,42,.035);
}
.tso-production-kpi::before,
.tso-job-kpis article::before,
.tso-schedule-kpis article::before,
.tso-field-kpis article::before,
.tso-field-job-kpis article::before {
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:var(--prod-kpi,var(--schedule-color,var(--field-color,var(--tso-teal))));
}
.tso-production-kpi:hover {
  transform:translateY(-1px);
  border-color:#b8deda;
}
.tso-production-kpi span,
.tso-production-kpi strong,
.tso-production-kpi small,
.tso-job-kpis article span,
.tso-job-kpis article strong,
.tso-job-kpis article small,
.tso-schedule-kpis article span,
.tso-schedule-kpis article strong,
.tso-schedule-kpis article small,
.tso-field-kpis article span,
.tso-field-kpis article strong,
.tso-field-kpis article small,
.tso-field-job-kpis article span,
.tso-field-job-kpis article strong,
.tso-field-job-kpis article small {
  display:block;
}
.tso-production-kpi span,
.tso-job-kpis article span,
.tso-schedule-kpis article span,
.tso-field-kpis article span,
.tso-field-job-kpis article span {
  color:var(--tso-muted);
  font-size:9px;
  font-weight:800;
  letter-spacing:.045em;
  text-transform:uppercase;
}
.tso-production-kpi strong,
.tso-job-kpis article strong,
.tso-schedule-kpis article strong,
.tso-field-kpis article strong,
.tso-field-job-kpis article strong {
  overflow:hidden;
  margin-top:8px;
  color:var(--tso-navy-900);
  font-size:22px;
  line-height:1.05;
  letter-spacing:-.035em;
  text-overflow:ellipsis;
}
.tso-production-kpi small,
.tso-job-kpis article small,
.tso-schedule-kpis article small,
.tso-field-kpis article small,
.tso-field-job-kpis article small {
  margin-top:7px;
  color:var(--tso-muted);
  font-size:8px;
}
.tso-production-kpi.is-alert,
.tso-job-kpis article.is-alert,
.tso-field-kpis article.is-alert {
  border-color:#fecaca;
  background:#fffafa;
}
.tso-production-kpi.is-warning,
.tso-field-job-kpis article.is-warning {
  border-color:#fed7aa;
  background:#fffaf4;
}

.tso-production-panel-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:13px;
}
.tso-production-panel-head h2 {
  margin:0;
  color:var(--tso-navy-900);
  font-size:15px;
}
.tso-production-panel-head p {
  margin:3px 0 0;
  color:var(--tso-muted);
  font-size:9px;
}
.tso-production-panel-head > span,
.tso-production-panel-head > strong,
.tso-production-panel-head > a {
  color:var(--tso-teal-dark);
  font-size:9px;
  font-weight:800;
  text-decoration:none;
}

.tso-production-handoff-alert {
  border-top:4px solid var(--tso-orange) !important;
}
.tso-production-handoff-strip {
  display:flex;
  gap:9px;
  overflow-x:auto;
  padding-bottom:3px;
}
.tso-production-handoff-strip > a {
  display:grid;
  flex:0 0 245px;
  gap:3px;
  padding:11px;
  border:1px solid #f2e2bf;
  border-radius:10px;
  background:#fffaf0;
  text-decoration:none;
}
.tso-production-handoff-strip strong {
  overflow:hidden;
  color:var(--tso-text);
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tso-production-handoff-strip span {
  color:#475569;
  font-size:8px;
}
.tso-production-handoff-strip small {
  color:var(--tso-muted);
  font-size:8px;
}

.tso-production-filter-panel,
.tso-job-filter-panel,
.tso-schedule-filter-panel,
.tso-field-filter-panel {
  padding:14px;
}
.tso-production-filters {
  display:grid;
  grid-template-columns:repeat(3,minmax(180px,1fr)) auto auto;
  gap:9px;
  align-items:center;
}
.tso-job-filters {
  display:grid;
  grid-template-columns:minmax(260px,1.5fr) repeat(7,minmax(135px,1fr)) auto auto;
  gap:8px;
  align-items:center;
}
.tso-schedule-filters {
  display:grid;
  grid-template-columns:minmax(260px,1.5fr) repeat(4,minmax(150px,1fr)) auto auto;
  gap:8px;
  align-items:center;
}
.tso-field-filters {
  display:flex;
  gap:8px;
  align-items:center;
}
.tso-job-search {
  position:relative;
}
.tso-job-search > span {
  position:absolute;
  z-index:1;
  top:50%;
  left:14px;
  color:var(--tso-muted);
  font-size:18px;
  transform:translateY(-50%);
}
.tso-job-search input {
  width:100%;
  padding-left:40px;
}

.tso-production-board-wrap { overflow:hidden; }
.tso-production-board {
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(270px,1fr);
  gap:12px;
  overflow-x:auto;
  padding-bottom:12px;
  scroll-snap-type:x proximity;
}
.tso-production-column {
  min-height:570px;
  border:1px solid var(--tso-line);
  border-radius:14px;
  background:#f8fafc;
  scroll-snap-align:start;
}
.tso-production-column-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:13px 13px 11px;
  border-bottom:1px solid var(--tso-line);
}
.tso-production-column-head > div {
  display:flex;
  align-items:center;
  gap:8px;
}
.tso-production-column-head h2 {
  margin:0;
  color:var(--tso-navy-900);
  font-size:11px;
}
.tso-production-stage-dot {
  width:8px;
  height:8px;
  border-radius:50%;
  background:#64748b;
}
.stage-preconstruction .tso-production-stage-dot { background:#7c3aed; }
.stage-permitting .tso-production-stage-dot { background:#9333ea; }
.stage-materials-ordered .tso-production-stage-dot { background:#d97706; }
.stage-ready-to-schedule .tso-production-stage-dot { background:#0891b2; }
.stage-scheduled .tso-production-stage-dot { background:#2563eb; }
.stage-in-progress .tso-production-stage-dot { background:#16a34a; }
.stage-punch-list .tso-production-stage-dot { background:#ec4899; }
.stage-final-paperwork-stage .tso-production-stage-dot { background:#4f46e5; }
.stage-on-hold .tso-production-stage-dot { background:#ea580c; }
.stage-complete .tso-production-stage-dot,
.stage-completed .tso-production-stage-dot { background:#059669; }

.tso-production-stage-count {
  display:grid;
  place-items:center;
  min-width:26px;
  height:25px;
  padding:0 7px;
  border-radius:999px;
  background:#fff;
  color:var(--tso-navy-800);
  font-size:9px;
  font-weight:800;
  box-shadow:0 2px 7px rgba(15,23,42,.06);
}
.tso-production-column-body {
  display:grid;
  gap:9px;
  padding:10px;
}
.tso-production-job-card {
  display:grid;
  gap:9px;
  padding:12px;
  border:1px solid #e5eaf0;
  border-radius:11px;
  background:#fff;
  box-shadow:0 4px 14px rgba(15,23,42,.035);
}
.tso-production-job-card.is-overdue {
  border-color:#fecaca;
  box-shadow:inset 3px 0 0 #dc2626;
}
.tso-production-job-card-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.tso-production-job-card-head a {
  min-width:0;
  text-decoration:none;
}
.tso-production-job-card-head strong {
  display:block;
  overflow:hidden;
  color:var(--tso-text);
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tso-production-late-chip {
  display:inline-flex;
  align-items:center;
  width:fit-content;
  min-height:21px;
  padding:0 7px;
  border-radius:999px;
  background:#fee2e2;
  color:#991b1b;
  font-size:7px;
  font-weight:850;
  white-space:nowrap;
}
.tso-production-customer {
  overflow:hidden;
  color:var(--tso-teal-dark);
  font-size:9px;
  font-weight:750;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tso-production-job-scope span,
.tso-production-job-scope small {
  display:block;
}
.tso-production-job-scope span {
  color:#334155;
  font-size:9px;
  font-weight:700;
}
.tso-production-job-scope small {
  overflow:hidden;
  margin-top:2px;
  color:var(--tso-muted);
  font-size:8px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tso-production-age-block {
  padding-top:7px;
  border-top:1px solid #edf1f5;
}
.tso-production-age-block > div:first-child {
  display:flex;
  justify-content:space-between;
  gap:8px;
}
.tso-production-age-block span,
.tso-production-age-block small {
  color:var(--tso-muted);
  font-size:7px;
}
.tso-production-age-block strong {
  color:var(--tso-text);
  font-size:8px;
}
.tso-production-age-meter,
.tso-field-table-progress,
.tso-field-progress,
.tso-field-progress-large {
  overflow:hidden;
  border-radius:999px;
  background:#e2e8f0;
}
.tso-production-age-meter {
  height:6px;
  margin:6px 0 4px;
}
.tso-production-age-meter span {
  display:block;
  height:100%;
  background:linear-gradient(90deg,var(--tso-teal),#f59e0b,#dc2626);
}
.tso-production-job-card-footer {
  display:flex;
  justify-content:space-between;
  gap:8px;
  color:var(--tso-muted);
  font-size:7px;
}
.tso-production-empty-column {
  display:grid;
  place-items:center;
  min-height:90px;
  color:var(--tso-muted);
  text-align:center;
  border:1px dashed #d5dfe7;
  border-radius:10px;
  background:#fbfcfd;
}
.tso-production-empty-column span {
  color:var(--tso-teal);
  font-size:20px;
}
.tso-production-empty-column p { margin:3px 0 0; font-size:8px; }

.tso-saved-job-views {
  margin-bottom:16px;
}
.tso-saved-job-views details summary {
  color:var(--tso-teal-dark);
  font-size:9px;
  font-weight:800;
  cursor:pointer;
}
.tso-save-view-form {
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px;
}
.tso-saved-view-list {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.tso-saved-view {
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:5px 8px;
  border:1px solid #dce5ec;
  border-radius:999px;
  background:#f8fafc;
}
.tso-saved-view a {
  color:var(--tso-navy-800);
  font-size:8px;
  font-weight:750;
  text-decoration:none;
}
.tso-saved-view form { margin:0; }
.tso-saved-view button {
  min-height:0;
  padding:0 3px;
  border:0;
  background:transparent;
  color:var(--tso-muted);
}

.tso-job-directory-panel,
.tso-field-directory-panel {
  overflow:hidden;
}
.tso-job-directory-panel > .tso-production-panel-head,
.tso-field-directory-panel > .tso-production-panel-head {
  padding:16px 17px 0;
}
.tso-job-directory tr.is-overdue td,
.tso-field-table tr.is-overdue td {
  background:#fff7f7;
}
.tso-job-identity {
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  gap:10px;
  align-items:center;
  min-width:185px;
  color:var(--tso-text);
  text-decoration:none;
}
.tso-job-icon {
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:10px;
  background:#ecfdf3;
  color:#16a34a;
  font-size:15px;
  font-weight:850;
}
.tso-job-identity strong,
.tso-job-identity small,
.tso-job-directory td strong,
.tso-job-directory td small,
.tso-field-table td strong,
.tso-field-table td small {
  display:block;
}
.tso-job-identity strong,
.tso-job-directory td strong,
.tso-field-table td strong {
  color:var(--tso-text);
  font-size:9px;
}
.tso-job-identity small,
.tso-job-directory td small,
.tso-field-table td small {
  margin-top:3px;
  color:var(--tso-muted);
  font-size:7px;
}
.tso-production-stage-chip,
.tso-production-stage-badge {
  display:inline-flex;
  align-items:center;
  width:fit-content;
  border-radius:999px;
  font-weight:800;
  white-space:nowrap;
}
.tso-production-stage-chip {
  min-height:24px;
  padding:0 8px;
  background:#eef2ff;
  color:#4f46e5;
  font-size:7px;
}
.tso-production-stage-chip.sales { background:#fff7ed; color:#c2410c; }
.tso-production-stage-chip.field { background:#ecfdf3; color:#166534; }
.tso-production-stage-chip.stage-on-hold { background:#fff7ed; color:#c2410c; }
.tso-production-stage-chip.stage-in-progress { background:#ecfdf3; color:#166534; }
.tso-production-stage-chip.stage-final-paperwork-stage { background:#eef2ff; color:#4338ca; }
.tso-production-stage-badge {
  min-height:34px;
  padding:0 12px;
  border:1px solid #dbe4eb;
  background:#f8fafc;
  color:var(--tso-navy-800);
  font-size:9px;
}
.tso-production-row-open {
  display:grid;
  place-items:center;
  width:31px;
  height:31px;
  border-radius:8px;
  background:#ecfdf3;
  color:#15803d;
  font-weight:800;
  text-decoration:none;
}

.tso-production-record-title {
  display:flex;
  align-items:center;
  gap:13px;
}
.tso-production-record-icon {
  display:grid;
  place-items:center;
  width:51px;
  height:51px;
  border-radius:13px;
  background:linear-gradient(145deg,#22c55e,#0f9f4b);
  color:#fff;
  font-size:21px;
  font-weight:850;
  box-shadow:0 7px 18px rgba(34,197,94,.18);
}
.tso-production-record-icon.field {
  background:linear-gradient(145deg,#00a7a5,#007e7d);
}
.tso-production-record-subtitle {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  color:var(--tso-muted);
  font-size:11px;
}
.tso-production-record-subtitle a {
  font-weight:700;
  text-decoration:none;
}

.tso-production-workflow-panel {
  margin-bottom:16px;
}
.tso-production-workflow-options {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.tso-production-workflow-options article {
  padding:11px;
  border:1px solid #e4eaf0;
  border-radius:10px;
  background:#fbfcfd;
}
.tso-production-workflow-options article > div {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.tso-production-workflow-options strong {
  color:var(--tso-text);
  font-size:9px;
}
.tso-production-workflow-options article span {
  padding:3px 6px;
  border-radius:999px;
  font-size:7px;
  font-weight:800;
}
.tso-production-workflow-options .is-ready span {
  background:#dcfce7;
  color:#166534;
}
.tso-production-workflow-options .is-blocked span {
  background:#fee2e2;
  color:#991b1b;
}
.tso-production-workflow-options p,
.tso-production-workflow-options ul {
  margin:8px 0 0;
  color:var(--tso-muted);
  font-size:8px;
}
.tso-production-workflow-options ul { padding-left:15px; }
.tso-production-stage-form {
  display:grid;
  grid-template-columns:210px minmax(210px,1fr) minmax(210px,1fr) auto auto;
  gap:9px;
  align-items:end;
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid var(--tso-line);
}
.tso-production-stage-form label {
  display:grid;
  gap:5px;
  color:#475569;
  font-size:8px;
  font-weight:750;
}
.tso-production-override {
  display:flex !important;
  align-items:center;
  min-height:40px;
}
.tso-production-override input { min-height:0; }

.tso-production-milestones {
  display:grid;
  grid-template-columns:repeat(5,minmax(130px,1fr));
  gap:10px;
  margin-bottom:18px;
}
.tso-production-milestones article {
  padding:12px;
  border:1px solid var(--tso-line);
  border-radius:10px;
  background:#fff;
}
.tso-production-milestones span,
.tso-production-milestones strong { display:block; }
.tso-production-milestones span {
  color:var(--tso-muted);
  font-size:7px;
  font-weight:800;
  text-transform:uppercase;
}
.tso-production-milestones strong {
  margin-top:4px;
  color:var(--tso-navy-900);
  font-size:10px;
}

.tso-production-record-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:18px;
  align-items:start;
}
.tso-production-record-main,
.tso-production-record-side {
  display:grid;
  min-width:0;
  gap:18px;
}
.tso-production-record-side > .panel { margin:0; }

.tso-production-module-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.tso-production-module {
  display:flex;
  flex-direction:column;
  gap:12px;
  margin:0;
}
.tso-production-module-head {
  display:grid;
  grid-template-columns:40px minmax(0,1fr);
  gap:10px;
  align-items:center;
}
.tso-module-icon {
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border-radius:10px;
  background:#eef2ff;
  color:#4f46e5;
  font-size:14px;
  font-weight:850;
}
.tso-module-icon.preconstruction { background:#f3e8ff; color:#7e22ce; }
.tso-module-icon.scheduling { background:#eff6ff; color:#2563eb; }
.tso-module-icon.field { background:#ecfdf3; color:#16a34a; }
.tso-module-icon.exceptions { background:#fff7ed; color:#ea580c; }
.tso-module-icon.quality { background:#ecfeff; color:#0891b2; }
.tso-production-module h2 {
  margin:0;
  color:var(--tso-navy-900);
  font-size:13px;
}
.tso-production-module p {
  margin:3px 0 0;
  color:var(--tso-muted);
  font-size:8px;
}
.tso-production-module-metrics {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
}
.tso-production-module-metrics > div {
  min-width:0;
  padding:8px;
  border:1px solid #edf1f5;
  border-radius:8px;
  background:#fbfcfd;
}
.tso-production-module-metrics span,
.tso-production-module-metrics strong { display:block; }
.tso-production-module-metrics span {
  color:var(--tso-muted);
  font-size:6px;
  font-weight:800;
  text-transform:uppercase;
}
.tso-production-module-metrics strong {
  overflow:hidden;
  margin-top:3px;
  color:var(--tso-text);
  font-size:8px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tso-module-actions {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:auto;
}
.tso-module-actions form { margin:0; }
.tso-production-warning {
  padding:8px 10px;
  border:1px solid #fed7aa;
  border-radius:8px;
  background:#fff7ed;
  color:#9a3412;
  font-size:8px;
}
.tso-production-warning.danger {
  border-color:#fecaca;
  background:#fff1f2;
  color:#991b1b;
}
.tso-field-progress {
  height:9px;
}
.tso-field-progress span,
.tso-field-progress-large span,
.tso-field-table-progress span {
  display:block;
  height:100%;
  background:linear-gradient(90deg,var(--tso-teal),#22c55e);
}

.tso-production-closeout-strip {
  margin:0;
}
.tso-closeout-links {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.tso-closeout-links a {
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  gap:9px;
  align-items:center;
  padding:11px;
  border:1px solid #edf1f5;
  border-radius:10px;
  color:var(--tso-text);
  text-decoration:none;
}
.tso-closeout-links a:hover {
  border-color:#b8deda;
  background:#fbfefe;
}
.tso-closeout-links a > span {
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  grid-row:span 2;
  border-radius:9px;
  background:#eef2ff;
  color:#4f46e5;
  font-size:11px;
  font-weight:850;
}
.tso-closeout-links strong,
.tso-closeout-links small { display:block; }
.tso-closeout-links strong { font-size:9px; }
.tso-closeout-links small { color:var(--tso-muted); font-size:7px; }

.tso-production-source-link {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  padding:10px;
  border:1px solid #edf1f5;
  border-radius:9px;
}
.tso-production-source-link span {
  color:var(--tso-muted);
  font-size:7px;
  font-weight:800;
  text-transform:uppercase;
}
.tso-production-source-link a {
  color:var(--tso-teal-dark);
  font-size:8px;
  font-weight:750;
  text-decoration:none;
}
.tso-production-handoff-record,
.tso-production-scope {
  margin-top:10px;
  padding:11px;
  border:1px solid #edf1f5;
  border-radius:9px;
  background:#fbfcfd;
}
.tso-production-handoff-record strong,
.tso-production-scope strong {
  color:var(--tso-navy-900);
  font-size:9px;
}
.tso-production-handoff-record p,
.tso-production-scope p {
  margin:5px 0;
  color:#475569;
  font-size:8px;
  white-space:pre-wrap;
}

.tso-production-two-column,
.tso-production-three-column,
.tso-field-two-column {
  display:grid;
  gap:18px;
}
.tso-production-two-column,
.tso-field-two-column { grid-template-columns:repeat(2,minmax(0,1fr)); }
.tso-production-three-column { grid-template-columns:repeat(3,minmax(0,1fr)); }
.tso-production-two-column > .panel,
.tso-production-three-column > .panel,
.tso-field-two-column > .panel { margin:0; }

.tso-production-create-drawer {
  margin:0 0 12px;
  border:1px solid #dbe5ec;
  border-radius:10px;
  background:#fbfcfd;
}
.tso-production-create-drawer summary {
  padding:9px 11px;
  color:var(--tso-teal-dark);
  font-size:8px;
  font-weight:800;
  cursor:pointer;
}
.tso-production-create-drawer[open] summary {
  border-bottom:1px solid #e6edf2;
}
.tso-production-create-drawer form { padding:11px; }

.tso-production-task-list,
.tso-production-note-list,
.tso-production-document-list,
.tso-production-history {
  display:grid;
}
.tso-production-task {
  display:grid;
  grid-template-columns:30px minmax(0,1fr);
  gap:9px;
  align-items:start;
  padding:9px 0;
  border-bottom:1px solid #edf1f5;
}
.tso-production-task:last-child { border-bottom:0; }
.tso-production-task-toggle {
  display:grid;
  place-items:center;
  width:28px;
  min-height:28px;
  padding:0;
  border:1px solid #cbd5e1;
  border-radius:8px !important;
  background:#fff;
  color:var(--tso-teal-dark);
}
.tso-production-task strong,
.tso-production-task small { display:block; }
.tso-production-task strong { color:var(--tso-text); font-size:9px; }
.tso-production-task small { margin-top:3px; color:var(--tso-muted); font-size:7px; }
.tso-production-auto-chip {
  display:inline-flex;
  margin:3px 0;
  padding:3px 6px;
  border-radius:999px;
  background:#eef2ff;
  color:#4f46e5;
  font-size:6px;
  font-weight:800;
}
.tso-production-note-list article {
  padding:10px 0;
  border-bottom:1px solid #edf1f5;
}
.tso-production-note-list article:last-child { border-bottom:0; }
.tso-production-note-list p {
  margin:0;
  color:#334155;
  font-size:9px;
  white-space:pre-wrap;
}
.tso-production-note-list small {
  display:block;
  margin-top:5px;
  color:var(--tso-muted);
  font-size:7px;
}
.tso-production-document-list { gap:7px; }
.tso-production-document-list a {
  display:grid;
  grid-template-columns:30px minmax(0,1fr);
  gap:9px;
  align-items:center;
  padding:8px;
  border:1px solid #edf1f5;
  border-radius:9px;
  color:var(--tso-text);
  text-decoration:none;
}
.tso-production-document-list a > span {
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:8px;
  background:#eef2ff;
  color:#4f46e5;
}
.tso-production-document-list strong,
.tso-production-document-list small { display:block; }
.tso-production-document-list strong {
  overflow:hidden;
  font-size:8px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tso-production-document-list small {
  margin-top:2px;
  color:var(--tso-muted);
  font-size:7px;
}
.tso-production-history article {
  display:grid;
  grid-template-columns:14px minmax(0,1fr);
  gap:9px;
  padding:9px 0;
  border-bottom:1px solid #edf1f5;
}
.tso-production-history article:last-child { border-bottom:0; }
.tso-production-history article > span {
  width:9px;
  height:9px;
  margin-top:3px;
  border:3px solid #d9f2ef;
  border-radius:50%;
  background:var(--tso-teal);
}
.tso-production-history strong,
.tso-production-history small { display:block; }
.tso-production-history strong { color:var(--tso-text); font-size:9px; }
.tso-production-history small { margin-top:2px; color:var(--tso-muted); font-size:7px; }
.tso-production-history p { margin:4px 0 0; color:#475569; font-size:8px; }

.tso-production-facts {
  display:grid;
  margin:0;
}
.tso-production-facts > div {
  display:grid;
  grid-template-columns:minmax(90px,.75fr) minmax(0,1.25fr);
  gap:10px;
  padding:8px 0;
  border-bottom:1px solid #edf1f5;
}
.tso-production-facts > div:last-child { border-bottom:0; }
.tso-production-facts dt {
  color:var(--tso-muted);
  font-size:7px;
  font-weight:800;
  text-transform:uppercase;
}
.tso-production-facts dd {
  min-width:0;
  margin:0;
  overflow-wrap:anywhere;
  color:var(--tso-text);
  font-size:8px;
  font-weight:650;
  text-align:right;
}
.tso-production-mono {
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
.tso-production-empty {
  display:grid;
  place-items:center;
  min-height:88px;
  padding:14px;
  color:var(--tso-muted);
  text-align:center;
  border:1px dashed #d5dfe7;
  border-radius:10px;
  background:#fbfcfd;
  font-size:8px;
}

.tso-production-form {
  display:grid;
  gap:16px;
  max-width:1080px;
  margin:0 auto;
}
.tso-production-form-section { margin:0; }
.tso-production-form-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.tso-production-form-grid label {
  display:grid;
  gap:6px;
  color:#334155;
  font-size:9px;
  font-weight:750;
}
.tso-production-form-grid label small {
  color:var(--tso-muted);
  font-size:7px;
  font-weight:500;
}
.tso-production-form-span-two { grid-column:span 2; }
.tso-production-source-section {
  border-top:4px solid #64748b !important;
}
.tso-production-sticky-save {
  position:sticky;
  bottom:14px;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 16px;
  border:1px solid #cfdce5;
  border-radius:13px;
  background:rgba(255,255,255,.96);
  box-shadow:0 14px 35px rgba(15,23,42,.14);
  backdrop-filter:blur(10px);
}
.tso-production-sticky-save strong,
.tso-production-sticky-save span { display:block; }
.tso-production-sticky-save strong {
  color:var(--tso-navy-900);
  font-size:10px;
}
.tso-production-sticky-save span {
  margin-top:2px;
  color:var(--tso-muted);
  font-size:8px;
}
.tso-production-sticky-save > div:last-child {
  display:flex;
  gap:8px;
}

.tso-schedule-card-list {
  display:grid;
  gap:11px;
}
.tso-schedule-card {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:16px;
  align-items:center;
  margin:0;
  border-left:5px solid #64748b !important;
}
.tso-schedule-card.status-dispatch-ready { border-left-color:#16a34a !important; }
.tso-schedule-card.status-needs-review,
.tso-schedule-card.status-tentative { border-left-color:#f59e0b !important; }
.tso-schedule-card.is-blocked { border-color:#fecaca !important; border-left-color:#dc2626 !important; }
.tso-schedule-card-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.tso-schedule-card-head h2 {
  margin:0;
  font-size:12px;
}
.tso-schedule-card-head h2 a {
  color:var(--tso-navy-900);
  text-decoration:none;
}
.tso-schedule-card-head p {
  margin:3px 0;
  color:#475569;
  font-size:9px;
}
.tso-schedule-card-head small {
  color:var(--tso-muted);
  font-size:8px;
}
.tso-schedule-card-metrics {
  display:grid;
  grid-template-columns:repeat(4,minmax(100px,1fr));
  gap:8px;
  margin-top:11px;
}
.tso-schedule-card-metrics > div {
  padding:8px;
  border:1px solid #edf1f5;
  border-radius:8px;
  background:#fbfcfd;
}
.tso-schedule-card-metrics span,
.tso-schedule-card-metrics strong { display:block; }
.tso-schedule-card-metrics span {
  color:var(--tso-muted);
  font-size:7px;
  text-transform:uppercase;
}
.tso-schedule-card-metrics strong {
  overflow:hidden;
  margin-top:3px;
  color:var(--tso-text);
  font-size:8px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.tso-calendar-section-tabs {
  display:inline-flex;
  gap:4px;
  margin-bottom:14px;
  padding:4px;
  border:1px solid var(--tso-line);
  border-radius:10px;
  background:#fff;
}
.tso-calendar-section-tabs a {
  padding:7px 10px;
  border-radius:7px;
  color:var(--tso-muted);
  font-size:8px;
  font-weight:800;
  text-decoration:none;
}
.tso-calendar-section-tabs a.active {
  background:var(--tso-navy-800);
  color:#fff;
}
.tso-prod-calendar-controls {
  padding:16px;
  margin-bottom:16px;
}
.tso-prod-calendar-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.tso-prod-calendar-nav,
.tso-prod-calendar-view-switch {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.tso-prod-calendar-view-switch .button.active {
  background:var(--tso-teal);
  border-color:var(--tso-teal);
  color:#fff;
}
.tso-prod-calendar-filters {
  display:grid;
  grid-template-columns:150px minmax(180px,1fr) 190px 180px auto;
  gap:9px;
  align-items:end;
  margin-top:13px;
  padding-top:13px;
  border-top:1px solid var(--tso-line);
}
.tso-prod-calendar-filters label {
  display:grid;
  gap:5px;
  color:#475569;
  font-size:8px;
  font-weight:750;
}
.tso-prod-calendar-filter-actions {
  display:flex;
  gap:6px;
}
.tso-prod-calendar-legend {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:12px;
}
.tso-prod-calendar-legend span {
  padding:5px 7px;
  border-radius:999px;
  background:#eef2ff;
  color:#4f46e5;
  font-size:7px;
  font-weight:800;
}
.tso-prod-calendar-legend .stage-in-progress { background:#dcfce7; color:#166534; }
.tso-prod-calendar-legend .stage-on-hold { background:#ffedd5; color:#9a3412; }
.tso-prod-calendar-scroll {
  overflow-x:auto;
  padding-bottom:8px;
}
.tso-prod-month-calendar {
  display:grid;
  grid-template-columns:repeat(7,minmax(145px,1fr));
  min-width:1015px;
  border-top:1px solid var(--tso-line);
  border-left:1px solid var(--tso-line);
  border-radius:12px;
  overflow:hidden;
}
.tso-prod-calendar-weekday {
  padding:9px;
  border-right:1px solid rgba(255,255,255,.1);
  background:var(--tso-navy-800);
  color:#fff;
  font-size:8px;
  font-weight:800;
  text-align:center;
}
.tso-prod-calendar-day-cell {
  min-height:145px;
  padding:8px;
  border-right:1px solid var(--tso-line);
  border-bottom:1px solid var(--tso-line);
  background:#fff;
}
.tso-prod-calendar-day-cell.outside-month {
  background:#f8fafc;
  opacity:.65;
}
.tso-prod-calendar-day-cell.today {
  box-shadow:inset 0 0 0 2px var(--tso-teal);
}
.tso-prod-calendar-day-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:6px;
}
.tso-prod-calendar-day-head a {
  color:var(--tso-navy-900);
  font-size:9px;
  font-weight:850;
  text-decoration:none;
}
.tso-prod-calendar-day-head span {
  display:grid;
  place-items:center;
  min-width:20px;
  height:20px;
  border-radius:999px;
  background:#eef2f7;
  color:var(--tso-muted);
  font-size:7px;
  font-weight:800;
}
.tso-prod-calendar-day-jobs {
  display:grid;
  gap:4px;
}
.tso-prod-calendar-job {
  display:grid;
  gap:2px;
  padding:6px 7px;
  border-left:3px solid #2563eb;
  border-radius:7px;
  background:#eff6ff;
  color:var(--tso-text);
  text-decoration:none;
}
.tso-prod-calendar-job.stage-in-progress { border-left-color:#16a34a; background:#f0fdf4; }
.tso-prod-calendar-job.stage-on-hold { border-left-color:#ea580c; background:#fff7ed; }
.tso-prod-calendar-job.stage-punch-list { border-left-color:#ec4899; background:#fdf2f8; }
.tso-prod-calendar-job > span {
  overflow:hidden;
  font-size:8px;
  font-weight:750;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tso-prod-calendar-job small {
  overflow:hidden;
  color:var(--tso-muted);
  font-size:7px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tso-prod-calendar-more {
  color:var(--tso-teal-dark);
  font-size:7px;
  font-weight:750;
  text-decoration:none;
}
.tso-prod-week-calendar {
  display:grid;
  grid-template-columns:repeat(7,minmax(175px,1fr));
  gap:8px;
  min-width:1225px;
}
.tso-prod-week-day {
  min-height:430px;
  overflow:hidden;
  border:1px solid var(--tso-line);
  border-radius:11px;
  background:#fff;
}
.tso-prod-week-day.today { box-shadow:inset 0 0 0 2px var(--tso-teal); }
.tso-prod-week-day header {
  padding:10px;
  border-bottom:1px solid var(--tso-line);
  background:#f8fafc;
}
.tso-prod-week-day header a {
  display:flex;
  justify-content:space-between;
  color:var(--tso-text);
  text-decoration:none;
}
.tso-prod-week-day header span { color:var(--tso-muted); font-size:8px; }
.tso-prod-week-day header strong { font-size:9px; }
.tso-prod-week-day header small {
  display:block;
  margin-top:4px;
  color:var(--tso-muted);
  font-size:7px;
}
.tso-prod-week-day > div {
  display:grid;
  gap:6px;
  padding:8px;
}
.tso-prod-calendar-empty {
  color:var(--tso-muted);
  font-size:8px;
  text-align:center;
}
.tso-prod-day-row,
.tso-prod-agenda-row {
  display:grid;
  grid-template-columns:100px minmax(0,1fr) 160px;
  gap:13px;
  align-items:center;
  padding:11px 0;
  border-bottom:1px solid #edf1f5;
  color:var(--tso-text);
  text-decoration:none;
}
.tso-prod-day-row:last-child,
.tso-prod-agenda-row:last-child { border-bottom:0; }
.tso-prod-day-row > div:first-child strong,
.tso-prod-day-row > div:first-child span,
.tso-prod-day-row > div:nth-child(2) strong,
.tso-prod-day-row > div:nth-child(2) span,
.tso-prod-day-row > div:nth-child(2) small,
.tso-prod-agenda-row strong,
.tso-prod-agenda-row span,
.tso-prod-agenda-row small {
  display:block;
}
.tso-prod-day-row > div:first-child strong { color:var(--tso-navy-900); font-size:10px; }
.tso-prod-day-row > div:first-child span { margin-top:3px; color:var(--tso-muted); font-size:7px; }
.tso-prod-day-row > div:nth-child(2) strong,
.tso-prod-agenda-row strong { color:var(--tso-text); font-size:9px; }
.tso-prod-day-row > div:nth-child(2) span,
.tso-prod-agenda-row span { margin-top:2px; color:#475569; font-size:8px; }
.tso-prod-day-row > div:nth-child(2) small,
.tso-prod-agenda-row small { margin-top:2px; color:var(--tso-muted); font-size:7px; }
.tso-prod-day-row > div:last-child {
  display:grid;
  justify-items:end;
  gap:4px;
}
.tso-prod-agenda {
  display:grid;
  gap:14px;
}
.tso-prod-agenda-row time {
  color:var(--tso-teal-dark);
  font-size:8px;
  font-weight:800;
}

.tso-field-table-progress {
  width:95px;
  height:6px;
  margin-bottom:4px;
}
.tso-field-progress-panel {
  margin-bottom:16px;
}
.tso-field-progress-large {
  height:14px;
}
.tso-field-checkin-form {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.tso-field-checkin-form label {
  display:grid;
  gap:5px;
  color:#475569;
  font-size:8px;
  font-weight:750;
}
.tso-field-form-span-two { grid-column:span 2; }
.tso-field-form-actions {
  display:flex;
  align-items:center;
  gap:10px;
}
.tso-field-form-actions small {
  color:var(--tso-muted);
  font-size:7px;
}
.tso-field-checkin-list {
  display:grid;
  gap:8px;
}
.tso-field-checkin-list article {
  padding:11px;
  border:1px solid #bbf7d0;
  border-left:4px solid #16a34a;
  border-radius:9px;
  background:#f0fdf4;
}
.tso-field-checkin-list article > div {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.tso-field-checkin-list strong { color:#166534; font-size:9px; }
.tso-field-checkin-list small { display:block; margin-top:4px; color:#475569; font-size:7px; }
.tso-field-checkin-list p { margin:5px 0; color:#334155; font-size:8px; }
.tso-field-checkin-list form { margin-top:8px; }
.tso-field-new-log {
  display:flex;
  gap:7px;
  align-items:center;
}
.tso-field-log-table td .button + .button { margin-left:4px; }

/* Existing production submodules: consistent ThreeSixOh! treatment */
.schedule-kpis,
.stats.stats-6,
.job-summary-grid,
.closeout-summary-grid,
.warranty-summary-grid,
.payment-summary-grid,
.quality-summary-grid,
.exception-summary-grid {
  gap:12px !important;
}
.job-summary-grid > div,
.schedule-kpi,
.closeout-card,
.warranty-summary-card,
.payment-summary-card,
.quality-summary-card,
.exception-summary-card {
  border:1px solid var(--tso-line) !important;
  border-radius:11px !important;
  background:#fff !important;
  box-shadow:0 4px 15px rgba(15,23,42,.035) !important;
}
.readiness-grid {
  gap:9px !important;
}
.readiness-item {
  border:1px solid #e4eaf0 !important;
  border-radius:9px !important;
  background:#fbfcfd !important;
}
.readiness-item.pass { border-left:5px solid #16a34a !important; }
.readiness-item.fail { border-left:5px solid #dc2626 !important; }
.schedule-state.ready {
  border:1px solid #bbf7d0 !important;
  background:#f0fdf4 !important;
}
.schedule-state.blocked {
  border:1px solid #fecaca !important;
  background:#fff1f2 !important;
}
.schedule-section,
.handoff-form-section,
.quality-workspace-section,
.exception-workspace-section,
.warranty-registration-card {
  border-radius:12px !important;
}
.production-calendar-job,
.sched-event {
  border-radius:7px !important;
}
.field-progress span { background:linear-gradient(90deg,var(--tso-teal),#22c55e) !important; }
.sticky-actions {
  border:1px solid #cfdce5 !important;
  border-radius:13px !important;
  background:rgba(255,255,255,.96) !important;
  box-shadow:0 14px 35px rgba(15,23,42,.14) !important;
}
.closeout-status,
.warranty-status {
  border-radius:999px !important;
  font-size:.72rem !important;
  font-weight:800 !important;
}
.warning-box,
.schedule-alert.error,
.requirement-blocker,
.quality-warning,
.exception-warning {
  border-radius:9px !important;
}

/* Dispatch calendar from production_scheduling.calendar_view */
.sched-month,
.week-grid {
  border-radius:12px;
  overflow:hidden;
}
.sched-weekday {
  background:var(--tso-navy-800) !important;
  color:#fff !important;
}
.sched-day.today {
  box-shadow:inset 0 0 0 2px var(--tso-teal) !important;
}
.sched-event.status-dispatch-ready {
  border-left-color:#16a34a !important;
  background:#f0fdf4 !important;
}
.sched-event.status-needs-review {
  border-left-color:#f59e0b !important;
  background:#fff7ed !important;
}
.move-notice {
  background:var(--tso-navy-900) !important;
  border-radius:10px !important;
  box-shadow:0 12px 30px rgba(15,23,42,.2) !important;
}

@media (max-width:1500px) {
  .tso-production-kpis,
  .tso-field-kpis { grid-template-columns:repeat(3,minmax(150px,1fr)); }
  .tso-job-kpis,
  .tso-field-job-kpis { grid-template-columns:repeat(4,minmax(140px,1fr)); }
  .tso-job-filters { grid-template-columns:repeat(4,minmax(150px,1fr)); }
  .tso-job-search { grid-column:span 2; }
  .tso-schedule-filters { grid-template-columns:repeat(3,minmax(160px,1fr)); }
  .tso-production-workflow-options { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tso-production-stage-form { grid-template-columns:repeat(2,minmax(190px,1fr)); }
}
@media (max-width:1200px) {
  .tso-production-record-layout { grid-template-columns:1fr; }
  .tso-production-record-side { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .tso-production-module-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tso-prod-calendar-filters { grid-template-columns:repeat(2,minmax(180px,1fr)); }
  .tso-schedule-card-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:900px) {
  .tso-production-hero,
  .tso-production-record-hero,
  .tso-production-sticky-save {
    flex-direction:column;
    align-items:stretch;
  }
  .tso-production-actions { justify-content:flex-start; }
  .tso-production-kpis,
  .tso-job-kpis,
  .tso-schedule-kpis,
  .tso-field-kpis,
  .tso-field-job-kpis,
  .tso-production-module-grid,
  .tso-production-two-column,
  .tso-production-three-column,
  .tso-field-two-column,
  .tso-production-record-side,
  .tso-closeout-links,
  .tso-production-form-grid,
  .tso-field-checkin-form {
    grid-template-columns:1fr;
  }
  .tso-production-form-span-two,
  .tso-field-form-span-two {
    grid-column:span 1;
  }
  .tso-production-filters,
  .tso-job-filters,
  .tso-schedule-filters,
  .tso-prod-calendar-filters {
    grid-template-columns:1fr;
  }
  .tso-job-search { grid-column:span 1; }
  .tso-production-stage-form { grid-template-columns:1fr; }
  .tso-production-milestones { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tso-schedule-card { grid-template-columns:1fr; }
  .tso-prod-day-row,
  .tso-prod-agenda-row { grid-template-columns:80px minmax(0,1fr); }
  .tso-prod-day-row > div:last-child,
  .tso-prod-agenda-row > .tso-production-stage-chip {
    grid-column:2;
    justify-items:start;
  }
  .tso-production-sticky-save > div:last-child {
    width:100%;
  }
  .tso-production-sticky-save > div:last-child > * { flex:1; }
  .tso-field-form-actions {
    align-items:stretch;
    flex-direction:column;
  }
}

/* THREESIXOH_SIMPLIFIED_SALES_WORKFLOW_V1 */
.stage-proposal-decision-pending .tso-stage-dot {
  background: #ec4899;
}

.tso-sales-stage-badge.stage-proposal-decision-pending {
  border-color: #fbcfe8;
  background: #fdf2f8;
  color: #9d174d;
}

@media (min-width: 1600px) {
  .tso-sales-board {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow-x: visible;
  }
}

/* THREESIXOH PROFILE APPEARANCE + TOPBAR ALIGNMENT v1 START */

/*
 * Keep the topbar actions on one visual baseline.
 */
.tso-topbar-actions {
    align-items: center !important;
}

/*
 * Alerts and Report a Bug should behave as a matched pair.
 *
 * Attribute selectors keep this compatible with the existing
 * button classes and with the /crm reverse-proxy prefix.
 */
.tso-topbar-actions > a[href*="/notifications"],
.tso-topbar-actions > a[href*="/feedback/new"],
.tso-topbar-actions a[href*="/notifications"],
.tso-topbar-actions a[href*="/feedback/new"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    height: 38px !important;
    min-height: 38px !important;

    box-sizing: border-box !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;

    line-height: 1 !important;
    vertical-align: middle !important;
    white-space: nowrap;
}

/*
 * Profile appearance controls.
 */
.tso-profile-appearance {
    margin-top: 18px;
}

.tso-profile-theme-form {
    max-width: 520px;
    margin: 0;
}

.tso-profile-theme-label {
    display: grid;
    gap: 7px;
    margin: 0;
}

.tso-profile-theme-label > span {
    font-weight: 700;
}

.tso-profile-theme-select {
    width: 100%;
    max-width: 320px;
    min-height: 42px;
}

.tso-profile-theme-label small {
    opacity: .72;
}

/* THREESIXOH PROFILE APPEARANCE + TOPBAR ALIGNMENT v1 END */

/* THREESIXOH PROFILE FEEDBACK CORRECTION v2 START */


/* ------------------------------------------------------------------
   MY PROFILE APPEARANCE
   ------------------------------------------------------------------ */

.tso-profile-appearance {
    margin-bottom: 20px;
}

.tso-profile-theme-form {
    max-width: 520px;
    margin: 0;
}

.tso-profile-theme-label {
    display: grid;
    gap: 8px;
    margin: 0;
}

.tso-profile-theme-label > span {
    font-weight: 700;
}

.tso-profile-theme-select {
    width: 100%;
    max-width: 320px;
    min-height: 44px;
}

.tso-profile-theme-label small {
    opacity: .70;
}


/* ------------------------------------------------------------------
   BUG & FEATURE TRACKER HEADER
   ------------------------------------------------------------------ */

.feedback-admin-page-head {
    align-items: center !important;
}

.feedback-page-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
}

.feedback-page-actions .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    height: 46px !important;
    min-height: 46px !important;

    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;

    line-height: 1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

@media (max-width: 700px) {
    .feedback-admin-page-head {
        align-items: stretch !important;
    }

    .feedback-page-actions {
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
    }
}


/* THREESIXOH PROFILE FEEDBACK CORRECTION v2 END */

