
/* Sfera CRM 2.33.0: Projects detail + Template Studio
   Dashboard-approved palette; old statistical panels are disabled in JS, not hidden.
   Responsive source styles are preloaded ahead of the Sfera layers to avoid style flashing.
*/

/* The Project detail has precisely the same app gutters as Companies. */
body:has(#projects-view:not([hidden]) .projects-shell--detail) #signed-in .app-content{
  padding:clamp(13px,1.5vw,22px) clamp(12px,2vw,32px) 30px!important;
}
#projects-view:not([hidden]):has(.projects-shell--detail){
  width:100%!important;max-width:none!important;min-width:0!important;
  margin:0!important;padding:0!important;background:transparent!important;
}
#projects-view .projects-shell--detail{
  width:100%!important;max-width:none!important;min-width:0!important;
  margin:0!important;padding:0!important;background:transparent!important;
}
#projects-view .projects-shell--detail [data-projects-content]{
  width:100%;max-width:none;min-width:0;
}

/* Project toolbar: title > search > view selector > actions. No redundant back. */
#signed-in.app-shell .app-topbar .sfera-projects-topbar__back{display:none!important}
#signed-in.app-shell .app-topbar .sfera-projects-topbar:has(.sfera-projects-topbar__modes:not([hidden])){
  gap:clamp(8px,1.05vw,14px);
}
#signed-in.app-shell .app-topbar .sfera-projects-topbar:has(.sfera-projects-topbar__modes:not([hidden])) .sfera-projects-topbar__title{
  order:0;flex:0 0 auto;
}
#signed-in.app-shell .app-topbar .sfera-projects-topbar__detail-search:not([hidden]){
  order:1;flex:0 1 380px;min-width:145px;
  max-width:min(390px,33vw);margin:0 4px 0 0!important;
  background:rgba(255,255,255,.09);
}
#signed-in.app-shell .app-topbar .sfera-projects-topbar__modes:not([hidden]){
  order:2;margin:0 auto 0 2px!important;flex:0 0 auto;
}
#signed-in.app-shell .app-topbar .sfera-projects-topbar__actions{
  order:3;
}

/* Clear and understated macrosection heading. */
#projects-view .projects-shell--detail .sfera-pd-workstreams__heading{
  min-height:55px!important;margin:0!important;
  display:flex!important;align-items:center;gap:12px!important;
  padding:16px 19px 11px!important;
  background:#fff!important;background-image:none!important;
  border:0!important;border-bottom:1px solid #e9eff7!important;
  box-shadow:none!important;border-radius:0!important;
}
#projects-view .projects-shell--detail .sfera-pd-workstreams__heading h2{
  font:650 15px/1.4 Poppins,"Open Sans",sans-serif!important;
  color:#14356b!important;
}
#projects-view .projects-shell--detail .sfera-pd-workstreams__heading>span{
  display:inline-flex;align-items:center;
  font:500 11px/1.35 "Open Sans",sans-serif!important;
  color:#8093ae!important;
}

/* Task group status: blue task-list symbol until complete, checked green at completion. */
#projects-view .projects-shell--detail .projects-task-group .projects-group-state{
  display:grid!important;place-items:center!important;
  flex:0 0 36px!important;width:36px!important;height:36px!important;
  border-radius:10px!important;border:1px solid #dceafd!important;
  color:#2373c8!important;background:#ecf5ff!important;
  font-size:0!important;line-height:0!important;
}
#projects-view .projects-shell--detail .projects-task-group .projects-group-state>svg{
  display:block!important;width:19px!important;height:19px!important;
  flex:0 0 19px!important;fill:none!important;stroke:currentColor!important;
  stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important;
}
#projects-view .projects-shell--detail .projects-task-group.is-complete .projects-group-state{
  color:#238768!important;background:#e9f7ef!important;border-color:#c7e8d7!important;
}
#projects-view .projects-shell--detail .projects-task-group .projects-group-progress__track i{
  transition:width .55s cubic-bezier(.2,.75,.25,1);
}

/* Four equivalent controls in the operational board, including chat / context. */
#projects-view .projects-shell--detail .sfera-pd-task-board .projects-task__actions{
  display:flex!important;align-items:center!important;justify-content:flex-end!important;
  gap:8px!important;flex-wrap:wrap!important;min-width:0!important;
}
#projects-view .projects-shell--detail .sfera-pd-task-board .projects-task__actions :is(button,a,[role="button"]){
  box-sizing:border-box!important;flex:0 0 36px!important;
  width:36px!important;min-width:36px!important;max-width:36px!important;
  height:36px!important;min-height:36px!important;max-height:36px!important;
  padding:0!important;margin:0!important;
  display:inline-grid!important;place-items:center!important;
  border-radius:10px!important;
}
#projects-view .projects-shell--detail .sfera-pd-task-board .projects-task__actions :is(button,a,[role="button"]) svg{
  display:block!important;flex:0 0 17px!important;
  width:17px!important;height:17px!important;max-width:17px!important;
  stroke-width:1.8!important;fill:none!important;
  transform:none!important;
}

/* Portfolio: visible navy icon with white line glyphs and safe clearance. */
#projects-view .projects-shell:not(.projects-shell--detail) :is(.projects-health-feature,.projects-workload-feature){
  position:relative;overflow:hidden;
  padding:22px 24px 20px!important;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-feature-icon{
  position:absolute;top:21px;right:23px;
  display:grid!important;place-items:center!important;
  width:40px!important;height:40px!important;
  border:0!important;border-radius:12px!important;
  background:#0e2166!important;color:#fff!important;
  box-shadow:0 4px 10px rgba(14,33,102,.1)!important;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-feature-icon svg{
  display:block!important;width:19px!important;height:19px!important;
  min-width:19px!important;min-height:19px!important;
  fill:none!important;stroke:#fff!important;stroke-width:1.85!important;
  stroke-linecap:round!important;stroke-linejoin:round!important;
  opacity:1!important;visibility:visible!important;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-health-feature__layout{
  display:grid;align-items:center;
  margin:46px 0 17px!important;gap:23px!important;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-health-feature__statuses{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:15px!important;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-health-feature__status{
  border-radius:13px!important;padding:15px 18px!important;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-workload-feature__primary{
  margin:17px 62px 18px 0!important;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-workload-feature__secondary{
  margin-top:auto!important;
}

/* Rebuilt Template studio: a true editing workspace rather than a giant task table. */
#projects-dialog.projects-template-studio .task-v2-dialog{
  width:min(97vw,1560px)!important;max-width:1560px!important;
  max-height:96vh!important;overflow:hidden!important;
  border:1px solid #e4ebf5!important;border-radius:18px!important;
}
#projects-dialog.projects-template-studio .task-v2-dialog__body{
  min-height:0!important;overflow:auto!important;
  padding:20px clamp(14px,2vw,28px)!important;
  background:#f5f8fc!important;
}
#projects-dialog.projects-template-studio .task-v2-dialog__header{
  padding:19px clamp(16px,2vw,28px)!important;
  border-bottom:1px solid #e7edf5!important;
}
#projects-dialog.projects-template-studio .task-v2-dialog__header .task-v3-dialog-heading__icon{
  width:44px!important;height:44px!important;border-radius:12px!important;
  background:#edf5ff!important;color:#0b7ff0!important;
}
#projects-dialog.projects-template-studio .task-v2-dialog__header .task-v3-dialog-heading__icon svg{
  display:block;width:21px!important;height:21px!important;
  fill:none!important;stroke:#0b7ff0!important;stroke-width:1.8!important;
}
#projects-dialog.projects-template-studio .projects-template-studio__tabs{
  display:flex!important;width:min(435px,100%)!important;gap:5px!important;
  min-height:0!important;padding:4px!important;margin:0 0 17px!important;
  border:1px solid #e2e9f4!important;background:#eaf0f8!important;
  border-radius:12px!important;box-shadow:none!important;
}
#projects-dialog.projects-template-studio .projects-template-studio__tabs button{
  position:relative;flex:1 1 0!important;display:flex!important;
  align-items:center!important;justify-content:center!important;
  gap:0!important;min-width:0!important;min-height:38px!important;
  height:38px!important;padding:8px 13px!important;
  border:0!important;border-radius:9px!important;
  background:transparent!important;color:#6a7f9a!important;
  box-shadow:none!important;font:650 12px/1.2 Poppins,sans-serif!important;
  transition:background .16s ease,color .16s ease,box-shadow .16s ease!important;
}
#projects-dialog.projects-template-studio .projects-template-studio__tabs button[aria-selected="true"]{
  background:#fff!important;color:#0e2166!important;
  box-shadow:0 2px 9px rgba(20,43,77,.09)!important;
}
#projects-dialog.projects-template-studio .projects-template-studio__tabs button:focus-visible{
  outline:2px solid #0b7ff0!important;outline-offset:2px!important;
}
#projects-dialog.projects-template-studio [data-template-editor-body]{
  display:block!important;width:100%!important;max-width:none!important;min-width:0!important;
}
#projects-dialog.projects-template-studio .sfera-template-label{
  color:#5a86b8;font:700 10px/1.2 "Open Sans",sans-serif!important;
  letter-spacing:.065em;text-transform:uppercase;
}
#projects-dialog.projects-template-studio .sfera-template-general{
  display:grid;grid-template-columns:minmax(235px,.62fr) minmax(0,1.65fr);
  gap:16px;align-items:stretch;
}
#projects-dialog.projects-template-studio .sfera-template-general__insight{
  display:flex;flex-direction:column;align-items:flex-start;gap:13px;
  min-width:0;padding:25px;min-height:352px;
  border:1px solid #e1e9f4;border-radius:16px;background:#fff;
  box-shadow:0 4px 16px rgba(18,43,86,.04);
}
#projects-dialog.projects-template-studio .sfera-template-general__emblem{
  display:grid;place-items:center;width:46px;height:46px;margin-top:3px;
  border-radius:13px;background:#edf5ff;color:#0b7ff0;
}
#projects-dialog.projects-template-studio .sfera-template-general__emblem svg{
  width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;
}
#projects-dialog.projects-template-studio .sfera-template-general__insight h3{
  margin:0!important;color:#0e2166!important;
  font:650 clamp(20px,2vw,26px)/1.2 Poppins,sans-serif!important;
  letter-spacing:-.03em;
}
#projects-dialog.projects-template-studio .sfera-template-general__insight>p{
  margin:0;color:#7186a4;font:450 11px/1.65 "Open Sans",sans-serif;
}
#projects-dialog.projects-template-studio .sfera-template-general__figures{
  display:flex;justify-content:space-between;gap:14px;
  width:100%;margin-top:8px;padding-top:17px;border-top:1px solid #e7eef6;
}
#projects-dialog.projects-template-studio .sfera-template-general__figures>div{
  display:flex;flex-direction:column;gap:4px;
}
#projects-dialog.projects-template-studio .sfera-template-general__figures strong{
  font:650 26px/1.1 Poppins,sans-serif;color:#0e2166;
}
#projects-dialog.projects-template-studio .sfera-template-general__figures span{
  font:550 10px/1.35 "Open Sans",sans-serif;color:#8094ae;
}
#projects-dialog.projects-template-studio .sfera-template-general__notice{
  margin-top:auto;border-top:1px solid #e9eff7;padding-top:13px;
  color:#8298b0;font:450 10px/1.55 "Open Sans",sans-serif;
}
#projects-dialog.projects-template-studio .sfera-template-general__form{
  display:grid!important;grid-template-columns:minmax(0,1.1fr) minmax(225px,.75fr);
  gap:16px;align-items:start;width:100%;min-width:0;
}
#projects-dialog.projects-template-studio .sfera-template-surface{
  display:block;min-width:0;margin:0;padding:22px;
  border:1px solid #e2eaf5!important;border-radius:15px!important;
  background:#fff!important;box-shadow:0 4px 15px rgba(18,43,86,.038)!important;
}
#projects-dialog.projects-template-studio .sfera-template-surface--options{
  align-self:start;
}
#projects-dialog.projects-template-studio .sfera-template-section-heading{
  display:flex;align-items:start;justify-content:space-between;
  gap:12px;margin:0 0 19px!important;padding:0 0 13px!important;
  border-bottom:1px solid #edf1f7!important;
  background:transparent!important;
}
#projects-dialog.projects-template-studio .sfera-template-section-heading h3,
#projects-dialog.projects-template-studio .sfera-template-section-heading h4{
  margin:0!important;color:#15366a!important;
  font:650 15px/1.35 Poppins,sans-serif!important;letter-spacing:-.018em;
}
#projects-dialog.projects-template-studio .sfera-template-section-heading p{
  margin:5px 0 0!important;color:#8799b0;font:450 10.5px/1.45 "Open Sans",sans-serif;
}
#projects-dialog.projects-template-studio .sfera-template-field-stack{
  display:grid;grid-template-columns:minmax(0,1fr);gap:17px;
}
#projects-dialog.projects-template-studio .sfera-template-field{
  display:flex;flex-direction:column;gap:8px;min-width:0;
}
#projects-dialog.projects-template-studio .sfera-template-field>span{
  display:flex;align-items:center;gap:4px;min-width:0;
  color:#536b8c;font:600 11px/1.3 "Open Sans",sans-serif!important;
}
#projects-dialog.projects-template-studio .sfera-template-field>span b{
  color:#bf5e68;font-weight:650;
}
#projects-dialog.projects-template-studio .sfera-template-field>span small{
  font-size:10px;color:#8b9bb0;font-weight:450;
}
#projects-dialog.projects-template-studio .sfera-template-field :is(input,select,textarea){
  box-sizing:border-box!important;display:block;width:100%!important;min-width:0!important;
  min-height:44px!important;height:auto;
  padding:10px 13px!important;margin:0!important;
  color:#244166!important;background:#fbfcff!important;background-image:none!important;
  border:1px solid #dae5f2!important;border-radius:10px!important;
  box-shadow:none!important;font:500 12px/1.45 "Open Sans",sans-serif!important;
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease!important;
}
#projects-dialog.projects-template-studio .sfera-template-field :is(input,select,textarea):is(:focus,:focus-visible){
  border-color:#8cbaf3!important;background:#fff!important;outline:none!important;
  box-shadow:0 0 0 3px #e9f3ff!important;
}
#projects-dialog.projects-template-studio .sfera-template-field textarea{
  display:block;resize:vertical!important;min-height:155px!important;
}
#projects-dialog.projects-template-studio .sfera-template-field input[type="number"]{
  font-variant-numeric:tabular-nums;
}
#projects-dialog.projects-template-studio .sfera-template-switch{
  position:relative;display:flex;align-items:center;justify-content:space-between;
  gap:15px;min-height:72px;padding:13px 14px;border-radius:11px;
  background:#f5f8fd;border:1px solid #e0e8f4;cursor:pointer;
}
#projects-dialog.projects-template-studio .sfera-template-switch>span{
  display:grid;gap:4px;min-width:0;
}
#projects-dialog.projects-template-studio .sfera-template-switch strong{
  color:#284b7b;font:650 11px Poppins,sans-serif;
}
#projects-dialog.projects-template-studio .sfera-template-switch small{
  color:#8195ad;font:450 10px/1.45 "Open Sans",sans-serif;
}
#projects-dialog.projects-template-studio .sfera-template-switch input{
  position:absolute;right:15px;width:42px;height:24px;opacity:0;cursor:pointer;
}
#projects-dialog.projects-template-studio .sfera-template-switch i{
  position:relative;flex:0 0 42px;width:42px;height:24px;
  background:#cbd7e5;border-radius:20px;transition:background .18s ease;
}
#projects-dialog.projects-template-studio .sfera-template-switch i::after{
  content:"";position:absolute;top:3px;left:3px;
  width:18px;height:18px;border-radius:50%;background:#fff;
  box-shadow:0 1px 4px rgba(5,25,58,.2);
  transition:transform .18s ease;
}
#projects-dialog.projects-template-studio .sfera-template-switch input:checked+i{background:#0b7ff0}
#projects-dialog.projects-template-studio .sfera-template-switch input:checked+i::after{transform:translateX(18px)}
#projects-dialog.projects-template-studio .sfera-template-switch input:focus-visible+i{
  outline:2px solid #0b7ff0;outline-offset:3px;
}

/* The template task browser: a searchable list and ONE editor, not a sea of forms. */
#projects-dialog.projects-template-studio .sfera-template-workspace{
  display:grid;grid-template-columns:minmax(230px,310px) minmax(0,1fr);
  gap:15px;align-items:stretch;min-height:470px;
  height:clamp(470px,calc(94vh - 264px),740px);
  overflow:hidden;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav,
#projects-dialog.projects-template-studio .sfera-template-editor,
#projects-dialog.projects-template-studio .sfera-template-editor-empty{
  min-width:0;min-height:0;
  border:1px solid #e1e9f3;border-radius:15px;
  background:#fff;box-shadow:0 4px 14px rgba(18,43,86,.038);
}
#projects-dialog.projects-template-studio .sfera-template-task-nav{
  display:flex;flex-direction:column;overflow:hidden;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__header{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;padding:19px 17px 12px;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__header h3{
  margin:0!important;color:#163d73!important;font:650 15px/1.3 Poppins,sans-serif!important;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__header p{
  margin:5px 0 0;color:#8598ae;font:500 10px "Open Sans",sans-serif;
}
#projects-dialog.projects-template-studio .sfera-template-task-add{
  display:grid;place-items:center;flex:0 0 37px;
  width:37px;height:37px;min-width:37px;min-height:37px;
  padding:0;border:0;border-radius:10px;background:#0b7ff0;color:#fff;cursor:pointer;
}
#projects-dialog.projects-template-studio .sfera-template-task-add:is(:hover,:focus-visible){
  background:#0e2166;outline-offset:2px;
}
#projects-dialog.projects-template-studio .sfera-template-task-add svg{
  width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;
}
#projects-dialog.projects-template-studio .sfera-template-task-search{
  display:flex;align-items:center;gap:7px;margin:0 15px 12px;padding:0 11px;
  min-height:40px;background:#f7faff;border:1px solid #e0eaf4;border-radius:10px;
}
#projects-dialog.projects-template-studio .sfera-template-task-search svg{
  flex:0 0 16px;width:16px;height:16px;fill:none;stroke:#6885a8;stroke-width:1.8;
}
#projects-dialog.projects-template-studio .sfera-template-task-search input{
  width:100%;min-width:0;min-height:38px;margin:0;padding:0 3px;
  border:0;background:transparent;box-shadow:none;outline:none;
  color:#203c67;font:500 11px "Open Sans",sans-serif;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__list{
  display:grid;align-content:start;gap:5px;overflow-y:auto;
  flex:1 1 auto;min-height:0;margin:0 9px 5px;padding:0 3px 7px;
  scrollbar-width:thin;scrollbar-color:#c8d9ed transparent;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__item{
  display:grid;grid-template-columns:26px minmax(0,1fr) 7px;
  align-items:center;gap:9px;text-align:left;
  width:100%;min-width:0;min-height:61px;
  margin:0;padding:10px 9px!important;
  border:1px solid transparent!important;border-radius:10px!important;
  background:#fff!important;box-shadow:none!important;
  color:#405f83;cursor:pointer;
  transition:background-color .13s ease,border-color .13s ease!important;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__item[hidden]{display:none!important}
#projects-dialog.projects-template-studio .sfera-template-task-nav__item:is(:hover,:focus-visible){
  background:#f6faff!important;border-color:#e4edf7!important;outline:none!important;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__item.is-selected{
  background:#ebf4ff!important;border-color:#cce2fd!important;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__seq{
  display:grid;place-items:center;width:26px;height:26px;border-radius:8px;
  color:#537cab;background:#eef4fc;font:650 10px Poppins,sans-serif;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__item.is-selected .sfera-template-task-nav__seq{
  background:#0b7ff0;color:#fff;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__copy{
  display:grid;gap:5px;min-width:0;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__copy strong{
  display:block;color:#234774;font:650 11px/1.3 Poppins,sans-serif;
  white-space:normal;overflow-wrap:anywhere;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__copy small{
  display:block;color:#8a9db3;font:500 9.5px/1.3 "Open Sans",sans-serif;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__state{
  width:7px;height:7px;border-radius:50%;background:#27916e;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__state.is-inactive{background:#b7c5d8}
#projects-dialog.projects-template-studio .sfera-template-task-nav__footer{
  padding:11px 17px;border-top:1px solid #ebf0f6;
  color:#96a5b8;font:450 9.5px/1.45 "Open Sans",sans-serif;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__empty{
  padding:18px;margin:0;color:#8295ad;font:500 11px "Open Sans",sans-serif;
}
#projects-dialog.projects-template-studio .sfera-template-task-nav__empty[hidden]{display:none!important}
#projects-dialog.projects-template-studio .sfera-template-editor{
  display:flex;flex-direction:column;overflow:hidden;
}
#projects-dialog.projects-template-studio .sfera-template-editor__header{
  display:flex;align-items:center;justify-content:space-between;
  gap:14px;padding:17px 21px 15px;border-bottom:1px solid #e9eff6;
}
#projects-dialog.projects-template-studio .sfera-template-editor__heading h3{
  margin:5px 0 2px!important;color:#0e2166!important;
  font:650 19px/1.25 Poppins,sans-serif!important;
}
#projects-dialog.projects-template-studio .sfera-template-editor__heading p{
  margin:0;color:#8799b0;font:450 10.5px/1.4 "Open Sans",sans-serif;
}
#projects-dialog.projects-template-studio .sfera-template-editor__actions{
  display:flex;align-items:center;gap:7px;flex:0 0 auto;
}
#projects-dialog.projects-template-studio .sfera-template-editor__actions button{
  display:grid;place-items:center;flex:0 0 35px;
  width:35px;height:35px;min-width:35px;min-height:35px;
  margin:0;padding:0;border:1px solid #dbe7f4;border-radius:9px;
  background:#fff;color:#32659f;box-shadow:none;
  transition:background .15s,border-color .15s;
}
#projects-dialog.projects-template-studio .sfera-template-editor__actions button:hover:not(:disabled){
  background:#f0f6ff;border-color:#b8d5f6;
}
#projects-dialog.projects-template-studio .sfera-template-editor__actions button.is-danger{
  color:#b65f6b;border-color:#f0dce1;
}
#projects-dialog.projects-template-studio .sfera-template-editor__actions button.is-danger:hover:not(:disabled){
  background:#fff1f3;border-color:#eccbd3;
}
#projects-dialog.projects-template-studio .sfera-template-editor__actions button:disabled{
  opacity:.34;cursor:not-allowed;
}
#projects-dialog.projects-template-studio .sfera-template-editor__actions button svg{
  width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.8;
}
#projects-dialog.projects-template-studio .sfera-template-editor__scroll{
  flex:1 1 auto;min-height:0;overflow-y:auto;
  padding:19px;scrollbar-width:thin;scrollbar-color:#d1dfef transparent;
}
#projects-dialog.projects-template-studio .sfera-template-editor__grid{
  display:grid;grid-template-columns:minmax(0,1.15fr) minmax(235px,.85fr);
  gap:15px;align-items:start;
}
#projects-dialog.projects-template-studio .sfera-template-task-content{
  grid-column:1;grid-row:1/span 2;
}
#projects-dialog.projects-template-studio .sfera-template-task-people{
  grid-column:2;grid-row:1;
}
#projects-dialog.projects-template-studio .sfera-template-task-planning{
  grid-column:2;grid-row:2;
}
#projects-dialog.projects-template-studio .sfera-template-task-content textarea{
  min-height:225px!important;
}
#projects-dialog.projects-template-studio .sfera-template-task-numbers{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:end;gap:9px;
}
#projects-dialog.projects-template-studio .sfera-template-task-numbers .sfera-template-field>span{
  min-height:28px;font-size:10px!important;
}
#projects-dialog.projects-template-studio .sfera-template-task-numbers input{
  text-align:center;padding:9px 5px!important;
}
#projects-dialog.projects-template-studio .sfera-template-switch--task{
  margin-top:16px;
}
#projects-dialog.projects-template-studio .sfera-template-technical{
  grid-column:1/-1;
  border:1px solid #e1e9f4;border-radius:13px;
  background:#fff;overflow:hidden;
}
#projects-dialog.projects-template-studio .sfera-template-technical>summary{
  display:flex;align-items:center;justify-content:space-between;
  gap:13px;list-style:none;padding:16px 19px;
  cursor:pointer;background:#f9fbfe;color:#45668b;
}
#projects-dialog.projects-template-studio .sfera-template-technical>summary::-webkit-details-marker{display:none}
#projects-dialog.projects-template-studio .sfera-template-technical>summary>span{
  display:flex;align-items:center;gap:10px;
}
#projects-dialog.projects-template-studio .sfera-template-technical>summary svg{
  width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;
}
#projects-dialog.projects-template-studio .sfera-template-technical>summary strong{
  color:#34577f;font:600 11px Poppins,sans-serif;
}
#projects-dialog.projects-template-studio .sfera-template-technical>summary>svg{
  transition:transform .18s ease;
}
#projects-dialog.projects-template-studio .sfera-template-technical[open]>summary>svg{
  transform:rotate(180deg);
}
#projects-dialog.projects-template-studio .sfera-template-technical>p{
  margin:0;padding:13px 19px 0;
  color:#8c9bb0;font:450 10px/1.5 "Open Sans",sans-serif;
}
#projects-dialog.projects-template-studio .sfera-template-technical__fields{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:13px;padding:15px 19px 20px;
}
#projects-dialog.projects-template-studio .sfera-template-editor-empty{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:11px;padding:25px;text-align:center;
}
#projects-dialog.projects-template-studio .sfera-template-editor-empty>span{
  display:grid;place-items:center;width:54px;height:54px;border-radius:15px;
  background:#eef5ff;color:#0b7ff0;
}
#projects-dialog.projects-template-studio .sfera-template-editor-empty svg{
  width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.8;
}
#projects-dialog.projects-template-studio .sfera-template-editor-empty h3{
  color:#0e2166!important;font:650 16px Poppins,sans-serif!important;margin:0;
}
#projects-dialog.projects-template-studio .sfera-template-editor-empty p{
  max-width:300px;color:#8599af;font-size:11px;line-height:1.5;margin:0 0 7px;
}
#projects-dialog.projects-template-studio .sfera-template-editor-empty button{
  display:flex;align-items:center;gap:8px;
}
#projects-dialog.projects-template-studio .sfera-template-editor-empty button svg{
  width:15px;height:15px;stroke:#fff;
}

/* Footer remains stable while only the editor panel scrolls. */
#projects-dialog.projects-template-studio .task-v2-dialog__footer{
  background:#fff!important;box-shadow:0 -2px 13px rgba(20,46,86,.025)!important;
}
#projects-dialog.projects-template-studio .task-v2-dialog__footer [data-template-save]{
  min-height:42px!important;border-radius:10px!important;
  font:600 12px Poppins,sans-serif!important;
}
#projects-dialog.projects-template-studio .projects-template-studio__status:not(:empty){
  display:block;background:#eef5ff!important;border-color:transparent!important;
  border-radius:9px;color:#2a609e;
}

@media(max-width:1280px){
  #projects-dialog.projects-template-studio .sfera-template-general{
    grid-template-columns:minmax(190px,.54fr) minmax(0,1.55fr);
  }
  #projects-dialog.projects-template-studio .sfera-template-general__form{
    grid-template-columns:minmax(0,1fr);
  }
  #projects-dialog.projects-template-studio .sfera-template-editor__grid{
    grid-template-columns:minmax(0,1fr);
  }
  #projects-dialog.projects-template-studio :is(.sfera-template-task-content,.sfera-template-task-people,.sfera-template-task-planning,.sfera-template-technical){
    grid-column:1;grid-row:auto;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-health-feature__statuses{gap:9px!important}
}
@media(max-width:960px){
  #projects-dialog.projects-template-studio .sfera-template-workspace{
    grid-template-columns:245px minmax(0,1fr);
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-health-feature__layout{
    margin-top:44px!important;
  }
}
@media(max-width:880px){
  #signed-in.app-shell .app-topbar .sfera-projects-topbar__detail-search:not([hidden]){
    max-width:none!important;margin:0!important;
  }
  #signed-in.app-shell .app-topbar .sfera-projects-topbar__modes:not([hidden]){
    margin-left:auto!important;
  }
}
@media(max-width:760px){
  #projects-dialog.projects-template-studio .task-v2-dialog{
    width:100vw!important;max-width:100vw!important;
    height:100vh!important;max-height:100vh!important;border-radius:0!important;
  }
  #projects-dialog.projects-template-studio .task-v2-dialog__body{
    overflow-y:auto!important;padding:13px 11px 18px!important;
  }
  #projects-dialog.projects-template-studio .sfera-template-general{
    grid-template-columns:minmax(0,1fr);gap:12px;
  }
  #projects-dialog.projects-template-studio .sfera-template-general__insight{
    min-height:0;padding:17px;
  }
  #projects-dialog.projects-template-studio .sfera-template-general__insight>p,
  #projects-dialog.projects-template-studio .sfera-template-general__notice{display:none}
  #projects-dialog.projects-template-studio .sfera-template-general__figures{
    padding-top:10px;margin-top:0;
  }
  #projects-dialog.projects-template-studio .sfera-template-general__form{
    grid-template-columns:minmax(0,1fr);gap:11px;
  }
  #projects-dialog.projects-template-studio .sfera-template-workspace{
    height:auto;min-height:0;overflow:visible;
    grid-template-columns:minmax(0,1fr);gap:11px;
  }
  #projects-dialog.projects-template-studio .sfera-template-task-nav{
    max-height:275px;min-height:190px;
  }
  #projects-dialog.projects-template-studio .sfera-template-task-nav__list{
    min-height:120px;max-height:160px;
  }
  #projects-dialog.projects-template-studio .sfera-template-task-nav__footer{display:none}
  #projects-dialog.projects-template-studio .sfera-template-editor{
    overflow:visible;min-height:0;
  }
  #projects-dialog.projects-template-studio .sfera-template-editor__scroll{
    overflow:visible;padding:13px;
  }
  #projects-dialog.projects-template-studio .sfera-template-editor__header{
    padding:14px;gap:9px;
  }
  #projects-dialog.projects-template-studio .sfera-template-surface{
    padding:16px;
  }
  #projects-dialog.projects-template-studio .sfera-template-technical__fields{
    grid-template-columns:minmax(0,1fr);
  }
  #projects-dialog.projects-template-studio .sfera-template-editor__heading h3{
    font-size:16px!important;
  }
  #projects-dialog.projects-template-studio .sfera-template-editor__heading p{display:none}
  #projects-dialog.projects-template-studio .sfera-template-editor__actions{gap:4px}
  #projects-dialog.projects-template-studio .sfera-template-editor__actions button{
    flex-basis:32px;width:32px;height:32px;min-width:32px;min-height:32px;
  }
}
@media(max-width:560px){
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-health-feature__layout{
    margin-top:57px!important;gap:12px!important;
  }
  #projects-dialog.projects-template-studio .sfera-template-task-numbers{
    grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;
  }
  #projects-dialog.projects-template-studio .sfera-template-task-numbers .sfera-template-field>span{
    font-size:9px!important;
  }
  #projects-dialog.projects-template-studio .sfera-template-task-numbers input{font-size:11px!important}
}
@media(prefers-reduced-motion:reduce){
  #projects-dialog.projects-template-studio :is(button,input,select,textarea,summary),
  #projects-view .projects-shell--detail .projects-group-progress__track i{
    animation:none!important;transition:none!important;
  }
}
