:root{
  --font-ui:"Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --pds-color-white:#FFFFFF;
  --pds-color-bg:#F6F8FB;
  --pds-color-surface:#FFFFFF;
  --pds-color-surface-soft:#F8FAFC;
  --pds-color-border:#E5EAF1;
  --pds-color-border-strong:#D6DEE8;
  --pds-color-text:#0F1B2E;
  --pds-color-text-muted:#64748B;
  --pds-color-text-soft:#94A3B8;
  --pds-color-text-inverse:#FFFFFF;
  --pds-color-primary:#0F1B2E;
  --pds-color-primary-hover:#17243A;
  --pds-color-primary-soft:#EAF0F8;
  --pds-color-primary-border:#CBD6E4;
  --pds-color-success:#16A34A;
  --pds-color-success-bg:#EAF8EF;
  --pds-color-success-border:#BFE8CD;
  --pds-color-warning:#F59E0B;
  --pds-color-warning-bg:#FFF7E6;
  --pds-color-warning-border:#FAD58B;
  --pds-color-danger:#DC2626;
  --pds-color-danger-bg:#FEECEC;
  --pds-color-danger-border:#F8B4B4;
  --pds-color-info:#2563EB;
  --pds-color-info-bg:#EFF6FF;
  --pds-color-info-border:#BFDBFE;

  --pds-space-1:4px;
  --pds-space-2:8px;
  --pds-space-3:12px;
  --pds-space-4:16px;
  --pds-space-5:20px;
  --pds-space-6:24px;
  --pds-space-8:32px;
  --pds-space-10:40px;
  --pds-space-12:48px;

  --pds-radius-xs:6px;
  --pds-radius-sm:8px;
  --pds-radius-md:12px;
  --pds-radius-lg:16px;
  --pds-radius-xl:20px;
  --pds-radius-pill:999px;

  --pds-shadow-card:0 8px 24px rgba(15,27,46,.05);
  --pds-shadow-card-hover:0 12px 32px rgba(15,27,46,.08);
  --pds-shadow-popover:0 20px 50px rgba(15,27,46,.14);
  --pds-focus-ring:0 0 0 2px rgba(37,99,235,.18), 0 0 0 4px rgba(37,99,235,.08);

  --bg:var(--pds-color-bg);
  --bg-2:var(--pds-color-primary-soft);
  --surface:var(--pds-color-surface);
  --surface-2:var(--pds-color-surface-soft);
  --surface-3:var(--pds-color-primary-soft);
  --border:var(--pds-color-border);
  --border-strong:var(--pds-color-border-strong);
  --text:var(--pds-color-text);
  --muted:var(--pds-color-text-muted);
  --brand:var(--pds-color-primary);
  --brand-strong:var(--pds-color-primary);
  --brand-soft:var(--pds-color-primary-soft);
  --brand-2:var(--pds-color-text-muted);
  --ok:var(--pds-color-success);
  --ok-soft:var(--pds-color-success-bg);
  --warn:var(--pds-color-warning);
  --warn-soft:var(--pds-color-warning-bg);
  --danger:var(--pds-color-danger);
  --danger-soft:var(--pds-color-danger-bg);
  --info:var(--pds-color-info);
  --info-soft:var(--pds-color-info-bg);
  --shadow-sm:var(--pds-shadow-card);
  --shadow-md:var(--pds-shadow-card-hover);
  --shadow:var(--shadow-md);
  --radius-card:var(--pds-radius-xl);
  --radius-control:var(--pds-radius-md);
  --radius-modal:var(--pds-radius-xl);
  --radius-pill:var(--pds-radius-pill);
}

.pds-app-shell{container-type:inline-size}
.pds-nav-tabs{display:flex;flex-wrap:wrap}
.pds-nav-tab{border-radius:var(--pds-radius-lg)}
.pds-card{
  border:1px solid var(--pds-color-border);
  border-radius:var(--pds-radius-xl);
  background:var(--pds-color-surface);
  box-shadow:var(--pds-shadow-card);
}
.pds-badge{
  display:inline-flex;
  align-items:center;
  gap:var(--pds-space-2);
  min-height:28px;
  padding:0 var(--pds-space-3);
  border-radius:var(--pds-radius-pill);
}
.pds-input{
  min-height:46px;
  border-radius:var(--pds-radius-md);
}
.pds-status-banner{
  border-radius:var(--pds-radius-lg);
  box-shadow:var(--pds-shadow-card);
}
.header-search-shortcut{
  position:absolute;
  right:var(--pds-space-4);
  top:50%;
  transform:translateY(-50%);
  padding:0 var(--pds-space-2);
  min-height:24px;
  display:inline-flex;
  align-items:center;
  border:1px solid var(--pds-color-border);
  border-radius:var(--pds-radius-pill);
  background:var(--pds-color-surface-soft);
  color:var(--pds-color-text-muted);
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
}
.pds-button:focus-visible,
.pds-nav-tab:focus-visible,
.pds-input:focus-visible,
.pds-switch:focus-visible,
.pds-status-banner:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:none;
  box-shadow:var(--pds-focus-ring);
}

@keyframes workbenchSpotlightPulse{
  0%{box-shadow:0 0 0 0 rgba(70,92,114,.22)}
  45%{box-shadow:0 0 0 6px rgba(70,92,114,.16)}
  100%{box-shadow:0 0 0 0 rgba(70,92,114,0)}
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
html[data-pergologic-boot="product"] body{
  background:#f4f7fb;
}

html[data-pergologic-boot="product"] body .shell{
  visibility:hidden;
}

.workbench-spotlight{
  animation:workbenchSpotlightPulse 1.6s ease;
}
body{
  font-family:var(--font-ui);
  font-size:14px;
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.72), rgba(255,255,255,0) 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

.shell{
  min-height:100vh;
  display:grid;
  grid-template-rows:auto 1fr auto;
}

.app-header{
  position:relative;
  top:auto;
  z-index:10;
  background:rgba(255,255,255,.92);
  border-bottom:1px solid var(--border);
  padding:8px 14px;
  box-shadow:var(--shadow-sm);
  backdrop-filter:blur(12px);
}

.app-header-shell{
  min-width:0;
  display:grid;
  grid-template-columns:auto minmax(280px, 1fr) auto auto auto;
  gap:10px;
  align-items:center;
}

.header-brand{
  justify-self:start;
}

.topbar-menu{
  position:relative;
  justify-self:end;
}

.topbar-menu > summary{
  list-style:none;
  cursor:pointer;
}

.topbar-menu > summary::-webkit-details-marker{
  display:none;
}

.topbar-menu-trigger{
  min-height:42px;
}

.topbar-menu-burger{
  display:grid;
  gap:4px;
}

.topbar-menu-burger span{
  display:block;
  width:16px;
  height:2px;
  border-radius:999px;
  background:currentColor;
}

.topbar-menu-panel{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  width:min(360px, calc(100vw - 24px));
  padding:12px;
  border:1px solid rgba(188,201,214,.94);
  border-radius:10px;
  background:rgba(255,255,255,.98);
  box-shadow:0 18px 44px rgba(24,42,65,.14);
  display:grid;
  gap:12px;
  z-index:80;
}

.topbar-menu-brand{
  width:100%;
  justify-content:flex-start;
}

.topbar-menu .auth-topbar{
  display:grid;
  gap:10px;
}

.topbar-menu .header-toggle,
.topbar-menu .easy-mode-toggle,
.topbar-menu .header-select,
.topbar-menu .tenant-switcher,
.topbar-menu #authState,
.topbar-menu #tenantLogoSlot{
  width:100%;
}

.topbar-menu .tenant-logo-slot{
  justify-content:flex-start;
}

.content{
  padding:16px;
  display:grid;
  align-content:start;
  gap:14px;
}

.flow-login-screen{
  display:none;
}

body[data-shell-state="public"]{
  background:#dbe6f2;
}

body[data-shell-state="public"] .app-header{
  display:none !important;
}

body[data-shell-state="public"] .app-footer{
  display:none !important;
}

body[data-shell-state="public"] .content{
  min-height:100vh;
  padding:0;
  display:block;
}

body[data-shell-state="public"] .content > :not(#flowLoginScreen):not(#publicSignatureScreen):not(#globalBanner){
  display:none !important;
}

body[data-shell-state="public"] #globalBanner{
  width:min(1120px, calc(100vw - 32px));
  margin:24px auto 0;
}

body[data-shell-state="public"] .flow-login-screen{
  position:relative;
  isolation:isolate;
  min-height:100vh;
  display:grid;
  grid-template-rows:auto 1fr auto;
  align-items:center;
  justify-items:center;
  gap:28px;
  padding:72px 24px 56px;
  background:
    linear-gradient(135deg, rgba(247, 250, 255, .28), rgba(18, 43, 70, .16)),
    url("/assets/flow-login-bg.png") center center / cover no-repeat;
}

body[data-shell-state="public"] #publicSignatureScreen{
  width:min(960px, calc(100vw - 20px));
  margin:24px auto;
  display:block;
}

body[data-shell-state="public"] .feedback-fab{
  display:none !important;
}

body[data-shell-state="public"] .legal-consent-modal[open]{
  display:none !important;
}

.public-signature-layout{
  display:grid;
  gap:18px;
}

html[data-preauth-route="public-signature"] body .flow-login-screen{
  display:none !important;
}

html[data-preauth-route="public-signature"] body #publicSignatureScreen.hidden{
  display:block !important;
}

.public-signature-brandbar{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:10px;
}

.public-signature-brand-logo{
  min-width:140px;
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding:8px 12px;
  border:1px solid var(--border);
  border-radius:8px;
  background:rgba(255,255,255,.78);
}

.public-signature-brand-logo img{
  display:block;
  width:auto;
  max-width:148px;
  max-height:34px;
  object-fit:contain;
}

.public-signature-brand-logo.is-image-error{
  justify-content:center;
}

.public-signature-brand-logo:not(.has-logo){
  font-size:16px;
  font-weight:800;
  color:var(--brand-strong);
}

.public-signature-brand-copy{
  display:grid;
  gap:4px;
}

.public-signature-brand-eyebrow{
  margin:0;
}

.public-signature-brand-module{
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
}

.public-signature-card{
  border-radius:12px;
  border-color:rgba(188,201,214,.9);
  box-shadow:0 18px 40px rgba(26, 43, 58, .08);
}

.public-signature-step-intro{
  margin:0 0 16px;
  padding:18px 20px;
  border:1px solid rgba(188,201,214,.9);
  border-radius:12px;
  background:linear-gradient(180deg, rgba(248,251,255,.96), rgba(242,247,252,.96));
}

.public-signature-step-title{
  margin:0 0 6px;
  font-size:20px;
  font-weight:800;
  color:var(--brand-strong);
}

.public-signature-step-copy{
  margin:0;
  color:var(--muted);
  line-height:1.5;
}

.public-signature-legal-card{
  margin:0 0 14px;
  padding:18px 20px;
  border:1px solid rgba(51,74,96,.12);
  border-radius:12px;
  background:linear-gradient(180deg, rgba(245,248,252,.96), rgba(238,244,250,.96));
}

.public-signature-legal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.public-signature-legal-kicker{
  margin:0 0 4px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--muted);
}

.public-signature-legal-title{
  margin:0;
  font-size:18px;
  font-weight:800;
  color:var(--brand-strong);
}

.public-signature-legal-copy{
  margin:0;
  color:var(--brand-strong);
  line-height:1.5;
  font-size:14px;
}

.public-signature-legal-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.public-signature-legal-links a{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:6px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  color:var(--brand-strong);
  font-size:13px;
  font-weight:600;
  text-decoration:none;
}

.public-signature-legal-links a:hover{
  background:var(--surface-2);
}

.public-signature-consent-card{
  margin:0 0 16px;
  padding:18px 20px;
  border:1px solid rgba(206,215,226,.92);
  border-radius:12px;
  background:#fff;
  display:grid;
  gap:14px;
}

.public-signature-consent-head{
  display:grid;
  gap:4px;
}

.public-signature-consent-title{
  margin:0;
  font-size:16px;
  font-weight:800;
  color:var(--brand-strong);
}

.public-signature-consent-copy{
  margin:0;
  color:var(--muted);
  line-height:1.5;
  font-size:14px;
}

.public-signature-consent-check{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px 16px;
  border:1px solid rgba(212,218,219,.92);
  border-radius:12px;
  background:rgba(250,252,255,.94);
  line-height:1.55;
  color:var(--brand-strong);
}

.public-signature-consent-check input{
  width:18px;
  height:18px;
  margin-top:2px;
  accent-color:var(--brand);
  flex:0 0 auto;
}

.public-signature-provider-note{
  padding:12px 14px;
  border-radius:10px;
  background:rgba(234,243,251,.86);
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

.public-signature-preview{
  width:100%;
  max-width:100%;
  justify-self:center;
  padding-bottom:12px;
}

.public-signature-document-shell{
  display:grid;
  gap:0;
  border:1px solid rgba(188,201,214,.72);
  border-radius:12px;
  background:#fff;
  overflow:hidden;
}

.public-signature-document-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  background:linear-gradient(180deg, rgba(246,249,253,.96), rgba(239,245,250,.96));
  border-bottom:1px solid rgba(188,201,214,.76);
}

.public-signature-document-toolbar-bottom{
  border-bottom:none;
  border-top:1px solid rgba(188,201,214,.76);
}

.public-signature-document-actions,
.public-signature-document-zoom{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

.public-signature-document-zoom{
  justify-content:flex-end;
}

.public-signature-document-zoom [data-pdf-action="zoom-out"]{
  order:1;
}

.public-signature-document-zoom [data-pdf-action="zoom-in"]{
  order:2;
}

.public-signature-document-zoom [data-pdf-zoom-label]{
  order:3;
}

.public-signature-document-zoom [data-pdf-action="fit-width"]{
  order:4;
}

.public-signature-zoom-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:72px;
  min-height:36px;
  padding:0 12px;
  border:1px solid rgba(188,201,214,.95);
  border-radius:999px;
  background:#fff;
  color:var(--brand-strong);
  font-size:13px;
  font-weight:700;
}

.public-signature-document-toolbar [data-pdf-action="fit-width"][aria-pressed="true"]{
  background:rgba(31, 51, 67, .12);
  border-color:rgba(51,74,96,.28);
}

.public-signature-document-viewport{
  position:relative;
  overflow:auto;
  background:linear-gradient(180deg, rgba(234,240,247,.96), rgba(226,234,243,.96));
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  touch-action:pan-x pan-y;
  padding:6px;
}

.public-signature-document-viewport::before,
.public-signature-document-viewport::after{
  content:"";
  position:absolute;
  inset:auto;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}

.public-signature-document-viewport.is-loading::before{
  inset:6px;
  border-radius:10px;
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(1px);
  opacity:1;
  z-index:2;
}

.public-signature-document-viewport.is-loading::after{
  top:24px;
  left:50%;
  width:24px;
  height:24px;
  margin-left:-12px;
  border-radius:999px;
  border:2px solid rgba(51,74,96,.16);
  border-top-color:var(--brand-strong);
  animation:publicSignatureSpinner .75s linear infinite;
  opacity:1;
  z-index:3;
}

.public-signature-pdf-stage{
  width:100%;
  min-width:100%;
  margin:0 auto;
  max-width:none;
  transition:width .18s ease, min-width .18s ease;
}

.public-signature-pdf-frame{
  display:block;
  width:100%;
  min-height:clamp(700px, 82vh, 1400px);
  border:none;
  border-radius:0;
  background:#fff;
}

@keyframes publicSignatureSpinner{
  to{
    transform:rotate(360deg);
  }
}

.public-signature-preview-note{
  padding:12px 4px 0;
}

.public-signature-technical-hash{
  padding:10px 4px 0;
  font-size:11px;
  line-height:1.45;
  color:var(--muted);
  word-break:break-all;
}

.public-signature-signbox{
  max-width:720px;
}

.public-signature-step-flow{
  display:grid;
  gap:16px;
}

.public-signature-step-card{
  border:1px solid rgba(188,201,214,.95);
  border-radius:12px;
  background:#fff;
  padding:18px 20px;
}

.public-signature-step-card-primary{
  background:linear-gradient(180deg, rgba(241,246,251,.96), rgba(234,242,249,.96));
}

.public-signature-step-card.is-disabled{
  background:var(--surface-2);
  border-style:dashed;
}

.public-signature-step-kicker{
  margin:0 0 6px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
}

.public-signature-step-heading{
  margin:0 0 6px;
  font-size:22px;
  font-weight:800;
  color:var(--brand-strong);
}

.public-signature-step-note{
  margin:0 0 14px;
  color:var(--muted);
  line-height:1.5;
}

.public-signature-step-hint{
  margin-top:4px;
}

.tenant-signature-modal-body{
  width:min(1120px, calc(100vw - 48px));
}

.tenant-signature-layout{
  padding-top:4px;
}

@media (max-width: 900px){
  body[data-shell-state="public"] #publicSignatureScreen{
    width:min(100vw, 760px);
    margin:4px auto 16px;
    padding:0;
    border:none;
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }

  .public-signature-layout{
    gap:12px;
  }

  .public-signature-layout > .public-signature-preview{
    order:-1;
  }

  .public-signature-card{
    border-radius:16px;
    box-shadow:0 10px 28px rgba(26, 43, 58, .06);
  }

  .public-signature-preview.public-signature-card{
    padding:0;
    border:none;
    background:transparent;
    box-shadow:none;
  }

  .public-signature-document-toolbar{
    padding:8px 10px;
  }

  .public-signature-document-toolbar,
  .public-signature-document-actions,
  .public-signature-document-zoom{
    align-items:stretch;
  }

  .public-signature-document-toolbar{
    flex-direction:column;
  }

  .public-signature-document-actions,
  .public-signature-document-zoom{
    width:100%;
    justify-content:flex-start;
  }

  .public-signature-document-zoom{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px;
  }

  .public-signature-document-actions > button,
  .public-signature-document-zoom > button{
    min-height:40px;
  }

  .public-signature-document-zoom > .public-signature-zoom-pill{
    min-width:0;
  }

  .public-signature-document-shell{
    border-radius:10px;
    border-left:none;
    border-right:none;
  }

  .public-signature-document-viewport{
    margin:0;
    background:#eef3f8;
    padding:4px;
  }

  .public-signature-pdf-frame{
    min-height:76vh;
  }

  .public-signature-preview-note{
    padding:10px 2px 0;
  }

  .public-signature-technical-hash{
    padding:8px 2px 0;
  }

  .public-signature-provider-note,
  .public-signature-step-intro,
  .public-signature-legal-card,
  .public-signature-consent-card,
  .public-signature-consent-check,
  .public-signature-step-card{
    border-radius:10px;
  }
}

.public-signature-status-panel{
  padding:18px 20px;
  border:1px solid rgba(188,201,214,.92);
  border-radius:12px;
  background:#fff;
}

.public-signature-status-panel-success{
  border-color:rgba(31, 122, 84, .18);
  background:var(--success-bg);
}

.public-signature-status-line{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}

.public-signature-status-label{
  font-size:13px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
}

.public-signature-status-text{
  font-weight:700;
  color:var(--brand-strong);
}

.public-signature-status-note{
  color:var(--muted);
  line-height:1.5;
}

.public-signature-success-card{
  padding:18px 20px;
  border:1px solid rgba(31, 122, 84, .18);
  border-radius:12px;
  background:linear-gradient(180deg, rgba(244, 251, 247, 1), rgba(236, 248, 242, 1));
}

.public-signature-success-kicker{
  margin:0 0 8px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--success);
}

.public-signature-success-title{
  margin:0 0 8px;
  font-size:24px;
  font-weight:800;
  color:var(--brand-strong);
}

.public-signature-success-copy{
  margin:0;
  color:var(--brand-strong);
  line-height:1.6;
}

.public-signature-success-meta{
  display:grid;
  gap:8px;
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid rgba(31, 122, 84, .14);
  color:var(--muted);
}

.public-signature-otp-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.public-signature-otp-pill{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:6px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--surface-2);
  color:var(--brand-strong);
  font-size:13px;
  font-weight:600;
}

.public-signature-scroll-gate{
  margin:0 0 12px;
}

.public-signature-sign-actions{
  display:flex;
  justify-content:flex-start;
  margin:0;
}

.public-signature-request-btn{
  min-width:220px;
  min-height:48px;
  padding:12px 18px;
  box-shadow:0 12px 24px rgba(49,69,87,.18);
}

.public-signature-request-btn:disabled{
  box-shadow:none;
}

.public-signature-signbox .grid,
.public-signature-signbox .actions{
  margin-top:0;
}

.public-signature-overview{
  display:grid;
  gap:18px;
}

.public-signature-overview-copy{
  display:grid;
  gap:8px;
}

.public-signature-overview-kicker{
  margin:0;
  font-size:12px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--muted);
}

.public-signature-overview-title{
  margin:0;
  font-size:24px;
  font-weight:800;
  color:var(--brand-strong);
}

.public-signature-overview-copy p{
  margin:0;
  color:var(--muted);
  line-height:1.6;
}

.public-signature-meta-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:10px;
}

.public-signature-meta-item{
  display:grid;
  gap:4px;
  padding:10px 12px;
  border:1px solid rgba(212,218,219,.92);
  border-radius:10px;
  background:rgba(255,255,255,.94);
}

.public-signature-meta-label{
  font-size:11px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--muted);
}

.public-signature-meta-value{
  color:var(--brand-strong);
  font-size:14px;
  font-weight:700;
  line-height:1.45;
  word-break:break-word;
}

body[data-shell-state="public"] .flow-login-screen::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 24% 20%, rgba(255,255,255,.58), rgba(255,255,255,0) 44%),
    linear-gradient(180deg, rgba(10, 26, 43, .02), rgba(10, 26, 43, .14));
  z-index:0;
}

body[data-login-mode="flow"]{
  background:#dbe6f2;
}

body[data-login-mode="flow"] .app-header,
body[data-login-mode="flow"] .view-switcher,
body[data-login-mode="flow"] .card,
body[data-login-mode="flow"] .feedback-fab,
body[data-login-mode="flow"] .app-footer,
body[data-login-mode="flow"] #globalBanner,
body[data-login-mode="flow"] .sr-only{
  display:none !important;
}

body[data-login-mode="flow"] .content{
  min-height:100vh;
  padding:0;
  display:block;
}

body[data-login-mode="flow"] .flow-login-screen{
  position:relative;
  isolation:isolate;
  min-height:100vh;
  display:grid;
  grid-template-rows:auto 1fr auto;
  align-items:center;
  justify-items:center;
  gap:28px;
  padding:72px 24px 56px;
  background:
    linear-gradient(135deg, rgba(247, 250, 255, .28), rgba(18, 43, 70, .16)),
    url("/assets/flow-login-bg.png") center center / cover no-repeat;
}

body[data-login-mode="flow"] .flow-login-screen::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 24% 20%, rgba(255,255,255,.58), rgba(255,255,255,0) 44%),
    linear-gradient(180deg, rgba(10, 26, 43, .02), rgba(10, 26, 43, .14));
  z-index:0;
}

.flow-login-screen__panel{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width:min(580px, calc(100vw - 48px));
  min-height:360px;
  padding:46px 48px 38px;
  border:1px solid rgba(255,255,255,.62);
  border-radius:8px;
  color:var(--brand-strong);
  text-align:center;
  background:rgba(255,255,255,.82);
  box-shadow:0 22px 54px rgba(24,43,61,.12);
  backdrop-filter:blur(14px);
}

.flow-login-screen__logo{
  width:min(188px, 62%);
  height:auto;
  margin:0 0 20px;
  display:block;
}

.flow-login-screen__title{
  max-width:480px;
  margin:0 0 14px;
  font-size:34px;
  line-height:1.12;
  font-weight:700;
  color:#223447;
}

.flow-login-screen__lead{
  max-width:430px;
  margin:0 0 30px;
  font-size:18px;
  line-height:1.48;
  font-weight:500;
  color:#50667a;
}

.flow-login-screen__hint{
  max-width:430px;
  margin:0 0 10px;
  font-size:14px;
  line-height:1.5;
  color:#5d7184;
}

.flow-login-screen__button{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  width:min(470px, 100%);
  min-height:72px;
  padding:16px 24px;
  border-radius:6px;
  border:1px solid rgba(61,84,104,.3);
  color:#fff;
  background:linear-gradient(180deg, #486076 0%, #35506a 100%);
  box-shadow:0 10px 24px rgba(24,43,61,.16);
  font-size:19px;
  font-weight:700;
}

.flow-login-screen__button:hover{
  border-color:rgba(53,95,111,.52);
  background:linear-gradient(180deg, #4d667d 0%, #39556f 100%);
  transform:translateY(-1px);
}

.flow-login-screen__button:focus-visible{
  outline:3px solid rgba(255,255,255,.78);
  outline-offset:4px;
}

.flow-login-screen__button--secondary{
  min-height:58px;
  margin-top:12px;
  color:#35546d;
  background:rgba(245,249,253,.86);
  box-shadow:none;
  font-size:16px;
}

.flow-login-screen__button--secondary:hover{
  background:#f8fbfe;
}

.flow-login-screen__google{
  width:28px;
  height:28px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-size:26px;
  line-height:1;
  font-weight:800;
  color:#4285f4;
  background-color:#fff;
  background:conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
}

.flow-login-screen__footer{
  position:relative;
  z-index:1;
  width:min(100%, 720px);
  padding:20px 28px;
  color:#36516a;
  font-size:14px;
  line-height:1.6;
  text-align:center;
  border:1px solid rgba(255,255,255,.42);
  border-radius:8px;
  background:rgba(248, 252, 255, .48);
  box-shadow:0 14px 34px rgba(17,33,49,.09);
  backdrop-filter:blur(14px);
}

.flow-login-screen__version{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(54,81,106,.14);
  font-size:12px;
  font-weight:700;
  letter-spacing:.03em;
  color:#5b7084;
}

.flow-login-screen__diagnostics{
  width:min(470px, 100%);
  margin-top:16px;
  padding:14px 16px;
  border:1px solid rgba(61,84,104,.16);
  border-radius:8px;
  text-align:left;
  background:rgba(246,250,253,.9);
}

.flow-login-screen__diagnostics summary{
  cursor:pointer;
  font-size:14px;
  font-weight:700;
  color:#314557;
}

.flow-login-screen__diagnostics-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:12px 0 10px;
}

.flow-login-screen__diag-btn{
  min-height:36px;
}

.flow-login-screen__diagnostics-log{
  margin:0;
  max-height:220px;
  overflow:auto;
  padding:12px;
  border-radius:8px;
  border:1px solid rgba(61,84,104,.12);
  background:#f7fafd;
  color:#223447;
  font-size:12px;
  line-height:1.45;
  white-space:pre-wrap;
  word-break:break-word;
}

.feedback-fab{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:120;
  border:1px solid #b98a00;
  border-radius:999px;
  padding:10px 14px;
  min-height:40px;
  background:#f4c300;
  color:#2d2200;
  font-size:14px;
  font-weight:800;
  box-shadow:0 10px 24px rgba(45,34,0,.18);
}

.feedback-fab[data-feedback-badge]::after{
  content:attr(data-feedback-badge);
  position:absolute;
  top:-8px;
  right:-6px;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#9f3131;
  color:#fff;
  font-size:11px;
  font-weight:800;
  box-shadow:0 6px 14px rgba(159,49,49,.28);
}

.feedback-fab.hidden{
  display:none;
}

.feedback-fab.feedback-fab-suspended{
  display:none !important;
}

.feedback-fab.feedback-fab-in-dialog{
  position:static;
  right:auto;
  bottom:auto;
  z-index:auto;
  flex:0 0 auto;
  align-self:center;
  margin:0;
  box-shadow:none;
}

.onboarding-overlay{
  position:fixed;
  inset:0;
  z-index:2147483600;
  pointer-events:auto;
  isolation:isolate;
  overflow:visible;
}

.onboarding-overlay.hidden{
  display:none;
}

.onboarding-backdrop{
  position:absolute;
  inset:0;
  z-index:2147483601;
  background:rgba(17,29,40,.48);
}

.onboarding-card{
  position:fixed;
  top:96px;
  left:16px;
  width:min(380px, calc(100vw - 32px));
  max-height:calc(100vh - 32px);
  overflow:auto;
  overscroll-behavior:contain;
  padding:18px;
  border-radius:14px;
  border:1px solid rgba(215,225,235,.9);
  background:#fff;
  box-shadow:0 24px 64px rgba(16,27,37,.24);
  z-index:2147483603;
  pointer-events:auto;
}

.onboarding-spotlight{
  position:fixed;
  z-index:2147483602;
  pointer-events:none;
  border:2px solid rgba(255,255,255,.96);
  border-radius:var(--radius-card);
  box-shadow:
    0 0 0 4px rgba(35,79,109,.42),
    0 20px 54px rgba(17,29,40,.26);
  background:rgba(255,255,255,.04);
  transition:top .12s ease, left .12s ease, width .12s ease, height .12s ease;
}

.onboarding-spotlight.hidden{
  display:none;
}

.onboarding-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}

.onboarding-close{
  min-width:40px;
  min-height:40px;
  padding:0;
  display:grid;
  place-items:center;
  border-radius:12px;
  font-size:22px;
  line-height:1;
}

.onboarding-card h3{
  margin:0 0 8px;
  font-size:28px;
  line-height:1.1;
}

.onboarding-card p{
  margin:0;
}

.onboarding-card .eyebrow{
  margin-bottom:10px;
}

.onboarding-card .muted{
  margin-top:10px;
}

.demo-autoplay-overlay{
  position:fixed;
  inset:0;
  z-index:250;
}

.demo-autoplay-overlay.hidden{
  display:none;
}

.demo-autoplay-card{
  width:min(420px, calc(100vw - 32px));
}

.demo-autoplay-progress-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-size:13px;
  font-weight:700;
  color:#5f7284;
}

.demo-autoplay-progress-track{
  margin-top:8px;
  width:100%;
  height:8px;
  border-radius:999px;
  background:rgba(214,223,232,.9);
  overflow:hidden;
}

.demo-autoplay-progress-fill{
  display:block;
  width:8%;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg, var(--brand) 0%, #5f8eb2 100%);
  transition:width .28s ease;
}

.demo-autoplay-actions{
  margin-top:18px;
  display:flex;
  align-items:center;
  gap:10px;
  justify-content:flex-end;
}

.onboarding-actions{
  margin-top:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.onboarding-actions-main{
  display:flex;
  gap:8px;
}

.onboarding-target-active{
  position:relative;
  z-index:auto !important;
  border-radius:var(--radius-card);
  box-shadow:none;
  scroll-margin-top:120px;
}

.crm-inline-notice{
  width:100%;
  margin:0 0 10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(233,184,123,.42);
  background:rgba(254,244,228,.92);
  color:#865527;
  font-size:13px;
  line-height:1.5;
}

.onboarding-target-active.field,
.onboarding-target-active.compact-field{
  background:rgba(255,255,255,.98);
}

.view-switcher{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

#moduleOnboardingBtn{
  margin-left:auto;
}

.header-search{
  min-width:0;
  display:grid;
  gap:6px;
  align-items:center;
}

.header-search-input{
  width:100%;
  min-width:0;
  min-height:42px;
  padding:10px 16px;
  border:1px solid var(--border);
  border-radius:var(--radius-control);
  background:var(--surface);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95);
  font-size:15px;
  transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.header-search-input::placeholder{
  color:#8b9aa8;
  font-weight:600;
  font-style:normal;
}

.header-search-input:hover{
  border-color:var(--border-strong);
  box-shadow:0 8px 18px rgba(18, 33, 47, .06);
}

.header-search-input:focus,
.header-search-input:focus-visible{
  outline:none;
  border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(35,79,109,.12);
}

.header-search-input.is-filtering{
  border-color:rgba(35,79,109,.42);
  background:#f7fbff;
  box-shadow:0 0 0 3px rgba(35,79,109,.08);
}

.header-search-status{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:28px;
  padding:6px 10px;
  border:1px solid rgba(35,79,109,.12);
  border-radius:var(--radius-control);
  background:#eef5fb;
  color:var(--brand-strong);
  font-size:12px;
  font-weight:700;
}

.header-search-status .ghost{
  min-height:28px;
  padding:4px 10px;
  font-size:12px;
}

.auth-topbar{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:flex-end;
  min-width:0;
  width:100%;
  max-width:none;
  justify-self:end;
  flex-wrap:nowrap;
}

.header-toggle,
.easy-mode-toggle{
  white-space:nowrap;
  min-height:42px;
  padding:10px 12px;
  border-radius:var(--radius-control);
  border:1px solid var(--border);
  background:var(--surface-2);
  color:var(--brand-strong);
  font-size:14px;
  font-weight:700;
  box-shadow:none;
  transition:border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.header-toggle.is-active,
.easy-mode-toggle.is-active{
  background:var(--brand);
  border-color:var(--brand);
  color:#fff;
}

.tenant-switcher{
  flex:0 0 112px;
  min-width:112px;
}

.tenant-switcher-label{
  display:block;
  margin-bottom:6px;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.header-select{
  min-width:112px;
  min-height:42px;
  padding:10px 12px;
  border-radius:var(--radius-control);
  border:1px solid var(--border);
  background:var(--surface);
  font-size:15px;
  font-weight:700;
}

.compact-field{
  min-width:0;
}

.compact-field span{
  font-size:11px;
  line-height:1;
}

.filters-bar{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
  margin-bottom:18px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(247,250,252,.98) 100%);
  box-shadow:var(--shadow-sm);
}

.brand{
  display:flex;
  gap:16px;
  align-items:center;
}

.brand-button{
  width:auto;
  max-width:210px;
  min-width:0;
  padding:0;
  background:transparent;
  border:0;
  border-radius:var(--radius-control);
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  align-items:center;
  justify-content:flex-start;
  column-gap:12px;
  justify-self:start;
  overflow:hidden;
}

.brand-button:hover{
  transform:none;
  opacity:.92;
}

.brand-mark{
  width:184px;
  min-width:140px;
  max-width:184px;
  height:28px;
  padding:0;
  border-radius:0;
  background:transparent;
  border:0;
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:flex-start;
  font-weight:800;
  letter-spacing:0;
  overflow:hidden;
  flex:0 0 auto;
}

.brand-mark.has-logo{
  width:184px;
  min-width:140px;
  max-width:184px;
  height:28px;
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  overflow:hidden;
}

.brand-mark img{
  width:auto;
  max-width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  display:block;
}

.brand-copy{
  display:none;
  gap:1px;
  min-width:0;
  align-content:center;
}

.brand h1{
  margin:0;
  font-size:17px;
  line-height:1.05;
  letter-spacing:.01em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.brand p{
  display:none;
}

.tenant-logo-slot{
  flex:0 0 auto;
  min-width:0;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 18px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius-control);
  box-shadow:var(--shadow-sm);
  color:var(--text);
  font-size:18px;
  line-height:1;
  font-weight:800;
  letter-spacing:.01em;
  white-space:nowrap;
}

.tenant-logo-slot.hidden{
  display:none;
}

.tenant-logo-slot img{
  display:block;
  width:auto;
  max-width:144px;
  max-height:28px;
  object-fit:contain;
  object-position:center;
}

.tenant-logo-slot:not(.has-logo){
  font-size:18px;
}

.header-user-slot{
  min-width:42px;
  min-height:42px;
  display:grid;
  place-items:center;
}

.header-user-slot.hidden{
  display:none;
}

.header-user-slot .auth-avatar{
  width:40px;
  height:40px;
}

.version-badge{
  display:inline-flex;
  align-items:center;
  padding:5px 9px;
  border-radius:var(--radius-pill);
  background:var(--surface-3);
  border:1px solid var(--border);
  color:var(--brand);
  font-size:10px;
  font-weight:800;
  letter-spacing:.04em;
  white-space:nowrap;
}

.version-badge-button{
  cursor:pointer;
  transition:border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.version-badge-button:hover{
  border-color:var(--border-strong);
  background:var(--surface-2);
  color:var(--brand-strong);
  transform:translateY(-1px);
}

.version-badge-button:focus-visible{
  outline:2px solid rgba(70,92,114,.28);
  outline-offset:2px;
}

.app-footer{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:10px 18px 16px;
}

.footer-version{
  background:rgba(238,243,247,.88);
  color:var(--muted);
  border-color:var(--border);
}

.version-history-list{
  margin-top:12px;
}

.version-history-entry{
  padding:14px 16px;
  border:1px solid rgba(188,201,214,.62);
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(245,248,251,.96) 100%);
  box-shadow:var(--shadow-sm);
}

.version-history-entry.is-current{
  border-color:rgba(70,92,114,.38);
  box-shadow:0 14px 30px rgba(18,33,47,.08);
}

.version-history-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.version-history-title{
  display:grid;
  gap:4px;
}

.version-history-title strong{
  font-size:15px;
}

.version-history-meta{
  font-size:12px;
  color:var(--muted);
}

.version-history-entry ul{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:6px;
  color:var(--text);
}

.version-history-entry li::marker{
  color:var(--brand-2);
}

.legal-modal{
  width:min(1040px,calc(100vw - 32px));
}

.legal-modal-body{
  padding-bottom:24px;
}

.legal-document{
  display:grid;
  gap:14px;
  color:var(--text);
  line-height:1.58;
}

.legal-document section,
.legal-consent-summary{
  padding:14px 16px;
  border:1px solid rgba(188,201,214,.62);
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(246,249,252,.96) 100%);
  box-shadow:var(--shadow-sm);
}

.legal-document h4{
  margin:0 0 8px;
  font-size:15px;
  line-height:1.3;
  color:var(--brand-strong);
}

.legal-document p,
.legal-consent-summary p{
  margin:0 0 10px;
}

.legal-document p:last-child,
.legal-consent-summary p:last-child{
  margin-bottom:0;
}

.legal-document ul,
.legal-consent-summary ul{
  margin:0;
  padding-left:20px;
  display:grid;
  gap:6px;
}

.legal-consent-modal::backdrop{
  background:rgba(10,22,34,.52);
  backdrop-filter:blur(2px);
}

.legal-consent-check{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:12px;
  align-items:start;
  margin-top:14px;
  padding:14px 16px;
  border:1px solid rgba(70,92,114,.25);
  border-radius:var(--radius-card);
  background:var(--brand-soft);
  color:var(--brand-strong);
  font-weight:700;
  line-height:1.45;
}

.legal-consent-check input{
  width:18px;
  height:18px;
  margin-top:2px;
}

.danger-action{
  color:var(--danger);
  border-color:rgba(143,90,106,.32);
  background:var(--danger-soft);
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0, 0, 0, 0);
  white-space:nowrap;
  border:0;
}

.auth-compact{
  display:flex;
  align-items:center;
  gap:8px;
  background:transparent;
  border:0;
  border-radius:0;
  padding:0;
  box-shadow:none;
  min-width:0;
  flex:0 1 auto;
  max-width:100%;
}

.icon-button{
  width:40px;
  height:40px;
  padding:0;
  display:grid;
  place-items:center;
  border-radius:var(--radius-control);
  font-size:16px;
  border:1px solid var(--border);
  background:var(--surface);
  color:var(--brand-strong);
  box-shadow:none;
}

.auth-compact-copy{
  display:grid;
  gap:2px;
  min-width:0;
}

.auth-compact-name{
  font-weight:800;
  font-size:14px;
  line-height:1.1;
}

.auth-compact-meta{
  color:var(--muted);
  font-size:11px;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.app-header .primary,
.app-header .ghost{
  min-height:42px;
  padding:10px 14px;
  border-radius:var(--radius-control);
}

.app-header #authState .primary,
.app-header #authState .ghost{
  min-height:38px;
  padding:9px 12px;
}

.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow);
  padding:14px;
}

.order-focus-card{
  border-color:rgba(70,92,114,.22);
  background:linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(249,252,254,.98) 100%);
  box-shadow:0 16px 34px rgba(49,69,87,.09);
}

.order-details-card{
  padding-bottom:10px;
}

.order-focus-card > .section-head,
.client-details-card > .section-head{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:16px;
  align-items:start;
  margin-bottom:14px;
  padding-bottom:12px;
  border-bottom:1px solid rgba(188,201,214,.66);
}

.order-focus-card > .section-head > div:first-child,
.client-details-card > .section-head > div:first-child{
  min-width:0;
}

.order-focus-card > .section-head > .actions,
.client-details-card > .section-head > .actions{
  justify-content:flex-end;
  align-content:start;
}

.order-side-grid > .card,
.client-context-grid > .card,
.dispatch-day-layout > .card,
.admin-card{
  background:linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(248,251,253,.98) 100%);
}

.admin-strategy-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:16px;
  align-items:center;
  padding:14px 16px;
  border:1px solid rgba(188,201,214,.62);
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(242,247,252,.96) 100%);
}

.admin-strategy-card strong{
  display:block;
  margin-bottom:6px;
  font-size:16px;
}

.admin-strategy-card .muted{
  margin:0;
}

.admin-strategy-label{
  display:inline-block;
  margin-bottom:8px;
  color:var(--brand-2);
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.admin-map-launcher{
  gap:var(--pds-space-6);
}

.admin-map-launcher-head{
  align-items:flex-start;
}

.admin-map-launcher-note{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 var(--pds-space-3);
  border:1px solid var(--pds-color-border);
  border-radius:var(--pds-radius-pill);
  background:var(--pds-color-surface-soft);
  color:var(--pds-color-text-muted);
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
}

.admin-map-launcher-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:var(--pds-space-4);
}

.admin-map-tile{
  display:grid;
  gap:var(--pds-space-5);
  min-height:220px;
  padding:var(--pds-space-5);
  border:1px solid var(--pds-color-border);
  border-radius:var(--pds-radius-xl);
  background:var(--pds-color-surface);
  box-shadow:var(--pds-shadow-card);
}

.admin-map-tile h4{
  margin:0 0 var(--pds-space-2);
  font-size:20px;
  line-height:1.2;
  color:var(--pds-color-text);
}

.admin-map-tile .muted{
  margin:0;
  font-size:14px;
  line-height:1.5;
}

.admin-map-tile-topline{
  display:flex;
  flex-wrap:wrap;
  gap:var(--pds-space-2);
  align-items:center;
  margin-bottom:var(--pds-space-4);
}

.admin-map-badge{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 var(--pds-space-3);
  border-radius:var(--pds-radius-pill);
  font-size:12px;
  font-weight:800;
  letter-spacing:.02em;
}

.admin-map-badge--neutral{
  background:var(--pds-color-surface-soft);
  color:var(--pds-color-text-muted);
  border:1px solid var(--pds-color-border);
}

.admin-map-badge--info{
  background:var(--pds-color-info-bg);
  color:var(--pds-color-info);
  border:1px solid var(--pds-color-info-border);
}

.admin-map-tile-meta{
  color:var(--pds-color-text-soft);
  font-size:12px;
  font-weight:700;
  letter-spacing:.02em;
  text-transform:uppercase;
}

.admin-map-tile-actions{
  margin-top:auto;
  display:flex;
  justify-content:flex-start;
}

.admin-map-tile-actions > button{
  min-width:220px;
}

.order-details-card .grid.two{
  gap:12px;
}

.order-details-card .field span{
  font-size:12px;
}

.client-details-card .grid.two{
  gap:12px;
}

.tri-panel-shell{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  align-items:start;
}

.tri-panel-column{
  display:grid;
  gap:14px;
  align-items:start;
  min-width:0;
}

.tri-panel-card{
  min-height:100%;
  min-width:0;
}

.client-triptych-shell{
  align-items:start;
}

.client-triptych-shell,
.client-triptych-shell .orders-table,
.client-triptych-shell .badge-row,
#clientProductsList,
#clientOrdersList,
#clientTasksList,
#clientIncidentsList,
#clientProtocolsList{
  min-width:0;
}

.client-triptych-shell .order-list-row{
  grid-template-columns:minmax(0, 1fr);
  align-items:start;
}

.client-triptych-shell .order-list-row > *{
  min-width:0;
}

.client-triptych-shell .order-list-row strong,
.client-triptych-shell .order-list-row .muted,
.client-triptych-shell .status-pill,
.client-triptych-shell .badge{
  overflow-wrap:anywhere;
}

.client-triptych-shell .order-list-status{
  justify-self:start;
}

@media (max-width: 1440px){
  .client-triptych-shell{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .client-triptych-shell > .tri-panel-column:last-child{
    grid-column:1 / -1;
  }
}

.clients-kanban-board{
  grid-auto-columns:minmax(220px, 1fr);
  align-items:start;
}

.clients-kanban-board .kanban-column{
  width:auto;
  min-width:0;
}

.client-kanban-card{
  display:grid;
  gap:10px;
}

.client-kanban-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.client-kanban-card__meta{
  display:grid;
  gap:4px;
  color:var(--muted);
  font-size:13px;
}

.client-kanban-card__badges{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}

.client-kanban-card__note{
  padding:10px 12px;
  border:1px solid rgba(188,201,214,.68);
  border-radius:var(--radius-control);
  background:var(--surface-2);
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.clients-list{
  display:grid;
  gap:8px;
}

.client-list-row{
  grid-template-columns:minmax(150px, 190px) minmax(180px, 1.1fr) minmax(170px, 1fr) minmax(190px, 1.2fr) auto auto minmax(180px, .9fr);
  align-items:center;
}

.client-list-row__status{
  justify-self:start;
}

.client-list-row__badges{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
}

.client-list-row__summary{
  line-height:1.35;
}

.supplier-list-row{
  grid-template-columns:minmax(180px, 220px) minmax(160px, .9fr) minmax(180px, 1fr) minmax(150px, .9fr) auto auto minmax(180px, .9fr);
  align-items:center;
}

.supplier-detail-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:10px;
}

.supplier-detail-metrics{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:10px;
}

.supplier-detail-list{
  display:grid;
  gap:8px;
}

.order-focus-card .summary-row,
.client-details-card .summary-row{
  gap:8px;
  margin-top:10px;
  padding:10px 12px;
  border:1px solid rgba(188,201,214,.58);
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, rgba(255,255,255,.96) 0%, rgba(243,247,251,.96) 100%);
}

.client-details-card input:disabled,
.client-details-card textarea:disabled,
.client-details-card select:disabled{
  background:linear-gradient(180deg, var(--surface) 0%, #fbfdff 100%);
  color:var(--text);
  opacity:1;
  cursor:default;
  border-color:var(--border);
}

.client-details-card textarea:disabled{
  resize:none;
}

.order-details-card textarea{
  min-height:96px;
}

.order-focus-card.is-readonly{
  background:linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.order-focus-card.is-readonly input:disabled,
.order-focus-card.is-readonly select:disabled,
.order-focus-card.is-readonly textarea:disabled{
  background:#f7fafd;
  color:var(--text);
  opacity:1;
  cursor:default;
  border-color:#dce6ef;
}

.order-focus-card.is-readonly textarea:disabled{
  resize:none;
}

.order-focus-card.is-readonly .field-helper,
.order-focus-card.is-readonly #orderClientLookupInput,
.order-focus-card.is-readonly #orderClientLookupResults,
.order-focus-card.is-readonly .twin-action-row,
.order-focus-card.is-readonly #importHubspotBtn{
  display:none;
}

.order-focus-card.is-readonly .field-action-row{
  grid-template-columns:minmax(0,1fr);
}

.order-field-hidden{
  display:none !important;
}

.order-section-hidden{
  display:none !important;
}

.order-readonly-toggle{
  min-width:164px;
}

.hero{
  min-height:150px;
  display:grid;
  align-content:center;
  gap:10px;
}

.hero h2{
  margin:0;
  font-size:30px;
}

.muted{
  color:var(--muted);
}

.audit-trail{
  margin-top:10px;
  font-size:12px;
  color:var(--muted);
}

.audit-trail strong{
  color:var(--text);
}

.hidden{display:none !important}
.stack{display:grid}
.gap-sm{gap:10px}
.gap-md{gap:12px}
.gap-lg{gap:14px}

.banner{
  padding:12px 16px;
  border-radius:10px;
  font-weight:700;
  background:var(--ok-soft);
  color:var(--ok);
  border:1px solid rgba(69,109,92,.18);
}

.modal-banner{
  margin-bottom:14px;
  position:sticky;
  top:0;
  z-index:8;
  box-shadow:0 10px 24px rgba(16,30,43,.08);
}

.modal input:disabled,
.modal select:disabled,
.modal textarea:disabled{
  background:#f1f5f9;
  color:#8a98a8;
  border-color:#d7e0e8;
  cursor:not-allowed;
  opacity:1;
}

.schedule-mode-toggle{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}

.admin-inline-picker{
  max-height:260px;
}

.dispatch-block-items-manager{
  display:grid;
  gap:10px;
}

.dispatch-block-map-host{
  display:grid;
  gap:10px;
}

.dispatch-block-item-card{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  align-items:start;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface-2);
}

.dispatch-block-item-copy{
  min-width:0;
  display:grid;
  gap:4px;
}
.dispatch-route-summary{
  display:grid;
  gap:2px;
  margin-top:4px;
  font-size:11px;
  color:#5f7388;
}
.dispatch-route-overflow{
  color:#b2640a;
  font-weight:700;
}

.dispatch-block-item-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
}

.dispatch-block-item-move-select{
  min-width:170px;
}

.inline-editor-row{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  align-items:end;
}

.dispatch-block-notes-log{
  display:grid;
  gap:8px;
  margin-top:10px;
}

.dispatch-block-note-entry{
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fbfdff;
  font-size:12px;
  line-height:1.45;
}

.banner.error{
  background:#f8e9e9;
  color:var(--danger);
  border-color:#e5c0c0;
}
.banner.warn{
  background:#fff4e7;
  color:var(--warn);
  border-color:#efcfaa;
}

.panel-head,.section-head{
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:10px;
}

.workbench-head{
  align-items:center;
  gap:16px;
}

.workbench-head--actions-only{
  justify-content:flex-end;
}

.workbench-head > div:first-child{
  min-width:0;
}

.section-head h2,.section-head h3,.panel-head h2{
  margin:0;
}

.eyebrow{
  margin:0 0 6px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
}

.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.label-action-btn{
  min-height:34px;
  padding:7px 12px;
  border-radius:12px;
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
}

.head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.view-toggle-group{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  padding:4px;
  border:1px solid var(--border);
  border-radius:var(--radius-control);
  background:var(--surface-3);
}

.view-toggle-group .primary,
.view-toggle-group .ghost{
  min-height:36px;
  padding:8px 12px;
  border-radius:calc(var(--radius-control) - 2px);
}

.summary-row{
  margin-top:6px;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.document-feed-links{
  display:grid;
  gap:10px;
  margin-top:6px;
}

.document-feed-links-main,
.document-feed-links-secondary{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.document-feed-links-secondary{
  justify-content:flex-start;
}

.document-feed-links a,
.document-feed-links button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:10px 14px;
  border-radius:var(--radius-control);
  border:1px solid transparent;
  font:inherit;
  font-size:13px;
  font-weight:700;
  line-height:1.1;
  text-decoration:none;
  white-space:nowrap;
}

.document-feed-links-main .primary{
  min-width:220px;
}

.document-feed-links-main .ghost,
.document-feed-links-secondary .ghost{
  min-width:0;
}

.document-feed-entry{
  border-left:4px solid transparent;
  border-radius:var(--radius-card);
}

.document-feed-entry.status-order{
  border-left-color:#c6942f;
  background:rgba(255,248,235,.82);
}

.document-feed-entry.status-planning{
  border-left-color:#47706e;
  background:rgba(236,247,245,.82);
}

.document-feed-entry.status-ready{
  border-left-color:#6da43a;
  background:rgba(241,250,234,.88);
}

.document-feed-entry.status-blocked,
.document-feed-entry.status-cancelled{
  border-left-color:#b15743;
  background:rgba(253,241,238,.88);
}

.document-feed-entry-top{
  align-items:flex-start;
}

.document-feed-statuses{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  justify-content:flex-end;
}

.document-feed-trash{
  min-height:34px;
  padding:7px 10px;
  font-size:12px;
  align-self:center;
}

.scope-pills{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.scope-pills .primary,
.scope-pills .ghost{
  min-height:34px;
  padding:7px 12px;
  font-size:13px;
}

.scope-pills .ghost.is-filtering{
  border-color:rgba(204,138,26,.34);
  background:rgba(255,244,220,.96);
  color:#8b5a14;
}

.scope-pills .primary.is-filtering{
  border-color:rgba(177,113,20,.9);
  background:linear-gradient(180deg, #d6972d 0%, #ba7d1d 100%);
  color:#fff;
}

.quick-order-actions{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(188,201,214,.54);
}

.order-detail-hero{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  align-items:start;
}

.order-detail-heading-copy{
  min-width:0;
}

.order-detail-heading-copy .eyebrow,
.order-detail-heading-copy .muted{
  margin:0;
}

.order-detail-heading-copy h2{
  margin:0 0 6px;
}

#orderDetailView .quick-order-actions{
  margin-top:0;
  padding-top:0;
  border-top:0;
  justify-content:flex-start;
  align-content:flex-start;
  max-width:100%;
}

#orderDetailView .quick-order-actions .quick-action-icon{
  width:42px;
  min-width:42px;
  height:38px;
  min-height:38px;
  font-size:12px;
  letter-spacing:0;
  white-space:nowrap;
}

#orderDetailView .order-details-card > .section-head{
  display:grid;
  grid-template-columns:1fr;
  gap:14px 18px;
  align-items:start;
}

#orderDetailView .order-details-card > .section-head > div:first-child{
  min-width:0;
}

#orderDetailView .order-primary-actions{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:wrap;
  max-width:100%;
}

#orderDetailView .order-primary-actions .icon-button span[aria-hidden="true"]{
  font-size:11px;
  letter-spacing:0;
}

.order-side-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.order-detail-view{
  display:grid;
  gap:14px;
}

.order-detail-toolbar{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:rgba(255,255,255,.86);
  box-shadow:var(--shadow-sm);
}

.order-detail-toolbar-copy{
  display:grid;
  gap:2px;
}

.order-detail-toolbar-copy .eyebrow,
.order-detail-toolbar-copy .muted{
  margin:0;
}

.order-detail-layout{
  display:grid;
  grid-template-columns:minmax(260px, 1fr) minmax(0, 2fr) minmax(280px, 1fr);
  gap:14px;
  align-items:start;
}

.order-detail-sidebar,
.order-detail-main{
  min-width:0;
}

.order-detail-side-card{
  position:sticky;
  top:14px;
  display:grid;
  gap:12px;
  border-radius:var(--radius-card);
  background:rgba(255,255,255,.94);
}

.order-detail-main > .stack{
  width:100%;
}

.order-detail-side-summary{
  display:grid;
  gap:12px;
}

.order-detail-side-field-list{
  display:grid;
  gap:8px;
}

.order-detail-side-field-card{
  display:grid;
  gap:6px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:var(--surface);
}

.order-detail-side-field-code{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  min-width:34px;
  padding:2px 8px;
  border:1px solid rgba(157,192,219,.7);
  border-radius:999px;
  background:#eef5fb;
  color:var(--brand-strong);
  font-size:11px;
  font-weight:700;
  line-height:1.2;
}

.order-detail-side-field-label{
  font-size:12px;
  line-height:1.35;
  color:var(--muted);
  text-transform:uppercase;
}

.order-detail-side-field-value{
  font-size:13px;
  line-height:1.45;
  color:var(--text);
  overflow-wrap:anywhere;
}

.order-detail-side-block{
  display:grid;
  gap:8px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:var(--surface-2);
}

.order-detail-side-block .context-subsection-head{
  margin-bottom:0;
}

.order-detail-side-list{
  display:grid;
  gap:8px;
}

.order-detail-side-list-item{
  display:grid;
  gap:2px;
}

.order-detail-side-list-item strong{
  font-size:12px;
  line-height:1.35;
}

.order-detail-side-list-item span,
.order-detail-side-list-item .muted{
  font-size:12px;
  line-height:1.45;
}

.order-detail-side-metrics{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.order-detail-side-metric{
  display:grid;
  gap:4px;
  padding:9px 10px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:var(--surface);
}

.order-detail-side-metric-label{
  font-size:11px;
  text-transform:uppercase;
  color:var(--muted);
}

.order-detail-side-metric-value{
  font-size:13px;
  font-weight:700;
  color:var(--text);
}

.order-detail-side-checklist{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.order-detail-side-check{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:var(--surface);
  font-size:12px;
  color:var(--text);
}

.order-detail-side-check::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:999px;
  background:var(--border-strong);
}

.order-detail-side-check.is-ready::before{
  background:var(--ok);
}

.order-detail-side-check.is-missing::before{
  background:var(--warn);
}

.order-detail-side-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:8px 12px;
  border:1px solid var(--border);
  border-radius:var(--radius-control);
  background:var(--surface);
  color:var(--brand-strong);
  text-decoration:none;
  font-size:12px;
  font-weight:700;
}

.order-topic-list{
  display:grid;
  gap:10px;
}

.order-topic-card{
  gap:8px;
}

.order-topic-badges{
  gap:6px;
  flex-wrap:wrap;
}

.order-topic-meta{
  display:grid;
  gap:4px;
  font-size:12px;
  line-height:1.45;
  color:var(--text);
}

.order-topic-meta strong{
  color:var(--muted);
}

.order-topic-actions{
  gap:6px;
  flex-wrap:wrap;
}

.order-topic-actions button{
  min-height:32px;
  padding:7px 10px;
  font-size:12px;
}

.url-open-actions{
  display:flex;
  justify-content:flex-start;
  margin-top:8px;
}

.url-open-actions .ghost{
  min-height:34px;
  padding:8px 12px;
  border-radius:var(--radius-control);
}

#clientDetailView .order-detail-main{
  display:grid;
}

#clientDetailView .client-details-card > .section-head{
  grid-template-columns:1fr;
  gap:14px 18px;
}

#clientDetailView .client-details-card > .section-head > .actions{
  justify-content:flex-start;
  align-items:flex-start;
  align-content:flex-start;
  max-width:100%;
}

#clientDetailView .client-details-card > .section-head > .actions .ghost,
#clientDetailView .client-details-card > .section-head > .actions .primary{
  min-height:38px;
}

#clientDetailView .client-details-card .summary-row{
  margin-top:10px;
}

#clientDetailView .client-triptych-shell{
  margin-top:2px;
}

#supplierDetailView .order-detail-main{
  display:grid;
}

.supplier-detail-main-grid{
  display:grid;
  gap:14px;
}

.supplier-detail-section{
  display:grid;
  gap:14px;
}

.supplier-summary-badges{
  gap:8px;
  flex-wrap:wrap;
}

.supplier-entity-list,
.supplier-contact-list,
.supplier-activity-list,
.supplier-side-list{
  display:grid;
  gap:10px;
}

.supplier-entity-card,
.supplier-contact-card{
  display:grid;
  gap:6px;
  padding:14px 16px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:rgba(248,250,252,.92);
}

.supplier-contact-links{
  display:grid;
  gap:4px;
}

.supplier-activity-row{
  width:100%;
  text-align:left;
}

.supplier-activity-row > *{
  text-align:left;
}

body.flow-ui-2027 .supplier-entity-card,
body.flow-ui-2027 .supplier-contact-card{
  border-color:var(--pds-color-border, var(--border));
  background:var(--pds-color-surface-soft, rgba(248,250,252,.96));
  box-shadow:var(--shadow-sm);
}

.order-detail-kpis{
  display:grid;
  gap:8px;
}

.order-detail-kpis--compact{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.order-detail-kpis--dense{
  gap:6px;
}

.order-detail-financial-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.order-detail-kpi{
  display:grid;
  gap:4px;
  padding:10px 12px;
  border:1px solid rgba(212,218,219,.92);
  border-radius:10px;
  background:var(--surface-2);
}

.order-detail-kpi--editable{
  background:#fff;
  cursor:text;
}

.order-detail-kpi-label{
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted-2);
}

.order-detail-kpi-value{
  font-size:15px;
  font-weight:700;
  color:var(--text);
  word-break:break-word;
}

.order-detail-kpi-value a{
  color:inherit;
  text-decoration:none;
  border-bottom:1px dashed rgba(35,79,109,.28);
}

.order-detail-side-input{
  width:100%;
  min-width:0;
  min-height:34px;
  padding:6px 8px;
  border:1px solid rgba(188,201,214,.95);
  border-radius:8px;
  background:#fff;
  color:var(--text);
  font:inherit;
  font-size:14px;
  font-weight:700;
}

.order-detail-side-input:focus{
  border-color:rgba(35,79,109,.72);
  box-shadow:0 0 0 3px rgba(35,79,109,.12);
  outline:none;
}

.order-detail-side-input--textarea{
  min-height:74px;
  resize:vertical;
  line-height:1.35;
}

.order-detail-kpi--wide{
  grid-column:1 / -1;
}

.order-detail-section-title{
  margin:0;
  font-size:18px;
}

.order-detail-subtitle{
  margin:0;
  color:var(--muted);
}

.order-detail-position-list{
  display:grid;
  gap:8px;
}

.order-detail-position-list--dense{
  gap:5px;
}

.order-detail-position-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.order-detail-position-toolbar-copy{
  display:grid;
  gap:2px;
}

.order-detail-position-toolbar-copy strong{
  font-size:13px;
}

.order-detail-position-toolbar-copy span{
  color:var(--muted);
  font-size:11px;
}

.order-detail-position-toolbar-actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.order-detail-position-toolbar--dense{
  gap:8px;
}

.order-detail-position-toolbar--dense .order-detail-position-toolbar-copy{
  gap:1px;
}

.order-detail-position-toolbar--dense .order-detail-position-toolbar-copy strong{
  font-size:12px;
}

.order-detail-position-toolbar--dense .order-detail-position-toolbar-copy span{
  font-size:10px;
}

.order-detail-position-toolbar-actions--dense{
  gap:4px;
}

.order-detail-position-toolbar-actions--dense button{
  min-height:26px;
  padding:4px 8px;
  font-size:11px;
}

.order-detail-position-row{
  display:grid;
  gap:5px;
  padding:8px 10px;
  border:1px solid rgba(212,218,219,.92);
  border-radius:10px;
  background:var(--surface-2);
}

.order-detail-position-title{
  display:flex;
  align-items:flex-start;
  gap:8px;
  min-width:0;
}

.order-detail-position-copy{
  display:grid;
  gap:2px;
  min-width:0;
}

.order-detail-position-index{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:32px;
  height:22px;
  padding:0 8px;
  border-radius:999px;
  background:#eaf3fb;
  color:var(--brand);
  font-size:11px;
  font-weight:800;
}

.order-detail-position-top,
.order-detail-position-meta,
.order-detail-position-bottom{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.order-detail-position-name{
  font-weight:700;
}

.order-detail-position-inline-end{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.order-detail-position-amount{
  white-space:nowrap;
  font-size:13px;
}

.order-detail-position-actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.order-detail-position-actions button{
  padding:5px 8px;
  min-height:30px;
  font-size:12px;
}

.order-detail-position-actions--dense{
  gap:4px;
}

.order-detail-position-actions--dense button{
  min-height:24px;
  padding:3px 7px;
  font-size:11px;
}

.order-detail-position-row.is-compact{
  gap:4px;
  padding:7px 8px;
}

.order-detail-position-row.is-dense{
  gap:3px;
  padding:6px 7px;
}

.order-detail-group.is-compact{
  display:grid;
  gap:6px;
}

.order-detail-group--dense{
  gap:4px;
}

.order-detail-position-note{
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.order-detail-position-empty{
  padding:18px;
  border:1px dashed var(--border-strong);
  border-radius:10px;
  background:var(--surface-2);
  color:var(--muted);
}

.order-detail-position-empty--dense{
  padding:12px;
  font-size:12px;
}

.order-detail-total{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding-top:6px;
  border-top:1px solid rgba(212,218,219,.92);
  font-weight:700;
}

.order-detail-total--stack{
  display:grid;
  gap:8px;
}

.order-detail-total--dense{
  gap:5px;
  padding-top:4px;
}

.order-detail-total-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.order-detail-total--dense .order-detail-total-row{
  gap:8px;
  font-size:13px;
}

.order-detail-total-row--highlight{
  padding-top:8px;
  border-top:1px solid rgba(212,218,219,.92);
}

.order-detail-total--dense .order-detail-total-row--highlight{
  padding-top:5px;
}

.order-detail-compact-block{
  display:grid;
  gap:8px;
}

#orderDetailItemsPanel .order-detail-kpi{
  padding:8px 10px;
}

#orderDetailItemsPanel .order-detail-kpi-label{
  font-size:10px;
}

#orderDetailItemsPanel .order-detail-kpi-value{
  font-size:13px;
  line-height:1.3;
}

#orderDetailItemsPanel .order-detail-side-input{
  min-height:30px;
  padding:5px 7px;
  font-size:13px;
}

#orderDetailItemsPanel .order-detail-side-input--textarea{
  min-height:60px;
}

.order-detail-summary-footer{
  padding-top:6px;
  border-top:1px solid rgba(212,218,219,.92);
}

.incident-detail-main-stack{
  display:grid;
  gap:12px;
}

.incident-detail-panel-card{
  display:grid;
  gap:12px;
}

.incident-detail-actions{
  margin-top:10px;
}

.incident-detail-linked-list{
  display:grid;
  gap:8px;
}

.incident-detail-link-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  border:1px solid rgba(212,218,219,.92);
  border-radius:10px;
  background:var(--surface-2);
}

.incident-detail-link-row strong{
  display:block;
  margin-bottom:2px;
}

.incident-detail-link-row span{
  color:var(--muted);
  font-size:12px;
}

.detail-hidden-section{
  display:none !important;
}

#orderDetailView #orderCard{
  display:grid;
  gap:14px;
}

#orderDetailView #orderCard > .card:first-child{
  grid-column:1 / -1;
}

#orderDetailView #orderCard > .card:not(:first-child){
  display:grid;
  gap:10px;
}

#orderDetailView .order-details-card .process-form-grid{
  gap:12px;
}

#orderDetailView .order-details-card .grid.two{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

#orderDetailView #orderSummary{
  display:none;
}

.inline-order-link{
  display:inline-flex;
  align-items:center;
  padding:0;
  margin:0;
  font:inherit;
  color:var(--brand);
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:2px;
}

.inline-order-link:focus-visible{
  outline:2px solid rgba(35,79,109,.28);
  outline-offset:3px;
  border-radius:4px;
}

.kanban-board{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(200px, 232px);
  gap:10px;
  overflow-x:auto;
  padding-bottom:4px;
}

.kanban-column{
  min-height:180px;
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  padding:10px;
  display:grid;
  align-content:start;
  gap:8px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.68);
}

.kanban-column.is-filter-parked{
  width:150px;
  min-width:150px;
}

.kanban-column-compact{
  width:170px;
  min-width:170px;
}

.kanban-column.drag-target{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.1), inset 0 1px 0 rgba(255,255,255,.68);
}

.kanban-column-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.kanban-column-title{
  font-size:14px;
  font-weight:800;
}

.kanban-list{
  display:grid;
  gap:7px;
}

.kanban-filter-empty{
  display:grid;
  gap:8px;
  align-content:start;
}

.kanban-clear-filter-btn{
  width:100%;
  min-height:30px;
  padding:6px 10px;
  font-size:12px;
}

.order-kanban-card{
  width:100%;
  text-align:left;
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, var(--surface) 100%);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  padding:12px;
  box-shadow:var(--shadow-sm);
  cursor:grab;
  display:grid;
  gap:8px;
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.order-kanban-card.active{
  border-color:rgba(35,79,109,.32);
  background:linear-gradient(180deg, rgba(35,79,109,.06) 0%, rgba(255,255,255,.98) 38%);
  box-shadow:0 0 0 2px rgba(35,79,109,.14), var(--shadow-md);
}

.order-kanban-card:hover{
  border-color:rgba(35,79,109,.18);
  box-shadow:var(--shadow-md);
}

.order-kanban-card:not(.active):focus-visible{
  outline:none;
  border-color:rgba(35,79,109,.34);
  box-shadow:0 0 0 1px rgba(35,79,109,.12), var(--shadow);
}

.order-kanban-card.active:focus-visible{
  outline:none;
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.18), var(--shadow);
}

.order-kanban-card.dragging{
  opacity:.55;
  transform:rotate(1deg);
}

.order-kanban-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}

.order-kanban-card-title{
  min-width:0;
  display:grid;
  gap:2px;
}

.order-kanban-card strong{
  display:block;
  font-size:14px;
  line-height:1.24;
}

.order-kanban-badges,
.order-list-badges{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.order-kanban-meta{
  display:grid;
  gap:3px;
  color:var(--muted);
  font-size:11px;
}

.deadline-chip{
  display:inline-flex;
  align-items:center;
  width:max-content;
  border-radius:999px;
  padding:3px 8px;
  font-size:11px;
  font-weight:800;
  background:var(--info-soft);
  color:var(--brand);
  border:1px solid rgba(84,119,151,.12);
}

.deadline-chip.warning,
.deadline-text.warning{
  background:var(--warn-soft);
  color:var(--warn);
}

.deadline-chip.danger,
.deadline-text.danger{
  background:#fae8e8;
  color:var(--danger);
}

.task-kanban-card{
  width:100%;
  text-align:left;
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, var(--surface) 100%);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  padding:12px;
  box-shadow:var(--shadow-sm);
  cursor:grab;
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.task-kanban-card.active{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.12), var(--shadow-md);
}

.task-kanban-card:hover{
  border-color:rgba(35,79,109,.18);
  box-shadow:var(--shadow-md);
}

.task-kanban-card.dragging{
  opacity:.55;
  transform:rotate(1deg);
}

.task-kanban-card strong{
  display:block;
  margin-bottom:3px;
  font-size:14px;
}

.task-kanban-meta{
  display:grid;
  gap:3px;
  color:var(--muted);
  font-size:11px;
}

.task-table-row{
  width:100%;
  text-align:left;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  padding:10px 12px;
  display:grid;
  grid-template-columns:28px minmax(180px, 220px) minmax(150px, 180px) minmax(150px, 1fr) minmax(120px, 150px) minmax(140px, 180px) auto;
  gap:10px;
  align-items:center;
  box-shadow:var(--shadow-sm);
  transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.task-table-row.active{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.12), var(--shadow-md);
}

.task-table-row:hover{
  border-color:rgba(35,79,109,.18);
}

.task-card-summary{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:6px;
}

.task-card-note{
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
}

.note-log-entry{
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  font-size:12px;
  color:var(--text);
}

.task-workbench-summary{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.my-work-lead{
  margin:0 0 10px;
  line-height:1.55;
}

.ops-pulse-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin:0 0 12px;
}

.ops-pulse-card{
  border:1px solid rgba(212,221,231,.9);
  border-radius:var(--radius-card);
  background:rgba(255,255,255,.92);
  box-shadow:var(--shadow-sm);
  padding:14px 16px;
  display:grid;
  gap:12px;
}

.ops-pulse-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.ops-pulse-card__head h3{
  margin:0;
  font-size:16px;
}

.ops-pulse-card__body{
  display:grid;
  gap:8px;
}

.ops-pulse-card__footer{
  display:flex;
  justify-content:flex-end;
}

.ops-metric-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:8px;
}

.ops-metric-card{
  border:1px solid rgba(212,221,231,.9);
  border-radius:12px;
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, var(--surface) 100%);
  padding:10px;
  display:grid;
  gap:4px;
}

.ops-metric-card strong{
  font-size:22px;
  line-height:1;
}

.ops-metric-card span{
  font-size:12px;
  color:var(--muted);
}

.ops-row{
  border:1px solid rgba(224,231,238,.92);
  border-radius:12px;
  padding:10px 12px;
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(246,249,252,.98) 100%);
  display:grid;
  gap:8px;
}

.ops-row__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.ops-row__meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color:var(--muted);
  font-size:12px;
}

.ops-row__hint{
  color:var(--text);
  font-size:12px;
  line-height:1.45;
}

.ops-row__time{
  color:var(--muted);
  font-size:11px;
}

.ops-row__time--danger{
  color:var(--danger);
  font-weight:700;
}

.ops-row__time--warning{
  color:var(--warn);
  font-weight:700;
}

.ops-row__time--success{
  color:#2d7d46;
  font-weight:700;
}

.ops-row__time--info{
  color:var(--brand);
  font-weight:700;
}

.ops-signal{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:5px 10px;
  font-size:12px;
  font-weight:800;
  line-height:1;
}

.ops-signal--danger{
  background:#fae8e8;
  color:var(--danger);
}

.ops-signal--warning{
  background:var(--warn-soft);
  color:var(--warn);
}

.ops-signal--success{
  background:#e9f7ef;
  color:#2d7d46;
}

.ops-signal--info{
  background:var(--info-soft);
  color:var(--brand);
}

.workspace-quick-actions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.workspace-quick-actions a{
  text-decoration:none;
}

.workspace-nav-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.workspace-nav-action{
  min-height:32px;
  font-size:12px;
  padding:6px 12px;
  border-radius:999px;
}

.workspace-quick-action{
  min-height:30px;
  font-size:12px;
  padding:6px 10px;
}

.workbench-record-subtle{
  margin-top:4px;
  color:var(--muted);
  font-size:11px;
  line-height:1.4;
}

.workbench-record-next{
  margin-top:5px;
  font-size:11px;
  line-height:1.45;
  font-weight:700;
}

.workbench-record-next--info{
  color:var(--brand-strong);
}

.workbench-record-next--warning{
  color:#8a5a00;
}

.workbench-record-next--danger{
  color:#a33b3b;
}

.workbench-record-next--success{
  color:#1f6d4f;
}

.signatures-workbench-lead{
  margin:0 0 14px;
}

.signatures-workbench-list{
  display:grid;
  gap:12px;
}

.signatures-workbench-card{
  display:grid;
  gap:10px;
  padding:14px 16px;
  border:1px solid rgba(212,221,231,.9);
  border-radius:var(--radius-card);
  background:rgba(255,255,255,.9);
}

.signatures-workbench-card.is-focused{
  border-color:rgba(51,74,96,.38);
  box-shadow:0 0 0 3px rgba(51,74,96,.08);
}

.signatures-workbench-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}

.signatures-workbench-title{
  display:grid;
  gap:4px;
}

.signatures-workbench-title strong{
  font-size:18px;
  line-height:1.2;
}

.signatures-workbench-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  color:var(--muted);
  font-size:12px;
}

.signatures-workbench-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:10px;
}

.signatures-workbench-field{
  display:grid;
  gap:4px;
  padding:10px 12px;
  border:1px solid rgba(212,221,231,.7);
  border-radius:calc(var(--radius-card) - 2px);
  background:#fff;
}

.signatures-workbench-label{
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted);
}

.signatures-workbench-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px 16px;
}

.signatures-workbench-actions-main,
.signatures-workbench-actions-secondary{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

.signatures-workbench-actions-main{
  flex:1 1 340px;
}

.signatures-workbench-actions-secondary{
  justify-content:flex-end;
  flex:1 1 280px;
}

.signatures-workbench-actions a,
.signatures-workbench-actions button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:10px 14px;
  border-radius:var(--radius-control);
  border:1px solid transparent;
  font:inherit;
  font-weight:700;
  line-height:1.1;
  text-decoration:none;
  white-space:nowrap;
}

.signatures-workbench-actions-main .primary{
  min-width:220px;
  justify-content:center;
}

.signatures-workbench-actions .primary{
  background:#334a60;
}

.signatures-workbench-empty{
  padding:18px;
  border:1px dashed rgba(212,221,231,.9);
  border-radius:var(--radius-card);
  background:rgba(255,255,255,.72);
}

.feedback-workbench-filters{
  grid-template-columns:minmax(240px, 320px);
}

.feedback-workbench-board{
  display:grid;
  gap:12px;
  grid-template-columns:repeat(auto-fit, minmax(300px, 1fr));
}

.feedback-workbench-card{
  display:grid;
  gap:10px;
  align-content:start;
  min-height:236px;
  padding:16px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, var(--surface-2) 100%);
  box-shadow:var(--shadow-sm);
  cursor:pointer;
  transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.feedback-workbench-card[draggable="true"]{
  cursor:grab;
}

.feedback-workbench-card:hover{
  border-color:rgba(35,79,109,.18);
  box-shadow:var(--shadow-md);
  transform:translateY(-1px);
}

.feedback-workbench-card.dragging{
  opacity:.58;
  transform:scale(.992);
  box-shadow:var(--shadow-sm);
}

.feedback-workbench-card.active{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.12), var(--shadow-md);
}

.feedback-workbench-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}

.feedback-workbench-card-head strong{
  display:block;
  margin-top:4px;
  font-size:17px;
  line-height:1.3;
}

.feedback-workbench-card-case{
  color:var(--brand);
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.feedback-workbench-card-meta,
.feedback-workbench-card-context{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.feedback-workbench-card-body{
  color:var(--text);
  font-size:14px;
  line-height:1.55;
}

.feedback-workbench-card-context{
  color:var(--muted);
  font-size:12px;
}

.feedback-prompt-button{
  flex:0 0 auto;
  min-height:36px;
  font-size:12px;
  font-weight:700;
}

.tasks-filters-bar,
.tasks-bulk-bar{
  display:grid;
  gap:8px;
  align-items:end;
  margin-bottom:10px;
}

.tasks-filters-bar .field,
.dispatch-map-toolbar .field,
.filters-bar .field{
  gap:5px;
}

.tasks-filters-bar .field span,
.dispatch-map-toolbar .field span,
.filters-bar .field span{
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  color:var(--brand);
}

.tasks-filters-bar{
  grid-template-columns:repeat(auto-fit, minmax(136px, 1fr));
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(247,250,252,.98) 100%);
  box-shadow:var(--shadow-sm);
}

.dispatch-nav{
  display:flex;
  gap:8px;
  align-items:end;
  flex-wrap:wrap;
}

.actions-inline{
  display:flex;
  gap:6px;
  align-items:center;
}

.dispatch-day-jump{
  padding:4px 8px;
}

.quick-places{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:-4px;
}

.quick-place-button{
  border-radius:999px;
}

.dispatch-timeline-item.is-done,
.dispatch-item-done{
  border-color:#8dc7a2;
  background:#f1fbf4;
}

.dispatch-timeline-item.is-open,
.dispatch-item-open{
  border-color:#f0c27b;
  background:#fff9ef;
}

.tasks-bulk-bar{
  grid-template-columns:minmax(120px, auto) auto minmax(150px, 1fr) auto auto minmax(150px, 1fr) auto auto;
  padding:10px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}

.tasks-filters-bar .field,
.tasks-bulk-bar .field{
  margin:0;
}

.clients-pagination-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.clients-pagination-controls{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

.clients-pagination-chip{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid #dce6ef;
  background:#f7fafc;
  color:var(--muted);
  font-size:13px;
  font-weight:700;
}

.dispatch-map-layout{
  display:grid;
  grid-template-columns:320px minmax(0, 1fr);
  gap:12px;
}

.dispatch-map-toolbar{
  grid-column:1 / -1;
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
}

.dispatch-map-toolbar-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 220px));
  gap:10px;
  align-items:end;
}

.dispatch-day-layout{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 276px;
  gap:2px;
  align-items:start;
}

.dispatch-pool-card{
  position:sticky;
  top:8px;
  align-self:start;
  overflow:visible;
}

.dispatch-pool-filters{
  position:sticky;
  top:8px;
  z-index:4;
  display:grid;
  grid-template-columns:1fr;
  gap:4px;
  margin:0 0 4px;
  padding-bottom:4px;
  background:var(--surface);
  border-bottom:1px solid rgba(188,201,214,.45);
}

.dispatch-pool-search-field{
  position:sticky;
  top:0;
  z-index:5;
  padding-bottom:2px;
  background:var(--surface);
}

.dispatch-pool-search-field input{
  width:100%;
}

.dispatch-pool-category-pills{
  margin:0 0 2px;
  gap:5px;
}

.dispatch-pool-category-pills .primary,
.dispatch-pool-category-pills .ghost{
  min-height:30px;
  padding:6px 9px;
  font-size:11px;
}

.dispatch-pool-filters .field span{
  font-size:10px;
}

.dispatch-pool-filters input,
.dispatch-pool-filters select{
  min-height:32px;
  padding:6px 9px;
}

.dispatch-pool-list{
  max-height:calc(100vh - 300px);
  overflow:auto;
  padding-right:1px;
}

.dispatch-schedule-details{
  display:grid;
  gap:10px;
}

.dispatch-schedule-context{
  display:grid;
  gap:10px;
  padding-top:2px;
}

.dispatch-schedule-context h4{
  margin:0;
  font-size:16px;
  line-height:1.25;
}

.dispatch-schedule-detail-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}

.dispatch-schedule-detail-panel{
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:var(--surface-2);
  padding:10px;
  display:grid;
  gap:8px;
  align-content:start;
  min-width:0;
}

.dispatch-schedule-detail-panel > strong{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted);
}

.dispatch-schedule-detail-panel ul{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:4px;
}

.dispatch-schedule-detail-panel li,
.dispatch-schedule-detail-panel .muted{
  font-size:12px;
  line-height:1.35;
}

.dispatch-schedule-detail-panel-wide{
  grid-column:1 / -1;
}

.dispatch-customer-confirm-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.dispatch-schedule-info-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:6px;
}

.dispatch-schedule-info-grid div{
  border:1px solid rgba(188,201,214,.72);
  border-radius:10px;
  background:var(--surface);
  padding:7px 8px;
  min-width:0;
}

.dispatch-schedule-info-grid span{
  display:block;
  font-size:10px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.06em;
}

.dispatch-schedule-info-grid strong{
  display:block;
  margin-top:3px;
  font-size:12px;
  line-height:1.25;
  overflow-wrap:anywhere;
}

.dispatch-pool-list.drag-over{
  outline:2px dashed rgba(25, 72, 138, 0.35);
  outline-offset:4px;
  border-radius:14px;
}

.dispatch-pool-planning-pills{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:4px 0 8px;
}

.dispatch-pool-planning-pills button{
  min-height:30px;
  padding:6px 10px;
  font-size:11px;
}

.dispatch-pool-strip-group{
  display:grid;
  gap:4px;
}

.dispatch-customer-queue{
  display:grid;
  gap:8px;
  margin-bottom:14px;
}

.dispatch-customer-queue-panel{
  display:grid;
  gap:10px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, var(--surface) 100%);
  box-shadow:var(--shadow-sm);
}

.dispatch-customer-queue-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.dispatch-customer-queue-head h4{
  margin:2px 0 0;
  font-size:16px;
}

.dispatch-customer-queue-badges{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.dispatch-customer-queue-list{
  display:grid;
  gap:8px;
}

.dispatch-customer-queue-item{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  align-items:start;
  padding:10px;
  border:1px solid rgba(148,163,184,.22);
  border-radius:14px;
  background:#fff;
}

.dispatch-customer-queue-copy{
  display:grid;
  gap:6px;
  min-width:0;
}

.dispatch-customer-queue-actions{
  display:grid;
  gap:8px;
  min-width:180px;
}

.dispatch-pool-strip-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  font-size:12px;
}

.dispatch-pool-strip-list{
  display:grid;
  gap:4px;
}

.dispatch-pool-item-strip{
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, var(--surface) 100%);
  padding:7px 8px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:6px;
  align-items:center;
  cursor:grab;
  box-shadow:var(--shadow-sm);
  transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.dispatch-pool-item-strip:hover{
  border-color:rgba(35,79,109,.18);
  box-shadow:var(--shadow-md);
}

.dispatch-pool-item-strip.is-fully-planned{
  opacity:.76;
}

.dispatch-pool-item-strip strong{
  display:block;
  font-size:11px;
  line-height:1.12;
  margin:0;
}

.dispatch-pool-item-strip-main{
  min-width:0;
}

.dispatch-pool-item-strip-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:6px;
  margin-bottom:2px;
}

.dispatch-pool-item-strip-meta{
  display:grid;
  gap:0;
  font-size:10px;
  line-height:1.2;
  color:var(--muted);
}

.dispatch-pool-item-strip-meta-row{
  display:flex;
  gap:6px;
  align-items:center;
  flex-wrap:wrap;
}

.dispatch-pool-item-strip-planned-days{
  color:var(--brand-strong);
}

.dispatch-pool-item-strip-planned-days strong{
  font-weight:800;
}

.dispatch-pool-item-strip-side{
  display:grid;
  justify-items:end;
  gap:2px;
}

.dispatch-pool-status-label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:18px;
  padding:0 7px;
  border-radius:999px;
  background:var(--ok-soft);
  color:var(--ok);
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
  border:1px solid rgba(47,115,81,.12);
}

.dispatch-pool-item-card-installation{ border-color:#e4b087; }
.dispatch-pool-item-card-service{ border-color:#8fceab; }
.dispatch-pool-item-card-measurement{ border-color:#9cc3f3; }
.dispatch-pool-item-card-task{ border-color:#baa8ef; }

.dispatch-pool-type-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:26px;
  min-height:18px;
  padding:0 6px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.02em;
  flex:0 0 auto;
}

.dispatch-pool-type-installation{
  background:#fff0e6;
  color:#b45309;
}

.dispatch-pool-type-service{
  background:#e9f8ef;
  color:#1f7a44;
}

.dispatch-pool-type-measurement{
  background:#e8f1ff;
  color:#1d4ed8;
}

.dispatch-pool-type-task{
  background:#f1eaff;
  color:#6b49b6;
}

.small-button{
  min-height:30px;
  padding:6px 10px;
  font-size:11px;
}

.dispatch-map-list{
  display:grid;
  gap:8px;
  max-height:70vh;
  overflow:auto;
}

.dispatch-map-item{
  width:100%;
  text-align:left;
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  display:grid;
  gap:6px;
}

.dispatch-map-item-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
}

.dispatch-map-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  background:#e8eef5;
  color:var(--brand);
}

.dispatch-map-icon-installation{ background:#ffe4d2; color:#c96f34; }
.dispatch-map-icon-service{ background:#e8f7ec; color:#257a49; }
.dispatch-map-icon-measurement{ background:#e3f0ff; color:#2f69c4; }
.dispatch-map-icon-task{ background:#f1eaff; color:#6b49b6; }

.dispatch-map-item.active,
.active-dispatch{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.15);
}

.dispatch-map-frame-wrap{
  min-height:420px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  overflow:hidden;
  background:var(--surface);
  box-shadow:var(--shadow-sm);
}

.dispatch-map-canvas,
.dispatch-block-map-canvas-host{
  width:100%;
  min-height:420px;
}

.dispatch-map-loading{
  display:grid;
  place-items:center;
  min-height:420px;
  padding:16px;
  text-align:center;
}

.dispatch-map-marker-host{
  background:transparent;
  border:0;
}

.dispatch-map-marker{
  width:28px;
  height:28px;
  border-radius:14px 14px 14px 2px;
  transform:rotate(-45deg);
  display:grid;
  place-items:center;
  border:2px solid rgba(255,255,255,.92);
  box-shadow:0 5px 12px rgba(23,33,43,.18);
}

.dispatch-map-marker span{
  transform:rotate(45deg);
  font-size:12px;
  font-weight:800;
  color:#fff;
}

.dispatch-map-marker-installation{ background:#c96f34; }
.dispatch-map-marker-service{ background:#257a49; }
.dispatch-map-marker-measurement{ background:#2f69c4; }
.dispatch-map-marker-task{ background:#6b49b6; }
.dispatch-map-marker-base{ background:#234f6d; }
.dispatch-map-marker-client{ background:#d97706; }

.dispatch-map-marker.is-active{
  box-shadow:0 0 0 4px rgba(35,79,109,.18), 0 8px 18px rgba(23,33,43,.22);
}

.dispatch-map-popup{
  display:grid;
  gap:4px;
  min-width:180px;
}

.dispatch-block-map{
  margin-top:12px;
  border-top:1px solid var(--border);
  padding-top:12px;
}

.dispatch-block-map-layout{
  display:grid;
  grid-template-columns:320px minmax(0, 1fr);
  gap:12px;
}

.dispatch-block-map-points{
  display:grid;
  gap:8px;
}

.dispatch-block-map-point{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
}

.people-board{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(280px, 320px);
  gap:12px;
  overflow:auto;
  padding-bottom:4px;
}

.people-column{
  border:1px solid var(--border);
  border-radius:16px;
  background:#f8fbfd;
  min-height:420px;
  display:flex;
  flex-direction:column;
}

.people-column.drag-target{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.12);
  background:#eef5fb;
}

.people-column-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:12px 12px 8px;
  position:sticky;
  top:0;
  background:#f8fbfd;
  border-bottom:1px solid var(--border);
  z-index:1;
}

.people-column-summary{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:4px;
  font-size:11px;
  color:var(--muted);
}

.people-column-list{
  display:grid;
  gap:10px;
  padding:12px;
  overflow:auto;
  max-height:70vh;
}

.button-link{
  text-decoration:none;
}

.checkbox-cell{
  display:flex;
  align-items:center;
  justify-content:center;
}

.row-checkbox{
  width:18px;
  height:18px;
}

.picker-panel{
  border:1px solid var(--border);
  border-radius:14px;
  background:#fbfdff;
  max-height:220px;
  overflow:auto;
  padding:8px;
  display:grid;
  gap:6px;
}

.picker-option{
  display:flex;
  gap:8px;
  align-items:flex-start;
  padding:6px 4px;
  border-radius:10px;
}

.picker-option:hover{
  background:#eef4f8;
}

.picker-option input{
  width:16px;
  height:16px;
  margin-top:2px;
}

.picker-option-meta{
  display:grid;
  gap:2px;
  min-width:0;
}

.picker-option-meta strong{
  font-size:13px;
}

.picker-option-meta span{
  font-size:11px;
  color:var(--muted);
}

.picker-selected{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  min-height:14px;
}

.field-job-card{
  width:100%;
  text-align:left;
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, var(--surface) 100%);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  padding:12px;
  box-shadow:var(--shadow-sm);
  cursor:grab;
  transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.field-job-card.active{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.12), var(--shadow-md);
}

.field-job-card:hover{
  border-color:rgba(35,79,109,.18);
  box-shadow:var(--shadow-md);
}

.field-job-card.dragging{
  opacity:.55;
  transform:rotate(1deg);
}

.field-job-meta{
  display:grid;
  gap:3px;
  color:var(--muted);
  font-size:11px;
}

.field-job-badges{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:6px;
}

.dispatch-progress-label{
  font-size:10px;
  line-height:1;
  font-weight:700;
  letter-spacing:0;
  padding:0;
  background:transparent;
  border:0;
}

.status-missing-data{
  background:#fff3cd;
  color:#8a5a00;
}

.dispatch-incomplete-badge{
  display:inline-flex;
  align-items:center;
  font-weight:700;
}

.field-job-row{
  width:100%;
  text-align:left;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  padding:10px 12px;
  display:grid;
  grid-template-columns:minmax(180px, 220px) minmax(120px, 150px) minmax(160px, 1fr) minmax(120px, 150px) minmax(160px, 200px) auto;
  gap:10px;
  align-items:center;
  box-shadow:var(--shadow-sm);
  transition:border-color .16s ease, box-shadow .16s ease;
}

.field-job-row.active{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.12), var(--shadow-md);
}

.field-job-row:hover{
  border-color:rgba(35,79,109,.18);
}

.crm-workbench-grid{
  display:grid;
  grid-template-columns:minmax(320px, 420px) minmax(0, 1fr);
  gap:14px;
  align-items:start;
}

.crm-workbench-grid.crm-case-board-mode,
.crm-workbench-grid.crm-case-detail-mode{
  grid-template-columns:1fr;
}

.crm-workbench-grid.crm-case-board-mode #crmDetailPanel,
.crm-workbench-grid.crm-case-detail-mode #crmPrimaryList{
  display:none;
}

.crm-pane{
  min-width:0;
  max-width:100%;
  min-height:220px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:rgba(255,255,255,.72);
  overflow:hidden;
}

#crmWorkbench,
#crmPrimaryList,
#crmDetailPanel{
  min-width:0;
  max-width:100%;
}

#crmPrimaryList .kanban-board,
#crmDetailPanel .kanban-board{
  max-width:100%;
}

.crm-detail-triptych{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
  align-items:start;
}

.crm-detail-column{
  display:grid;
  gap:12px;
  align-items:start;
}

.crm-detail-column .crm-detail-section{
  margin-top:0;
  padding-top:0;
  border-top:0;
}

.crm-pane-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.crm-pane-head--stack{
  align-items:stretch;
  flex-direction:column;
}

.crm-record-list,
.crm-mini-list{
  display:grid;
  gap:10px;
}

.crm-record-card{
  width:100%;
  padding:14px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:#fff;
  color:var(--text);
  text-align:left;
  box-shadow:var(--shadow-sm);
}

.crm-record-card[draggable="true"]{
  cursor:grab;
}

.crm-record-card:hover{
  border-color:var(--border-strong);
  transform:translateY(-1px);
}

.crm-record-card.active{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.12), var(--shadow-sm);
}

.crm-record-card.dragging{
  opacity:.62;
  transform:rotate(.4deg);
}

.crm-record-card-head,
.crm-detail-badges{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.crm-record-card-head--stack{
  align-items:flex-start;
  flex-direction:column;
}

.crm-health-row,
.crm-toolbar{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.crm-action-strip{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.crm-record-card-meta{
  margin-top:8px;
  display:grid;
  gap:4px;
  color:var(--muted);
  font-size:13px;
}

.crm-case-toolbar{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:10px;
  margin-bottom:12px;
}

.flow-inbox-filters{
  grid-template-columns:repeat(auto-fit, minmax(170px, 1fr));
  align-items:end;
}

.crm-case-toolbar-actions{
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  min-width:0;
}

.crm-case-toolbar-actions .primary,
.crm-case-toolbar-actions .ghost{
  width:100%;
}

.crm-case-toolbar-summary{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.crm-case-detail-toolbar{
  display:flex;
  align-items:center;
  gap:12px;
  padding-bottom:12px;
  margin-bottom:12px;
  border-bottom:1px solid var(--border);
}

.crm-case-edit-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
}

.crm-case-edit-note{
  grid-column:1 / -1;
}

.crm-toolbar-wrap{
  align-items:flex-start;
}

.flow-inbox-quick-actions{
  gap:8px;
}

.flow-inbox-quick-actions .ghost,
.flow-inbox-quick-actions .primary{
  flex:0 1 auto;
}

.flow-inbox-filters--operational{
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
}

.flow-inbox-layout{
  display:grid;
  gap:14px;
}

.flow-inbox-section{
  display:grid;
  gap:10px;
}

.flow-inbox-section__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.crm-case-board--operational{
  grid-auto-columns:minmax(240px, 1fr);
  overflow:visible;
}

.flow-inbox-lane{
  min-height:180px;
}

.flow-inbox-lane__head{
  align-items:flex-start;
}

.flow-inbox-lane__hint{
  font-size:12px;
  line-height:1.4;
}

.crm-case-card--operational{
  min-height:160px;
}

.crm-case-card__footer{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.crm-case-card__status{
  font-size:12px;
  color:var(--muted);
  font-weight:600;
}

.subtle-link{
  color:var(--brand);
  font-weight:600;
}

.crm-detail-section{
  display:grid;
  gap:10px;
  padding-top:12px;
  margin-top:12px;
  border-top:1px solid var(--border);
}

.crm-detail-section h3{
  margin:0;
  font-size:15px;
}

.crm-kpi-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(120px, 1fr));
  gap:10px;
}

.crm-kpi-card{
  display:grid;
  gap:4px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:var(--radius-control);
  background:var(--surface-2);
}

.crm-kpi-card strong{
  font-size:22px;
}

.crm-detail-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
}

.crm-field-card{
  display:grid;
  gap:6px;
  min-height:78px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:var(--radius-control);
  background:var(--surface);
}

.crm-field-card__label{
  font-size:11px;
  line-height:1.2;
  font-weight:700;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.02em;
}

.crm-field-card__value{
  font-size:14px;
  line-height:1.35;
  color:var(--text);
  font-weight:600;
}

.crm-mini-row{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:12px;
  align-items:start;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:var(--radius-control);
  background:#fff;
}

.crm-mini-row strong,
.crm-mini-row span{
  display:block;
}

.crm-mini-row span{
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
}

.crm-mini-row.active{
  border-color:var(--brand);
}

.crm-mini-row--stack{
  grid-template-columns:1fr;
}

.crm-empty-state{
  padding:18px;
  border:1px dashed var(--border-strong);
  border-radius:var(--radius-card);
  color:var(--muted);
  background:var(--surface-2);
}

.workspace-empty-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:12px;
}

.crm-pipeline-board{
  grid-auto-columns:minmax(220px, 260px);
}

.crm-case-board{
  grid-auto-columns:minmax(188px, 216px);
  gap:8px;
  align-items:start;
  align-content:start;
  padding-bottom:6px;
}

.crm-case-board .kanban-column{
  min-height:156px;
  padding:8px;
  gap:6px;
}

.crm-case-board .kanban-column-compact{
  width:auto;
  min-width:0;
}

.crm-case-board .kanban-column-head{
  gap:8px;
}

.crm-case-board .kanban-list{
  gap:6px;
}

.crm-case-board .crm-case-card{
  padding:10px;
  gap:8px;
}

.crm-case-card{
  gap:10px;
  text-align:left;
}

.crm-case-card.dragging{
  opacity:.55;
}

.checkbox-field{
  justify-content:end;
}

.checkbox-row{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
}

.checkbox-row input{
  width:18px;
  height:18px;
}

.crm-health-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--surface);
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}

.crm-health-pill.is-good{
  border-color:rgba(66,109,88,.24);
  background:var(--success-bg);
  color:var(--success);
}

.crm-health-pill.is-warn{
  border-color:rgba(154,115,52,.22);
  background:var(--warning-bg);
  color:var(--warning);
}

.crm-health-pill.is-danger{
  border-color:rgba(151,87,98,.24);
  background:var(--danger-bg);
  color:var(--danger);
}

.crm-toolbar .ghost,
.crm-toolbar .primary{
  white-space:nowrap;
}

.crm-icon-button{
  flex:0 0 auto;
  font-size:15px;
  font-weight:700;
}

.crm-action-strip .crm-icon-button{
  background:var(--surface);
  box-shadow:none;
}

.crm-action-strip .crm-icon-button.primary{
  color:#fff;
}

.crm-activity-card{
  gap:10px;
}

.crm-activity-card .crm-record-card-meta{
  margin-top:0;
}

.crm-quick-activity-box{
  display:grid;
  gap:10px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:rgba(255,255,255,.84);
}

.crm-quick-activity-box textarea{
  min-height:92px;
  resize:vertical;
}

.crm-timeline{
  display:grid;
  gap:10px;
}

.crm-timeline-item{
  position:relative;
  display:grid;
  gap:4px;
  padding:10px 12px 10px 24px;
  border:1px solid var(--border);
  border-radius:var(--radius-control);
  background:#fff;
}

.crm-timeline-item::before{
  content:"";
  position:absolute;
  left:10px;
  top:14px;
  width:8px;
  height:8px;
  border-radius:999px;
  background:var(--brand);
  box-shadow:0 0 0 4px rgba(35,79,109,.08);
}

.crm-timeline-item strong{
  font-size:13px;
}

.crm-timeline-item span{
  color:var(--muted);
  font-size:13px;
}

.task-dependency-list{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:6px;
}

.dependency-pill{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  background:var(--info-soft);
  color:var(--brand);
  border:1px solid rgba(84,119,151,.12);
}

.dependency-pill.blocked{
  background:var(--danger-soft);
  color:var(--danger);
}

.dependency-pill.warn{
  background:var(--warn-soft);
  color:var(--warn);
}

.dependency-pill.info{
  background:var(--info-soft);
  color:var(--info);
}

.kanban-card-operator{
  font-weight:700;
  color:var(--brand);
}

.order-kanban-jump{
  width:30px;
  height:30px;
  min-width:30px;
  border:1px solid var(--border);
  border-radius:var(--radius-control);
  padding:0;
  font-size:16px;
  line-height:1;
  color:var(--brand);
  background:var(--surface-2);
  box-shadow:var(--shadow-sm);
}

.order-kanban-jump:hover{
  transform:none;
  background:var(--brand-soft);
  border-color:rgba(35,79,109,.2);
}

.order-kanban-jump:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(35,101,168,.16);
}

.orders-table{
  display:grid;
  gap:7px;
}

.order-list-row{
  width:100%;
  text-align:left;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  padding:10px 12px;
  display:grid;
  grid-template-columns:minmax(110px, 140px) minmax(190px, 1fr) minmax(120px, 170px) minmax(150px, 200px) auto auto auto;
  gap:10px;
  align-items:center;
  box-shadow:var(--shadow-sm);
  transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.order-list-row.active{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.1), var(--shadow-md);
}

.order-list-row:hover{
  border-color:rgba(35,79,109,.18);
}

.order-list-status{
  justify-self:start;
}

.deadline-text{
  display:inline-flex;
  align-items:center;
  justify-self:start;
  border-radius:var(--radius-pill);
  padding:6px 10px;
  font-size:12px;
  font-weight:800;
  border:1px solid transparent;
}

.status-pill{
  display:inline-flex;
  align-items:center;
  border-radius:var(--radius-pill);
  padding:8px 14px;
  font-size:12px;
  font-weight:800;
  border:1px solid transparent;
}

.status-order{
  color:var(--danger);
  background:var(--danger-soft);
  border-color:rgba(173,90,82,.14);
}

.status-docs{
  color:var(--info);
  background:var(--info-soft);
  border-color:rgba(84,119,151,.14);
}

.status-partial-plan{
  color:#8a5a00;
}

.status-fully-planned{
  color:#1f7a44;
}

.status-overplanned{
  color:#b42318;
}

.status-production{
  color:var(--warn);
  background:var(--warn-soft);
  border-color:rgba(142,106,52,.16);
}

.status-install{
  color:#fff;
  background:var(--ok);
}

.status-settle{
  color:var(--warn);
  background:#f8dfad;
}

.status-review{
  color:#49566b;
  background:#e5eaf1;
}

.status-closed{
  color:#1d7b2e;
  background:#d8f2ba;
}

.status-supplier-settlement{
  color:#ffffff;
  background:#6f42c1;
}

.status-cancelled{
  color:#333;
  background:#e6e7eb;
}

button{
  border:1px solid transparent;
  border-radius:var(--radius-control);
  padding:10px 14px;
  font:inherit;
  font-family:var(--font-ui);
  font-weight:700;
  cursor:pointer;
  transition:transform .12s ease, opacity .12s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}
button:hover{transform:translateY(-1px)}
button:disabled{opacity:.55;cursor:not-allowed;transform:none}
button:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(35,79,109,.12);
}

.primary{
  background:linear-gradient(180deg, var(--brand) 0%, var(--brand-strong) 100%);
  color:#fff;
  border-color:transparent;
  box-shadow:0 8px 18px rgba(49,69,87,.12);
}

.ghost{
  background:linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  color:var(--text);
  border-color:var(--border);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}

.danger-button{
  background:var(--danger-soft);
  color:var(--danger);
  border:1px solid rgba(173,90,82,.18);
}

.field{
  display:grid;
  gap:7px;
  align-content:start;
}

.form-group-title{
  display:flex;
  align-items:center;
  min-height:28px;
  margin-top:4px;
  padding:0 2px;
  color:var(--brand);
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.field-guided{
  align-content:start;
  position:relative;
}

.field-label-line{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

.field-index-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:22px;
  padding:0 8px;
  border-radius:999px;
  background:#eaf3fb;
  color:var(--brand);
  font-size:11px;
  font-weight:800;
  letter-spacing:.02em;
}

.field-label-text{
  color:inherit;
  font:inherit;
}

.field-help{
  position:relative;
  display:inline-flex;
  align-items:center;
  z-index:100001;
}

.field-help-trigger{
  width:18px;
  height:18px;
  display:grid;
  place-items:center;
  border-radius:999px;
  border:1px solid rgba(92,119,144,.22);
  background:var(--surface-2);
  color:var(--brand);
  font-size:11px;
  font-weight:800;
  cursor:help;
  box-shadow:0 2px 6px rgba(20,34,47,.06);
}

.field-help-popover{
  position:fixed;
  left:0;
  top:0;
  z-index:100002;
  width:min(320px, calc(100vw - 24px));
  max-width:min(320px, calc(100vw - 24px));
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(188,201,214,.9);
  background:#fff;
  color:var(--text);
  box-shadow:0 18px 34px rgba(20,34,47,.18);
  display:none;
  gap:6px;
  font-size:12px;
  line-height:1.5;
}

.field-help.is-open .field-help-popover{
  display:grid;
}

.field-help-popover strong{
  color:var(--brand);
  font-size:11px;
  letter-spacing:.02em;
}

.field-helper{
  padding:8px 10px 8px 12px;
  border-radius:10px;
  border:1px dashed #d6e3ee;
  background:#f8fbfe;
  color:#6d8092;
  font-size:12px;
  line-height:1.45;
  border-left:3px solid #d7e4ef;
}

.field-helper.is-placeholder{
  color:transparent;
  user-select:none;
}

.field-empty .field-helper{
  background:#f8fbfe;
  color:#7b8d9e;
}

.field-filled .field-helper{
  background:#fbfdff;
  border-color:#d3dfeb;
  color:#667b8e;
}

.field-helper-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.inline-helper-button{
  white-space:nowrap;
}

body[data-field-descriptions-visible="false"] .field-helper.field-description{
  display:none !important;
}

body[data-field-descriptions-visible="true"] .field-help{
  display:none !important;
}

body[data-easy-mode="true"] .field-easy-muted{
  display:none !important;
}

body[data-easy-mode="true"] .label-action-btn{
  display:none !important;
}

.field-action-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
}

.field-action-row .ghost,
.twin-action-row .ghost,
.triple-action-row .ghost{
  min-height:38px;
  border-radius:var(--radius-control);
}

.triple-action-row{
  grid-template-columns:minmax(0,1fr) auto auto;
}

.twin-action-row{
  grid-template-columns:auto auto;
  justify-content:start;
}

.field-action-row button{
  white-space:nowrap;
}

.lookup-selected-hint{
  min-height:16px;
  padding:8px 10px;
  border-radius:var(--radius-card);
  border:1px solid #dde8f0;
  background:var(--surface-2);
  color:#586d80;
  font-size:12px;
  line-height:1.45;
}

.service-quote-import-panel{
  display:grid;
  gap:10px;
  margin-top:10px;
}

.service-quote-table-wrap{
  overflow:auto;
  border:1px solid #dde8f0;
  border-radius:var(--radius-card);
  background:#fff;
}

.service-quote-table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
  line-height:1.45;
}

.service-quote-table th,
.service-quote-table td{
  padding:8px 10px;
  border-bottom:1px solid #eef3f7;
  border-right:1px solid #eef3f7;
  text-align:left;
  vertical-align:top;
  white-space:nowrap;
}

.service-quote-table th{
  position:sticky;
  top:0;
  z-index:1;
  background:#f7fafc;
  color:#385066;
  font-weight:700;
}

.service-quote-table tr:last-child td{
  border-bottom:none;
}

.service-quote-table th:last-child,
.service-quote-table td:last-child{
  border-right:none;
}

.service-quote-detail-table{
  display:grid;
  gap:8px;
  margin-top:10px;
}

.service-quote-detail-meta{
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

.service-quote-versions-list{
  display:grid;
  gap:8px;
}

.service-quote-version-card{
  display:grid;
  gap:6px;
  padding:10px 12px;
  border:1px solid #dde8f0;
  border-radius:var(--radius-card);
  background:var(--surface-2);
}

.service-quote-version-card strong{
  color:var(--text);
  font-size:13px;
}

.service-quote-version-meta{
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

.service-quote-version-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  font-size:12px;
}

.service-quote-version-links a{
  color:var(--accent-strong);
  text-decoration:none;
}

.service-quote-version-links a:hover{
  text-decoration:underline;
}

.client-view-tabs{
  margin-top:10px;
}

.client-address-pair{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.client-address-card{
  display:grid;
  gap:12px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:var(--surface-2);
}

.client-address-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.client-address-head h4{
  margin:2px 0 0;
  font-size:16px;
}

.client-modal-map-card,
.client-drive-card{
  margin-top:4px;
}

.client-map-actions{
  flex-wrap:wrap;
}

.client-map-frame-wrap{
  min-height:280px;
}

.client-map-frame-wrap .dispatch-map-canvas,
.client-map-frame-wrap .dispatch-map-loading{
  min-height:280px;
}

.client-map-frame-large{
  min-height:280px;
}

.client-map-placeholder{
  display:grid;
  gap:10px;
  justify-items:center;
  text-align:center;
}

.client-map-placeholder p{
  max-width:440px;
  margin:0;
  color:#5f7388;
}

.client-context-grid-modal{
  margin-top:12px;
}

.hubspot-diff-row{
  display:grid;
  gap:8px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface-2);
}

.hubspot-diff-values{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.hubspot-diff-values span{
  display:block;
  margin-bottom:4px;
  color:var(--muted);
  font-size:11px;
  font-weight:700;
  letter-spacing:.02em;
}

.hubspot-diff-values b{
  display:block;
  font-size:13px;
  line-height:1.45;
}

.client-lookup-results{
  max-height:180px;
  padding:6px;
}

.client-lookup-result{
  width:100%;
  text-align:left;
  border:1px solid transparent;
  border-radius:10px;
  background:#fff;
  padding:8px 10px;
  display:grid;
  gap:2px;
}

.client-lookup-result:hover{
  background:#eef4f8;
}

.client-lookup-result.active{
  border-color:rgba(35,79,109,.28);
  background:#f2f7fb;
}

@media (max-width: 900px){
  .client-address-pair{
    grid-template-columns:1fr;
  }

  .hubspot-diff-values{
    grid-template-columns:1fr;
  }
}

.client-lookup-result strong{
  font-size:13px;
}

.client-lookup-result span{
  font-size:11px;
  color:var(--muted);
}

.client-list-row{
  grid-template-columns:minmax(180px, 1.2fr) minmax(140px, 1fr) minmax(160px, 1fr) minmax(200px, 1.2fr) auto auto;
}

.client-order-row{
  grid-template-columns:minmax(140px, 180px) minmax(120px, 150px) minmax(120px, 160px) minmax(120px, 160px) auto auto;
}

.field span{
  font-size:13px;
  font-weight:700;
  color:var(--muted);
}

input, select, textarea{
  width:100%;
  border:1px solid var(--border);
  border-radius:var(--radius-control);
  padding:10px 12px;
  font:inherit;
  font-family:var(--font-ui);
  background:linear-gradient(180deg, var(--surface) 0%, #fcfeff 100%);
  color:var(--text);
  box-shadow:0 1px 2px rgba(16,30,43,.04), inset 0 0 0 1px rgba(255,255,255,.45);
  transition:border-color .16s ease, box-shadow .16s ease, background .16s ease, color .16s ease;
}

input[readonly],
textarea[readonly]{
  cursor:default;
  border-color:var(--border-strong);
  background:linear-gradient(180deg, var(--surface) 0%, #fbfdff 100%);
  box-shadow:0 1px 2px rgba(16,30,43,.03), inset 0 0 0 1px rgba(255,255,255,.52);
}

input:not(:disabled),
textarea:not(:disabled){
  cursor:text;
}

select:not(:disabled){
  cursor:pointer;
}

input::placeholder,
textarea::placeholder{
  color:#94a3b0;
  opacity:1;
  font-weight:400;
  font-style:normal;
}

input:placeholder-shown,
textarea:placeholder-shown{
  background:#fff;
  border-color:#cfdae5;
}

.field-empty input,
.field-empty select,
.field-empty textarea{
  background:var(--surface);
  border-color:var(--border);
  box-shadow:0 1px 0 rgba(35,79,109,.03), 0 2px 10px rgba(35,79,109,.03);
  color:var(--text);
}

.field-filled input,
.field-filled select,
.field-filled textarea{
  background:var(--surface);
  border-color:var(--border-strong);
  box-shadow:0 0 0 1px rgba(70,92,114,.05), 0 2px 10px rgba(70,92,114,.04);
  color:var(--text);
}

input:enabled,
select:enabled,
textarea:enabled{
  background:#ffffff;
}

input:hover,
select:hover,
textarea:hover{
  background:#fff;
  border-color:var(--border-strong);
  box-shadow:0 6px 16px rgba(35,79,109,.08);
}

input:focus,
select:focus,
textarea:focus,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline:none;
  background:#fff;
  border-color:var(--brand);
  box-shadow:0 0 0 3px rgba(35,79,109,.12);
}

textarea{
  resize:vertical;
}

.order-key-field{
  gap:8px;
}

.order-key-field span{
  color:var(--brand);
  font-size:12px;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.order-key-field input{
  min-height:54px;
  padding:12px 14px;
  font-size:24px;
  font-weight:800;
  line-height:1.1;
  letter-spacing:.01em;
  color:var(--brand-strong);
}

.order-key-field input[readonly]{
  background:linear-gradient(180deg, var(--surface) 0%, #fbfdff 100%);
}

.grid{
  display:grid;
  gap:14px;
  align-items:start;
}

.task-feedback-section{
  grid-column:1 / -1;
  width:100%;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, var(--surface-2) 100%);
  padding:18px 20px;
  box-shadow:var(--shadow-sm);
}

.task-feedback-layout{
  display:grid;
  gap:16px;
}

.task-modal-shell{
  width:min(1400px, calc(100vw - 24px));
}

.task-modal-shell .modal-body{
  max-height:90vh;
  padding:22px;
  padding-bottom:92px;
}

.task-feedback-section .section-head{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:16px;
  align-items:start;
}

.task-feedback-grid{
  align-items:start;
  gap:16px;
}

.task-feedback-story,
.task-feedback-actions-panel{
  display:grid;
  gap:8px;
}

.task-feedback-grid > .task-feedback-story,
.task-feedback-grid > .task-feedback-actions-panel{
  grid-column:1 / -1;
}

.task-feedback-context-field,
.task-feedback-review-field{
  grid-column:1;
}

.task-feedback-links-field,
.task-feedback-screenshot-field,
.task-feedback-response-field{
  grid-column:2;
}

.task-feedback-review-field textarea,
.task-feedback-response-field textarea{
  min-height:168px;
}

.task-feedback-screenshot-field .feedback-screenshot-preview{
  min-height:260px;
}

.task-feedback-links-field .task-feedback-links{
  align-content:start;
  min-height:120px;
}

.task-feedback-links-field .task-feedback-links .ghost,
.task-feedback-links-field .task-feedback-links .button-link{
  justify-self:start;
}

.task-feedback-section .admin-note-block{
  min-height:72px;
}

.task-feedback-story .admin-note-block,
.task-feedback-context-field .admin-note-block{
  min-height:132px;
}

.task-feedback-screenshot-field .link-button{
  margin-bottom:6px;
}

.task-feedback-section .field-helper{
  line-height:1.45;
}

@media (max-width: 1100px){
  .task-modal-shell{
    width:min(1100px, calc(100vw - 16px));
  }

  .task-feedback-context-field,
  .task-feedback-links-field,
  .task-feedback-screenshot-field,
  .task-feedback-review-field,
  .task-feedback-response-field{
    grid-column:1 / -1;
  }
}

.order-side-grid .card > .section-head,
.client-context-grid .card > .section-head,
.dispatch-day-layout .card > .section-head,
.dispatch-map-layout .card > .section-head{
  margin-bottom:12px;
  padding-bottom:10px;
  border-bottom:1px solid rgba(188,201,214,.58);
}

.task-feedback-toolbar{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}

.task-feedback-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.task-feedback-links .ghost{
  min-height:36px;
}

.feedback-screenshot-preview{
  min-height:160px;
  border:1px dashed var(--border);
  border-radius:var(--radius-card);
  background:var(--surface);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  padding:8px;
}

.feedback-screenshot-preview img{
  display:block;
  max-width:100%;
  max-height:320px;
  border-radius:8px;
}

.task-feedback-escalation{
  display:grid;
  gap:12px;
  padding-top:14px;
  border-top:1px solid rgba(188,201,214,.58);
}

.task-feedback-escalation summary{
  cursor:pointer;
  font-weight:700;
  color:var(--text);
  list-style:none;
}

.task-feedback-escalation summary::-webkit-details-marker{
  display:none;
}

.task-feedback-escalation-helper{
  margin-top:-4px;
}

.feedback-submit-slot{
  margin-top:-4px;
}

.feedback-submit-row{
  justify-content:flex-start;
}

.feedback-modal-lead{
  margin:4px 0 0;
  max-width:62ch;
  line-height:1.5;
}

.feedback-queue-list{
  display:grid;
  gap:12px;
}

.feedback-queue-item{
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:var(--surface);
  padding:12px;
  display:grid;
  gap:8px;
  box-shadow:var(--shadow-sm);
}

.feedback-queue-item-unseen{
  border-color:#cfa51d;
  box-shadow:0 0 0 2px rgba(244,195,0,.16);
}

.feedback-queue-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.feedback-queue-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color:var(--muted);
  font-size:12px;
}

.feedback-queue-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}

.feedback-queue-highlight{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:2px 8px;
  background:#fff4cc;
  color:#8a6500;
  font-weight:700;
}

.incidents-feedback-panel{
  margin:8px 0 14px;
  border:1px solid #d8e3ed;
  border-radius:18px;
  background:linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
  padding:16px 18px;
  display:grid;
  gap:12px;
}

.incidents-feedback-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.incidents-feedback-panel-head h3{
  margin:0;
  font-size:18px;
}

.incidents-feedback-panel-copy{
  display:grid;
  gap:4px;
}

.incidents-feedback-panel-copy p{
  margin:0;
  color:var(--muted);
  font-size:13px;
}

.incidents-feedback-list{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:10px;
}

.incidents-feedback-card{
  border:1px solid #d7e3ed;
  border-radius:14px;
  background:#fff;
  padding:12px;
  display:grid;
  gap:8px;
  text-align:left;
  box-shadow:0 8px 24px rgba(16,30,43,.05);
}

.incidents-feedback-card:hover{
  border-color:#a9bfd0;
  box-shadow:0 10px 28px rgba(16,30,43,.09);
}

.incidents-feedback-card-top,
.incidents-feedback-card-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
}

.incidents-feedback-card strong{
  font-size:14px;
  line-height:1.3;
}

.incidents-feedback-card-meta{
  font-size:12px;
  color:var(--muted);
}

.incidents-feedback-card-note{
  font-size:13px;
  color:#4c6074;
  line-height:1.45;
}

.incidents-feedback-card-context{
  display:grid;
  gap:2px;
  font-size:12px;
  color:var(--muted);
}

.link-button{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-bottom:10px;
}

.grid.two{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.wide{
  grid-column:1 / -1;
}

.check{
  display:flex;
  gap:10px;
  align-items:center;
  min-height:48px;
}

.check input{
  width:18px;
  height:18px;
}

.order-list{
  display:grid;
  gap:10px;
  max-height:calc(100vh - 320px);
  overflow:auto;
  padding-right:4px;
}

.order-row{
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--surface);
  padding:14px;
  display:grid;
  gap:4px;
  cursor:pointer;
}

.order-row.active{
  border-color:#92abc0;
  background:#f5f9fc;
}

.order-row strong{
  font-size:16px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:var(--radius-pill);
  background:var(--surface-3);
  color:var(--brand);
  font-weight:700;
  font-size:12px;
  padding:6px 10px;
  border:1px solid rgba(35,79,109,.08);
}

.badge-with-dot{
  display:inline-flex;
  align-items:center;
}

.badge-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#2f9e44;
  box-shadow:0 0 0 2px rgba(47,158,68,.16);
  flex:0 0 auto;
}

.badge.is-ready{
  background:var(--ok-soft);
  color:var(--ok);
  border:1px solid rgba(47,115,81,.16);
}

.badge.is-warning{
  background:var(--warn-soft);
  color:var(--warn);
  border:1px solid rgba(154,106,31,.16);
}

.badge.is-blocked{
  background:var(--danger-soft);
  color:var(--danger);
  border:1px solid rgba(173,90,82,.16);
}

.summary-filter-chip{
  border:1px solid transparent;
  cursor:pointer;
}

.summary-filter-chip.active{
  background:var(--brand);
  color:#fff;
  border-color:var(--brand);
}

.group-card{
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, rgba(255,255,255,.96) 0%, var(--surface-2) 100%);
  overflow:hidden;
  box-shadow:var(--shadow-sm);
}

.group-head{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  background:rgba(255,255,255,.54);
}

.group-list{
  display:grid;
}

.item-row{
  padding:10px 12px;
  display:grid;
  gap:6px;
  border-top:1px solid rgba(212,221,231,.8);
  transition:background .16s ease;
}

.item-row:first-child{border-top:0}

.item-row:hover{
  background:rgba(255,255,255,.68);
}

.item-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}

.item-meta{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:11px;
}

.item-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.order-note-card{
  gap:10px;
}

.order-note-context{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color:var(--muted);
  font-size:12px;
  padding:4px 0 2px;
}

.order-note-summary{
  font-size:16px;
  font-weight:700;
  line-height:1.55;
  color:var(--text);
}

.order-note-block{
  display:grid;
  gap:4px;
  padding:8px 10px;
  border:1px solid #e6edf3;
  border-radius:12px;
  background:#f8fbfd;
  line-height:1.5;
}

.order-note-block-label{
  font-size:11px;
  font-weight:800;
  color:var(--brand);
  text-transform:uppercase;
  letter-spacing:.03em;
}

.order-note-mail-hint{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:8px;
  padding:10px 12px;
  border-radius:12px;
  background:#f3f7fb;
  color:#4f657a;
  font-size:12px;
  border:1px solid #dce7f2;
}

.order-note-mail-hint code{
  padding:2px 6px;
  border-radius:8px;
  background:#fff;
  border:1px solid #d8e3ed;
  color:var(--text);
}

.context-subsection{
  display:grid;
  gap:6px;
}

.context-subsection + .context-subsection{
  margin-top:10px;
}

.context-subsection-head{
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--brand-2);
  padding:2px 2px 4px;
}

.process-form-grid{
  display:grid;
  gap:16px;
}

.process-section{
  display:grid;
  gap:14px;
  padding:16px;
  border:1px solid #dce6ef;
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,251,253,.96) 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82), 0 1px 0 rgba(70,92,114,.03);
}

.field-easy-hidden,
.field-conditional-hidden,
.section-empty-hidden{
  display:none !important;
}

.contract-workbench{
  display:grid;
  gap:14px;
}

.contract-workbench-main{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:14px;
  align-items:start;
}

.contract-workbench-card{
  display:grid;
  gap:12px;
  padding:12px;
  border:1px solid #dce6ef;
  border-radius:14px;
  background:#fff;
  min-width:0;
}

.contract-workbench-card-accent{
  background:linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.contract-workbench-card .form-group-title{
  margin:0;
}

.contract-workbench-grid{
  align-items:start;
}

.finance-workbench{
  display:grid;
  gap:12px;
}

.finance-workbench-card{
  display:grid;
  gap:10px;
  padding:12px;
  border:1px solid #dce6ef;
  border-radius:14px;
  background:#fff;
}

.finance-workbench-meta,
.finance-settlement-grid{
  gap:10px;
}

.finance-sheet{
  display:grid;
  gap:0;
  border:1px solid rgba(210,220,230,.95);
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}

.finance-sheet-section-title{
  padding:12px 14px;
  border-top:1px solid rgba(223,230,237,.95);
  border-bottom:1px solid rgba(223,230,237,.95);
  background:#f7fafc;
  color:var(--brand);
  font-size:12px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.finance-sheet-row{
  display:grid;
  grid-template-columns:minmax(180px, 1.5fr) minmax(90px, .72fr) minmax(110px, .82fr) minmax(120px, .9fr);
  align-items:stretch;
}

.finance-sheet-row + .finance-sheet-row{
  border-top:1px solid rgba(223,230,237,.95);
}

.finance-sheet-row--head{
  background:#f7fafc;
}

.finance-sheet-row--columns{
  background:#fbfdff;
}

.finance-sheet-row--total{
  background:#fcfdfd;
}

.finance-sheet-spacer,
.finance-sheet-label,
.finance-sheet-cell,
.finance-sheet-value,
.finance-sheet-column-title{
  min-width:0;
  padding:10px 12px;
}

.finance-sheet-spacer{
  border-right:1px solid rgba(223,230,237,.95);
}

.finance-sheet-label{
  display:flex;
  align-items:center;
  font-size:14px;
  font-weight:700;
  color:var(--text);
  border-right:1px solid rgba(223,230,237,.95);
}

.finance-sheet-cell,
.finance-sheet-value,
.finance-sheet-column-title{
  border-right:1px solid rgba(223,230,237,.95);
}

.finance-sheet-row > :last-child{
  border-right:0;
}

.finance-sheet-cell{
  display:grid;
  gap:6px;
  align-content:center;
}

.finance-sheet-cell > span,
.finance-sheet-column-title{
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted-2);
}

.finance-sheet-column-title{
  display:flex;
  align-items:center;
}

.finance-sheet-cell input,
.finance-sheet-cell select{
  width:100%;
  min-width:0;
  min-height:38px;
  padding:8px 10px;
}

.finance-sheet-cell--head{
  align-content:start;
}

.finance-sheet-cell--muted,
.finance-sheet-value--ghost{
  display:flex;
  align-items:center;
  font-size:12px;
  color:var(--muted);
  line-height:1.45;
}

.finance-sheet-value{
  display:flex;
  align-items:center;
  font-size:14px;
  font-weight:700;
  color:var(--text);
}

.finance-sheet-value--stacked{
  display:grid;
  gap:4px;
  align-content:center;
}

.finance-sheet-mini-label{
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted-2);
}

.finance-sheet-value--strong{
  color:var(--brand);
}

.contract-workbench-health-grid{
  gap:10px;
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.contract-workbench-health-grid > .field:last-child{
  grid-column:1 / -1;
}

.contract-workbench-sources .grid{
  gap:10px;
}

.contract-workbench-sources .field-helper{
  margin-top:4px;
}

.grid.three{
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.process-check-stack{
  display:grid;
  gap:12px;
  margin-top:4px;
}

.process-check-row{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
  align-items:stretch;
}

#checkOrderContractReadinessBtn{
  grid-column:1 / -1;
  min-height:52px;
}

.process-check-row > .primary,
.process-check-row > .ghost{
  min-height:40px;
  padding-inline:16px;
  width:100%;
  justify-content:center;
  text-align:center;
  white-space:normal;
  line-height:1.25;
  text-wrap:balance;
}

.contract-process-stack{
  gap:14px;
}

.contract-process-stack .process-check-row{
  padding:12px;
  border:1px solid #dce6ef;
  border-radius:14px;
  background:linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.contract-workbench-card .grid.two.contract-workbench-grid{
  align-items:start;
}

.contract-workbench-card .grid.two.contract-workbench-grid > .field{
  min-width:0;
}

.contract-workbench-card .grid.two.contract-workbench-grid > .field.wide{
  grid-column:1 / -1;
}

.contract-workbench-sources{
  gap:14px;
}

.contract-workbench-summary{
  padding-top:2px;
}

.contract-readiness-panel{
  display:grid;
  gap:10px;
  min-width:0;
}

.contract-readiness-panel .lookup-selected-hint,
.contract-readiness-panel .contract-readiness-inline-copy{
  border-radius:var(--radius-card);
}

.incident-readiness-panel{
  margin-top:4px;
}

.contract-readiness-progress{
  display:grid;
  gap:2px;
  padding:10px 12px;
  border-radius:var(--radius-card);
  border:1px solid #dce6ef;
  background:#fff;
}

.contract-readiness-progress strong{
  font-size:13px;
  line-height:1.35;
}

.contract-readiness-progress span{
  font-size:12px;
  color:var(--muted);
}

.contract-readiness-progress.is-ready{
  border-color:#cfe4d5;
  background:#f4fbf6;
}

.contract-readiness-progress.is-ready strong{
  color:#2f7d47;
}

.contract-readiness-progress.is-warning{
  border-color:#efd7a6;
  background:#fffaf0;
}

.contract-readiness-progress.is-warning strong{
  color:#9a6d12;
}

.contract-readiness-progress.is-blocked{
  border-color:#edc6c0;
  background:#fff6f4;
}

.contract-readiness-progress.is-blocked strong{
  color:#b64a38;
}

.contract-readiness-decision-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
}

.contract-readiness-decision{
  display:grid;
  gap:4px;
  padding:10px 12px;
  border-radius:var(--radius-card);
  border:1px solid #dce6ef;
  background:#fff;
}

.contract-readiness-decision span{
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted);
}

.contract-readiness-decision strong{
  font-size:14px;
  line-height:1.3;
}

.contract-readiness-decision small{
  font-size:12px;
  line-height:1.45;
  color:#5f7488;
}

.contract-readiness-decision.is-ready{
  border-color:#c9e3d1;
  background:#fbfefc;
}

.contract-readiness-decision.is-ready strong{
  color:#2f7d47;
}

.contract-readiness-decision.is-missing{
  border-color:#ead7b0;
  background:#fffdf7;
}

.contract-readiness-decision.is-missing strong{
  color:#9a6d12;
}

.contract-readiness-decision.is-soft{
  border-color:#d6e2ec;
  background:#f9fbfd;
}

.contract-readiness-inline-copy{
  padding:9px 12px;
  border-radius:var(--radius-card);
  border:1px dashed #d6e3ee;
  background:#f8fbfe;
  color:#6a7f92;
  font-size:12px;
  line-height:1.5;
}

.contract-readiness-inline-copy.is-ready{
  border-color:#cfe4d5;
  background:#f4fbf6;
  color:#2f7d47;
}

.contract-operator-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
}

.contract-operator-card{
  display:grid;
  gap:8px;
  padding:12px;
  border:1px solid #dce6ef;
  border-radius:var(--radius-card);
  background:#fff;
  align-content:start;
  min-width:0;
}

.contract-operator-card span{
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted);
}

.contract-operator-card strong{
  font-size:15px;
  line-height:1.35;
  overflow-wrap:anywhere;
}

.contract-operator-card p{
  margin:0;
  font-size:12px;
  line-height:1.55;
  color:#5f7488;
  white-space:pre-line;
}

.contract-operator-card-next.is-ready{
  border-color:#cfe4d5;
  background:#f4fbf6;
}

.contract-operator-card-next.is-ready strong{
  color:#2f7d47;
}

.contract-operator-card-next.is-warning{
  border-color:#efd7a6;
  background:#fffaf0;
}

.contract-operator-card-next.is-warning strong{
  color:#9a6d12;
}

.contract-operator-card-next.is-blocked{
  border-color:#edc6c0;
  background:#fff6f4;
}

.contract-operator-card-next.is-blocked strong{
  color:#b64a38;
}

.contract-operator-list{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:6px;
  font-size:12px;
  color:#4b5f73;
}

.contract-operator-summary{
  padding:10px 12px;
  border-radius:12px;
  background:#f8fbfe;
  border:1px solid #dce6ef;
}

.contract-readiness-status{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border:1px solid #dce6ef;
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.contract-readiness-status .contract-readiness-copy{
  display:grid;
  gap:2px;
}

.contract-readiness-status strong{
  font-size:14px;
  line-height:1.3;
}

.contract-readiness-status span{
  font-size:12px;
  color:var(--muted);
}

.contract-readiness-lamp{
  width:12px;
  height:12px;
  border-radius:999px;
  background:#aab8c5;
  box-shadow:0 0 0 4px rgba(170,184,197,.18);
  flex:0 0 12px;
}

.contract-readiness-status.is-ready{
  border-color:#b9dec0;
  background:#f3fbf5;
}

.contract-readiness-status.is-ready .contract-readiness-lamp{
  background:#2f9d52;
  box-shadow:0 0 0 4px rgba(47,157,82,.16);
}

.contract-readiness-status.is-warning{
  border-color:#efd7a6;
  background:#fffaf0;
}

.contract-readiness-status.is-warning .contract-readiness-lamp{
  background:#d39a1d;
  box-shadow:0 0 0 4px rgba(211,154,29,.16);
}

.contract-readiness-status.is-blocked{
  border-color:#edc6c0;
  background:#fff6f4;
}

.contract-readiness-status.is-blocked .contract-readiness-lamp{
  background:#cf5a46;
  box-shadow:0 0 0 4px rgba(207,90,70,.16);
}

.contract-draft-summary{
  display:grid;
  gap:12px;
}

.contract-draft-summary-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  align-items:stretch;
}

.contract-draft-card{
  border:1px solid #dce6ef;
  border-radius:var(--radius-card);
  background:#ffffff;
  padding:10px 12px;
  display:grid;
  gap:4px;
  align-content:start;
  min-width:0;
}

.contract-draft-card span{
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted);
}

.contract-draft-card strong{
  font-size:14px;
  line-height:1.35;
  overflow-wrap:anywhere;
}

.contract-draft-card small{
  font-size:12px;
  line-height:1.45;
  color:#5f7488;
  overflow-wrap:anywhere;
}

.contract-draft-card.contract-draft-card-accent.is-ready{
  border-color:#cfe4d5;
  background:#f4fbf6;
}

.contract-draft-card.contract-draft-card-accent.is-ready strong{
  color:#2f7d47;
}

.contract-draft-card.contract-draft-card-accent.is-warning{
  border-color:#efd7a6;
  background:#fffaf0;
}

.contract-draft-card.contract-draft-card-accent.is-warning strong{
  color:#9a6d12;
}

.contract-draft-card.contract-draft-card-accent.is-blocked{
  border-color:#edc6c0;
  background:#fff6f4;
}

.contract-draft-card.contract-draft-card-accent.is-blocked strong{
  color:#b64a38;
}

.contract-draft-card.contract-draft-card-annex{
  border-color:#d9e5f6;
  background:#f7fbff;
}

.contract-draft-card.contract-draft-card-annex strong{
  color:#204d86;
}

.contract-readiness-groups{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  align-items:stretch;
}

.contract-readiness-group{
  border:1px solid #dce6ef;
  border-radius:14px;
  background:#fff;
  padding:10px 12px;
  display:grid;
  gap:6px;
  align-content:start;
  min-width:0;
}

.contract-readiness-group-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.contract-readiness-group-header strong{
  font-size:13px;
  overflow-wrap:anywhere;
}

.contract-readiness-group-meta{
  font-size:12px;
  color:var(--muted);
  text-align:right;
  overflow-wrap:anywhere;
}

.contract-readiness-group-list{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:4px;
  color:#5c7185;
  font-size:12px;
  overflow-wrap:anywhere;
}

.contract-readiness-group.is-ready{
  border-color:#cfe4d5;
  background:#fbfefb;
}

.contract-readiness-group.is-ready .contract-readiness-group-meta{
  color:#2f7d47;
  font-weight:700;
}

.contract-readiness-group.is-missing{
  border-color:#ead7b0;
  background:#fffdf7;
}

.contract-readiness-group.is-missing .contract-readiness-group-meta{
  color:#9a6d12;
}

.contract-annex-summary{
  display:grid;
  gap:12px;
}

.contract-annex-summary-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.contract-annex-summary-copy{
  display:grid;
  gap:4px;
  min-width:0;
}

.contract-annex-summary-copy strong{
  font-size:14px;
  color:#204d86;
}

.contract-annex-summary-copy span{
  font-size:12px;
  color:#5f7488;
  line-height:1.45;
}

.contract-annex-summary-list{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:6px;
  color:#4b5f73;
  font-size:12px;
}

.contract-missing-link{
  appearance:none;
  border:none;
  background:transparent;
  padding:0;
  margin:0;
  color:#9a6d12;
  font:inherit;
  font-weight:700;
  text-align:left;
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:2px;
  overflow-wrap:anywhere;
}

.contract-missing-link.in-list{
  font-weight:600;
}

.contract-missing-link:hover{
  color:#7d5608;
}

.field.contract-missing-field{
  border-color:#f3d28d;
  background:#fffaf0;
  box-shadow:0 0 0 2px rgba(243, 210, 141, .35);
}

.field.contract-missing-field > span:first-child{
  color:#9a6d12;
  font-weight:700;
}

.field.contract-missing-field input,
.field.contract-missing-field textarea,
.field.contract-missing-field select{
  border-color:#e3b95e;
  background:#fffef9;
}

.field.contract-missing-field-pulse{
  animation:contractMissingPulse 1.6s ease-out 1;
}

.field.contract-changed-field{
  border-color:#9fc3f4;
  background:#f5f9ff;
  box-shadow:0 0 0 2px rgba(120, 166, 229, .22);
}

.field.contract-changed-field > span:first-child{
  color:#265a9b;
  font-weight:700;
}

.field.contract-changed-field input,
.field.contract-changed-field textarea,
.field.contract-changed-field select{
  border-color:#b7d0f5;
  background:#ffffff;
}

@keyframes contractMissingPulse{
  0%{ box-shadow:0 0 0 0 rgba(243, 210, 141, .65); }
  100%{ box-shadow:0 0 0 14px rgba(243, 210, 141, 0); }
}

.contract-draft-helper{
  margin-top:2px;
}

.contract-draft-details{
  display:grid;
  gap:10px;
}

.contract-draft-details summary{
  cursor:pointer;
  color:#4c647a;
  font-weight:700;
}

.contract-draft-field textarea{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:12px;
  line-height:1.5;
  background:#f8fbfe;
}

.contract-draft-details{
  border:1px dashed #d5e1eb;
  border-radius:14px;
  padding:10px 12px;
  background:#f9fbfd;
}

.contract-draft-details summary{
  cursor:pointer;
  font-weight:700;
  color:var(--brand);
}

.contract-draft-details[open]{
  display:grid;
  gap:12px;
}

.contract-draft-field{
  margin-top:8px;
}

.task-feedback-toolbar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.readiness-grid{
  align-items:start;
}

.readiness-chip-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:10px;
}

.readiness-chip{
  display:grid;
  gap:4px;
  padding:10px 12px;
  border-radius:var(--radius-card);
  border:1px solid #dce6ef;
  background:#fff;
}

.readiness-chip strong{
  font-size:13px;
  line-height:1.3;
}

.readiness-chip small{
  font-size:12px;
  line-height:1.45;
  color:#5f7488;
}

.readiness-chip.is-ready{
  border-color:#c9e3d1;
  background:#fbfefc;
}

.readiness-chip.is-ready strong{
  color:#2f7d47;
}

.readiness-chip.is-missing{
  border-color:#ead7b0;
  background:#fffdf7;
}

.readiness-chip.is-missing strong{
  color:#9a6d12;
}

.readiness-chip.is-blocked{
  border-color:#edc6c0;
  background:#fff6f4;
}

.readiness-chip.is-blocked strong{
  color:#b64a38;
}

.order-supplier-runtime-placeholder{
  margin-top:10px;
}

.order-supplier-runtime-placeholder .summary-row{
  margin-top:4px;
}

.incident-workflow-rail{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(120px, 1fr));
  gap:8px;
  margin:12px 0 14px;
}

.incident-workflow-step{
  border:1px solid #d7e3ed;
  border-radius:14px;
  background:#f8fbff;
  padding:10px 12px;
  display:grid;
  gap:4px;
}

.incident-workflow-step span{
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#6e8396;
}

.incident-workflow-step strong{
  font-size:13px;
  line-height:1.25;
  color:var(--text);
}

.incident-workflow-step small{
  font-size:12px;
  color:var(--muted);
}

.incident-workflow-step.is-done{
  background:#f2fbf4;
  border-color:#c7dfcf;
}

.incident-workflow-step.is-done span,
.incident-workflow-step.is-done strong{
  color:#2f7d47;
}

.incident-workflow-step.is-active{
  background:#fffaf0;
  border-color:#ead7b0;
  box-shadow:0 0 0 1px rgba(234,215,176,.4), 0 8px 18px rgba(154,109,18,.10);
}

.incident-workflow-step.is-active span,
.incident-workflow-step.is-active strong{
  color:#9a6d12;
}

.incident-workflow-step.is-future{
  background:#f8fbff;
}

.incident-workflow-guidance{
  display:grid;
  gap:6px;
  margin:-2px 0 14px;
  padding:12px 14px;
  border:1px solid #d7e3ed;
  border-radius:14px;
  background:#f8fbff;
}

.incident-workflow-guidance strong{
  font-size:13px;
  color:var(--text);
}

.incident-workflow-guidance span{
  font-size:13px;
  line-height:1.5;
  color:var(--muted);
}

.incident-workflow-guidance.is-info{
  border-color:#d7e3ed;
  background:#f8fbff;
}

.incident-workflow-guidance.is-warning{
  border-color:#ead7b0;
  background:#fffaf0;
}

.incident-workflow-guidance.is-warning strong{
  color:#9a6d12;
}

.incident-workflow-guidance.is-success{
  border-color:#c7dfcf;
  background:#f2fbf4;
}

.incident-workflow-guidance.is-success strong{
  color:#2f7d47;
}

.incident-workflow-guidance.is-muted{
  border-color:#dfe7ee;
  background:#f6f8fb;
}

.dispatch-block-layout{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(320px,.85fr);
  gap:12px;
  padding:12px;
}

.dispatch-zone-card{
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface);
  padding:10px;
  display:grid;
  gap:10px;
}

.dispatch-zone-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
}

.dispatch-timeline-zone,
.dispatch-flex-zone{
  border:1px dashed #c4d3df;
  border-radius:12px;
  background:#f8fbfd;
  padding:10px;
  transition:border-color .15s ease, background .15s ease;
}

.dispatch-timeline-zone.drag-over,
.dispatch-flex-zone.drag-over{
  border-color:#5c84a8;
  background:#eef5fb;
}

.dispatch-timeline-hours{
  display:grid;
  grid-template-columns:repeat(var(--dispatch-hours, 14), minmax(72px,1fr));
  gap:0;
  margin-bottom:8px;
}

.dispatch-hour-label{
  font-size:11px;
  color:#4d6981;
  text-align:left;
  font-weight:700;
  padding:4px 0;
}

.dispatch-timeline-grid{
  position:relative;
  display:grid;
  grid-template-columns:repeat(var(--dispatch-hours, 14), minmax(72px,1fr));
  min-height:188px;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  background:
    linear-gradient(to right, rgba(170,190,206,.35) 1px, transparent 1px);
  background-size:calc(100% / var(--dispatch-hours, 14)) 100%;
}

.dispatch-hour-cell{
  min-height:188px;
  border-right:1px solid rgba(170,190,206,.25);
}

.dispatch-empty-lane{
  position:absolute;
  inset:8px;
}

.dispatch-timeline-item{
  position:absolute;
  top:16px;
  min-height:18px;
  border:1px solid #9eb8cd;
  border-radius:12px;
  background:#f1f7fb;
  padding:8px 10px;
  display:grid;
  gap:4px;
  box-shadow:0 6px 16px rgba(35,67,93,.07);
  cursor:grab;
  overflow:hidden;
}

.dispatch-timeline-item.is-open{
  background:#f4f9fc;
}

.dispatch-timeline-item.is-done{
  background:#edf8ef;
  border-color:#aed4b5;
}

.dispatch-timeline-item.is-partial-plan{
  border-color:#e2b65d;
  background:linear-gradient(180deg, #fff8e9 0%, #fffdf7 100%);
}

.dispatch-timeline-item.is-overplanned{
  border-color:#f1a5a5;
  background:linear-gradient(180deg, #fff0ee 0%, #fffaf9 100%);
}

.item-row[draggable="true"]{
  cursor:grab;
}

.planner-note-log{
  white-space:pre-line;
  line-height:1.5;
}

.dispatch-timeline-item strong{
  font-size:13px;
}

.dispatch-timeline-meta{
  font-size:11px;
  color:var(--muted);
}

.dispatch-timeline-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}

.dispatch-timeline-actions button{
  grid-column:1 / -1;
}

.dispatch-resize-handle{
  position:absolute;
  top:10px;
  bottom:10px;
  width:10px;
  border:0;
  padding:0;
  border-radius:999px;
  background:rgba(35,79,109,.14);
  cursor:ew-resize;
}

.dispatch-resize-handle:hover{
  background:rgba(35,79,109,.28);
}

.dispatch-resize-handle-start{
  left:4px;
}

.dispatch-resize-handle-end{
  right:4px;
}

.dispatch-timeline-grid[data-dispatch-orientation="vertical"]{
  display:block;
  min-height:calc(var(--dispatch-slots, 28) * 32px);
  overflow:visible;
  background:
    linear-gradient(to bottom, rgba(170,190,206,.35) 1px, transparent 1px);
  background-size:100% calc(100% / var(--dispatch-slots, 28));
}

.dispatch-timeline-grid[data-dispatch-orientation="vertical"] .dispatch-resize-handle-start{
  top:4px;
  left:10px;
  right:10px;
  width:auto;
  height:10px;
  bottom:auto;
  cursor:ns-resize;
}

.dispatch-timeline-grid[data-dispatch-orientation="vertical"] .dispatch-resize-handle-end{
  left:10px;
  right:10px;
  width:auto;
  height:10px;
  top:auto;
  bottom:4px;
  cursor:ns-resize;
}

.dispatch-timeline-item-vertical{
  left:4px;
  right:4px;
  top:auto;
  min-height:18px;
  padding:8px 42px 22px 10px;
}

.dispatch-timeline-item.is-time-locked{
  box-shadow:0 0 0 2px rgba(35,79,109,.16), var(--shadow);
}

.dispatch-timeline-item.is-customer-locked{
  box-shadow:0 0 0 2px rgba(185,28,28,.18), var(--shadow);
}

.dispatch-item-lock-toggle{
  position:absolute;
  top:8px;
  right:10px;
  width:28px;
  height:28px;
  border-radius:10px;
  border:1px solid rgba(148, 163, 184, .35);
  background:rgba(255,255,255,.98);
  display:grid;
  place-items:center;
  line-height:1;
  padding:0;
  cursor:pointer;
  z-index:4;
  box-shadow:0 10px 24px rgba(15, 23, 42, .12);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.dispatch-item-lock-toggle:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 26px rgba(15, 23, 42, .16);
}

.dispatch-item-lock-toggle.is-locked{
  border-color:rgba(22,163,74,.22);
  background:linear-gradient(180deg, rgba(240,253,244,.98), rgba(220,252,231,.92));
}

.dispatch-item-lock-toggle.is-customer-locked{
  border-color:rgba(220,38,38,.26);
  background:linear-gradient(180deg, rgba(255,241,242,.98), rgba(254,226,226,.94));
}

.dispatch-item-lock-toggle.is-unlocked{
  opacity:.9;
}

.dispatch-lock-icon{
  display:grid;
  place-items:center;
  width:18px;
  height:18px;
}

.dispatch-lock-icon svg{
  width:18px;
  height:18px;
}

.dispatch-lock-icon svg path,
.dispatch-lock-icon svg rect{
  vector-effect:non-scaling-stroke;
}

.dispatch-lock-icon svg path{
  stroke:var(--dispatch-lock-shackle);
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
  fill:none;
}

.dispatch-lock-icon svg rect{
  stroke-width:1.4;
}

.dispatch-lock-icon-unlocked{
  opacity:.92;
}
.dispatch-timeline-workline{
  position:absolute;
  left:8px;
  right:8px;
  border-top:1px dashed rgba(37,99,235,.75);
  opacity:.95;
  pointer-events:none;
}

.dispatch-timeline-workline-start{
  transform:translateY(0);
}

.dispatch-timeline-workline-end{
  border-top-color:rgba(22,163,74,.78);
  transform:translateY(-1px);
}

.dispatch-timeline-item-vertical .dispatch-timeline-actions.compact{
  position:absolute;
  left:10px;
  right:10px;
  bottom:8px;
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:4px;
}

.dispatch-timeline-item-vertical .dispatch-timeline-actions.compact button{
  grid-column:auto;
  font-size:11px;
  min-height:28px;
  padding:5px 6px;
}

.dispatch-block-head-drop,
.dispatch-new-block-drop,
.dispatch-empty-day-drop,
.dispatch-week-day{
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.dispatch-block-head-drop.drag-over,
.dispatch-new-block-drop.drag-over,
.dispatch-empty-day-drop.drag-over,
.dispatch-week-day.drag-over{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.1);
  background:var(--brand-soft);
}

.dispatch-new-block-drop{
  align-content:start;
  min-height:100%;
}

.dispatch-empty-day-drop{
  border:1px dashed var(--border-strong);
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, rgba(255,255,255,.74) 0%, rgba(247,250,252,.92) 100%);
  position:absolute;
  inset:6px;
  z-index:1;
  align-content:flex-start;
  padding:14px 12px;
  display:grid;
  gap:8px;
}

.dispatch-route-strip{
  margin-top:8px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  font-size:11px;
  color:var(--muted);
}

.dispatch-calendar-shell{
  overflow:auto;
}

.dispatch-calendar-grid{
  display:grid;
  grid-template-columns:46px minmax(0, 1fr);
  gap:2px;
  min-width:max(960px, calc(var(--dispatch-day-count, 5) * 178px));
}

.dispatch-calendar-hours-column{
  display:grid;
  grid-template-rows:auto 1fr;
  gap:8px;
}

.dispatch-calendar-hours-head{
  min-height:184px;
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  padding-right:4px;
  padding-top:8px;
  font-size:12px;
  font-weight:700;
  color:#4d6981;
}

.dispatch-calendar-hours-body{
  position:relative;
  min-height:calc(var(--dispatch-slots, 28) * 32px);
}

.dispatch-calendar-hour-tick{
  position:absolute;
  left:0;
  right:0;
  transform:translateY(-50%);
  font-size:11px;
  font-weight:700;
  color:#4d6981;
  text-align:right;
  padding-right:4px;
}

.dispatch-calendar-hour-tick:nth-child(1){ top:0%; }
.dispatch-calendar-hour-tick:nth-child(2){ top:7.1428%; }
.dispatch-calendar-hour-tick:nth-child(3){ top:14.2856%; }
.dispatch-calendar-hour-tick:nth-child(4){ top:21.4284%; }
.dispatch-calendar-hour-tick:nth-child(5){ top:28.5712%; }
.dispatch-calendar-hour-tick:nth-child(6){ top:35.714%; }
.dispatch-calendar-hour-tick:nth-child(7){ top:42.8568%; }
.dispatch-calendar-hour-tick:nth-child(8){ top:49.9996%; }
.dispatch-calendar-hour-tick:nth-child(9){ top:57.1424%; }
.dispatch-calendar-hour-tick:nth-child(10){ top:64.2852%; }
.dispatch-calendar-hour-tick:nth-child(11){ top:71.428%; }
.dispatch-calendar-hour-tick:nth-child(12){ top:78.5708%; }
.dispatch-calendar-hour-tick:nth-child(13){ top:85.7136%; }
.dispatch-calendar-hour-tick:nth-child(14){ top:92.8564%; }

.dispatch-calendar-days{
  display:grid;
  grid-template-columns:repeat(var(--dispatch-day-count, 5), minmax(170px, 1fr));
  gap:0;
}

.dispatch-calendar-day{
  display:grid;
  gap:2px;
  align-content:start;
}

.dispatch-calendar-day-head{
  min-height:36px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
}

.dispatch-calendar-day-events{
  min-height:34px;
  max-height:34px;
  display:flex;
  align-items:center;
  gap:6px;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:2px;
}

.dispatch-calendar-event-bar{
  border:1px solid var(--border);
  border-radius:999px;
  background:#f7fafc;
  color:#4d6981;
  padding:4px 10px;
  font-size:12px;
  font-weight:700;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
}

.dispatch-calendar-event-bar.is-absence{
  background:#fef3c7;
  border-color:#f4d58d;
  color:#92400e;
}

.dispatch-calendar-event-bar.is-holiday{
  background:#ffe8d6;
  border-color:#f3c39d;
  color:#9a3412;
}

.dispatch-calendar-lanes-heads{
  display:grid;
  gap:1px;
  margin-bottom:4px;
  align-items:stretch;
  min-height:92px;
}

.dispatch-calendar-day-body{
  position:relative;
  min-height:calc(var(--dispatch-slots, 28) * 32px);
  border:1px solid var(--border);
  border-radius:0;
  background:#fff;
  overflow:hidden;
}

.dispatch-calendar-hour-line{
  height:calc(100% / var(--dispatch-slots, 28));
  border-top:1px solid rgba(170,190,206,.28);
}

.dispatch-calendar-hour-line:first-child{
  border-top:0;
}

.dispatch-calendar-lanes{
  position:absolute;
  inset:0;
  display:grid;
  gap:1px;
  padding:1px;
}

.dispatch-calendar-lanes-body{
  z-index:1;
}

.dispatch-calendar-lane{
  position:relative;
  display:flex;
  flex-direction:column;
  min-width:0;
}

.dispatch-calendar-lane.is-conflict{
  background:rgba(185, 28, 28, .03);
}

.dispatch-calendar-lane.is-overduration{
  background:rgba(180, 83, 9, .04);
}

.dispatch-calendar-lane-head{
  border:1px solid rgba(158,184,205,.9);
  border-radius:8px;
  background:#f6fbff;
  padding:4px 5px;
  display:grid;
  gap:3px;
  min-height:88px;
  max-height:88px;
  cursor:pointer;
  overflow:hidden;
}

.dispatch-calendar-lane-head.has-flex-items{
  background:#edf5ff;
  border-color:#8eb3d5;
}

.dispatch-calendar-lane-head.is-overduration{
  border-color:#e2b65d;
  background:linear-gradient(180deg, #fff6e6 0%, #fffdf7 100%);
}

.dispatch-calendar-lane-head.is-conflict{
  border-color:#e4a7a7;
  background:#fff2f2;
}

.dispatch-calendar-lane-head-top{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:flex-start;
}

.dispatch-calendar-conflict-note{
  color:#b42318;
  font-size:10px;
  font-weight:800;
  letter-spacing:.02em;
  line-height:1.25;
}

.dispatch-calendar-conflict-flag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:18px;
  padding:0 7px;
  border-radius:999px;
  background:#fde8e8;
  color:#b42318;
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}

.dispatch-calendar-crew,
.dispatch-calendar-note{
  line-height:1.35;
}

.dispatch-calendar-note{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dispatch-calendar-flex-pills{
  display:flex;
  flex-wrap:nowrap;
  gap:4px;
  align-items:flex-start;
  overflow:hidden;
}

.dispatch-calendar-flex-pill{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:1px 7px;
  border-radius:999px;
  background:#d9ecff;
  color:#123f68;
  font-size:10px;
  font-weight:700;
  cursor:grab;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dispatch-calendar-flex-pill-more{
  cursor:default;
  background:#cfe4fb;
  color:#214f74;
}

.dispatch-calendar-lane-body{
  min-height:0;
  border-radius:12px;
}

.dispatch-calendar-lane-body.is-conflict{
  box-shadow:inset 0 0 0 1px rgba(185, 28, 28, .18);
  background:linear-gradient(180deg, rgba(255,241,242,.55) 0%, rgba(255,255,255,0) 24%);
}

.dispatch-calendar-lane-body.is-overduration{
  box-shadow:inset 0 0 0 1px rgba(180, 83, 9, .18);
}

.dispatch-calendar-workband{
  position:absolute;
  left:4px;
  right:4px;
  border-radius:var(--radius-card);
  background:rgba(35,79,109,.07);
  border:1px dashed rgba(35,79,109,.18);
  overflow:visible;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.4);
}

.dispatch-calendar-workband.is-overduration{
  background:rgba(154,106,31,.09);
  border-color:rgba(154,106,31,.26);
}

.dispatch-block-shift-handle{
  position:absolute;
  top:-10px;
  right:clamp(10px, 18%, 34px);
  width:42px;
  height:22px;
  border:1px dashed rgba(35,79,109,.22);
  border-bottom:0;
  border-radius:12px 12px 999px 999px;
  background:rgba(226,235,243,.98);
  cursor:grab;
  box-shadow:0 6px 14px rgba(15, 23, 42, .12);
  z-index:6;
}

.dispatch-block-shift-handle::before{
  content:"";
  position:absolute;
  left:11px;
  right:11px;
  top:6px;
  height:8px;
  border-top:3px solid rgba(18, 63, 104, .76);
  border-bottom:3px solid rgba(18, 63, 104, .76);
}

.dispatch-block-shift-handle:hover{
  background:#dce8f2;
}

.dispatch-block-shift-handle:active{
  cursor:grabbing;
}

.dispatch-calendar-lane-footer{
  display:none;
}

.dispatch-calendar-new-lane{
  border:1px dashed #9eb8cd;
  border-radius:8px;
  background:rgba(248,251,253,.65);
  width:42px;
  min-width:42px;
  display:grid;
  place-items:center;
  cursor:pointer;
}

.dispatch-calendar-lanes-heads .dispatch-calendar-new-lane{
  min-height:88px;
}

.dispatch-calendar-day.is-holiday .dispatch-calendar-day-body{
  background:#fff7ef;
}

.dispatch-calendar-day.is-holiday .dispatch-calendar-new-lane,
.dispatch-calendar-day.is-holiday .dispatch-empty-day-drop{
  background:#fff2e2;
  border-color:#e5c39d;
}

.dispatch-new-block-button{
  width:100%;
  height:100%;
  min-height:88px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#5a7388;
  font-size:28px;
  font-weight:700;
  cursor:pointer;
}

.dispatch-pool-card .section-head{
  margin-bottom:6px;
}

.dispatch-pool-card .section-head h3{
  font-size:16px;
}

.dispatch-drive-chip{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:4px 8px;
  background:#eef4f8;
  color:#47637b;
  font-weight:700;
}

@media (max-width: 1180px){
  .contract-workbench-main,
  .contract-readiness-decision-grid,
  .contract-operator-grid,
  .contract-draft-summary-grid,
  .contract-readiness-groups{
    grid-template-columns:1fr;
  }

  .grid.three{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .order-detail-layout{
    grid-template-columns:1fr;
  }

  .order-detail-side-card{
    position:static;
  }

  .order-detail-hero{
    grid-template-columns:1fr;
  }

  #orderDetailView .order-details-card > .section-head{
    grid-template-columns:1fr;
  }

  #orderDetailView .quick-order-actions{
    justify-content:flex-start;
  }

  #orderDetailView .order-primary-actions{
    justify-content:flex-start;
    max-width:none;
  }

  .order-detail-financial-grid,
  .order-detail-kpis--compact,
  #orderDetailView .order-details-card .grid.two{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .order-side-grid{
    grid-template-columns:1fr;
  }

  .dispatch-block-layout{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  .process-check-row,
  .grid.three{
    grid-template-columns:1fr;
  }
}

@media (max-width: 1440px){
  .order-detail-kpis--compact,
  #orderDetailView .order-details-card .grid.two{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .brand p{
    display:none;
  }

  .app-header{
    grid-template-columns:minmax(220px, 300px) minmax(260px, 1fr) minmax(240px, 340px);
  }

  .brand-button{
    max-width:220px;
  }

  .version-badge{
    padding:6px 10px;
    font-size:11px;
  }

  .status-pill{
    padding:7px 12px;
    font-size:11px;
  }
}

@media (max-width: 1120px){
  .app-header-shell{
    grid-template-columns:1fr;
  }

  .header-search{
    order:2;
  }

  .auth-topbar{
    order:3;
    justify-content:flex-start;
    flex-wrap:wrap;
    max-width:none;
  }

  .head-actions{
    justify-content:flex-start;
  }

  .order-list-row{
    grid-template-columns:1fr 1fr;
  }

  .admin-layout{
    grid-template-columns:1fr;
  }

  .admin-strategy-card{
    grid-template-columns:1fr;
  }

  .admin-map-launcher-grid{
    grid-template-columns:1fr;
  }

  .admin-map-tile-actions > button{
    width:100%;
    min-width:0;
  }
}

@media (max-width: 900px){
  .content{
    padding:16px;
  }

  .app-header{
    padding:8px 10px;
  }

  .brand{
    gap:12px;
  }

  .brand-button{
    max-width:none;
    column-gap:12px;
  }

  .brand-mark{
    width:min(184px, 48vw);
    min-width:140px;
    max-width:184px;
    height:28px;
    padding:0;
  }

  .brand-mark.has-logo{
    width:min(184px, 48vw);
    min-width:140px;
    max-width:184px;
  }

  .brand h1{
    font-size:18px;
  }

  .brand-copy p{
    display:none;
  }

  .header-toggle,
  .easy-mode-toggle,
  .header-select,
  .header-search-input{
    width:100%;
  }

  .tenant-logo-slot{
    width:100%;
    height:34px;
    justify-content:flex-start;
    padding:0 34px;
  }

  .auth-compact{
    width:100%;
    justify-content:space-between;
  }

  body[data-login-mode="flow"] .flow-login-screen{
    padding:48px 18px 32px;
    gap:22px;
  }

  .flow-login-screen__panel{
    width:100%;
    min-height:330px;
    padding:34px 24px 30px;
  }

  .flow-login-screen__title{
    font-size:28px;
  }

  .flow-login-screen__lead{
    font-size:17px;
  }

  .flow-login-screen__button{
    min-height:62px;
    font-size:18px;
  }

  .app-footer{
    padding:8px 14px 14px;
  }

  .panel-head,
  .section-head,
  .workbench-head{
    flex-direction:column;
    align-items:stretch;
  }

  .head-actions{
    width:100%;
    justify-content:flex-start;
  }

  .view-toggle-group{
    width:100%;
  }

  .view-toggle-group .primary,
  .view-toggle-group .ghost{
    flex:1 1 120px;
  }

  .grid.two,
  .filters-bar,
  .order-list-row,
  .admin-status-grid,
  .admin-user-grid,
  .admin-visibility-grid,
  .field-action-row{
    grid-template-columns:1fr;
  }
}

.context-hint{
  margin-bottom:14px;
  padding:12px 14px;
  border-radius:var(--radius-card);
  background:var(--surface-2);
  color:var(--brand);
  border:1px solid var(--border);
  font-size:14px;
  font-weight:600;
}

.pill{
  border-radius:var(--radius-pill);
  padding:7px 10px;
  font-size:12px;
  font-weight:700;
  background:var(--info-soft);
  color:var(--brand);
  border:1px solid rgba(84,119,151,.12);
}

.pill.warn{background:var(--warn-soft);color:var(--warn)}
.pill.success{background:var(--ok-soft);color:var(--ok)}
.pill.danger{background:var(--danger-soft);color:var(--danger)}

.modal{
  width:min(760px,calc(100vw - 24px));
  border:0;
  border-radius:var(--radius-modal);
  padding:0;
  box-shadow:var(--shadow-md);
  background:var(--surface);
}

.modal::backdrop{
  background:rgba(10,22,34,.28);
}

.modal-body{
  position:relative;
  padding:18px;
  padding-bottom:84px;
  max-height:85vh;
  overflow:auto;
  overscroll-behavior:contain;
}

.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
  padding-top:10px;
  border-top:1px solid rgba(188,201,214,.58);
}

.field-inline-stack{
  display:grid;
  gap:8px;
}

.field-inline-actions{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto auto;
  gap:8px;
  align-items:center;
}

.crm-intake-client-lookup .client-lookup-results{
  max-height:240px;
}

.task-order-window-pills{
  margin-top:0;
}

.task-order-window-pills .ghost,
.task-order-window-pills .primary{
  font-size:12px;
  padding:6px 10px;
}

.task-order-lookup-results{
  max-height:240px;
}

.row-end .feedback-fab.feedback-fab-in-dialog,
.modal-actions .feedback-fab.feedback-fab-in-dialog{
  order:-1;
}

.public-signature-card,
.public-signature-step-intro,
.public-signature-legal-card,
.public-signature-consent-card,
.public-signature-consent-check,
.public-signature-provider-note,
.public-signature-document-shell,
.onboarding-card,
.demo-autoplay-card,
.migration-candidate-btn,
.multi-select-summary,
.admin-logo-preview,
.dispatch-month-cell,
.dispatch-month-block,
.dispatch-month-absence,
.dispatch-week-empty-drop,
.dispatch-week-block{
  border-radius:var(--radius-card);
}

.public-signature-legal-links a,
.flow-login-screen__button,
.technical-advisory-actions > button,
.quick-place-button,
.small-button{
  border-radius:var(--radius-control);
}

@media (max-width: 700px){
  .label-action-btn{
    display:none !important;
  }
}

.modal-wide{
  width:min(1100px,calc(100vw - 32px));
}

.admin-strategy-modal-body{
  max-height:88vh;
}

/* Flow UI Constitution
   Source of truth: docs/design/FLOW_UI_CONSTITUTION.md
   Keep geometry tight, actions crisp, and reserve full pills for statuses only. */

.brand-button{
  border-radius:0;
}

.brand-copy{
  display:none;
}

.app-wordmark{
  width:168px;
  min-width:168px;
  max-width:168px;
  height:28px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.app-wordmark img{
  width:100%;
  height:100%;
  object-fit:contain;
}

.tenant-logo-slot{
  border-radius:0;
  background:transparent;
  border:0;
  box-shadow:none;
}

button{
  transition:opacity .12s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}

button:hover{
  transform:none;
}

.primary{
  background:var(--brand-strong);
  color:#fff;
  border-color:rgba(49,69,87,.2);
  box-shadow:0 6px 16px rgba(49,69,87,.12);
}

.primary:hover{
  background:var(--brand);
  box-shadow:0 8px 18px rgba(49,69,87,.14);
}

.ghost{
  background:var(--surface);
  color:var(--text);
  border-color:var(--border);
  box-shadow:none;
}

.ghost:hover{
  background:var(--surface-2);
  border-color:var(--border-strong);
}

.header-toggle,
.label-action-btn,
.client-lookup-result,
.lookup-selected-hint,
.field-help-popover,
.field-helper,
.dispatch-block-item-card,
.dispatch-block-note-entry,
.client-address-card,
.hubspot-diff-row,
.note-log-entry,
.feedback-workbench-card,
.field-job-card,
.field-job-row,
.auth-panel,
.summary-panel,
.case-inbox-card,
.crm-detail-panel,
.inbox-mail-thread,
.inbox-mail-thread-card{
  border-radius:var(--radius-card);
}

.view-toggle-group,
.field-action-row .ghost,
.twin-action-row .ghost,
.triple-action-row .ghost,
.client-lookup-result,
input,
select,
textarea{
  border-radius:var(--radius-control);
}

.app-header .primary,
.app-header .ghost,
.view-toggle-group .primary,
.view-toggle-group .ghost,
.scope-pills .primary,
.scope-pills .ghost,
.label-action-btn{
  border-radius:var(--radius-control);
}

.card,
.kanban-column,
.order-kanban-card,
.task-kanban-card,
.task-table-row,
.version-history-entry,
.legal-document section,
.legal-consent-summary,
.modal-banner{
  border-radius:var(--radius-card);
}

.feedback-fab{
  border-radius:var(--radius-control);
}

.flow-login-screen__panel{
  border-radius:var(--radius-modal);
}

.flow-login-screen__button{
  border-radius:var(--radius-control);
  min-height:64px;
  font-size:18px;
}

.flow-login-screen__footer{
  border-radius:var(--radius-modal);
}

.admin-strategy-frame-wrap{
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  overflow:hidden;
  background:#edf2f7;
}

.admin-strategy-frame{
  width:100%;
  height:min(78vh, 920px);
  border:0;
  display:block;
  background:#edf2f7;
}

.admin-modal-body{
  max-height:85vh;
  overflow:auto;
}

.admin-layout{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

.badge,
.version-badge,
.deadline-text,
.quick-place-button,
.dispatch-pool-type-badge,
.dispatch-calendar-flex-pill,
.dispatch-calendar-flex-pill-more,
.multi-select-summary,
.tag,
.lookup-chip{
  border-radius:var(--radius-control);
}

.badge,
.version-badge{
  background:var(--surface-2);
  border:1px solid rgba(188,201,214,.72);
  box-shadow:none;
}

.crm-health-pill,
.dependency-pill{
  border-radius:var(--radius-control);
}

.card,
.group-card,
.order-kanban-card,
.task-kanban-card,
.feedback-workbench-card,
.field-job-card,
.field-job-row,
.crm-record-card,
.order-list-row,
.inbox-mail-thread-card,
.onboarding-card,
.demo-autoplay-card,
.dispatch-zone-card,
.contract-draft-card,
.admin-strategy-card,
.version-history-entry,
.legal-document section,
.legal-consent-summary,
.modal-banner,
.lookup-selected-hint,
.hubspot-diff-row,
.note-log-entry,
.summary-panel,
.auth-panel,
.crm-pane,
.crm-empty-state,
.order-detail-toolbar,
.order-detail-kpi,
.order-detail-position-row,
.order-detail-position-empty,
.client-address-card,
.field-help-popover,
.dispatch-block-item-card,
.dispatch-block-note-entry,
.multi-select-panel,
.multi-select-option,
.picker-panel,
.picker-option{
  border-radius:var(--radius-card);
}

.card,
.group-card,
.order-kanban-card,
.task-kanban-card,
.feedback-workbench-card,
.field-job-card,
.field-job-row,
.crm-record-card,
.order-list-row,
.inbox-mail-thread-card,
.onboarding-card,
.demo-autoplay-card,
.dispatch-zone-card,
.contract-draft-card,
.admin-strategy-card,
.crm-pane,
.order-detail-toolbar,
.order-detail-kpi,
.order-detail-position-row,
.client-address-card{
  background:var(--surface);
  background-image:none;
}

.order-kanban-card,
.task-kanban-card,
.feedback-workbench-card,
.field-job-card,
.field-job-row,
.crm-record-card,
.order-list-row,
.inbox-mail-thread-card,
.card,
.group-card{
  box-shadow:var(--shadow-sm);
}

.onboarding-card,
.demo-autoplay-card,
.dispatch-zone-card,
.contract-draft-card,
.admin-strategy-card{
  box-shadow:var(--shadow-sm);
}

.header-search-input,
.header-select,
input,
select,
textarea,
input[readonly],
textarea[readonly],
.field-empty input,
.field-empty select,
.field-empty textarea,
.field-filled input,
.field-filled select,
.field-filled textarea{
  background:var(--surface);
  background-image:none;
}

input[readonly],
textarea[readonly],
.order-focus-card.is-readonly input:disabled,
.order-focus-card.is-readonly select:disabled,
.order-focus-card.is-readonly textarea:disabled,
.client-details-card input:disabled,
.client-details-card textarea:disabled,
.client-details-card select:disabled,
.modal input:disabled,
.modal select:disabled,
.modal textarea:disabled{
  background:var(--surface-2);
}

.section-head .actions{
  gap:8px;
}

.icon-button{
  width:40px;
  min-width:40px;
  height:40px;
  min-height:40px;
  padding:0;
  font-size:15px;
  font-weight:700;
}

.icon-button.button-link{
  display:grid;
  place-items:center;
  text-decoration:none;
}

.icon-button span[aria-hidden="true"]{
  line-height:1;
}

.ghost.icon-button.is-missing,
.icon-button.is-missing{
  border-color:rgba(173,90,82,.28);
  background:var(--danger-soft);
  color:var(--danger);
}

.ghost.icon-button.is-current,
.icon-button.is-current{
  border-color:rgba(188,201,214,.92);
  background:var(--surface-2);
  color:var(--muted);
}

.ghost.icon-button.is-ready,
.icon-button.is-ready{
  border-color:rgba(47,115,81,.22);
  background:var(--ok-soft);
  color:var(--ok);
}

.order-detail-toolbar{
  grid-template-columns:auto 1fr;
}

.order-detail-side-card{
  gap:10px;
}

.order-detail-kpis{
  grid-template-columns:1fr;
  gap:8px;
}

.order-detail-kpi{
  padding:11px 12px;
  border-color:rgba(188,201,214,.86);
}

.order-detail-kpi-label{
  letter-spacing:.02em;
}

.order-detail-position-row{
  border-color:rgba(188,201,214,.86);
}

.order-detail-position-note,
.order-detail-subtitle,
.crm-record-card-meta,
.field-job-meta,
.task-kanban-meta,
.order-kanban-meta{
  color:var(--muted);
}

.orders-table{
  gap:8px;
}

.order-list-row,
.field-job-row{
  padding:12px;
  gap:12px;
}

.order-list-row:hover,
.field-job-row:hover,
.crm-record-card:hover{
  box-shadow:var(--shadow-sm);
}

.crm-kpi-card,
.crm-field-card,
.crm-mini-row,
.crm-case-toolbar,
.crm-case-toolbar-summary,
.contract-readiness-panel .lookup-selected-hint,
.contract-readiness-panel .field-helper{
  border-radius:var(--radius-card);
}

.crm-field-card{
  background:var(--surface-2);
}

.client-view-tabs .primary,
.client-view-tabs .ghost,
.scope-pills .primary,
.scope-pills .ghost,
.view-toggle-group .primary,
.view-toggle-group .ghost{
  min-height:36px;
  padding:7px 12px;
}

.feedback-fab{
  min-width:auto;
  min-height:40px;
  padding:0 14px;
  box-shadow:0 8px 20px rgba(18,33,47,.12);
}

.modal,
.flow-login-screen__panel,
.flow-login-screen__footer{
  box-shadow:var(--shadow-md);
}

.multi-select-summary,
.quick-place-button,
.dispatch-calendar-flex-pill,
.dispatch-pool-planning-pills button{
  min-height:36px;
}

.quick-order-actions{
  gap:8px;
}

.quick-order-actions .ghost{
  border-radius:var(--radius-control);
}

.task-feedback-toolbar .icon-button,
.row-end .icon-button,
.client-map-actions .icon-button{
  flex:0 0 auto;
}

.task-feedback-toolbar{
  gap:8px;
  flex-wrap:wrap;
}

.task-feedback-toolbar .icon-button span[aria-hidden="true"],
.row-end .icon-button span[aria-hidden="true"]{
  font-size:13px;
  font-weight:800;
}

.row-end{
  gap:8px;
  flex-wrap:wrap;
}

.crm-case-toolbar .row-end{
  justify-content:flex-end;
}

.head-actions .primary,
.head-actions .ghost{
  min-height:40px;
}

.incidents-feedback-card,
.client-context-grid-modal .card,
.dispatch-block-item-move-select,
.dispatch-timeline-item,
.dispatch-timeline-item-vertical,
.dispatch-month-cell,
.dispatch-pool-card,
.dispatch-pool-summary-card{
  border-radius:var(--radius-card);
}

.task-feedback-section .section-head{
  align-items:flex-start;
}

.task-feedback-layout .admin-note-block,
.task-feedback-layout .feedback-screenshot-preview{
  background:var(--surface-2);
  border:1px solid rgba(188,201,214,.72);
  border-radius:var(--radius-card);
}

.task-feedback-links .button-link{
  min-height:40px;
  display:inline-flex;
  align-items:center;
}

.crm-case-toolbar .field.compact-field,
.tasks-filters-bar .field.compact-field{
  min-width:0;
}

body[data-field-descriptions-visible="true"] .tasks-filters-bar .field.compact-field,
body[data-field-descriptions-visible="true"] .filters-bar .field.compact-field,
body[data-field-descriptions-visible="true"] .dispatch-map-toolbar .field.compact-field,
body[data-field-descriptions-visible="true"] .dispatch-pool-filters .field.compact-field,
body[data-field-descriptions-visible="true"] .crm-case-toolbar .field.compact-field{
  grid-template-rows:min-content minmax(42px, auto) minmax(58px, auto);
  align-content:start;
}

body[data-field-descriptions-visible="true"] .field.field-guided{
  grid-template-rows:min-content minmax(42px, auto) minmax(58px, auto);
  align-content:start;
}

body[data-field-descriptions-visible="true"] .field.field-guided > .field-helper{
  min-height:58px;
  margin:0;
}

body[data-field-descriptions-visible="true"] .tasks-filters-bar .field.compact-field > .field-helper,
body[data-field-descriptions-visible="true"] .filters-bar .field.compact-field > .field-helper,
body[data-field-descriptions-visible="true"] .dispatch-map-toolbar .field.compact-field > .field-helper,
body[data-field-descriptions-visible="true"] .dispatch-pool-filters .field.compact-field > .field-helper,
body[data-field-descriptions-visible="true"] .crm-case-toolbar .field.compact-field > .field-helper{
  min-height:58px;
  margin:0;
}

.crm-toolbar .primary,
.crm-toolbar .ghost,
.crm-action-strip .primary,
.crm-action-strip .ghost{
  min-height:40px;
}

.crm-mini-row .actions .ghost,
.crm-mini-row .actions .primary{
  min-height:36px;
}


.admin-card{
  padding:12px;
}

.admin-statuses-list,
.admin-users-list,
.admin-visibility-list{
  display:grid;
  gap:8px;
}

.migration-job-row,
.migration-review-row{
  background:#fff;
}

.migration-job-row.active{
  border-color:#9dc0db;
  box-shadow:0 10px 24px rgba(35,79,109,.10);
}

.migration-summary-grid{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.migration-review-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  font-size:13px;
  line-height:1.45;
}

.migration-review-grid strong{
  color:var(--text);
}

.migration-candidate-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.migration-candidate-btn{
  min-height:36px;
  padding:8px 10px;
  border-radius:12px;
  font-size:12px;
  text-align:left;
}

.migration-candidate-btn:hover{
  border-color:#9dc0db;
  background:#eef5fb;
}

.multi-select-dropdown{
  position:relative;
}

.multi-select-summary{
  list-style:none;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  min-height:40px;
  padding:10px 38px 10px 12px;
  cursor:pointer;
  display:flex;
  align-items:center;
  color:var(--text);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.multi-select-summary::-webkit-details-marker{
  display:none;
}

.multi-select-dropdown .multi-select-summary::after{
  content:"▾";
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  color:var(--muted);
  pointer-events:none;
}

.multi-select-dropdown[open] .multi-select-summary{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.12);
}

.multi-select-panel{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  right:0;
  z-index:20;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-md);
}

.admin-status-row,
.admin-user-row,
.admin-visibility-row{
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:var(--surface-2);
  padding:10px;
  display:grid;
  gap:8px;
  box-shadow:var(--shadow-sm);
}

.admin-status-grid{
  display:grid;
  grid-template-columns:150px minmax(0,1fr) 160px 150px;
  gap:8px;
  align-items:end;
}

.admin-user-grid{
  display:grid;
  grid-template-columns:minmax(220px,1.2fr) 170px 140px 140px auto;
  gap:8px;
  align-items:end;
}

.admin-user-grid-add{
  grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) 150px 130px auto;
}

.admin-visibility-grid{
  display:grid;
  grid-template-columns:170px 170px 170px auto;
  gap:8px;
  align-items:end;
}

.admin-row-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
}

.admin-note{
  font-size:12px;
  color:var(--muted);
}

.admin-note-block{
  align-self:end;
  font-size:12px;
  line-height:1.5;
  color:var(--muted);
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}

.admin-logo-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.admin-logo-preview{
  width:120px;
  height:72px;
  border:1px dashed var(--border);
  border-radius:14px;
  background:#f8fbfd;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  font-size:12px;
  overflow:hidden;
}

.admin-logo-preview.has-image{
  border-style:solid;
  background:#fff;
}

.admin-logo-preview img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.admin-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:12px;
}

.weekday-picker{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding-top:6px;
}

.dispatch-month-calendar{
  display:grid;
  gap:10px;
}

.dispatch-month-head,
.dispatch-month-grid{
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
  gap:8px;
}

.dispatch-month-head span{
  font-size:12px;
  color:var(--muted);
  font-weight:700;
  text-align:center;
}

.dispatch-month-cell{
  min-height:140px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  padding:10px;
  display:grid;
  align-content:start;
  gap:8px;
  text-align:left;
}

.dispatch-month-cell.is-filler{
  background:transparent;
  border-style:dashed;
  opacity:.3;
}

.dispatch-month-cell.is-active{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(70,92,114,.12);
}

.dispatch-month-cell.is-holiday{
  background:#fff7ef;
}

.dispatch-month-date{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
}

.dispatch-month-blocks{
  display:grid;
  gap:6px;
}

.dispatch-month-block,
.dispatch-month-absence{
  display:block;
  border-radius:10px;
  padding:6px 8px;
  background:var(--surface-2);
  font-size:12px;
  line-height:1.4;
}

.dispatch-month-item-installation{
  background:#ffe8d6;
}

.dispatch-month-item-service{
  background:#e8f7ec;
}

.dispatch-month-item-measurement{
  background:#e3f0ff;
}

.dispatch-month-item-task{
  background:#f1eaff;
}

.dispatch-month-absence{
  background:#fef3c7;
  color:#92400e;
}

.dispatch-week-grid{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:12px;
}

.dispatch-week-day{
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background:#fff;
  padding:12px;
  display:grid;
  gap:10px;
  align-content:start;
}

.dispatch-week-day.is-holiday{
  background:#fff7ef;
}

.dispatch-week-head{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
}

.dispatch-week-list,
.dispatch-week-chip-list{
  display:grid;
  gap:8px;
}

.dispatch-week-empty-drop{
  min-height:88px;
  border:1px dashed #c4d3df;
  border-radius:12px;
  background:#f8fbfd;
  padding:12px;
  color:var(--muted);
  display:flex;
  align-items:center;
}

.dispatch-week-block{
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface-2);
  padding:10px;
  display:grid;
  gap:8px;
}

.dispatch-week-block.drag-over{
  border-color:var(--brand);
  box-shadow:0 0 0 2px rgba(35,79,109,.15);
  background:#eef5fb;
}

.row-end{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:18px;
  padding-top:10px;
  border-top:1px solid rgba(188,201,214,.58);
}

.technical-advisory-actions{
  flex-wrap:nowrap;
  align-items:center;
}

.technical-advisory-actions > button{
  flex:0 0 auto;
  white-space:nowrap;
}

.technical-advisory-actions > .primary{
  margin-left:auto;
}

@media (max-width: 980px){
  .technical-advisory-actions{
    flex-wrap:wrap;
  }

  .technical-advisory-actions > .primary{
    margin-left:0;
  }
}

.entity-share-link-row{
  display:flex;
  justify-content:flex-start;
  margin-top:12px;
}

.entity-share-link{
  margin-right:auto;
  padding:0;
  border:0;
  background:none;
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
  text-align:left;
  cursor:pointer;
  max-width:100%;
  word-break:break-all;
  text-decoration:underline;
  text-decoration-style:dotted;
  text-underline-offset:2px;
  transition:color .18s ease, opacity .18s ease;
}

.entity-share-link:hover,
.entity-share-link:focus-visible{
  color:var(--brand-strong);
  opacity:1;
}

.entity-share-link.hidden{
  display:none;
}

.incident-attachment-list{
  display:grid;
  gap:10px;
  margin-top:10px;
}

.incident-attachment-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface);
}

.incident-attachment-card.is-pending{
  border-style:dashed;
  background:rgba(255, 196, 0, 0.08);
}

.incident-attachment-meta{
  display:grid;
  gap:4px;
  min-width:0;
}

.incident-attachment-meta strong,
.incident-attachment-meta span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.incident-attachment-meta span{
  font-size:12px;
  color:var(--muted);
}

@media (max-width: 980px){
  .shell{
    grid-template-columns:1fr;
  }

  .sidebar{
    border-right:0;
    border-bottom:1px solid var(--border);
  }

  .content{
    padding:18px 14px 28px;
  }

  .feedback-fab{
    right:16px;
    bottom:16px;
  }

  .tasks-filters-bar{
    grid-template-columns:repeat(3, minmax(140px, 1fr));
  }

  .tasks-bulk-bar{
    grid-template-columns:repeat(3, minmax(180px, 1fr));
  }

  .dispatch-map-layout{
    grid-template-columns:1fr;
  }

  .dispatch-map-toolbar-grid{
    grid-template-columns:1fr;
  }

  .dispatch-block-map-layout{
    grid-template-columns:1fr;
  }

  .dispatch-day-layout{
    grid-template-columns:1fr;
  }

  .inline-editor-row{
    grid-template-columns:1fr;
  }

  .dispatch-pool-card{
    position:static;
  }

  .dispatch-pool-filters{
    position:sticky;
    top:0;
  }

  .dispatch-schedule-detail-grid,
  .dispatch-schedule-info-grid{
    grid-template-columns:1fr;
  }

  .dispatch-month-head,
  .dispatch-month-grid{
    grid-template-columns:repeat(5, minmax(0, 1fr));
  }

  .dispatch-week-grid{
    grid-template-columns:1fr;
  }

  .crm-workbench-grid{
    grid-template-columns:1fr;
  }
  .tri-panel-shell,
  .crm-detail-triptych{
    grid-template-columns:1fr;
  }
  .crm-detail-grid{
    grid-template-columns:1fr;
  }
  .crm-case-edit-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 700px){
  .grid.two{
    grid-template-columns:1fr;
  }

  .field-inline-actions{
    grid-template-columns:1fr;
  }

  .crm-case-toolbar-actions{
    justify-content:stretch;
  }

  .hero h2{
    font-size:28px;
  }

  .section-head,.panel-head{
    display:grid;
  }

  .tasks-filters-bar,
  .tasks-bulk-bar{
    grid-template-columns:1fr;
  }

  .feedback-queue-top{
    display:grid;
  }

  .admin-user-grid,
  .admin-user-grid-add,
  .admin-status-grid{
    grid-template-columns:1fr;
  }

  .dispatch-month-head,
  .dispatch-month-grid{
    grid-template-columns:1fr;
  }
}

/* Flow UI 2027 Release
   Jeden kierunek dla shell, kart sprawy i list operacyjnych. */

body.flow-ui-2027{
  --font-ui:"Inter", "Aptos", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --bg:#f4f7fb;
  --bg-2:#ecf2f7;
  --surface:#ffffff;
  --surface-2:#f7fafc;
  --surface-3:#eef4f8;
  --border:#dce5ee;
  --border-strong:#c5d2df;
  --text:#142033;
  --muted:#617086;
  --muted-2:#748296;
  --brand:#2f4663;
  --brand-strong:#20354f;
  --brand-soft:#eef4fa;
  --brand-2:#445d79;
  --ok:#168a4d;
  --ok-soft:#eef9f2;
  --warn:#b7791f;
  --warn-soft:#fff7e6;
  --danger:#b64b5f;
  --danger-soft:#fff0f3;
  --info:#426a91;
  --info-soft:#edf5fc;
  --shadow-sm:0 1px 2px rgba(15, 31, 50, .05), 0 8px 24px rgba(31, 51, 78, .06);
  --shadow-md:0 1px 2px rgba(15, 31, 50, .06), 0 18px 48px rgba(31, 51, 78, .09);
  --shadow:var(--shadow-sm);
  --radius-card:16px;
  --radius-control:12px;
  --radius-modal:20px;
  --radius-pill:999px;
  font-size:14px;
  line-height:1.48;
  background:
    linear-gradient(180deg, rgba(255,255,255,.76) 0%, rgba(255,255,255,0) 260px),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

body.flow-ui-2027 .content{
  width:min(100%, 1600px);
  margin:0 auto;
  gap:var(--pds-space-5);
  padding:var(--pds-space-5);
}

body.flow-ui-2027 .app-header{
  position:relative;
  top:auto;
  padding:12px var(--pds-space-4);
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--pds-color-border);
  box-shadow:var(--pds-shadow-card);
  backdrop-filter:blur(18px);
}

body.flow-ui-2027 .app-header-shell{
  width:min(100%, 1600px);
  margin:0 auto;
  grid-template-columns:auto minmax(420px, 1fr) auto auto auto;
  gap:12px;
  align-items:center;
}

body.flow-ui-2027 .brand-button{
  max-width:256px;
  min-height:52px;
}

body.flow-ui-2027 .app-wordmark,
body.flow-ui-2027 .brand-mark,
body.flow-ui-2027 .brand-mark.has-logo{
  width:210px;
  min-width:186px;
  max-width:210px;
  height:32px;
}

body.flow-ui-2027 .header-search{
  position:relative;
}

body.flow-ui-2027 .header-search::before{
  content:"";
  position:absolute;
  left:15px;
  top:50%;
  width:14px;
  height:14px;
  border:2px solid #7c8aa0;
  border-radius:50%;
  transform:translateY(-52%);
  pointer-events:none;
}

body.flow-ui-2027 .header-search::after{
  content:"";
  position:absolute;
  left:28px;
  top:calc(50% + 8px);
  width:7px;
  height:2px;
  border-radius:2px;
  background:#7c8aa0;
  transform:rotate(45deg);
  pointer-events:none;
}

body.flow-ui-2027 .header-search-input{
  min-height:48px;
  padding:12px 62px 12px 46px;
  border-color:var(--pds-color-border);
  background:var(--pds-color-surface);
  box-shadow:var(--pds-shadow-card);
  font-size:14px;
  font-weight:650;
  border-radius:var(--pds-radius-lg);
}

body.flow-ui-2027 .header-search-input:focus,
body.flow-ui-2027 .header-search-input:focus-visible{
  border-color:rgba(47,70,99,.55);
  box-shadow:0 0 0 4px rgba(47,70,99,.10), 0 8px 24px rgba(31,51,78,.06);
}

body.flow-ui-2027 .auth-topbar{
  gap:10px;
}

body.flow-ui-2027 .topbar-menu-trigger{
  width:48px;
  height:48px;
  min-height:48px;
}

body.flow-ui-2027 .topbar-menu[open] > .topbar-menu-trigger{
  background:var(--brand-soft);
  border-color:rgba(47,70,99,.25);
}

body.flow-ui-2027 .topbar-menu-panel{
  padding:var(--pds-space-4);
  border-radius:var(--pds-radius-xl);
  border-color:var(--pds-color-border);
  box-shadow:var(--pds-shadow-popover);
}

body.flow-ui-2027 .topbar-menu .auth-topbar{
  justify-items:stretch;
}

body.flow-ui-2027 .topbar-menu .header-toggle,
body.flow-ui-2027 .topbar-menu .easy-mode-toggle,
body.flow-ui-2027 .topbar-menu .header-select{
  width:100%;
}

body.flow-ui-2027 .header-toggle,
body.flow-ui-2027 .easy-mode-toggle,
body.flow-ui-2027 .header-select,
body.flow-ui-2027 .app-header .primary,
body.flow-ui-2027 .app-header .ghost{
  min-height:44px;
  border-color:var(--pds-color-border);
  background:var(--pds-color-surface);
  font-size:13px;
  font-weight:800;
  border-radius:var(--pds-radius-md);
}

body.flow-ui-2027 .header-toggle.is-active,
body.flow-ui-2027 .easy-mode-toggle.is-active{
  background:var(--pds-color-primary);
  border-color:var(--pds-color-primary);
  color:var(--pds-color-text-inverse);
}

body.flow-ui-2027 .tenant-logo-slot{
  min-height:48px;
  padding:0 18px;
  background:var(--pds-color-surface);
  border:1px solid var(--pds-color-border);
  border-radius:var(--pds-radius-lg);
  box-shadow:var(--pds-shadow-card);
}

body.flow-ui-2027 .auth-compact{
  gap:12px;
  min-height:56px;
  padding-left:4px;
}

body.flow-ui-2027 .auth-avatar{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  overflow:hidden;
  flex:0 0 auto;
  border:1px solid rgba(197,210,223,.94);
  border-radius:50%;
  background:linear-gradient(180deg, #f9fbfd 0%, #edf3f8 100%);
  color:var(--brand-strong);
  font-size:13px;
  font-weight:900;
  box-shadow:0 1px 2px rgba(20,32,51,.05);
}

body.flow-ui-2027 .auth-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

body.flow-ui-2027 .auth-compact-name{
  font-size:13px;
  font-weight:850;
}

body.flow-ui-2027 .auth-compact-meta{
  font-size:11px;
  color:var(--muted);
}

.fakturownia-preview-panel{
  display:grid;
  gap:12px;
}

.fakturownia-preview-panel .lookup-selected-hint{
  white-space:pre-wrap;
}

.fakturownia-preview-panel .lookup-selected-hint.warning{
  color:var(--warning-strong, #8f5a16);
  background:rgba(255,245,221,.92);
  border-color:rgba(236,191,93,.44);
}

@media (max-width: 920px){
  .app-header-shell{
    grid-template-columns:auto minmax(0, 1fr) auto;
  }
}

@media (max-width: 640px){
  .app-header-shell{
    grid-template-columns:minmax(0, 1fr) auto;
  }

  .tenant-logo-slot,
  .header-user-slot{
    display:none;
  }
}

body.flow-ui-2027 .view-switcher{
  gap:var(--pds-space-2);
  padding:var(--pds-space-3);
  border:1px solid var(--pds-color-border);
  border-radius:var(--pds-radius-xl);
  background:rgba(255,255,255,.92);
  box-shadow:var(--pds-shadow-card);
}

body.flow-ui-2027 .view-switcher > button{
  min-height:44px;
  padding:10px 16px;
  border-radius:var(--pds-radius-lg);
  font-size:13px;
  font-weight:850;
}

body.flow-ui-2027 .view-switcher > .primary{
  background:var(--pds-color-primary);
  border-color:var(--pds-color-primary);
  color:var(--pds-color-text-inverse);
  box-shadow:var(--pds-shadow-card-hover);
}

body.flow-ui-2027 .view-switcher > .ghost{
  background:var(--pds-color-surface);
  border-color:var(--pds-color-border);
  color:var(--pds-color-text);
}

body.flow-ui-2027 .view-switcher > .ghost:hover{
  background:var(--pds-color-primary-soft);
  border-color:var(--pds-color-primary-border);
}

body.flow-ui-2027 #moduleOnboardingBtn{
  margin-left:auto;
  border-color:rgba(197,210,223,.88);
  background:#fff;
}

body.flow-ui-2027 .banner{
  position:sticky;
  top:var(--pds-space-3);
  z-index:9;
  border-radius:var(--pds-radius-lg);
  padding:var(--pds-space-4) var(--pds-space-5);
  background:var(--pds-color-success-bg);
  border-color:var(--pds-color-success-border);
  box-shadow:var(--pds-shadow-card);
}

body.flow-ui-2027 .card,
body.flow-ui-2027 .order-focus-card,
body.flow-ui-2027 .client-details-card,
body.flow-ui-2027 .order-detail-side-card,
body.flow-ui-2027 .kanban-column,
body.flow-ui-2027 .order-kanban-card,
body.flow-ui-2027 .task-kanban-card,
body.flow-ui-2027 .crm-record-card,
body.flow-ui-2027 .field-job-card,
body.flow-ui-2027 .field-job-row,
body.flow-ui-2027 .order-list-row,
body.flow-ui-2027 .client-kanban-card{
  border:1px solid var(--pds-color-border);
  border-radius:var(--pds-radius-xl);
  background:var(--pds-color-surface);
  background-image:none;
  box-shadow:var(--pds-shadow-card);
}

body.flow-ui-2027 .view-switcher.pds-nav-tabs,
body.flow-ui-2027 .banner,
body.flow-ui-2027 .pds-screen{
  width:min(100%, 1480px);
  margin-inline:auto;
}

body.flow-ui-2027 .pds-screen{
  padding:var(--pds-space-6);
}

body.flow-ui-2027 .pds-screen--empty,
body.flow-ui-2027 .pds-screen--detail{
  display:grid;
  gap:var(--pds-space-5);
}

body.flow-ui-2027 .pds-screen--empty{
  align-content:start;
}

body.flow-ui-2027 .pds-screen--workbench{
  display:grid;
  gap:var(--pds-space-5);
}

body.flow-ui-2027 .section-head,
body.flow-ui-2027 .panel-head{
  gap:var(--pds-space-4);
  margin-bottom:0;
}

body.flow-ui-2027 .section-head h2,
body.flow-ui-2027 .section-head h3,
body.flow-ui-2027 .panel-head h2{
  margin:0;
  color:var(--pds-color-text);
  letter-spacing:0;
}

body.flow-ui-2027 .workbench-head{
  align-items:flex-start;
  justify-content:space-between;
}

body.flow-ui-2027 .workbench-head--actions-only{
  justify-content:flex-end;
}

body.flow-ui-2027 .workbench-head h2{
  font-size:22px;
  line-height:1.16;
  letter-spacing:0;
}

body.flow-ui-2027 .eyebrow{
  color:#49617c;
  font-size:11px;
  letter-spacing:.08em;
  font-weight:900;
}

body.flow-ui-2027 .head-actions .primary,
body.flow-ui-2027 .head-actions .ghost,
body.flow-ui-2027 .view-toggle-group .primary,
body.flow-ui-2027 .view-toggle-group .ghost,
body.flow-ui-2027 .scope-pills .primary,
body.flow-ui-2027 .scope-pills .ghost{
  min-height:40px;
  padding:8px 12px;
  border-radius:var(--pds-radius-lg);
  font-size:13px;
  font-weight:850;
}

body.flow-ui-2027 .task-workbench-summary,
body.flow-ui-2027 .scope-pills{
  gap:10px;
  margin:0;
}

body.flow-ui-2027 .task-workbench-summary .badge,
body.flow-ui-2027 .scope-pills .ghost,
body.flow-ui-2027 .scope-pills .primary{
  min-height:34px;
  padding-inline:12px;
}

body.flow-ui-2027 .orders-table,
body.flow-ui-2027 .clients-list,
body.flow-ui-2027 .signatures-workbench-list,
body.flow-ui-2027 .feedback-queue,
body.flow-ui-2027 .feedback-workbench-list,
body.flow-ui-2027 .crm-workbench-grid,
body.flow-ui-2027 .ops-pulse-grid{
  gap:var(--pds-space-4);
}

body.flow-ui-2027 .task-workbench-summary + .scope-pills,
body.flow-ui-2027 .scope-pills + .muted,
body.flow-ui-2027 .signatures-workbench-lead{
  margin-top:calc(var(--pds-space-2) * -1);
}

body.flow-ui-2027 .filters-bar,
body.flow-ui-2027 .tasks-filters-bar,
body.flow-ui-2027 .feedback-workbench-filters,
body.flow-ui-2027 .crm-toolbar,
body.flow-ui-2027 .dispatch-map-toolbar{
  padding:var(--pds-space-4);
  border:1px solid var(--pds-color-border);
  border-radius:var(--pds-radius-xl);
  background:var(--pds-color-surface);
  box-shadow:var(--pds-shadow-card);
}

body.flow-ui-2027 .ops-pulse-card,
body.flow-ui-2027 .ops-row,
body.flow-ui-2027 .signatures-workbench-card{
  border-color:var(--pds-color-border);
  border-radius:var(--pds-radius-xl);
  background:var(--pds-color-surface);
  box-shadow:var(--pds-shadow-card);
}

body.flow-ui-2027 .public-signature-layout{
  grid-template-columns:minmax(0, 1fr);
  gap:var(--pds-space-5);
  max-width:900px;
  margin:0 auto;
}

body.flow-ui-2027 .pds-screen--signature{
  padding:clamp(16px, 2vw, 28px);
}

body.flow-ui-2027 .public-signature-card{
  padding:clamp(16px, 2vw, 24px);
}

body.flow-ui-2027 .public-signature-document-shell{
  padding:4px;
  gap:4px;
  background:var(--pds-color-surface-soft);
  border:1px solid var(--pds-color-border);
  box-shadow:none;
}

body.flow-ui-2027 .public-signature-document-toolbar,
body.flow-ui-2027 .public-signature-document-toolbar-bottom{
  padding:0;
  border:0;
  background:transparent;
}

body.flow-ui-2027 .public-signature-document-zoom{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

body.flow-ui-2027 .public-signature-document-actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}

body.flow-ui-2027 .public-signature-document-zoom .icon-button,
body.flow-ui-2027 .public-signature-document-zoom .ghost,
body.flow-ui-2027 .public-signature-document-actions .ghost{
  min-height:40px;
}

body.flow-ui-2027 .public-signature-document-viewport{
  min-height:72vh;
  border-radius:var(--pds-radius-lg);
  overflow:auto;
  background:#fff;
  padding:4px;
}

body.flow-ui-2027 .public-signature-document-viewport.is-loading::before{
  inset:4px;
  border-radius:calc(var(--pds-radius-lg) - 2px);
}

body.flow-ui-2027 .public-signature-document-viewport.is-loading::after{
  top:18px;
}

body.flow-ui-2027 .public-signature-pdf-stage{
  width:100%;
  min-width:100%;
  max-width:none;
}

body.flow-ui-2027 .public-signature-pdf-frame{
  width:100%;
  min-height:72vh;
  border:0;
  display:block;
  background:#fff;
}

body.flow-ui-2027 .public-signature-technical-hash{
  margin-top:-2px;
  color:var(--pds-color-text-muted);
  font-size:11px;
  line-height:1.45;
  word-break:break-all;
}

body.flow-ui-2027 .scope-pills .ghost.signatures-scope-pill--issues{
  border-color:var(--pds-color-warning-border);
  background:var(--pds-color-warning-bg);
  color:var(--pds-color-warning);
}

body.flow-ui-2027 .scope-pills .primary.signatures-scope-pill--issues{
  border-color:var(--pds-color-warning);
  background:var(--pds-color-warning);
  color:var(--pds-color-text);
  box-shadow:var(--pds-shadow-card);
}

body.flow-ui-2027 button,
body.flow-ui-2027 .button-link{
  border-radius:14px;
  font-weight:800;
}

body.flow-ui-2027 .primary{
  background:var(--pds-color-primary);
  border-color:var(--pds-color-primary);
  color:var(--pds-color-text-inverse);
  box-shadow:var(--pds-shadow-card);
}

body.flow-ui-2027 .ghost{
  background:var(--pds-color-surface);
  border-color:var(--pds-color-border);
  color:var(--pds-color-text);
}

body.flow-ui-2027 .icon-button{
  width:42px;
  min-width:42px;
  height:42px;
  min-height:42px;
  border-radius:7px;
}

body.flow-ui-2027 input,
body.flow-ui-2027 select,
body.flow-ui-2027 textarea{
  border-radius:var(--pds-radius-md);
  border-color:var(--pds-color-border);
  background:var(--pds-color-surface);
  box-shadow:var(--pds-shadow-card);
}

body.flow-ui-2027 input:focus,
body.flow-ui-2027 select:focus,
body.flow-ui-2027 textarea:focus,
body.flow-ui-2027 input:focus-visible,
body.flow-ui-2027 select:focus-visible,
body.flow-ui-2027 textarea:focus-visible{
  border-color:var(--pds-color-info);
  box-shadow:var(--pds-focus-ring);
}

body.flow-ui-2027 .order-detail-toolbar{
  min-height:62px;
  padding:10px 12px;
  border-color:rgba(197,210,223,.78);
  background:rgba(255,255,255,.92);
  box-shadow:var(--shadow-sm);
}

body.flow-ui-2027 .order-detail-layout{
  grid-template-columns:minmax(320px, 360px) minmax(640px, 1fr) minmax(320px, 360px);
  gap:var(--pds-space-5);
}

body.flow-ui-2027 .order-detail-side-card{
  top:84px;
  padding:var(--pds-space-5);
  gap:var(--pds-space-4);
}

body.flow-ui-2027 .order-detail-section-title{
  font-size:20px;
  line-height:1.22;
}

body.flow-ui-2027 .order-detail-subtitle{
  color:var(--muted);
  font-size:13px;
}

body.flow-ui-2027 .order-detail-side-field-list{
  gap:var(--pds-space-3);
}

body.flow-ui-2027 .order-detail-side-field-card{
  gap:var(--pds-space-2);
  padding:var(--pds-space-4);
  border-color:var(--pds-color-border);
  border-radius:var(--pds-radius-lg);
  background:var(--pds-color-surface);
  box-shadow:var(--pds-shadow-card);
}

body.flow-ui-2027 .order-detail-side-field-code,
body.flow-ui-2027 .field-index-badge{
  min-width:38px;
  padding:3px 8px;
  border-radius:var(--pds-radius-sm);
  border-color:var(--pds-color-primary-border);
  background:var(--pds-color-primary-soft);
  color:var(--pds-color-text-muted);
  font-size:11px;
  font-weight:900;
}

body.flow-ui-2027 .order-detail-side-field-label{
  color:var(--pds-color-text-muted);
  font-size:11px;
  letter-spacing:.06em;
  font-weight:900;
}

body.flow-ui-2027 .order-detail-side-field-value{
  font-size:13px;
  font-weight:720;
}

body.flow-ui-2027 .order-detail-side-action,
body.flow-ui-2027 .url-open-actions .ghost{
  min-height:36px;
  border-radius:7px;
  background:#fff;
}

body.flow-ui-2027 .order-details-card,
body.flow-ui-2027 .client-details-card{
  padding:18px;
}

body.flow-ui-2027 .order-focus-card > .section-head,
body.flow-ui-2027 .client-details-card > .section-head{
  border-bottom-color:rgba(197,210,223,.72);
}

body.flow-ui-2027 .order-detail-hero h2,
body.flow-ui-2027 .client-details-card h2{
  font-size:24px;
  line-height:1.16;
}

body.flow-ui-2027 .quick-order-actions .ghost,
body.flow-ui-2027 #orderDetailView .quick-order-actions .quick-action-icon{
  min-height:42px;
  border-radius:7px;
  background:#fff;
}

body.flow-ui-2027 .order-primary-actions .primary,
body.flow-ui-2027 .order-primary-actions .ghost{
  min-height:42px;
  padding:10px 14px;
}

body.flow-ui-2027 .order-detail-kpis,
body.flow-ui-2027 .order-detail-financial-grid,
body.flow-ui-2027 .order-detail-kpis--compact{
  gap:10px;
}

body.flow-ui-2027 .order-detail-kpi{
  gap:6px;
  padding:var(--pds-space-4);
  border-color:var(--pds-color-border);
  border-radius:var(--pds-radius-lg);
  background:var(--pds-color-surface);
}

body.flow-ui-2027 .order-detail-kpi-label{
  color:var(--pds-color-text-muted);
  font-size:11px;
  letter-spacing:.06em;
  font-weight:900;
}

body.flow-ui-2027 .order-detail-kpi-value{
  color:var(--pds-color-text);
  font-size:16px;
  line-height:1.34;
  font-weight:850;
}

body.flow-ui-2027 .order-detail-position-row,
body.flow-ui-2027 .order-detail-position-empty{
  border-color:rgba(197,210,223,.78);
  border-radius:8px;
  background:#fff;
}

body.flow-ui-2027 .order-detail-position-index{
  border-radius:7px;
  background:var(--surface-3);
  color:#425a75;
}

body.flow-ui-2027 .tasks-filters-bar,
body.flow-ui-2027 .filters-bar{
  border-color:rgba(197,210,223,.82);
  border-radius:8px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}

body.flow-ui-2027 .kanban-board{
  gap:12px;
}

body.flow-ui-2027 .kanban-column{
  padding:12px;
  background:rgba(255,255,255,.72);
}

body.flow-ui-2027 .kanban-column-title{
  color:#253b56;
  font-size:13px;
  letter-spacing:.03em;
  text-transform:uppercase;
}

body.flow-ui-2027 .orders-table,
body.flow-ui-2027 .clients-list{
  gap:10px;
}

body.flow-ui-2027 .order-list-row,
body.flow-ui-2027 .client-list-row{
  min-height:78px;
  padding:14px;
  border-color:rgba(197,210,223,.82);
}

body.flow-ui-2027 .order-list-row:hover,
body.flow-ui-2027 .client-list-row:hover,
body.flow-ui-2027 .client-kanban-card:hover,
body.flow-ui-2027 .order-kanban-card:hover{
  border-color:rgba(47,70,99,.34);
  box-shadow:var(--shadow-md);
}

body.flow-ui-2027 .client-kanban-card{
  padding:14px;
}

body.flow-ui-2027 .client-kanban-card__head strong,
body.flow-ui-2027 .order-list-row strong{
  color:var(--text);
  font-weight:900;
}

body.flow-ui-2027 .client-kanban-card__meta,
body.flow-ui-2027 .client-list-row__summary{
  color:var(--muted);
  font-size:13px;
}

body.flow-ui-2027 .client-kanban-card__note{
  border-color:rgba(197,210,223,.74);
  border-radius:8px;
  background:var(--surface-2);
}

body.flow-ui-2027 .status-pill,
body.flow-ui-2027 .badge,
body.flow-ui-2027 .deadline-text,
body.flow-ui-2027 .lookup-chip,
body.flow-ui-2027 .version-badge{
  border-radius:7px;
  font-size:11px;
  font-weight:900;
}

body.flow-ui-2027 .feedback-fab{
  right:18px;
  bottom:18px;
  min-height:42px;
  border-radius:7px;
  background:#f6b700;
  color:#17212b;
  border-color:#dda000;
}

body.product-home{
  min-height:100vh;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.88), rgba(255,255,255,0) 26%),
    linear-gradient(180deg, #eff4f9 0%, #dfe8f2 100%);
  color:#16253a;
}

.product-home-shell{
  width:min(1180px, calc(100vw - 32px));
  margin:0 auto;
  padding:24px 0 40px;
  display:grid;
  gap:22px;
}

.product-home-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.product-home-mark{
  display:flex;
  align-items:center;
}

.product-home-mark img{
  display:block;
  width:min(220px, 46vw);
  height:auto;
}

.product-home-hero{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(0, 1.15fr) minmax(280px, .85fr);
  gap:22px;
  padding:26px;
  border:1px solid rgba(197,210,223,.82);
  border-radius:10px;
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,250,255,.94));
  box-shadow:0 20px 48px rgba(24,42,65,.10);
}

.product-home-hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(120deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.64) 52%, rgba(255,255,255,.28) 100%),
    url("/assets/flow-login-bg.png") center center / cover no-repeat;
  opacity:.88;
  pointer-events:none;
}

.product-home-copy,
.product-home-rail{
  position:relative;
  z-index:1;
}

.product-home-copy{
  display:grid;
  align-content:start;
  gap:16px;
}

.product-home-kicker{
  margin:0;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#3d5e84;
}

.product-home-title{
  margin:0;
  max-width:13ch;
  font-size:clamp(36px, 5vw, 64px);
  line-height:1;
  letter-spacing:-.03em;
  color:#102133;
}

.product-home-lead{
  margin:0;
  max-width:56ch;
  font-size:18px;
  line-height:1.55;
  color:#42586f;
}

.product-home-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.product-home-actions a{
  text-decoration:none;
}

.product-home-rail{
  display:grid;
  gap:12px;
}

.product-home-stat,
.product-home-card{
  padding:18px;
  border:1px solid rgba(197,210,223,.9);
  border-radius:10px;
  background:rgba(255,255,255,.92);
  box-shadow:0 10px 28px rgba(24,42,65,.08);
}

.product-home-stat-label{
  margin:0 0 8px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#587291;
}

.product-home-stat-value{
  margin:0;
  font-size:28px;
  font-weight:900;
  color:#102133;
}

.product-home-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:18px;
}

.product-home-card h3{
  margin:0 0 10px;
  font-size:18px;
  color:#102133;
}

.product-home-card p{
  margin:0;
  color:#4a6077;
  line-height:1.55;
}

@media (max-width: 1280px){
  body.flow-ui-2027 .order-detail-layout{
    grid-template-columns:minmax(280px, .92fr) minmax(0, 1.5fr);
  }

  body.flow-ui-2027 .order-detail-layout > .order-detail-sidebar:last-child{
    grid-column:1 / -1;
  }
}

@media (max-width: 1120px){
  body.flow-ui-2027 .app-header-shell{
    grid-template-columns:auto minmax(0, 1fr) auto;
    gap:10px;
  }

  body.flow-ui-2027 .auth-topbar{
    justify-content:flex-start;
    flex-wrap:wrap;
  }

  body.flow-ui-2027 .view-switcher{
    overflow-x:auto;
    flex-wrap:nowrap;
  }

  body.flow-ui-2027 .view-switcher > button{
    flex:0 0 auto;
  }

  body.flow-ui-2027 .order-detail-layout{
    grid-template-columns:1fr;
  }

  body.flow-ui-2027 .order-detail-layout > .order-detail-sidebar:last-child{
    grid-column:auto;
  }

  .product-home-hero,
  .product-home-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 760px){
  body.flow-ui-2027 .content{
    padding:12px;
    gap:12px;
  }

  body.flow-ui-2027 .app-header{
    padding:8px 10px;
  }

  body.flow-ui-2027 .header-brand{
    display:none;
  }

  body.flow-ui-2027 .app-header-shell{
    width:100%;
    grid-template-columns:auto minmax(0, 1fr);
    gap:12px;
  }

  body.flow-ui-2027 .header-search{
    min-width:0;
  }

  body.flow-ui-2027 .header-search-input{
    min-height:52px;
    padding-right:20px;
    font-size:13px;
  }

  body.flow-ui-2027 .header-search-shortcut{
    display:none;
  }

  body.flow-ui-2027 .app-wordmark,
  body.flow-ui-2027 .brand-mark,
  body.flow-ui-2027 .brand-mark.has-logo{
    width:156px;
    min-width:132px;
    max-width:156px;
  }

  body.flow-ui-2027 .pds-screen,
  body.flow-ui-2027 .view-switcher.pds-nav-tabs{
    width:100%;
  }

  body.flow-ui-2027 .pds-screen{
    padding:14px;
    border-radius:var(--pds-radius-lg);
  }

  body.flow-ui-2027 .workbench-head h2{
    font-size:20px;
  }

  body.flow-ui-2027 .workbench-head,
  body.flow-ui-2027 .section-head,
  body.flow-ui-2027 .panel-head{
    flex-direction:column;
    align-items:stretch;
    gap:12px;
  }

  body.flow-ui-2027 .view-switcher{
    flex-wrap:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    padding:10px;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }

  body.flow-ui-2027 .view-switcher::-webkit-scrollbar{
    display:none;
  }

  body.flow-ui-2027 .view-switcher > button{
    flex:0 0 auto;
    min-width:max-content;
    scroll-snap-align:start;
  }

  body.flow-ui-2027 .head-actions{
    width:100%;
    justify-content:stretch;
  }

  body.flow-ui-2027 .view-toggle-group{
    width:100%;
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:8px;
    padding:6px;
  }

  body.flow-ui-2027 .view-toggle-group .primary,
  body.flow-ui-2027 .view-toggle-group .ghost{
    width:100%;
    justify-content:center;
    text-align:center;
    padding-inline:10px;
  }

  body.flow-ui-2027 .scope-pills,
  body.flow-ui-2027 .task-workbench-summary{
    display:flex;
    flex-wrap:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    padding-bottom:2px;
    -webkit-overflow-scrolling:touch;
  }

  body.flow-ui-2027 .scope-pills::-webkit-scrollbar,
  body.flow-ui-2027 .task-workbench-summary::-webkit-scrollbar{
    display:none;
  }

  body.flow-ui-2027 .scope-pills .ghost,
  body.flow-ui-2027 .scope-pills .primary,
  body.flow-ui-2027 .task-workbench-summary .badge{
    flex:0 0 auto;
  }

  body.flow-ui-2027 .ops-pulse-grid{
    grid-template-columns:minmax(0, 1fr);
  }

  body.flow-ui-2027 .ops-pulse-card{
    min-width:0;
    padding:16px;
    gap:14px;
  }

  body.flow-ui-2027 .ops-pulse-card__head{
    flex-direction:column;
    align-items:flex-start;
  }

  body.flow-ui-2027 .ops-pulse-card__head h3{
    font-size:15px;
    line-height:1.25;
  }

  body.flow-ui-2027 .ops-pulse-card__body,
  body.flow-ui-2027 .ops-pulse-card__footer,
  body.flow-ui-2027 .my-work-lead{
    min-width:0;
  }

  body.flow-ui-2027 .ops-metric-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  body.flow-ui-2027 .banner{
    top:10px;
    padding:14px;
  }

  body.flow-ui-2027 .pds-screen--signature{
    padding:8px 0 16px;
  }

  body.flow-ui-2027 .public-signature-card{
    padding:12px;
  }

  body.flow-ui-2027 .public-signature-preview{
    padding-inline:0;
  }

  body.flow-ui-2027 .public-signature-document-shell{
    padding:0;
    border-left:0;
    border-right:0;
    border-radius:0;
  }

  body.flow-ui-2027 .public-signature-document-viewport,
  body.flow-ui-2027 .public-signature-pdf-frame{
    min-height:calc(100vh - 260px);
  }

  body.flow-ui-2027 .public-signature-document-viewport{
    border-radius:0;
    padding:0;
  }

  body.flow-ui-2027 .public-signature-document-toolbar,
  body.flow-ui-2027 .public-signature-document-toolbar-bottom{
    padding:0 12px 8px;
  }

  body.flow-ui-2027 .public-signature-document-toolbar-bottom{
    padding:8px 12px 0;
  }

  body.flow-ui-2027 .public-signature-document-actions{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    width:100%;
  }

  body.flow-ui-2027 .public-signature-document-zoom{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    width:100%;
  }

  body.flow-ui-2027 .public-signature-document-actions .ghost,
  body.flow-ui-2027 .public-signature-document-zoom .ghost,
  body.flow-ui-2027 .public-signature-document-zoom .icon-button{
    width:100%;
  }

  body.flow-ui-2027 .public-signature-document-zoom .public-signature-zoom-pill{
    grid-column:1 / -1;
    justify-self:stretch;
    text-align:center;
  }

  body.flow-ui-2027 .order-details-card,
  body.flow-ui-2027 .client-details-card,
  body.flow-ui-2027 .order-detail-side-card{
    padding:14px;
  }

  body.flow-ui-2027 .topbar-menu{
    position:static;
  }

  body.flow-ui-2027 .topbar-menu[open]::before{
    content:"";
    position:fixed;
    inset:0;
    background:rgba(15, 27, 46, .18);
    backdrop-filter:blur(4px);
    z-index:79;
  }

  body.flow-ui-2027 .topbar-menu-panel{
    position:fixed;
    top:calc(env(safe-area-inset-top, 0px) + 76px);
    left:12px;
    right:12px;
    width:auto;
    max-width:none;
    max-height:calc(100dvh - env(safe-area-inset-top, 0px) - 100px);
    overflow:auto;
    padding:14px;
    border-radius:20px;
    z-index:80;
  }

  body.flow-ui-2027 .topbar-menu .auth-topbar{
    gap:12px;
  }

  .product-home-shell{
    width:min(100vw - 20px, 1180px);
    padding:18px 0 28px;
  }

  .product-home-topbar,
  .product-home-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .product-home-title{
    max-width:none;
  }
}

@media (max-width: 520px){
  body.flow-ui-2027 .content{
    padding:10px;
  }

  body.flow-ui-2027 .app-header{
    padding-inline:8px;
  }

  body.flow-ui-2027 .pds-screen{
    padding:12px;
  }

  body.flow-ui-2027 .view-switcher.pds-nav-tabs{
    padding:8px;
    border-radius:20px;
  }

  body.flow-ui-2027 .view-switcher > button{
    min-height:42px;
    padding-inline:14px;
  }

  body.flow-ui-2027 .header-search-input{
    font-size:12px;
    padding-left:42px;
  }

  body.flow-ui-2027 .header-search::before{
    left:14px;
  }

  body.flow-ui-2027 .header-search::after{
    left:27px;
  }

  body.flow-ui-2027 .ops-metric-grid{
    grid-template-columns:minmax(0, 1fr);
  }

  body.flow-ui-2027 .feedback-fab{
    right:12px;
    bottom:calc(env(safe-area-inset-bottom, 0px) + 104px);
    min-height:48px;
    padding-inline:18px;
    font-size:13px;
  }
}

.flow-map-workbench{
  --flow-map-accent:#06B6D4;
  --flow-map-accent-strong:#0891B2;
  --flow-map-accent-soft:#ECFEFF;
  --flow-map-accent-border:rgba(6,182,212,.24);
  --flow-map-glow:rgba(6,182,212,.16);
  --flow-map-sun:rgba(251,191,36,.18);
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at top right, var(--flow-map-glow), rgba(6,182,212,0) 24%),
    radial-gradient(circle at left center, var(--flow-map-sun), rgba(251,191,36,0) 22%),
    linear-gradient(180deg, rgba(255,255,255,.995), rgba(246,250,255,.995));
}

.flow-map-head-actions,
.flow-map-toolbar,
.flow-map-filters,
.flow-map-player-actions,
.flow-map-canvas-meta,
.flow-map-detail-topline,
.flow-map-tag-row,
.flow-map-module-list,
.flow-map-related-list,
.flow-map-preset-grid{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.flow-map-toolbar,
.flow-map-filters,
.flow-map-player,
.flow-map-preset-rail,
.flow-map-training-rail{
  margin-top:12px;
}

.flow-map-preset-rail,
.flow-map-training-rail{
  display:grid;
  gap:10px;
}

.flow-map-preset-header,
.flow-map-training-header{
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  align-items:baseline;
}

.flow-map-preset-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.flow-map-preset-card{
  text-align:left;
  padding:12px 14px;
  border:1px solid var(--pds-color-border);
  border-radius:14px;
  background:var(--pds-color-surface);
  display:grid;
  gap:6px;
  box-shadow:var(--pds-shadow-card);
  transition:border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.flow-map-preset-card:hover{
  transform:translateY(-1px);
  border-color:var(--pds-color-border-strong);
  box-shadow:var(--pds-shadow-card-hover);
}

.flow-map-preset-card.is-active{
  border-color:var(--pds-color-primary);
  background:var(--pds-color-primary);
  color:var(--pds-color-text-inverse);
}

.flow-map-preset-label{
  font-weight:800;
}

.flow-map-preset-summary{
  font-size:12px;
  line-height:1.45;
  color:inherit;
  opacity:.84;
}

.flow-map-context-grid,
.flow-map-training-grid{
  display:grid;
  gap:12px;
}

.flow-map-context-grid{
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.flow-map-training-grid{
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.flow-map-context-card,
.flow-map-training-card{
  text-align:left;
  padding:12px 14px;
  border:1px solid var(--pds-color-border);
  border-radius:14px;
  background:var(--pds-color-surface);
  display:grid;
  gap:6px;
  box-shadow:var(--pds-shadow-card);
  transition:border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.flow-map-context-card:hover,
.flow-map-training-card:hover{
  transform:translateY(-1px);
  border-color:var(--pds-color-border-strong);
  box-shadow:var(--pds-shadow-card-hover);
}

.flow-map-context-card.is-active,
.flow-map-training-card.is-active{
  border-color:var(--pds-color-primary);
  background:var(--pds-color-primary);
  color:var(--pds-color-text-inverse);
}

.flow-map-training-meta,
.flow-map-training-sequence{
  font-size:12px;
  line-height:1.45;
  color:inherit;
  opacity:.84;
}

.flow-map-training-empty{
  padding:14px 16px;
  border:1px dashed var(--pds-color-border-strong);
  border-radius:14px;
  background:var(--pds-color-surface-soft);
}

.flow-map-filters{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px 12px;
}

.flow-map-switch{
  min-height:48px;
  min-width:210px;
  padding:0 14px;
  border:1px solid var(--pds-color-border);
  border-radius:12px;
  background:var(--pds-color-surface);
  box-shadow:var(--pds-shadow-card);
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-weight:600;
  color:var(--pds-color-text);
  cursor:pointer;
}

.flow-map-switch input{
  width:16px;
  height:16px;
  margin:0;
  accent-color:var(--pds-color-primary);
}

.flow-map-summary-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
}

.flow-map-summary-card,
.flow-map-detail-card,
.flow-map-canvas-card{
  border:1px solid var(--pds-color-border);
  border-radius:16px;
  background:var(--pds-color-surface);
  box-shadow:var(--pds-shadow-card);
}

.flow-map-summary-card{
  min-height:74px;
  padding:14px;
  display:grid;
  gap:4px;
}

.flow-map-summary-card strong{
  font-size:18px;
  line-height:1.1;
  letter-spacing:-.03em;
  color:var(--pds-color-text);
}

.flow-map-layout{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:14px;
  margin-top:14px;
  align-items:start;
}

.flow-map-canvas-card{
  padding:12px;
  display:grid;
  gap:10px;
}

.flow-map-canvas{
  min-height:560px;
  padding:10px;
  border:1px solid var(--pds-color-border);
  border-radius:8px;
  overflow:auto;
  background:
    linear-gradient(90deg, rgba(6,182,212,.07), rgba(34,197,94,.045), rgba(250,204,21,.055)),
    linear-gradient(180deg, rgba(255,255,255,.995), rgba(246,252,255,.995));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72);
}

.flow-map-svg{
  width:100%;
  min-width:1360px;
  height:auto;
  display:block;
}

.flow-map-canvas.is-master-board{
  min-height:0;
  overflow:visible;
}

.flow-map-canvas-meta{
  align-items:center;
  padding-bottom:4px;
}

.flow-map-overview{
  display:grid;
  gap:10px;
}

.flow-map-overview-hero{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:10px;
  align-items:stretch;
}

.flow-map-overview-copy{
  display:grid;
  align-content:start;
  gap:8px;
  padding:14px 16px;
  border:1px solid rgba(34,211,238,.24);
  border-radius:22px;
  background:
    radial-gradient(circle at top left, rgba(103,232,249,.18), rgba(103,232,249,0) 36%),
    linear-gradient(145deg, rgba(248,254,255,.98), rgba(255,255,255,.98) 55%, rgba(240,253,250,.95));
  box-shadow:0 18px 40px rgba(8,47,73,.08);
}

.flow-map-overview-topline{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.flow-map-overview-kicker,
.flow-map-overview-stat,
.flow-map-overview-stream{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 11px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.flow-map-overview-kicker{
  border:1px solid rgba(8,145,178,.22);
  background:rgba(236,254,255,.92);
  color:#0f766e;
}

.flow-map-overview-stat{
  border:1px solid rgba(59,130,246,.14);
  background:rgba(255,255,255,.92);
  color:#155e75;
}

.flow-map-overview-copy h3,
.flow-map-overview-copy p{
  margin:0;
}

.flow-map-overview-copy h3{
  font-size:20px;
  line-height:1.08;
  letter-spacing:-.04em;
  color:#0f172a;
}

.flow-map-overview-copy p{
  font-size:13px;
  line-height:1.45;
  color:#334155;
}

.flow-map-overview-legend{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.flow-map-overview-stream{
  border:1px solid rgba(203,213,225,.9);
  background:rgba(255,255,255,.88);
  color:#334155;
}

.flow-map-overview-stream[data-flow-stream="client"]{
  border-color:rgba(34,197,94,.3);
  color:#166534;
}

.flow-map-overview-stream[data-flow-stream="product"]{
  border-color:rgba(6,182,212,.28);
  color:#0f766e;
}

.flow-map-overview-stream[data-flow-stream="money"]{
  border-color:rgba(245,158,11,.32);
  color:#b45309;
}

.flow-map-overview-stream[data-flow-stream="knowledge"]{
  border-color:rgba(59,130,246,.24);
  color:#1d4ed8;
}

.flow-map-overview-placeholder{
  min-height:320px;
  display:grid;
  place-items:center;
  padding:24px;
  color:var(--pds-color-text-muted);
  font-weight:700;
}

.flow-map-visual-board{
  display:grid;
  gap:10px;
  padding:12px;
  border:1px solid rgba(186,230,253,.9);
  border-radius:24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(34,211,238,.1), rgba(34,211,238,0) 26%),
    linear-gradient(180deg, rgba(255,255,255,.985), rgba(247,253,255,.98));
  box-shadow:0 24px 50px rgba(15,23,42,.08);
  overflow:hidden;
}

.flow-map-visual-board-scroll{
  display:grid;
  gap:10px;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:4px;
}

.flow-map-visual-board-stagebar{
  display:grid;
  gap:8px;
}

.flow-map-visual-stage{
  min-width:0;
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  gap:8px;
  align-items:center;
  padding:10px 11px;
  border-radius:16px;
  border:1px solid rgba(203,213,225,.88);
  background:rgba(255,255,255,.96);
  box-shadow:0 12px 26px rgba(15,23,42,.06);
}

.flow-map-visual-stage-index{
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:999px;
  background:var(--flow-map-stage-accent, #0f766e);
  color:#fff;
  font-size:11px;
  font-weight:900;
}

.flow-map-visual-stage-copy{
  display:grid;
  gap:2px;
}

.flow-map-visual-stage-copy strong{
  font-size:10px;
  line-height:1.15;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:#0f172a;
}

.flow-map-visual-board-grid{
  display:grid;
  gap:8px;
  align-items:stretch;
}

.flow-map-visual-board-corner,
.flow-map-visual-board-column-head,
.flow-map-visual-board-lanehead,
.flow-map-visual-board-cell{
  border-radius:14px;
}

.flow-map-visual-board-column-head{
  min-width:0;
  display:grid;
  gap:5px;
  padding:9px 10px 10px;
  border:1px solid rgba(203,213,225,.88);
  background:rgba(255,255,255,.96);
  text-align:left;
  box-shadow:0 10px 20px rgba(15,23,42,.04);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  cursor:pointer;
  appearance:none;
  width:100%;
}

.flow-map-visual-board-column-head span{
  display:inline-flex;
  width:max-content;
  min-height:20px;
  padding:0 7px;
  align-items:center;
  border-radius:999px;
  background:#e0f2fe;
  color:#075985;
  font-size:10px;
  font-weight:900;
}

.flow-map-visual-board-column-head strong{
  font-size:10px;
  line-height:1.2;
  color:#0f172a;
}

.flow-map-visual-board-column-head em{
  margin:0;
  font-style:normal;
  font-size:10px;
  line-height:1.3;
  color:#64748b;
}

.flow-map-visual-board-column-head.is-completed{
  border-color:rgba(34,197,94,.28);
  background:linear-gradient(180deg, rgba(240,253,244,.94), rgba(255,255,255,.98));
}

.flow-map-visual-board-column-head.is-current{
  border-color:rgba(14,165,233,.55);
  background:linear-gradient(180deg, rgba(224,242,254,.98), rgba(255,255,255,.98));
  box-shadow:0 18px 32px rgba(14,165,233,.14);
  transform:translateY(-4px) scale(1.02);
}

.flow-map-visual-board-column-head.is-upcoming{
  background:rgba(248,250,252,.94);
}

.flow-map-visual-board-lanehead{
  min-width:0;
  display:grid;
  align-content:center;
  gap:3px;
  padding:10px;
  border:1px solid rgba(221,230,242,.96);
  background:rgba(255,255,255,.96);
}

.flow-map-visual-board-lanehead strong{
  font-size:11px;
  line-height:1.15;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:#0f172a;
}

.flow-map-visual-board-lanehead span{
  font-size:10px;
  line-height:1.3;
  color:#64748b;
}

.flow-map-visual-board-cell{
  min-width:0;
  min-height:96px;
  display:grid;
  align-content:center;
  gap:3px;
  padding:10px 8px;
  border:1px solid var(--flow-map-cell-stroke, #dbe4ec);
  background:var(--flow-map-cell-fill, #ffffff);
  box-shadow:0 10px 22px rgba(15,23,42,.04);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, opacity .18s ease;
  cursor:pointer;
}

.flow-map-visual-board-cell.is-completed{
  box-shadow:0 12px 22px rgba(34,197,94,.08);
}

.flow-map-visual-board-cell.is-current{
  position:relative;
  border-color:rgba(14,165,233,.5);
  box-shadow:0 18px 30px rgba(14,165,233,.12);
  transform:translateY(-2px);
}

.flow-map-visual-board-cell.is-current::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  box-shadow:inset 0 0 0 1px rgba(14,165,233,.22);
}

.flow-map-visual-board-cell.is-upcoming{
  opacity:.93;
}

.flow-map-visual-board-cell span{
  font-size:10px;
  line-height:1.28;
  font-weight:700;
  color:#334155;
  text-align:center;
}

.flow-map-visual-board-footer{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
}

.flow-map-visual-board-footer-card{
  min-width:0;
  display:grid;
  gap:8px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(221,230,242,.96);
  background:rgba(255,255,255,.96);
  box-shadow:0 12px 24px rgba(15,23,42,.05);
}

.flow-map-visual-board-footer-card h4,
.flow-map-visual-board-footer-card p{
  margin:0;
}

.flow-map-visual-board-footer-card h4{
  font-size:10px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:#0f172a;
}

.flow-map-visual-board-footer-lines{
  display:grid;
  gap:6px;
}

.flow-map-visual-board-footer-card p{
  font-size:10px;
  line-height:1.35;
  color:#475569;
}

.flow-map-process-board{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
}

.flow-map-process-lane{
  display:grid;
  gap:8px;
  align-content:start;
  padding:10px;
  border:1px solid rgba(203,213,225,.88);
  border-radius:20px;
  background:rgba(255,255,255,.92);
  box-shadow:0 10px 28px rgba(15,23,42,.05);
}

.flow-map-process-lane[data-flow-stream="client"]{
  background:linear-gradient(180deg, rgba(240,253,244,.92), rgba(255,255,255,.95));
  border-color:rgba(34,197,94,.28);
}

.flow-map-process-lane[data-flow-stream="product"]{
  background:linear-gradient(180deg, rgba(236,254,255,.94), rgba(255,255,255,.95));
  border-color:rgba(6,182,212,.28);
}

.flow-map-process-lane[data-flow-stream="money"]{
  background:linear-gradient(180deg, rgba(255,251,235,.96), rgba(255,255,255,.95));
  border-color:rgba(245,158,11,.24);
}

.flow-map-process-lane[data-flow-stream="knowledge"]{
  background:linear-gradient(180deg, rgba(239,246,255,.96), rgba(255,255,255,.95));
  border-color:rgba(59,130,246,.22);
}

.flow-map-process-lane-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.flow-map-process-lane-label{
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#0f172a;
}

.flow-map-process-lane-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  min-height:28px;
  border-radius:999px;
  background:rgba(255,255,255,.95);
  color:#0f172a;
  font-size:12px;
  font-weight:900;
}

.flow-map-process-lane-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}

.flow-map-process-lane-empty{
  min-height:78px;
  display:grid;
  place-items:center;
  border:1px dashed var(--pds-color-border-strong);
  border-radius:16px;
  background:rgba(255,255,255,.72);
  color:var(--pds-color-text-muted);
  font-size:12px;
  font-weight:700;
}

.flow-map-process-tile{
  min-width:0;
  min-height:104px;
  padding:12px 13px 13px;
  border:1px solid rgba(191,219,254,.88);
  border-radius:20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.99), rgba(247,252,255,.98)),
    radial-gradient(circle at top right, rgba(34,211,238,.08), rgba(34,211,238,0) 42%);
  box-shadow:0 14px 28px rgba(15,23,42,.06);
  display:grid;
  gap:8px;
  text-align:left;
  color:#0f172a;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.flow-map-process-tile:hover{
  transform:translateY(-3px) scale(1.01);
  border-color:rgba(6,182,212,.5);
  box-shadow:0 22px 38px rgba(8,145,178,.16);
}

.flow-map-process-tile-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.flow-map-process-tile-number,
.flow-map-process-tile-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:29px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.03em;
}

.flow-map-process-tile-number{
  min-width:38px;
  padding:0 11px;
  background:linear-gradient(135deg, #ecfeff, #cffafe);
  color:#0f766e;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72);
}

.flow-map-process-tile-status{
  padding:0 10px;
  background:rgba(241,245,249,.88);
  color:#334155;
  border:1px solid rgba(226,232,240,.95);
}

.flow-map-process-tile-title{
  min-height:0;
  overflow:hidden;
  font-size:14px;
  font-weight:800;
  line-height:1.26;
  letter-spacing:-.015em;
  color:inherit;
}

.flow-map-process-tile-meta{
  font-size:12px;
  line-height:1.45;
  color:#5b6b80;
}

.flow-map-process-tile-progress-row{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}

.flow-map-process-tile-progress,
.flow-map-process-tile-focus{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.flow-map-process-tile-progress{
  background:rgba(15,23,42,.07);
  color:#475569;
}

.flow-map-process-tile-focus{
  background:rgba(34,197,94,.1);
  color:#166534;
}

.flow-map-process-tile.tone-selected{
  border-color:#06b6d4;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.16), rgba(255,255,255,0) 36%),
    linear-gradient(135deg, #0f766e, #0891b2 52%, #22c55e);
  color:#fff;
  box-shadow:0 24px 44px rgba(6,182,212,.28);
}

.flow-map-process-tile.tone-selected .flow-map-process-tile-number,
.flow-map-process-tile.tone-selected .flow-map-process-tile-status{
  background:rgba(255,255,255,.18);
  border-color:rgba(255,255,255,.14);
  color:#fff;
}

.flow-map-process-tile.tone-selected .flow-map-process-tile-meta{
  color:rgba(255,255,255,.86);
}

.flow-map-process-tile.tone-selected .flow-map-process-tile-progress{
  background:rgba(255,255,255,.16);
  color:#f8fafc;
}

.flow-map-process-tile.tone-selected .flow-map-process-tile-focus{
  background:rgba(255,255,255,.22);
  color:#f8fafc;
}

.flow-map-process-tile.tone-related{
  border-color:rgba(34,197,94,.38);
  background:linear-gradient(180deg, rgba(240,253,244,.98), rgba(255,255,255,.98));
}

.flow-map-process-tile.is-progress-completed{
  border-color:rgba(34,197,94,.34);
  background:linear-gradient(180deg, rgba(240,253,244,.98), rgba(255,255,255,.98));
}

.flow-map-process-tile.is-progress-current{
  border-color:rgba(6,182,212,.52);
  box-shadow:0 20px 34px rgba(6,182,212,.14);
}

.flow-map-process-tile.is-progress-upcoming{
  background:linear-gradient(180deg, rgba(248,250,252,.96), rgba(255,255,255,.96));
}

.flow-map-process-tile.is-frame-focus:not(.tone-selected){
  box-shadow:0 0 0 2px rgba(34,197,94,.18), 0 16px 30px rgba(34,197,94,.08);
}

.flow-map-process-tile.is-presentation-active{
  transform:translateY(-10px) scale(1.06);
  border-color:#06b6d4;
  box-shadow:0 28px 44px rgba(8,145,178,.22);
  z-index:2;
}

.flow-map-process-tile.is-presentation-active.is-presentation-board{
  transform:translateY(-16px) scale(1.08);
}

.flow-map-process-tile.tone-muted{
  opacity:.62;
}

.flow-map-empty{
  min-height:360px;
  display:grid;
  place-items:center;
  padding:24px;
  text-align:center;
  color:var(--muted);
  font-weight:600;
}

.flow-map-detail{
  display:block;
  min-height:0;
}

.flow-map-detail--has-overlay{
  min-height:0;
}

.flow-map-detail-card--prompt{
  display:grid;
  gap:12px;
  align-content:start;
  min-height:112px;
  background:
    radial-gradient(circle at top right, rgba(6,182,212,.12), rgba(6,182,212,0) 36%),
    linear-gradient(180deg, rgba(255,255,255,.995), rgba(247,251,255,.99));
}

.flow-map-detail-card--prompt h3,
.flow-map-detail-card--prompt p{
  margin:0;
}

.flow-map-detail-card--prompt h3{
  font-size:22px;
  line-height:1.08;
  letter-spacing:-.03em;
}

.flow-map-detail-card{
  padding:16px;
}

.flow-map-process-overlay{
  position:fixed;
  inset:0;
  z-index:1800;
  display:grid;
  place-items:center;
  padding:32px;
}

.flow-map-process-overlay-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.42);
  backdrop-filter:blur(10px);
}

.flow-map-process-overlay-card{
  position:relative;
  z-index:1;
  width:min(1120px, calc(100vw - 64px));
  max-height:calc(100vh - 64px);
  overflow:auto;
  padding:28px;
  border:1px solid rgba(125,211,252,.3);
  border-radius:30px;
  background:
    radial-gradient(circle at top left, rgba(34,211,238,.16), rgba(34,211,238,0) 26%),
    radial-gradient(circle at top right, rgba(59,130,246,.08), rgba(59,130,246,0) 28%),
    linear-gradient(180deg, rgba(255,255,255,.992), rgba(248,252,255,.992));
  box-shadow:0 36px 90px rgba(15,23,42,.28);
}

.flow-map-process-overlay-head{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:18px;
  align-items:start;
  margin-bottom:20px;
}

.flow-map-process-overlay-head h3,
.flow-map-process-overlay-head p{
  margin:0;
}

.flow-map-process-overlay-head h3{
  font-size:32px;
  line-height:1;
  letter-spacing:-.04em;
}

.flow-map-process-overlay-head p{
  margin-top:10px;
  max-width:78ch;
  font-size:15px;
  line-height:1.65;
  color:#516174;
}

.flow-map-process-overlay-close{
  min-width:52px;
  min-height:52px;
  border-radius:16px;
}

.flow-map-process-overlay-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:18px;
}

.flow-map-process-overlay-tab{
  min-height:42px;
  padding:0 15px;
  border:1px solid rgba(186,230,253,.88);
  border-radius:999px;
  background:rgba(255,255,255,.94);
  color:#0f5f7e;
  font-size:13px;
  font-weight:800;
  transition:background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.flow-map-process-overlay-tab:hover{
  transform:translateY(-1px);
  border-color:rgba(6,182,212,.54);
}

.flow-map-process-overlay-tab.is-active{
  border-color:#06b6d4;
  background:linear-gradient(135deg, #0891b2, #06b6d4);
  color:#fff;
}

.flow-map-process-overlay-grid{
  display:grid;
  grid-template-columns:minmax(0, 1.22fr) minmax(320px, .78fr);
  gap:18px;
}

.flow-map-process-overlay-panel{
  padding:20px;
  border:1px solid rgba(203,213,225,.88);
  border-radius:24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(249,252,255,.94));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
}

.flow-map-process-overlay-panel h4,
.flow-map-process-overlay-panel p{
  margin:0 0 12px;
}

.flow-map-process-overlay-panel h4{
  font-size:15px;
  line-height:1.2;
  letter-spacing:-.01em;
  color:#0f172a;
}

.flow-map-process-overlay-panel p{
  font-size:14px;
  line-height:1.62;
  color:#516174;
}

.flow-map-process-overlay-panel p:last-child{
  margin-bottom:0;
}

.flow-map-process-overlay-modules{
  display:grid;
  gap:10px;
}

.flow-map-process-overlay-module{
  display:grid;
  gap:6px;
  padding:13px 14px;
  border:1px solid rgba(186,230,253,.84);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(236,254,255,.86), rgba(255,255,255,.88));
}

.flow-map-process-overlay-module strong{
  font-size:14px;
  line-height:1.3;
}

.flow-map-process-overlay-module span{
  font-size:12px;
  line-height:1.5;
  color:#516174;
}

.flow-map-process-overlay-module em{
  font-style:normal;
  font-size:11px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#0f766e;
}

.flow-map-process-overlay-steps{
  display:grid;
  gap:10px;
}

.flow-map-process-overlay-step{
  padding:13px 14px;
  border:1px solid rgba(203,213,225,.88);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(248,250,252,.96), rgba(255,255,255,.94));
}

.flow-map-process-overlay-step strong,
.flow-map-process-overlay-step span{
  display:block;
}

.flow-map-process-overlay-step strong{
  font-size:14px;
  line-height:1.32;
}

.flow-map-process-overlay-step span{
  margin-top:5px;
  font-size:12px;
  line-height:1.5;
  color:#5b6b80;
}

.flow-map-visual-overlay{
  position:fixed;
  inset:0;
  z-index:1810;
  display:grid;
  place-items:center;
  padding:24px;
}

.flow-map-visual-overlay-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.6);
  backdrop-filter:blur(8px);
}

.flow-map-visual-overlay-card{
  position:relative;
  z-index:1;
  width:min(96vw, 1800px);
  max-height:calc(100vh - 48px);
  overflow:auto;
  padding:20px;
  border:1px solid rgba(125,211,252,.28);
  border-radius:28px;
  background:rgba(255,255,255,.98);
  box-shadow:0 32px 80px rgba(15,23,42,.34);
}

.flow-map-visual-overlay-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:start;
  margin-bottom:16px;
}

.flow-map-visual-overlay-head h3{
  margin:0;
  font-size:26px;
  line-height:1.04;
  letter-spacing:-.04em;
}

.flow-map-visual-overlay-close{
  min-width:48px;
  min-height:48px;
  border-radius:16px;
}

.flow-map-visual-overlay-body{
  display:grid;
  place-items:center;
  min-height:320px;
}

.flow-map-visual-overlay-image{
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  max-height:calc(100vh - 180px);
  object-fit:contain;
}

.flow-map-process-overlay-app-screen{
  margin-top:22px;
  border:1px solid rgba(171,187,214,.42);
  border-radius:26px;
  background:
    radial-gradient(circle at top right, rgba(34,211,238,.12), rgba(34,211,238,0) 34%),
    linear-gradient(180deg, rgba(248,253,255,.985), rgba(239,247,255,.96));
  padding:20px;
  box-shadow:0 18px 36px rgba(29,55,96,.08);
  display:grid;
  justify-items:start;
}

.flow-map-process-overlay-app-screen-head{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:6px;
  margin-bottom:16px;
}

.flow-map-process-overlay-app-screen-head h4{
  margin:0;
  font-size:16px;
  line-height:1.2;
  letter-spacing:-.015em;
}

.flow-map-process-overlay-app-screen-head p{
  margin:0;
  max-width:72ch;
  color:#58708b;
  font-size:13px;
  line-height:1.6;
}

.flow-map-process-overlay-app-screen-trigger{
  position:relative;
  display:block;
  width:min(100%, 460px);
  padding:10px;
  border:1px solid rgba(186,230,253,.78);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,248,255,.96));
  cursor:pointer;
  text-align:left;
  overflow:hidden;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.flow-map-process-overlay-app-screen-trigger:hover{
  transform:translateY(-2px);
  border-color:rgba(6,182,212,.42);
  box-shadow:0 22px 40px rgba(29,55,96,.14);
}

.flow-map-process-overlay-app-screen-image{
  display:block;
  width:100%;
  height:auto;
  max-height:180px;
  object-fit:cover;
  object-position:top center;
  border-radius:16px;
  border:1px solid rgba(171,187,214,.48);
  box-shadow:0 18px 34px rgba(29,55,96,.12);
}

.flow-map-process-overlay-app-screen-hint{
  position:absolute;
  right:18px;
  bottom:18px;
  display:inline-flex;
  align-items:center;
  min-height:34px;
  padding:0 13px;
  border-radius:999px;
  background:rgba(15,23,42,.8);
  color:#f8fafc;
  font-size:12px;
  font-weight:800;
  letter-spacing:.02em;
  box-shadow:0 14px 30px rgba(15,23,42,.2);
}

.flow-map-script-stack{
  display:grid;
  gap:14px;
}

.flow-map-script-section > p{
  margin:0 0 8px;
}

.flow-map-detail-card h3,
.flow-map-detail-card h4{
  margin:0 0 10px;
}

.flow-map-detail-card p{
  margin:0 0 10px;
}

.flow-map-detail-lead{
  font-size:15px;
  line-height:1.55;
}

.flow-map-bullet-list{
  margin:8px 0 0;
  padding-left:18px;
  display:grid;
  gap:6px;
}

.flow-map-tag{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border:1px solid var(--pds-color-border);
  border-radius:999px;
  background:var(--pds-color-surface-soft);
  color:var(--pds-color-text);
  font-weight:600;
}

.flow-map-stage-list{
  display:grid;
  gap:10px;
}

.flow-map-stage{
  padding:14px;
  border:1px solid var(--pds-color-border);
  border-radius:12px;
  background:var(--pds-color-surface);
}

.flow-map-stage.is-active{
  border-color:var(--pds-color-primary);
  background:rgba(20,32,51,.04);
  box-shadow:0 0 0 1px rgba(20,32,51,.08);
}

.flow-map-stage-topline{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
  font-size:12px;
  color:var(--muted);
}

.flow-map-stage h4{
  margin:0 0 6px;
  font-size:15px;
}

.flow-map-stage p{
  margin:0;
  color:var(--pds-color-text-muted);
}

.flow-map-stage-step{
  font-weight:700;
  color:var(--pds-color-primary);
}

.flow-map-plain-steps{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:10px;
}

.flow-map-plain-steps li{
  display:grid;
  gap:4px;
}

.flow-map-module-card{
  min-width:180px;
  padding:12px 14px;
  border:1px solid var(--pds-color-border);
  border-radius:12px;
  background:var(--pds-color-surface-soft);
  display:grid;
  gap:4px;
}

.flow-map-module-readiness{
  color:var(--pds-color-primary);
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.03em;
  font-size:11px;
}

.flow-map-related-btn{
  min-height:36px;
}

.flow-map-player{
  display:grid;
  gap:10px;
}

.flow-map-player-spotlight{
  display:grid;
  grid-template-columns:minmax(0, 1.1fr) minmax(280px, .9fr);
  gap:16px;
  padding:18px 20px;
  border:1px solid rgba(186,230,253,.88);
  border-radius:24px;
  background:
    radial-gradient(circle at top left, rgba(34,211,238,.12), rgba(34,211,238,0) 28%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,251,255,.98));
  box-shadow:0 14px 30px rgba(15,23,42,.06);
}

.flow-map-player-copy{
  display:grid;
  gap:8px;
}

.flow-map-player-kicker{
  display:inline-flex;
  align-items:center;
  width:max-content;
  min-height:30px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(8,145,178,.1);
  color:#0f766e;
  font-size:11px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.flow-map-player-copy strong{
  font-size:22px;
  line-height:1.08;
  letter-spacing:-.03em;
  color:#0f172a;
}

.flow-map-player-copy p{
  margin:0;
  font-size:14px;
  line-height:1.62;
  color:#516174;
}

.flow-map-player-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-content:start;
}

.flow-map-player-meta-pill{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(255,255,255,.9);
  border:1px solid rgba(203,213,225,.88);
  color:#334155;
  font-size:12px;
  font-weight:800;
}

.flow-map-player-meta-pill.is-role{
  border-color:rgba(34,197,94,.26);
  background:rgba(240,253,244,.95);
  color:#166534;
}

.flow-map-player-axis{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(168px, 1fr));
  gap:10px;
}

.flow-map-player-step{
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  align-items:start;
  gap:10px;
  padding:14px;
  border:1px solid rgba(203,213,225,.86);
  border-radius:20px;
  background:rgba(255,255,255,.94);
  text-align:left;
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.flow-map-player-step:hover{
  transform:translateY(-2px);
  border-color:rgba(6,182,212,.4);
  box-shadow:0 16px 26px rgba(15,23,42,.08);
}

.flow-map-player-step.is-completed{
  background:linear-gradient(180deg, rgba(240,253,244,.96), rgba(255,255,255,.96));
  border-color:rgba(34,197,94,.26);
}

.flow-map-player-step.is-current{
  background:
    radial-gradient(circle at top left, rgba(34,211,238,.16), rgba(34,211,238,0) 36%),
    linear-gradient(135deg, rgba(8,145,178,.14), rgba(255,255,255,.98) 55%);
  border-color:#06b6d4;
  box-shadow:0 18px 32px rgba(6,182,212,.14);
}

.flow-map-player-step.is-upcoming{
  background:rgba(248,250,252,.92);
}

.flow-map-player-step-index{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:999px;
  background:#e0f2fe;
  color:#075985;
  font-size:12px;
  font-weight:900;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72);
}

.flow-map-player-step.is-completed .flow-map-player-step-index{
  background:#dcfce7;
  color:#166534;
}

.flow-map-player-step.is-current .flow-map-player-step-index{
  background:#0f172a;
  color:#f8fafc;
}

.flow-map-player-step-copy{
  display:grid;
  gap:4px;
  min-width:0;
}

.flow-map-player-step-copy strong{
  font-size:13px;
  line-height:1.28;
  color:#0f172a;
}

.flow-map-player-step-copy span{
  font-size:12px;
  line-height:1.45;
  color:#64748b;
}

.flow-map-speed-field{
  min-width:140px;
}

.flow-map-presentation{
  position:fixed;
  inset:0;
  z-index:3600;
  display:grid;
  place-items:center;
  padding:22px;
}

.flow-map-presentation.hidden{
  display:none;
}

.flow-map-presentation-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.56);
  backdrop-filter:blur(18px);
}

.flow-map-presentation-shell{
  position:relative;
  z-index:1;
  width:min(1760px, calc(100vw - 44px));
  height:min(980px, calc(100vh - 44px));
  display:grid;
  grid-template-rows:auto auto auto minmax(0, 1fr) auto;
  gap:14px;
  padding:18px;
  border-radius:30px;
  border:1px solid rgba(186,230,253,.72);
  background:
    radial-gradient(circle at top left, rgba(34,211,238,.14), rgba(34,211,238,0) 28%),
    linear-gradient(180deg, rgba(255,255,255,.99), rgba(244,250,255,.98));
  box-shadow:0 30px 80px rgba(15,23,42,.22);
  overflow:hidden;
  animation:flowMapPresentationFade .24s ease;
}

.flow-map-presentation-bar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

.flow-map-presentation-title{
  display:grid;
  gap:6px;
  min-width:0;
}

.flow-map-presentation-title strong{
  font-size:30px;
  line-height:1.02;
  letter-spacing:-.04em;
  color:#0f172a;
}

.flow-map-presentation-kicker{
  display:inline-flex;
  align-items:center;
  width:max-content;
  min-height:30px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(8,145,178,.1);
  color:#0f766e;
  font-size:11px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.flow-map-presentation-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:10px;
}

.flow-map-presentation-process-axis,
.flow-map-presentation-step-axis{
  display:grid;
  gap:10px;
}

.flow-map-presentation-process-axis{
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
}

.flow-map-presentation-step-axis{
  grid-template-columns:repeat(11, minmax(0, 1fr));
  overflow-x:auto;
  padding-bottom:4px;
}

.flow-map-presentation-process-pill,
.flow-map-presentation-step-pill{
  min-width:0;
  display:grid;
  gap:8px;
  text-align:left;
  border:1px solid rgba(191,219,254,.92);
  background:rgba(255,255,255,.92);
  color:#0f172a;
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.flow-map-presentation-process-pill{
  grid-template-columns:auto minmax(0, 1fr);
  align-items:start;
  padding:12px 14px;
  border-radius:22px;
}

.flow-map-presentation-step-pill{
  grid-template-columns:auto minmax(0, 1fr);
  align-items:start;
  padding:12px;
  border-radius:18px;
}

.flow-map-presentation-process-pill:hover,
.flow-map-presentation-step-pill:hover{
  transform:translateY(-2px);
  border-color:rgba(6,182,212,.48);
  box-shadow:0 14px 28px rgba(8,145,178,.12);
}

.flow-map-presentation-process-pill.is-current,
.flow-map-presentation-step-pill.is-current{
  border-color:#06b6d4;
  background:
    radial-gradient(circle at top left, rgba(34,211,238,.16), rgba(34,211,238,0) 36%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(238,248,255,.98));
  box-shadow:0 18px 32px rgba(6,182,212,.16);
}

.flow-map-presentation-process-pill.is-completed,
.flow-map-presentation-step-pill.is-completed{
  border-color:rgba(34,197,94,.26);
  background:linear-gradient(180deg, rgba(240,253,244,.96), rgba(255,255,255,.96));
}

.flow-map-presentation-process-pill.is-upcoming,
.flow-map-presentation-step-pill.is-upcoming{
  opacity:.88;
}

.flow-map-presentation-process-index,
.flow-map-presentation-step-index{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:999px;
  background:#e0f2fe;
  color:#075985;
  font-size:12px;
  font-weight:900;
}

.flow-map-presentation-process-copy,
.flow-map-presentation-step-copy{
  display:grid;
  gap:4px;
  min-width:0;
}

.flow-map-presentation-process-copy strong,
.flow-map-presentation-step-copy strong{
  font-size:13px;
  line-height:1.3;
}

.flow-map-presentation-process-copy span,
.flow-map-presentation-step-copy span{
  font-size:11px;
  line-height:1.45;
  color:#64748b;
}

.flow-map-presentation-stage{
  min-height:0;
  overflow:auto;
  padding-right:4px;
}

.flow-map-presentation-board{
  display:grid;
  gap:16px;
  animation:flowMapPresentationFade .24s ease;
}

.flow-map-presentation-story{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:12px;
}

.flow-map-presentation-story-card{
  min-width:0;
  display:grid;
  align-content:start;
  gap:8px;
  min-height:148px;
  padding:16px 18px;
  border-radius:22px;
  border:1px solid rgba(191,219,254,.82);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,251,255,.98)),
    radial-gradient(circle at top right, rgba(34,211,238,.08), rgba(34,211,238,0) 42%);
  box-shadow:0 12px 26px rgba(15,23,42,.06);
}

.flow-map-presentation-story-card p{
  margin:0;
  font-size:13px;
  line-height:1.58;
  color:#445468;
}

.flow-map-presentation-story-label{
  font-size:11px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:#0f766e;
}

@keyframes flowMapPresentationFade{
  from{
    opacity:0;
    transform:translateY(8px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

.flow-map-workbench.is-presentation .flow-map-layout{
  grid-template-columns:minmax(0, 1fr);
}

.flow-map-workbench.is-presentation .flow-map-canvas{
  min-height:760px;
}

.flow-map-workbench.is-presentation #flowMapSummary,
.flow-map-workbench.is-presentation #flowMapTrainingRail,
.flow-map-workbench.is-presentation .flow-map-player,
.flow-map-workbench.is-presentation #flowMapCopySceneBtn,
.flow-map-workbench.is-presentation #flowMapCopyNarrativeBtn,
.flow-map-workbench.is-presentation #flowMapDownloadSvgBtn,
.flow-map-workbench.is-presentation #flowMapMindViewBtn,
.flow-map-workbench.is-presentation #flowMapAudienceUniversalBtn,
.flow-map-workbench.is-presentation #flowMapAudienceClientBtn,
.flow-map-workbench.is-presentation #flowMapDomainFilterSelect,
.flow-map-workbench.is-presentation #flowMapPriorityFilterSelect,
.flow-map-workbench.is-presentation #flowMapStatusFilterSelect,
.flow-map-workbench.is-presentation #flowMapTrainingContextSelect,
.flow-map-workbench.is-presentation #flowMapTrainingPathSelect{
  display:none !important;
}

.flow-map-workbench.is-presentation .flow-map-head-actions{
  justify-content:flex-end;
}

.flow-map-workbench.is-presentation .flow-map-toolbar{
  gap:12px;
}

.flow-map-workbench.is-presentation .flow-map-filters{
  grid-template-columns:minmax(0, 320px);
}

.flow-map-workbench.is-presentation .flow-map-filters .field:not(:first-child){
  display:none;
}

.flow-map-center{
  stroke:var(--pds-color-primary);
  stroke-width:2;
}

.flow-map-center-title{
  font-size:44px;
  font-weight:800;
  fill:var(--pds-color-primary);
  letter-spacing:.04em;
}

.flow-map-center-meta{
  font-size:17px;
  fill:var(--pds-color-text-muted);
}

.flow-map-group-label,
.flow-map-stream-label,
.flow-map-axis-label{
  fill:var(--pds-color-text-muted);
  font-weight:700;
}

.flow-map-stream-label{
  font-size:18px;
}

.flow-map-group-label{
  font-size:16px;
}

.flow-map-axis-label{
  font-size:12px;
}

.flow-map-axis-line{
  stroke:rgba(148,163,184,.26);
  stroke-width:2;
  stroke-dasharray:6 7;
}

.flow-map-axis-pill,
.flow-map-master-stream{
  fill:rgba(255,255,255,.86);
  stroke:var(--pds-color-border);
  stroke-width:1.5;
}

.flow-map-relation{
  stroke:var(--pds-color-border-strong);
  stroke-width:2;
  opacity:.88;
}

.flow-map-relation.is-highlighted{
  stroke:var(--pds-color-primary);
  stroke-width:3;
}

.flow-map-node{
  cursor:pointer;
  transition:transform .18s ease, opacity .18s ease;
}

.flow-map-node:hover{
  transform:translateY(-2px);
}

.flow-map-node rect{
  fill:var(--pds-color-surface);
  stroke:var(--pds-color-border);
  stroke-width:1.6;
  filter:drop-shadow(0 8px 22px rgba(15,23,42,.08));
}

.flow-map-node-title,
.flow-map-node-number,
.flow-map-node-meta{
  fill:var(--pds-color-text);
}

.flow-map-node-title{
  font-size:15px;
  font-weight:700;
}

.flow-map-node-number{
  font-size:13px;
  font-weight:800;
}

.flow-map-node-meta{
  font-size:11px;
}

.flow-map-node.tone-selected rect{
  fill:var(--pds-color-primary);
  stroke:var(--pds-color-primary);
}

.flow-map-node.tone-selected .flow-map-node-title,
.flow-map-node.tone-selected .flow-map-node-number,
.flow-map-node.tone-selected .flow-map-node-meta{
  fill:var(--pds-color-text-inverse);
}

.flow-map-node.tone-related rect{
  fill:rgba(31,122,76,.14);
  stroke:var(--pds-color-success);
}

.flow-map-node.tone-muted{
  opacity:.36;
}

@media (max-width: 1240px){
  .flow-map-summary-grid,
  .flow-map-filters{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .flow-map-preset-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .flow-map-context-grid,
  .flow-map-training-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .flow-map-layout{
    grid-template-columns:minmax(0, 1fr);
  }
}

@media (max-width: 820px){
  .flow-map-summary-grid,
  .flow-map-filters{
    grid-template-columns:minmax(0, 1fr);
  }

  .flow-map-preset-grid{
    grid-template-columns:minmax(0, 1fr);
  }

  .flow-map-context-grid,
  .flow-map-training-grid{
    grid-template-columns:minmax(0, 1fr);
  }

  .flow-map-toolbar,
  .flow-map-player-actions{
    align-items:stretch;
  }

  .flow-map-svg{
    min-width:920px;
  }
}

.ai-review-panel {
  gap: 14px;
}

.ai-review-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ai-review-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.ai-review-list-item {
  color: var(--text);
}

.ai-review-draft {
  margin: 0;
  white-space: pre-wrap;
  font: inherit;
  color: var(--text);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}
/* Order-card polish: stable actions, canonical white wordmark and dismissible notices. */
body.flow-ui-2027 .app-wordmark,
body.flow-ui-2027 .brand-mark,
body.flow-ui-2027 .brand-mark.has-logo{
  height:38px;
  padding:7px 12px;
  background:#10213a;
  border:1px solid #10213a;
  border-radius:5px;
}

body.flow-ui-2027 .app-wordmark img,
body.flow-ui-2027 .brand-mark img{
  object-position:left center;
}

.flow-login-screen__logo{
  box-sizing:content-box;
  padding:12px 16px;
  background:#10213a;
  border:1px solid #10213a;
  border-radius:5px;
}

#globalBanner:not(.hidden){
  position:fixed;
  top:12px;
  left:50%;
  z-index:1200;
  display:flex;
  align-items:flex-start;
  gap:12px;
  width:min(calc(100vw - 32px), 1480px);
  margin:0;
  transform:translateX(-50%);
}

#globalBanner [data-global-banner-message]{
  min-width:0;
  flex:1 1 auto;
}

.banner-dismiss{
  flex:0 0 auto;
  width:32px;
  min-width:32px;
  height:32px;
  min-height:32px;
  padding:0;
  border:0;
  border-radius:5px;
  background:transparent;
  color:currentColor;
  font-size:24px;
  line-height:1;
  cursor:pointer;
}

.banner-dismiss:hover{
  background:rgba(16,33,58,.1);
}

#orderDetailView .quick-order-actions,
#orderDetailView .order-primary-actions{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  align-items:stretch;
  width:100%;
  gap:10px;
}

#orderDetailView .quick-order-actions .quick-action-icon,
#orderDetailView .order-primary-actions > button{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-width:0;
  min-height:48px;
  margin:0;
  padding:10px 14px;
  overflow-wrap:anywhere;
  text-align:center;
  white-space:normal;
}

#orderDetailView .quick-order-actions .quick-action-icon,
body.flow-ui-2027 #orderDetailView .quick-order-actions .quick-action-icon{
  width:100%;
  min-width:0;
  height:auto;
  min-height:48px;
  font-size:14px;
}

#orderDetailView .order-primary-actions .icon-button span[aria-hidden="true"]{
  font-size:14px;
  line-height:1.2;
}
