/* Projects: Sfera CRM redesign — portfolio, statistics, template catalog.
 * Palette follows the approved Dashboard (navy #0e2166, blue #0b7ff0).
 * Scope expressly excludes project detail/editors and all other CRM views. */
#projects-view{
  --project-navy:#0e2166;--project-blue:#0b7ff0;
  --project-ink:#17305d;--project-muted:#71809a;
  --project-soft:#f6f9fd;--project-line:#e6edf7;
  --project-shadow:0 5px 22px rgba(16,43,96,.045);
  --project-smooth:cubic-bezier(.2,.75,.25,1);
}
#signed-in .app-topbar .sfera-projects-topbar[hidden],
#signed-in .app-topbar .sfera-projects-topbar [hidden]{
  display:none!important;
}
#signed-in:not(:has(#projects-view:not([hidden]))) .app-topbar .sfera-projects-topbar{
  display:none!important;
}
/* Persistent toolbar in the same navy row as Aziende / Statistiche. */
#signed-in.app-shell .app-topbar .sfera-projects-topbar{
  display:flex;align-items:center;gap:clamp(11px,1.5vw,22px);
  flex:1 1 auto;min-width:0;min-height:44px;
  font-family:Poppins,"Open Sans",sans-serif;color:#f6f9ff;
}
#signed-in.app-shell .app-topbar .sfera-projects-topbar__title{
  flex:0 0 auto;margin:0;padding:0;white-space:nowrap;
  font:600 15px/1.25 Poppins,"Open Sans",sans-serif!important;
  letter-spacing:0;color:#f6f9ff!important;
}
#signed-in.app-shell .app-topbar .sfera-projects-topbar__search{
  position:relative;display:flex;align-items:center;
  flex:1 1 340px;min-width:110px;max-width:min(500px,42vw);
  height:36px;margin-left:auto;border-radius:11px;
  border:1px solid rgba(220,232,255,.22);
  background:rgba(255,255,255,.075);
  transition:background-color .15s ease,border-color .15s ease;
}
#signed-in.app-shell .app-topbar .sfera-projects-topbar__search:is(:hover,:focus-within){
  background:rgba(255,255,255,.13);
  border-color:rgba(225,237,255,.46);
}
#signed-in.app-shell .app-topbar .sfera-projects-topbar__search>svg{
  display:block;width:17px;height:17px;flex:0 0 17px;margin-left:12px;
  fill:none;stroke:#d4e3ff;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;
}
#signed-in.app-shell .app-topbar .sfera-projects-topbar__search input[type=search]{
  display:block;box-sizing:border-box;width:100%;min-width:0;height:34px;min-height:34px;
  margin:0;border:0;background:transparent;color:#fff;
  padding:0 11px 0 10px;border-radius:11px;
  font:500 11px/1.25 "Open Sans",sans-serif;box-shadow:none;outline:none;
  appearance:none;-webkit-appearance:none;
}
#signed-in.app-shell .app-topbar .sfera-projects-topbar__search input::placeholder{
  color:#d2ddf5;opacity:.92;
}
#signed-in.app-shell .app-topbar .sfera-projects-topbar__search input::-webkit-search-cancel-button{
  cursor:pointer;filter:grayscale(1) invert(1);
}
#signed-in.app-shell .app-topbar .sfera-projects-topbar__actions{
  display:flex;align-items:center;gap:8px;flex:0 0 auto;
}
#signed-in.app-shell .app-topbar button.sfera-projects-topbar__action{
  box-sizing:border-box;display:grid;place-items:center;
  flex:0 0 36px;width:36px;min-width:36px;max-width:36px;
  height:36px;min-height:36px;max-height:36px;
  margin:0;padding:0;border:1px solid rgba(220,232,255,.25);
  border-radius:10px;background:rgba(255,255,255,.085);
  color:#f4f8ff;box-shadow:none;cursor:pointer;
  transition:background-color .14s ease,border-color .14s ease,transform .14s ease;
}
#signed-in.app-shell .app-topbar button.sfera-projects-topbar__action--new{
  background:#0877e7;border-color:#238cf0;color:#fff;
}
#signed-in.app-shell .app-topbar button.sfera-projects-topbar__action:is(:hover,:focus-visible){
  background:rgba(255,255,255,.18);border-color:rgba(234,241,255,.6);
}
#signed-in.app-shell .app-topbar button.sfera-projects-topbar__action--new:is(:hover,:focus-visible){
  background:#1688fb;border-color:#58adff;
}
#signed-in.app-shell .app-topbar button.sfera-projects-topbar__action:focus-visible{
  outline:2px solid #aed0ff;outline-offset:2px;
}
#signed-in.app-shell .app-topbar button.sfera-projects-topbar__action>svg{
  display:block!important;width:19px!important;height:19px!important;
  min-width:19px!important;max-width:19px!important;
  margin:0!important;padding:0!important;overflow:visible!important;
  fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;
  stroke-linecap:round!important;stroke-linejoin:round!important;
  transform:none!important;
}
#signed-in.app-shell .app-topbar button.sfera-projects-topbar__action>svg *{
  fill:none!important;stroke:currentColor!important;
}
#signed-in.app-shell .app-topbar .sfera-projects-topbar__search-toggle{
  display:none!important;
}
/* Portfolio landing: no redundant gradient banner or full-page white monolith. */
#projects-view:not([hidden]){max-width:1760px;background:transparent}
#projects-view .projects-shell:not(.projects-shell--detail){
  border:0!important;border-radius:0!important;background:transparent!important;
  box-shadow:none!important;box-sizing:border-box;
  padding:clamp(12px,1.8vw,26px)!important;
}
#projects-view .projects-shell:not(.projects-shell--detail)>.projects-header{
  display:none!important;
}
#projects-view .projects-shell:not(.projects-shell--detail)>.projects-tabs{
  display:flex;align-items:stretch;justify-content:flex-start;gap:4px;
  min-height:55px;padding:0 3px;margin:0 0 18px;
  border:0;border-bottom:1px solid #dfe7f3;border-radius:0;
  background:transparent;box-shadow:none;overflow-x:auto;
  scrollbar-width:thin;scrollbar-color:#d0ddeb transparent;
}
#projects-view .projects-shell:not(.projects-shell--detail)>.projects-tabs button{
  position:relative;display:inline-flex;align-items:center;justify-content:center;
  gap:10px;flex:0 0 auto;min-width:160px;min-height:55px;
  padding:12px 20px;border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;
  color:#7384a0;font:550 12px/1.2 Poppins,"Open Sans",sans-serif;
  transition:color .15s ease,background-color .15s ease!important;
}
#projects-view .projects-shell:not(.projects-shell--detail)>.projects-tabs button::after{
  position:absolute;left:22px;right:22px;bottom:0;height:3px;
  border-radius:3px 3px 0 0;background:transparent;content:"";
  transition:background-color .15s ease,left .15s ease,right .15s ease;
}
#projects-view .projects-shell:not(.projects-shell--detail)>.projects-tabs button:hover{
  color:#173b77;background:#f0f5fd!important;
}
#projects-view .projects-shell:not(.projects-shell--detail)>.projects-tabs button[aria-selected=true]{
  color:#0e2166!important;font-weight:650;background:transparent!important;
}
#projects-view .projects-shell:not(.projects-shell--detail)>.projects-tabs button[aria-selected=true]::after{
  background:#0b7ff0;left:15px;right:15px;
}
#projects-view .projects-shell:not(.projects-shell--detail)>.projects-tabs button>svg{
  display:block;flex:0 0 18px;width:18px;height:18px;
  stroke-width:1.8;
}
#projects-view .projects-shell:not(.projects-shell--detail)>.projects-tabs .admin-restricted-key{
  display:inline-flex;opacity:.6;
}
#projects-view .projects-shell:not(.projects-shell--detail)>.projects-tabs .admin-restricted-key svg{
  width:12px;height:12px;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-state{
  margin:0 0 12px;color:#647b9c;font:450 12px/1.5 "Open Sans",sans-serif;
}
#projects-view .projects-shell:not(.projects-shell--detail) [data-projects-content]{
  display:block;min-width:0;
}
/* Six KPIs create an editorial bento rhythm, using the actual CRM numbers. */
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpis--overview{
  display:grid;grid-template-columns:repeat(12,minmax(0,1fr));
  gap:clamp(10px,1.2vw,15px);margin:0 0 20px;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpis--overview>.projects-kpi{
  display:flex;flex-direction:column;justify-content:space-between;
  position:relative;box-sizing:border-box;grid-column:span 4;min-width:0;min-height:155px;
  padding:19px 20px 17px;border:1px solid #e4ebf5!important;
  border-radius:16px;background:#fff!important;box-shadow:var(--project-shadow)!important;
  overflow:hidden;
  transition:transform .18s var(--project-smooth),box-shadow .18s var(--project-smooth),
    border-color .18s ease!important;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpis--overview>.projects-kpi:nth-child(6n+1),
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpis--overview>.projects-kpi:nth-child(6n){
  grid-column:span 5;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpis--overview>.projects-kpi:nth-child(6n+2),
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpis--overview>.projects-kpi:nth-child(6n+5){
  grid-column:span 4;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpis--overview>.projects-kpi:nth-child(6n+3),
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpis--overview>.projects-kpi:nth-child(6n+4){
  grid-column:span 3;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpis--overview>.projects-kpi:hover{
  transform:translateY(-2px);border-color:#d5e3f5!important;
  box-shadow:0 11px 25px rgba(20,48,96,.075)!important;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi__top{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi__top small{
  margin:3px 0 0;color:#687d9c;font:500 12px/1.4 "Open Sans",sans-serif;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi__symbol{
  display:grid;place-items:center;width:38px;height:38px;min-width:38px;flex:0 0 38px;
  background:#eaf3ff;color:#2d66b8;border-radius:11px;
  font-style:normal;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi__symbol svg{
  width:18px;height:18px;stroke-width:1.8;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi--success .projects-kpi__symbol{
  background:#e9f7f1;color:#207e5c;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi--warning .projects-kpi__symbol{
  background:#fff5e8;color:#af7328;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi--danger .projects-kpi__symbol{
  background:#fff0f2;color:#bb5561;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi strong{
  display:block;font:650 clamp(27px,2.4vw,38px)/1.12 Poppins,"Open Sans",sans-serif;
  color:#0e2166!important;letter-spacing:-.035em;font-variant-numeric:tabular-nums;
  margin:auto 0 0;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi--success strong{color:#237c5f!important}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi--warning strong{color:#ae6c19!important}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi--danger strong{color:#b44655!important}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi>span{
  margin-top:8px;color:#8a98ab;font:450 10.5px/1.4 "Open Sans",sans-serif;
}
/* Filter strip: controls floating on a minimal open workspace, not a bordered box. */
#projects-view .projects-shell:not(.projects-shell--detail) .projects-toolbar--portfolio{
  display:flex;align-items:center;gap:11px 12px;flex-wrap:wrap;
  margin:0 0 13px;padding:10px 0 12px;
  border:0!important;border-bottom:1px solid #e3eaf4!important;
  border-radius:0;background:transparent!important;box-shadow:none!important;
}
#projects-view .projects-toolbar__intro{
  display:flex;flex-direction:column;gap:3px;
  margin-right:auto;min-width:190px;
}
#projects-view .projects-toolbar__intro strong{
  color:#172f60;font:600 14px/1.3 Poppins,"Open Sans",sans-serif;
}
#projects-view .projects-toolbar__intro span{
  color:#8b9ab0;font:450 11px/1.3 "Open Sans",sans-serif;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-toolbar--portfolio select{
  min-width:150px;min-height:38px;height:38px;padding:6px 32px 6px 12px;
  background:#fff;border:1px solid #dce5f1;border-radius:10px;
  color:#3d5778;font:500 11px/1.2 "Open Sans",sans-serif;
  transition:border-color .14s ease,background-color .14s ease;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-toolbar--portfolio select:hover{
  border-color:#abc7ed;background:#f8fbff;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-toolbar--portfolio [data-project-action="rebuild"]{
  min-height:38px;padding:7px 12px;border:1px solid #dbe5f1;
  border-radius:10px;background:#fff;color:#2e5f9e;
  font:550 11px/1.2 "Open Sans",sans-serif;box-shadow:none;
}
/* Project table: deliberately light and data-led, without navy solid header or stripes. */
#projects-view .projects-shell:not(.projects-shell--detail) .projects-table-wrap{
  overflow-x:auto;overflow-y:hidden;border:1px solid #e3eaf4!important;
  border-radius:16px!important;background:#fff;
  box-shadow:var(--project-shadow);scrollbar-color:#cedcf0 transparent;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-table{
  width:100%;min-width:1140px;border-collapse:separate;border-spacing:0;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-table thead th{
  padding:15px 13px;background:#f3f7fc!important;color:#687e9e!important;
  border:0;border-bottom:1px solid #e6edf7!important;
  text-transform:none;letter-spacing:.005em;
  font:600 10.5px/1.2 "Open Sans",sans-serif;white-space:nowrap;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-table td{
  padding:17px 13px;border:0;border-bottom:1px solid #eef1f7;
  color:#3d5272;font:450 11.5px/1.5 "Open Sans",sans-serif;
  vertical-align:middle;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-table tbody tr:last-child td{
  border-bottom:0;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-table tr[data-project-open]{
  box-shadow:none!important;transition:background-color .14s ease;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-table tr[data-project-open]:is(:hover,:focus-visible){
  background:#f6faff!important;outline:2px solid #c8def9;outline-offset:-2px;
}
#projects-view .projects-project-identity{
  display:flex;align-items:center;gap:11px;min-width:180px;
}
#projects-view .projects-project-identity__mark{
  display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;
  background:#edf4ff;color:#1e55a2;border-radius:10px;
  font:650 15px/1 Poppins,sans-serif;
}
#projects-view .projects-name{min-width:0;gap:4px}
#projects-view .projects-name strong{
  color:#102f67;font:600 12px/1.35 Poppins,"Open Sans",sans-serif;
  overflow-wrap:anywhere;
}
#projects-view .projects-name small{
  color:#8997ad;font:450 10.5px/1.3 "Open Sans",sans-serif;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-badge{
  border-radius:7px;padding:5px 9px;font:550 10px "Open Sans",sans-serif;
  border:1px solid transparent;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-badge--active,
#projects-view .projects-shell:not(.projects-shell--detail) .projects-badge--planned{
  background:#edf5ff;color:#255d9b;border-color:#e3eefc;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-progress{min-width:92px}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-progress__bar{
  height:8px;background:#e8eef7;border:0;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-progress__bar>span{
  background:#0b7ff0!important;background-image:none!important;
  transform-origin:left center;transition:transform .7s var(--project-smooth);
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-progress small{
  color:#74849b;font:500 10px/1.3 "Open Sans",sans-serif;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-row-actions{
  flex-wrap:nowrap;gap:6px;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-row-actions button{
  display:grid;place-items:center;width:34px;min-width:34px;max-width:34px;height:34px;min-height:34px;
  border:1px solid #dae6f4;border-radius:9px;background:#fff;
  color:#2765b4;padding:0;box-shadow:none;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-row-actions button:hover{
  background:#ebf4ff;border-color:#b4d4f6;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-row-actions button svg{
  width:17px;height:17px;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-late{
  color:#bb5862;font-weight:600;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-empty{
  display:grid;place-content:center;justify-items:center;min-height:210px;gap:9px;
  background:#fff;border:1px dashed #d6e2f2;border-radius:15px;
  color:#71859f;box-shadow:var(--project-shadow);
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-empty strong{
  font:600 17px Poppins,sans-serif;color:#173b70;
}

/* Statistics section: real figures in asymmetric panels, no invented datasets. */
#projects-view .projects-shell:not(.projects-shell--detail) .projects-stats-grid--showcase{
  display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);
  gap:clamp(12px,1.3vw,18px);margin:0;
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-stat-panel{
  min-width:0;margin:0;padding:clamp(19px,1.9vw,27px);
  border:1px solid #e4ebf5;border-radius:17px;
  background:#fff;box-shadow:var(--project-shadow);
}
#projects-view .projects-stat-panel__heading{
  display:flex;align-items:center;justify-content:space-between;gap:15px;
  padding-bottom:15px;margin-bottom:19px;border-bottom:1px solid #e9eef6;
}
#projects-view .projects-section-eyebrow{
  color:#5881b7;font:650 10px/1.3 "Open Sans",sans-serif;
  letter-spacing:.065em;text-transform:uppercase;
}
#projects-view .projects-stat-panel__heading h2{
  margin:6px 0 0;color:#133364;font:600 18px/1.25 Poppins,sans-serif;
}
#projects-view .projects-studio-icon,
#projects-view .projects-template-card__symbol{
  display:grid;place-items:center;flex:0 0 39px;
  width:39px;height:39px;background:#edf4ff;color:#2460b7;
  border-radius:12px;
}
#projects-view .projects-studio-icon svg,
#projects-view .projects-template-card__symbol svg{
  display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;
}
#projects-view .projects-stat-operations{
  display:grid;grid-template-columns:minmax(170px,.78fr) minmax(0,1.22fr);
  align-items:center;gap:22px;
}
#projects-view .projects-stat-ring{
  display:grid;place-items:center;position:relative;aspect-ratio:1;
  width:100%;max-width:208px;margin:auto;border-radius:50%;
  background:conic-gradient(#0b7ff0 0 var(--project-ring),#e8eef7 var(--project-ring) 100%);
  box-shadow:0 6px 20px rgba(20,65,126,.055);
}
#projects-view .projects-stat-ring::before{
  position:absolute;inset:14%;border-radius:50%;background:#fff;content:"";
}
#projects-view .projects-stat-ring>div{
  position:relative;z-index:1;display:grid;gap:4px;place-items:center;text-align:center;
}
#projects-view .projects-stat-ring strong{
  color:#0e2166;font:650 clamp(25px,2.3vw,35px)/1.1 Poppins,sans-serif;
  letter-spacing:-.04em;
}
#projects-view .projects-stat-ring span{
  color:#7d8da5;font:450 10px/1.4 "Open Sans",sans-serif;max-width:98px;
}
#projects-view .projects-stat-operations__numbers{
  display:grid;gap:10px;min-width:0;
}
#projects-view .projects-stat-operations__numbers .projects-overview-card{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:64px;padding:12px 16px;margin:0;
  border:1px solid #e8eef7;border-radius:11px;background:#f9fbfe;box-shadow:none;
}
#projects-view .projects-stat-operations__numbers .projects-overview-card small{
  margin:0;color:#7085a0;font:500 11px/1.35 "Open Sans",sans-serif;
}
#projects-view .projects-stat-operations__numbers .projects-overview-card strong{
  margin:0;color:#163c73;font:650 22px/1.1 Poppins,sans-serif;
}
#projects-view .projects-stat-panel__footnote{
  margin:16px 0 0;padding-top:14px;
  border-top:1px solid #edf0f6;color:#7b8ea8;
  font:450 11px/1.5 "Open Sans",sans-serif;
}
#projects-view .projects-bars--showcase{
  display:grid;gap:17px;margin:1px 0;
}
#projects-view .projects-bars--showcase .projects-bar{
  display:grid;grid-template-columns:1fr;align-items:stretch;gap:6px;
}
#projects-view .projects-bar__label{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
#projects-view .projects-bar__label span{
  min-width:0;overflow-wrap:anywhere;color:#375475;
  font:550 12px/1.35 "Open Sans",sans-serif;
}
#projects-view .projects-bar__label strong{
  color:#17386a;font:650 13px/1.2 Poppins,sans-serif;
}
#projects-view .projects-bars--showcase .projects-bar__track{
  display:block;height:10px;border-radius:6px;overflow:hidden;background:#edf2f9;
}
#projects-view .projects-bars--showcase .projects-bar__track>span{
  display:block;height:100%;border-radius:inherit;
  background:#4b84df;transform-origin:left center;
  transition:transform .85s var(--project-smooth);
}
#projects-view .projects-bars--showcase .projects-bar:nth-child(even) .projects-bar__track>span{
  background:#268a6a;
}
#projects-view .projects-bars--showcase .projects-bar>small{
  color:#98a4b5;font:450 10px/1.3 "Open Sans",sans-serif;
}

/* Template library: editorial cards, version badge, numerical metadata, safe actions. */
#projects-view .projects-template-heading{
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;
  padding:10px 2px 20px;margin-bottom:16px;
  border-bottom:1px solid #e4ebf5;
}
#projects-view .projects-template-heading h2{
  margin:5px 0 4px;color:#123568;
  font:600 20px/1.3 Poppins,"Open Sans",sans-serif;
}
#projects-view .projects-template-heading p{
  margin:0;color:#8091a8;font:450 11.5px/1.5 "Open Sans",sans-serif;
}
#projects-view .projects-template-heading__new{
  display:inline-flex;align-items:center;gap:8px;min-height:38px;
  padding:8px 12px;background:#eff5fe!important;
  border:1px solid #d8e6f9!important;border-radius:10px!important;
  color:#1c58ab!important;font:550 11px/1.3 "Open Sans",sans-serif!important;
  box-shadow:none!important;
}
#projects-view .projects-template-heading__new:hover{background:#e1efff!important}
#projects-view .projects-template-heading__new svg{
  width:17px;height:17px;
}
#projects-view .projects-template-grid--showcase{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:clamp(12px,1.3vw,18px);
}
#projects-view .projects-template-card--showcase{
  display:flex;flex-direction:column;gap:0;min-width:0;min-height:290px;
  padding:21px 21px 18px;margin:0;
  border:1px solid #e5ebf5!important;border-radius:17px;background:#fff!important;
  box-shadow:var(--project-shadow);
  transition:transform .18s var(--project-smooth),box-shadow .18s ease,border-color .18s ease;
}
#projects-view .projects-template-card--showcase:hover{
  transform:translateY(-2px);border-color:#d3e1f4!important;
  box-shadow:0 11px 27px rgba(19,49,96,.075);
}
#projects-view .projects-template-card__head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin-bottom:16px;
}
#projects-view .projects-template-card__version{
  border:1px solid #e3eaf6;border-radius:8px;padding:5px 8px;
  background:#f5f8fe;color:#617999;
  font:550 10px Poppins,sans-serif;
}
#projects-view .projects-template-card--showcase h3{
  color:#173364;font:600 16px/1.35 Poppins,sans-serif;
  margin:0 0 7px;overflow-wrap:anywhere;
}
#projects-view .projects-template-card__description{
  color:#7a8a9e;font:450 11px/1.55 "Open Sans",sans-serif;
  margin:0 0 18px;min-height:32px;overflow-wrap:anywhere;
}
#projects-view .projects-template-card__metrics{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;
  margin-top:auto;padding:15px 0 16px;border-top:1px solid #edf1f7;
}
#projects-view .projects-template-card__metrics>div{
  display:flex;flex-direction:column;gap:4px;
}
#projects-view .projects-template-card__metrics>div+div{
  border-left:1px solid #e8eef7;padding-left:15px;
}
#projects-view .projects-template-card__metrics strong{
  color:#193a70;font:650 23px/1.2 Poppins,sans-serif;
  font-variant-numeric:tabular-nums;
}
#projects-view .projects-template-card__metrics span{
  color:#8493a9;font:450 10.5px/1.3 "Open Sans",sans-serif;
}
#projects-view .projects-template-card__footer{
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:9px;
  padding-top:14px;border-top:1px solid #edf1f7;
}
#projects-view .projects-template-card__status{
  display:inline-flex;gap:6px;align-items:center;min-height:24px;
  color:#687d9b;font:550 10px/1.2 "Open Sans",sans-serif;
}
#projects-view .projects-template-card__status i{
  width:7px;height:7px;border-radius:50%;background:#a3b2c7;
}
#projects-view .projects-template-card__status.is-active{color:#277e60}
#projects-view .projects-template-card__status.is-active i{background:#268a6a}
#projects-view .projects-template-card__status.is-archived{color:#9ba7b7}
#projects-view .projects-template-card__actions{display:flex;align-items:center;gap:6px}
#projects-view .projects-template-card__actions button{
  display:grid;place-items:center;box-sizing:border-box;
  min-height:32px;height:32px;padding:5px 10px;
  border:1px solid #dde7f4;border-radius:9px;
  color:#3e6aa6;background:#fff;font:550 10.5px/1 "Open Sans",sans-serif;
  box-shadow:none;
}
#projects-view .projects-template-card__actions button svg{
  width:16px;height:16px;min-width:16px;
}
#projects-view .projects-template-card__actions button:is(:hover,:focus-visible){
  background:#edf4ff;border-color:#bcd4f2;
}
#projects-view .projects-template-card__actions button.projects-danger{
  color:#b64e5d;border-color:#f2d9de;background:#fff;
}
#projects-view .projects-template-card__actions button.projects-danger:hover{
  background:#fff1f2;border-color:#edb9c4;
}

/* Reveal animated in viewport, with no chart data inventions. */
#projects-view .projects-shell:not(.projects-shell--detail) .projects-reveal{
  opacity:.9;transform:translateY(10px);
  transition:opacity .5s var(--project-smooth),transform .5s var(--project-smooth);
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-reveal--visible{
  opacity:1;transform:translateY(0);
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-reveal:not(.projects-reveal--visible) .projects-bar__track>span,
#projects-view .projects-shell:not(.projects-shell--detail) .projects-reveal:not(.projects-reveal--visible) .projects-progress__bar>span{
  transform:scaleX(.08);
}
#projects-view .projects-shell:not(.projects-shell--detail) .projects-reveal--visible .projects-bar__track>span,
#projects-view .projects-shell:not(.projects-shell--detail) .projects-reveal--visible .projects-progress__bar>span{
  transform:scaleX(1);
}

/* Responsive: mobile search stays in the anchored header via a popover. */
@media(max-width:1220px){
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-kpis--overview>.projects-kpi{
    grid-column:span 4!important;
  }
  #projects-view .projects-template-grid--showcase{grid-template-columns:repeat(2,minmax(0,1fr))}
  #projects-view .projects-stat-operations{grid-template-columns:minmax(160px,.7fr) minmax(0,1.3fr)}
}
@media(max-width:1000px){
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-kpis--overview>.projects-kpi{
    grid-column:span 6!important;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-stats-grid--showcase{
    grid-template-columns:1fr;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-template-grid--showcase{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #signed-in.app-shell .app-topbar .sfera-projects-topbar__search{
    max-width:320px;
  }
}
@media(max-width:780px){
  #signed-in.app-shell .app-topbar .sfera-projects-topbar{
    gap:8px;min-width:0;
  }
  #signed-in.app-shell .app-topbar .sfera-projects-topbar__search-toggle:not([hidden]){
    display:grid!important;
  }
  #signed-in.app-shell .app-topbar .sfera-projects-topbar__search{
    display:none;
    position:absolute;top:calc(100% + 5px);left:12px;right:12px;
    z-index:600;max-width:none;height:44px;
    margin:0;background:#fff;border:1px solid #ccdaf0;
    box-shadow:0 12px 30px rgba(17,47,99,.18);
  }
  #signed-in.app-shell .app-topbar .sfera-projects-topbar.search-open .sfera-projects-topbar__search:not([hidden]){
    display:flex;
  }
  #signed-in.app-shell .app-topbar .sfera-projects-topbar__search>svg{stroke:#3f659b}
  #signed-in.app-shell .app-topbar .sfera-projects-topbar__search input[type=search]{
    height:42px;color:#18386f;font-size:12px;
  }
  #signed-in.app-shell .app-topbar .sfera-projects-topbar__search input::placeholder{
    color:#8293ac;
  }
  #signed-in.app-shell .app-topbar .sfera-projects-topbar__actions{margin-left:auto;gap:6px}
  #projects-view .projects-shell:not(.projects-shell--detail){
    padding:12px 6px!important;
  }
}
@media(max-width:680px){
  #projects-view{width:calc(100% - 16px)!important;max-width:none!important}
  #projects-view .projects-shell:not(.projects-shell--detail){
    padding:10px 0 20px!important;
  }
  #projects-view .projects-shell:not(.projects-shell--detail)>.projects-tabs{
    gap:0;min-height:48px;margin-bottom:13px;
  }
  #projects-view .projects-shell:not(.projects-shell--detail)>.projects-tabs button{
    min-width:0;flex:1 0 auto;min-height:47px;padding:10px 14px;
    font-size:11px;gap:7px;
  }
  #projects-view .projects-shell:not(.projects-shell--detail)>.projects-tabs button>svg{
    width:16px;height:16px;flex-basis:16px;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-kpis--overview{
    gap:9px;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-kpis--overview>.projects-kpi{
    min-height:133px;padding:14px!important;border-radius:13px!important;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi strong{
    font-size:28px;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi__top small{
    font-size:11px;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi__symbol{
    width:29px;height:29px;flex-basis:29px;min-width:29px;border-radius:9px;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-kpi__symbol svg{
    width:15px;height:15px;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-toolbar--portfolio{
    gap:8px;padding:8px 0 12px;
  }
  #projects-view .projects-toolbar__intro{flex:1 1 100%;margin-right:0}
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-toolbar--portfolio select{
    flex:1 1 120px;min-width:0;
  }
  /* Native table becomes accessible project record cards, never a clipped grid. */
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-table-wrap{
    overflow:visible;border:0!important;background:transparent;
    box-shadow:none;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-table{
    width:100%;min-width:0;display:block;border:0;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-table thead{display:none}
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-table tbody{
    display:grid;gap:10px;width:100%;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-table tbody tr[data-project-open]{
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:10px 13px;padding:15px;border:1px solid #e4ebf5;
    border-radius:14px;background:#fff;box-shadow:var(--project-shadow);
    min-width:0;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-table tbody td{
    display:flex;flex-direction:column;gap:4px;min-width:0;
    border:0!important;padding:0!important;font-size:11px;
    overflow-wrap:anywhere;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-table tbody td::before{
    content:attr(data-label);font:600 9px/1.25 "Open Sans",sans-serif;
    color:#93a1b3;letter-spacing:.045em;text-transform:uppercase;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-table tbody td:first-child{
    grid-column:1/-1;padding:0 0 11px!important;
    border-bottom:1px solid #edf1f7!important;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-table tbody td:first-child::before{
    display:none;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-table tbody td:last-child{
    align-items:flex-end;justify-content:flex-end;
  }
  #projects-view .projects-project-identity__mark{width:34px;height:34px;flex-basis:34px}
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-stats-grid--showcase{
    gap:10px;
  }
  #projects-view .projects-stat-operations{grid-template-columns:1fr;justify-items:center}
  #projects-view .projects-stat-ring{max-width:175px}
  #projects-view .projects-stat-operations__numbers{width:100%}
  #projects-view .projects-template-grid--showcase{grid-template-columns:1fr}
  #projects-view .projects-template-card--showcase{min-height:260px}
}
@media(max-width:420px){
  #signed-in.app-shell .app-topbar .sfera-projects-topbar{
    gap:5px;
  }
  #signed-in.app-shell .app-topbar .sfera-projects-topbar__title{
    font-size:13px!important;
  }
  #signed-in.app-shell .app-topbar button.sfera-projects-topbar__action{
    flex-basis:33px;width:33px;min-width:33px;height:33px;min-height:33px;
  }
  #projects-view .projects-shell:not(.projects-shell--detail)>.projects-tabs button{
    padding:9px 10px;white-space:nowrap;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-kpis--overview>.projects-kpi{
    grid-column:span 6!important;
  }
  #projects-view .projects-stat-panel__heading h2{font-size:16px}
}
/* Very narrow phones: free room for title, search, refresh and project creation. */
@media(max-width:380px){
  #signed-in.app-shell:has(#projects-view:not([hidden])) .app-topbar .portal-topbar__branding{
    display:none!important;
  }
  #signed-in.app-shell .app-topbar .sfera-projects-topbar{
    gap:4px;
  }
  #signed-in.app-shell .app-topbar .sfera-projects-topbar__actions{
    gap:4px;
  }
  #signed-in.app-shell .app-topbar .sfera-projects-topbar__title{
    font-size:12px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  #projects-view .projects-shell:not(.projects-shell--detail) *,
  #signed-in.app-shell .app-topbar .sfera-projects-topbar *{
    animation:none!important;transition:none!important;scroll-behavior:auto!important;
  }
  #projects-view .projects-shell:not(.projects-shell--detail) .projects-reveal{
    opacity:1!important;transform:none!important;
  }
}
