/* Foundation UX Phase 2D-A: 10-second Daily Flow, native customer actions, refined work drawer. */

/* Customers Control: keep actions inside their natural visual lane. */
.customer-control-v2-page .title-row{align-items:flex-start;gap:20px}
.customer-control-v2-page .title-row>div:first-child{min-width:0;flex:1 1 auto}
.customer-control-v2-page .title-actions{display:flex;flex:0 1 auto;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:6px;max-width:min(48vw,620px)}
.customer-control-v2-page .title-actions button{min-height:36px;padding:0 13px;border-radius:10px;white-space:nowrap;box-shadow:none}
.customer-control-v2-page .title-actions .customer-export-v2{min-width:58px;padding-inline:11px}
.customer-control-v2-page .customer-v2-commandbar{grid-template-columns:minmax(250px,1.75fr) repeat(5,minmax(118px,.7fr));gap:7px}
.customer-control-v2-page .customer-v2-commandbar select{min-width:0;font-size:11px}

/* Fast work composer */
#modal .modal-card:has(.work-fast-composer){width:min(790px,96vw);max-height:min(90vh,860px);overflow:auto}
.work-fast-composer .work-composer-grid{display:block!important}
.work-fast-composer .work-composer-context{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.work-fast-composer .work-composer-context>.full,.work-fast-composer .work-problem-input,.work-fast-composer .work-composer-essentials,.work-fast-composer .work-fast-more,.work-fast-composer .work-customer-context-wrap{grid-column:1/-1}
.work-fast-composer .work-composer-task{display:none!important}
.work-fast-composer .work-target-scope{display:none!important}
.work-fast-composer .work-context-fallback{display:none!important}
.work-fast-composer .work-composer-head{margin-bottom:14px}
.work-fast-composer .work-composer-head h2{font-size:24px;line-height:1.08;margin-top:4px}
.work-fast-composer .work-composer-head p{max-width:620px;margin-top:6px;font-size:11px;line-height:1.5}
.work-fast-composer .work-composer-step{background:var(--soft);border:1px solid var(--line);color:var(--muted);font-size:9px}
.work-fast-composer .work-composer-customer,.work-fast-composer .work-composer-device,.work-fast-composer .work-problem-input{margin:0}
.work-fast-composer .field-label-row{margin-bottom:5px}
.work-fast-composer .field-label-row label,.work-fast-composer .work-problem-input>label{font-size:10px;font-weight:800;color:var(--ink)}
.work-fast-composer .field-label-row small{font-size:8px}
.work-fast-composer input,.work-fast-composer select,.work-fast-composer textarea,.work-fast-composer .picker-input{min-height:42px;border-radius:10px}
.work-fast-composer .work-problem-input input{font-size:15px;font-weight:700;padding-inline:13px}
.work-fast-composer .work-composer-essentials{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.85fr) minmax(0,1fr);gap:10px;align-items:end;margin-top:1px}
.work-fast-composer .work-composer-essentials .field{margin:0}
.work-fast-composer .work-composer-essentials label{font-size:9px;font-weight:760;color:var(--muted)}
.work-fast-composer .work-context-card{padding:10px 12px;border-radius:11px;margin:0;background:var(--soft)}
.work-fast-composer .work-resolved-context{grid-column:1/-1;margin:0;padding:9px 11px;border-radius:10px}
.work-fast-composer .composer-inline-hint{min-height:0;margin-top:4px;font-size:8px}
.work-fast-composer .work-fast-more{margin-top:2px;border:1px solid var(--line);border-radius:11px;background:var(--panel);overflow:hidden}
.work-fast-composer .work-fast-more>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:42px;padding:0 12px;cursor:pointer;list-style:none;font-size:10px;font-weight:800;color:var(--muted)}
.work-fast-composer .work-fast-more>summary::-webkit-details-marker{display:none}
.work-fast-composer .work-fast-more>summary::before{content:'＋';font-size:13px;color:#6070d8;margin-right:3px}
.work-fast-composer .work-fast-more[open]>summary::before{content:'−'}
.work-fast-composer .work-fast-more-body{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 12px 12px;border-top:1px solid var(--line)}
.work-fast-composer .work-fast-more-body>.full,.work-fast-composer .work-fast-more-body>.work-external-context{grid-column:1/-1}
.work-fast-composer .work-external-context{margin:0;padding:10px;border-radius:10px;background:var(--soft)}
.work-fast-composer .work-external-context-head{margin-bottom:8px}
.work-fast-composer .work-external-context-head>div>b{font-size:10px}
.work-fast-composer .work-external-context-head>div>small{font-size:8px}
.work-fast-composer .work-external-grid{grid-template-columns:1.2fr .8fr .8fr;gap:8px}
.work-fast-composer .work-external-grid label span{font-size:8px}
.work-fast-composer .work-external-grid input{min-height:38px}
.work-fast-composer .work-composer-actions{position:sticky;bottom:0;z-index:3;margin-top:14px;padding:10px 0 0;background:linear-gradient(to bottom,transparent 0,var(--panel) 24%)}
.work-fast-composer .work-composer-actions .primary{min-width:132px}
.work-quick-assignee select{width:100%}
.work-fast-customer-hint{display:flex;align-items:center;gap:7px;margin-top:5px;color:var(--muted);font-size:8px}
.work-fast-customer-hint i{width:6px;height:6px;border-radius:50%;background:#d99a34;box-shadow:0 0 0 4px rgba(217,154,52,.12)}

/* Refined work detail drawer */
.work-drawer-panel.work-drawer-panel-v2{width:min(680px,96vw);background:var(--panel);box-shadow:-24px 0 70px rgba(20,26,38,.16)}
.work-drawer-panel-v2 .work-detail-head{padding:28px 32px 18px;border-bottom:1px solid var(--line)}
.work-drawer-panel-v2 .work-detail-kicker{font-size:9px;font-weight:760;letter-spacing:.045em;color:var(--muted);margin-bottom:6px}
.work-drawer-panel-v2 .work-detail-head h2{margin:0;color:var(--muted);font-size:13px;font-weight:700}
.work-drawer-panel-v2 .work-detail-head h3{margin:5px 0 10px;font-size:25px;line-height:1.12;letter-spacing:-.025em;color:var(--ink)}
.work-drawer-panel-v2 .work-detail-chips{gap:6px;margin-bottom:10px}
.work-drawer-panel-v2 .work-detail-meta{display:none}
.work-drawer-panel-v2 .work-identifiers{margin-top:10px}
.work-drawer-panel-v2 .work-identifiers summary{font-size:9px;color:var(--muted)}
.work-drawer-v2-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}
.work-drawer-v2-fact{display:flex;align-items:center;gap:10px;min-height:58px;padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:var(--soft)}
.work-drawer-v2-fact>i{display:grid;place-items:center;flex:0 0 28px;height:28px;border-radius:9px;background:var(--panel);border:1px solid var(--line);font-style:normal;color:#5a6ad6;font-size:12px}
.work-drawer-v2-fact>span{min-width:0}
.work-drawer-v2-fact small,.work-drawer-v2-fact b{display:block}
.work-drawer-v2-fact small{font-size:8px;color:var(--muted);margin-bottom:2px}
.work-drawer-v2-fact b{font-size:10px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.work-drawer-panel-v2 .work-request-context-card{margin:0 32px 12px;padding:11px 13px;border-radius:11px;display:grid;grid-template-columns:8px 1fr;background:var(--soft);border:1px solid var(--line)}
.work-drawer-panel-v2 .work-request-context-card span{font-size:8px}
.work-drawer-panel-v2 .work-request-context-card b{font-size:12px}
.work-drawer-panel-v2 .work-request-context-card small,.work-drawer-panel-v2 .work-request-context-card p{font-size:9px}
.work-drawer-panel-v2 .work-head-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}
.work-drawer-panel-v2 .work-head-actions button{min-height:36px;padding:0 13px;border-radius:9px}
.work-drawer-panel-v2 .work-primary-actions{display:flex;gap:7px}
.work-drawer-panel-v2 .work-drawer-tabs{position:sticky;top:0;z-index:4;display:grid;grid-template-columns:repeat(3,1fr);padding:0 24px;background:var(--panel);border-bottom:1px solid var(--line)}
.work-drawer-panel-v2 .work-drawer-tabs button{min-height:48px;font-size:10px}
.work-drawer-panel-v2 .work-tab-content{padding:18px 32px 30px}
.work-drawer-panel-v2 .compact-empty{padding:26px 12px}
.work-drawer-panel-v2 .work-composer-bottom{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--soft)}
.work-drawer-panel-v2 .work-composer-bottom textarea{min-height:92px;padding:12px;border:0;background:transparent}
.work-drawer-panel-v2 .work-composer-foot{border-top:1px solid var(--line);padding:8px 10px;background:var(--panel)}
.work-drawer-panel-v2 .work-description{margin:8px 0 0;padding:10px 12px;border-radius:9px;background:var(--soft);font-size:10px;line-height:1.55}

/* Completion -> master-data promotion */
.work-promotion-card{display:grid;gap:14px}
.work-promotion-identity{display:flex;align-items:center;gap:12px;padding:13px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
.work-promotion-identity i{width:10px;height:10px;border-radius:50%;background:#d99a34;box-shadow:0 0 0 5px rgba(217,154,52,.12)}
.work-promotion-identity span{min-width:0}
.work-promotion-identity b,.work-promotion-identity small{display:block}
.work-promotion-identity b{font-size:13px;color:var(--ink)}
.work-promotion-identity small{font-size:9px;color:var(--muted);margin-top:2px}

/* Direct date entry for historical installs/contracts. */
.refined-date-field{position:relative}
.date-direct-entry{display:flex;align-items:center;gap:5px;margin-top:5px}
.date-direct-toggle{min-height:28px;padding:0 8px;border:1px solid var(--line);border-radius:8px;background:var(--soft);color:var(--muted);font-size:8px;font-weight:760;cursor:pointer}
.date-direct-input{display:none!important;min-height:30px!important;width:128px!important;padding:5px 8px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--panel)!important;color:var(--ink)!important;font-size:9px!important}
.date-direct-entry.open .date-direct-input{display:block!important}
.date-direct-entry.open .date-direct-toggle{color:#5666cf;border-color:#8794e8;background:#f3f5ff}

html[data-theme="dark"] .work-fast-composer .work-fast-more,html[data-theme="dark"] .work-drawer-panel.work-drawer-panel-v2{background:#151e29;border-color:#2c394a}
html[data-theme="dark"] .work-fast-composer .work-context-card,html[data-theme="dark"] .work-fast-composer .work-external-context,html[data-theme="dark"] .work-drawer-v2-fact,html[data-theme="dark"] .work-drawer-panel-v2 .work-request-context-card,html[data-theme="dark"] .work-drawer-panel-v2 .work-description,html[data-theme="dark"] .work-promotion-identity{background:#111822;border-color:#2f3d4f}
html[data-theme="dark"] .work-drawer-v2-fact>i,html[data-theme="dark"] .work-drawer-panel-v2 .work-composer-foot{background:#182331;border-color:#334255}
html[data-theme="dark"] .work-drawer-panel-v2 .work-drawer-tabs{background:#151e29;border-color:#2c394a}
html[data-theme="dark"] .date-direct-entry.open .date-direct-toggle{background:#202a43;color:#aeb7ff}
html[data-theme="dark"] .date-direct-input{background:#111822!important;border-color:#334255!important;color:#eef3f8!important}

@media(max-width:1200px){
  .customer-control-v2-page .title-row{flex-wrap:wrap}
  .customer-control-v2-page .title-actions{max-width:none;width:100%;justify-content:flex-start}
  .customer-control-v2-page .customer-v2-commandbar{grid-template-columns:repeat(3,minmax(0,1fr))}
  .customer-control-v2-page .customer-v2-search{grid-column:1/-1}
}
@media(max-width:760px){
  .work-fast-composer .work-composer-context{grid-template-columns:1fr}
  .work-fast-composer .work-composer-essentials{grid-template-columns:1fr}
  .work-fast-composer .work-fast-more-body{grid-template-columns:1fr}
  .work-fast-composer .work-external-grid{grid-template-columns:1fr}
  .work-drawer-v2-facts{grid-template-columns:1fr}
  .work-drawer-panel-v2 .work-detail-head,.work-drawer-panel-v2 .work-tab-content{padding-left:20px;padding-right:20px}
  .work-drawer-panel-v2 .work-request-context-card{margin-left:20px;margin-right:20px}
  .customer-control-v2-page .customer-v2-commandbar{grid-template-columns:1fr 1fr}
  .customer-control-v2-page .customer-v2-search{grid-column:1/-1}
}
