/* Archivio V4 — presentational layer. Functional selectors stay in the existing stylesheets. */
:root {
  --v4-primary:#00688b;
  --v4-accent:#92d9f7;
  --v4-surface:#fefefe;
  --v4-canvas:#edf3f5;
  --v4-panel:#ffffff;
  --v4-panel-head:#f1f6f8;
  --v4-line:#c7d6dc;
  --v4-line-strong:#a9c0c9;
  --v4-ink:#142f3a;
  --v4-muted:#58717b;
  --v4-danger:#c73e4d;
  --v4-warning:#db8a00;
  --v4-success:#16855b;
  --v4-info:#08779c;
  --v4-secondary:#31515e;
  --v4-neutral:#667b84;
  --v4-disabled:#a7b5bb;
  --v4-hover:#eef7fa;
  --v4-selected:#e1f3f8;
  --v4-focus:0 0 0 3px rgba(0,104,139,.16);
  --v4-transition:140ms ease;
  --v4-sidebar:250px;
  --v4-footer:0px;
  --v4-radius:6px;
  --v4-shadow:0 2px 7px rgba(24,62,75,.09);
  --v4-gap:14px;
  --v4-pad:14px;
  --v4-page-gap:8px;
  --v4-page-title-size:22px;
  --v4-panel-header-height:40px;
  --v4-panel-header-pad:6px 10px;
  --v4-admin-sidebar:260px;
  --v4-space-1:4px;
  --v4-space-2:8px;
  --v4-space-3:12px;
  --v4-space-4:16px;
  --v4-control-height:34px;
  --v4-font-xs:9px;
  --v4-font-sm:10px;
  --v4-font-md:12px;
  --v4-font-lg:16px;
  --sidebar-width:var(--v4-sidebar);
}

* { scrollbar-color:#91aab4 transparent; scrollbar-width:thin; }
html { background:var(--v4-canvas); }
body {
  color:var(--v4-ink);
  background:var(--v4-canvas);
  font-family:"Segoe UI",Inter,Arial,sans-serif;
  padding-bottom:0;
}

/* Application shell */
.app-header {
  inset:0 auto var(--v4-footer) 0;
  box-sizing:border-box;
  width:var(--v4-sidebar);
  min-height:0;
  padding:20px 13px 13px;
  border:0;
  border-right:1px solid rgba(255,255,255,.22);
  color:#fff;
  background:var(--v4-primary);
  box-shadow:none;
}
.brand {
  min-height:62px;
  gap:11px;
  padding:0 7px 16px;
  border-bottom:1px solid rgba(255,255,255,.25);
}
.app-header .brand-mark {
  flex:0 0 46px;
  width:46px;
  height:46px;
  border:1px solid rgba(255,255,255,.68);
  border-radius:5px;
  background:transparent !important;
  box-shadow:none;
}
.app-header .dashboard-symbol img {
  width:78%;
  height:78%;
  object-fit:contain;
  filter:brightness(0) invert(1);
  transform:none;
}
.app-header .brand strong { color:#fff; font-size:14px; line-height:1.15; }
.app-header .brand small { margin-top:4px; color:rgba(255,255,255,.75); font-size:9px; }
.tabs {
  gap:3px;
  margin-top:14px;
  padding:4px 0 0;
  overflow-y:auto;
  scroll-padding-top:4px;
}
.nav-section-label {
  display:block;
  margin:7px 8px 4px;
  color:rgba(190,235,250,.9);
  font-size:8.5px;
  font-weight:800;
  letter-spacing:.14em;
  line-height:1.2;
  text-transform:uppercase;
}
.nav-system-label {
  position:relative;
  margin-top:18px;
  padding-top:14px;
}
.nav-system-label::before {
  position:absolute;
  top:0;
  right:0;
  left:0;
  border-top:1px solid rgba(190,235,250,.3);
  content:"";
}
.tab {
  position:relative;
  width:100%;
  height:42px;
  min-height:42px;
  margin:0;
  gap:10px;
  padding:0 36px 0 11px;
  border:1px solid transparent;
  border-radius:4px !important;
  color:rgba(255,255,255,.82) !important;
  background:transparent;
  font-size:10.5px;
  font-weight:650;
}
.tab::before {
  display:block;
  flex:0 0 20px;
  width:20px;
  height:20px;
  border:0;
  color:var(--v4-accent);
  background:currentColor !important;
  box-shadow:none !important;
  content:"";
  -webkit-mask-position:center;
  -webkit-mask-repeat:no-repeat;
  -webkit-mask-size:19px 19px;
  mask-position:center;
  mask-repeat:no-repeat;
  mask-size:19px 19px;
  transform:none;
}
.tab[data-view="alerts-view"]::before {
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Crect x='3' y='3' width='5' height='5' rx='1'/%3E%3Crect x='9.5' y='3' width='5' height='5' rx='1'/%3E%3Crect x='16' y='3' width='5' height='5' rx='1'/%3E%3Crect x='3' y='9.5' width='5' height='5' rx='1'/%3E%3Crect x='9.5' y='9.5' width='5' height='5' rx='1'/%3E%3Crect x='16' y='9.5' width='5' height='5' rx='1'/%3E%3Crect x='3' y='16' width='5' height='5' rx='1'/%3E%3Crect x='9.5' y='16' width='5' height='5' rx='1'/%3E%3Crect x='16' y='16' width='5' height='5' rx='1'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Crect x='3' y='3' width='5' height='5' rx='1'/%3E%3Crect x='9.5' y='3' width='5' height='5' rx='1'/%3E%3Crect x='16' y='3' width='5' height='5' rx='1'/%3E%3Crect x='3' y='9.5' width='5' height='5' rx='1'/%3E%3Crect x='9.5' y='9.5' width='5' height='5' rx='1'/%3E%3Crect x='16' y='9.5' width='5' height='5' rx='1'/%3E%3Crect x='3' y='16' width='5' height='5' rx='1'/%3E%3Crect x='9.5' y='16' width='5' height='5' rx='1'/%3E%3Crect x='16' y='16' width='5' height='5' rx='1'/%3E%3C/svg%3E");
}
.tab[data-view="fleet-availability-view"]::before {
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h8'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h8'/%3E%3C/svg%3E");
}
.tab[data-view="maintenance-view"]::before {
  -webkit-mask-size:20px 20px;
  mask-size:20px 20px;
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.7 5.3a5.5 5.5 0 0 1-7.2 7.2L7 19a2.1 2.1 0 1 1-3-3l6.5-6.5a5.5 5.5 0 0 1 7.2-7.2l-3.2 3.2 3 3 3.2-3.2z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.7 5.3a5.5 5.5 0 0 1-7.2 7.2L7 19a2.1 2.1 0 1 1-3-3l6.5-6.5a5.5 5.5 0 0 1 7.2-7.2l-3.2 3.2 3 3 3.2-3.2z'/%3E%3C/svg%3E");
}
.tab[data-view="material-management-view"]::before {
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16v14H4zM3 3h18v4H3zM9 11h6'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16v14H4zM3 3h18v4H3zM9 11h6'/%3E%3C/svg%3E");
}
.tab[data-view="fleet-form-view"]::before {
  display:block;
  box-sizing:border-box;
  height:20px;
  border:0;
  border-radius:0;
  background:currentColor !important;
  content:"";
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 2.5a4 4 0 0 0-4 4C3 9.6 7 14 7 14s4-4.4 4-7.5a4 4 0 0 0-4-4z'/%3E%3Ccircle cx='7' cy='6.5' r='1.3'/%3E%3Cpath d='M17 10a3.5 3.5 0 0 0-3.5 3.5C13.5 16.2 17 20 17 20s3.5-3.8 3.5-6.5A3.5 3.5 0 0 0 17 10z'/%3E%3Ccircle cx='17' cy='13.5' r='1.1'/%3E%3Cpath d='M7 16c1.5 2.6 5.2-.8 8 1' stroke-dasharray='2.2 2.2'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 2.5a4 4 0 0 0-4 4C3 9.6 7 14 7 14s4-4.4 4-7.5a4 4 0 0 0-4-4z'/%3E%3Ccircle cx='7' cy='6.5' r='1.3'/%3E%3Cpath d='M17 10a3.5 3.5 0 0 0-3.5 3.5C13.5 16.2 17 20 17 20s3.5-3.8 3.5-6.5A3.5 3.5 0 0 0 17 10z'/%3E%3Ccircle cx='17' cy='13.5' r='1.1'/%3E%3Cpath d='M7 16c1.5 2.6 5.2-.8 8 1' stroke-dasharray='2.2 2.2'/%3E%3C/svg%3E");
}
.tab[data-view="personnel-management-view"]::before {
  -webkit-mask-size:20px 20px;
  mask-size:20px 20px;
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1-2.8 2.8-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6v.2h-4V21a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1L4.2 17l.1-.1a1.7 1.7 0 0 0 .3-1.9A1.7 1.7 0 0 0 3 14H2.8v-4H3a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9L4.2 7 7 4.2l.1.1a1.7 1.7 0 0 0 1.9.3A1.7 1.7 0 0 0 10 3v-.2h4V3a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1L19.8 7l-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.2v4H21a1.7 1.7 0 0 0-1.6 1z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1-2.8 2.8-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6v.2h-4V21a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1L4.2 17l.1-.1a1.7 1.7 0 0 0 .3-1.9A1.7 1.7 0 0 0 3 14H2.8v-4H3a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9L4.2 7 7 4.2l.1.1a1.7 1.7 0 0 0 1.9.3A1.7 1.7 0 0 0 10 3v-.2h4V3a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1L19.8 7l-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.2v4H21a1.7 1.7 0 0 0-1.6 1z'/%3E%3C/svg%3E");
}
.tab:hover { border-color:rgba(255,255,255,.18); color:#fff !important; background:rgba(255,255,255,.07); }
.tab.is-active {
  border-color:rgba(146,217,247,.28);
  color:#fff !important;
  background:rgba(146,217,247,.14) !important;
  box-shadow:none;
}
.tab.is-active::after {
  display:block;
  position:absolute;
  top:6px;
  bottom:6px;
  left:0;
  width:3px;
  height:auto;
  border-radius:0 2px 2px 0;
  background:var(--v4-accent);
  content:"";
}
.tab .count,.tab .backup-nav-alert,.tab .competency-nav-alert { right:9px; }
.app-header .count { min-width:19px; height:19px; padding:0 4px; color:#083747; background:var(--v4-accent); border-radius:3px; }

/* Le icone delle sezioni seguono l'altezza tipografica dei titoli principali. */
:is(#alerts-title,#fleet-availability-title,#maintenance-title,#material-management-title,#fleet-form-title,#personnel-management-title) {
  display:flex;
  align-items:center;
  gap:.45em;
}
:is(#alerts-title,#fleet-availability-title,#maintenance-title,#material-management-title,#fleet-form-title,#personnel-management-title)::before {
  display:block;
  flex:0 0 32px;
  width:32px;
  height:38px;
  background:currentColor;
  content:"";
  -webkit-mask-position:center;
  -webkit-mask-repeat:no-repeat;
  -webkit-mask-size:30px 30px;
  mask-position:center;
  mask-repeat:no-repeat;
  mask-size:30px 30px;
  transform:none;
}
#alerts-title::before {
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Crect x='3' y='3' width='5' height='5' rx='1'/%3E%3Crect x='9.5' y='3' width='5' height='5' rx='1'/%3E%3Crect x='16' y='3' width='5' height='5' rx='1'/%3E%3Crect x='3' y='9.5' width='5' height='5' rx='1'/%3E%3Crect x='9.5' y='9.5' width='5' height='5' rx='1'/%3E%3Crect x='16' y='9.5' width='5' height='5' rx='1'/%3E%3Crect x='3' y='16' width='5' height='5' rx='1'/%3E%3Crect x='9.5' y='16' width='5' height='5' rx='1'/%3E%3Crect x='16' y='16' width='5' height='5' rx='1'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Crect x='3' y='3' width='5' height='5' rx='1'/%3E%3Crect x='9.5' y='3' width='5' height='5' rx='1'/%3E%3Crect x='16' y='3' width='5' height='5' rx='1'/%3E%3Crect x='3' y='9.5' width='5' height='5' rx='1'/%3E%3Crect x='9.5' y='9.5' width='5' height='5' rx='1'/%3E%3Crect x='16' y='9.5' width='5' height='5' rx='1'/%3E%3Crect x='3' y='16' width='5' height='5' rx='1'/%3E%3Crect x='9.5' y='16' width='5' height='5' rx='1'/%3E%3Crect x='16' y='16' width='5' height='5' rx='1'/%3E%3C/svg%3E");
}
#fleet-availability-title::before {
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h8'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h8'/%3E%3C/svg%3E");
}
#maintenance-title::before {
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.7 5.3a5.5 5.5 0 0 1-7.2 7.2L7 19a2.1 2.1 0 1 1-3-3l6.5-6.5a5.5 5.5 0 0 1 7.2-7.2l-3.2 3.2 3 3 3.2-3.2z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.7 5.3a5.5 5.5 0 0 1-7.2 7.2L7 19a2.1 2.1 0 1 1-3-3l6.5-6.5a5.5 5.5 0 0 1 7.2-7.2l-3.2 3.2 3 3 3.2-3.2z'/%3E%3C/svg%3E");
}
#material-management-title::before {
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16v14H4zM3 3h18v4H3zM9 11h6'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16v14H4zM3 3h18v4H3zM9 11h6'/%3E%3C/svg%3E");
}
#fleet-form-title::before {
  display:block;
  box-sizing:border-box;
  flex-basis:32px;
  width:32px;
  height:38px;
  border:0;
  border-radius:0;
  background:currentColor;
  content:"";
  font-size:inherit;
  -webkit-mask-position:center;
  -webkit-mask-repeat:no-repeat;
  -webkit-mask-size:30px 30px;
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 2.5a4 4 0 0 0-4 4C3 9.6 7 14 7 14s4-4.4 4-7.5a4 4 0 0 0-4-4z'/%3E%3Ccircle cx='7' cy='6.5' r='1.3'/%3E%3Cpath d='M17 10a3.5 3.5 0 0 0-3.5 3.5C13.5 16.2 17 20 17 20s3.5-3.8 3.5-6.5A3.5 3.5 0 0 0 17 10z'/%3E%3Ccircle cx='17' cy='13.5' r='1.1'/%3E%3Cpath d='M7 16c1.5 2.6 5.2-.8 8 1' stroke-dasharray='2.2 2.2'/%3E%3C/svg%3E");
  mask-position:center;
  mask-repeat:no-repeat;
  mask-size:30px 30px;
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 2.5a4 4 0 0 0-4 4C3 9.6 7 14 7 14s4-4.4 4-7.5a4 4 0 0 0-4-4z'/%3E%3Ccircle cx='7' cy='6.5' r='1.3'/%3E%3Cpath d='M17 10a3.5 3.5 0 0 0-3.5 3.5C13.5 16.2 17 20 17 20s3.5-3.8 3.5-6.5A3.5 3.5 0 0 0 17 10z'/%3E%3Ccircle cx='17' cy='13.5' r='1.1'/%3E%3Cpath d='M7 16c1.5 2.6 5.2-.8 8 1' stroke-dasharray='2.2 2.2'/%3E%3C/svg%3E");
}
#personnel-management-title::before {
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1-2.8 2.8-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6v.2h-4V21a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1L4.2 17l.1-.1a1.7 1.7 0 0 0 .3-1.9A1.7 1.7 0 0 0 3 14H2.8v-4H3a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9L4.2 7 7 4.2l.1.1a1.7 1.7 0 0 0 1.9.3A1.7 1.7 0 0 0 10 3v-.2h4V3a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1L19.8 7l-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.2v4H21a1.7 1.7 0 0 0-1.6 1z'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1-2.8 2.8-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6v.2h-4V21a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1L4.2 17l.1-.1a1.7 1.7 0 0 0 .3-1.9A1.7 1.7 0 0 0 3 14H2.8v-4H3a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9L4.2 7 7 4.2l.1.1a1.7 1.7 0 0 0 1.9.3A1.7 1.7 0 0 0 10 3v-.2h4V3a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1L19.8 7l-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.2v4H21a1.7 1.7 0 0 0-1.6 1z'/%3E%3C/svg%3E");
}
.session-actions {
  gap:6px;
  padding:12px 2px 1px;
  border-top:1px solid rgba(255,255,255,.24);
}
.session-actions .session-profile { min-height:37px; padding:0 5px; border:0; background:transparent; }
.session-actions .session-user::before { width:32px; height:32px; border-radius:4px; font-size:12px; }
.session-user { color:#fff !important; font-size:10px; }
.session-actions .header-session,.session-actions .header-shutdown {
  flex-basis:34px;
  width:34px;
  height:34px;
  border:1px solid rgba(255,255,255,.45);
  color:#fff;
  background:rgba(255,255,255,.06);
  box-shadow:none;
  text-shadow:none;
}

main {
  position:relative;
  width:auto;
  max-width:none;
  min-width:0;
  margin:0 14px 0 calc(var(--v4-sidebar) + 14px) !important;
  container:workspace / inline-size;
}
/* Shared operational header */
.page-heading,.work-heading,.scheduled-heading,.fleet-heading,.material-heading,.alerts-heading,.archive-heading,
#fleet-availability-view .fleet-availability-heading {
  box-sizing:border-box;
  min-height:64px;
  margin:0;
  padding:8px 16px;
  align-items:center;
  border:1px solid #005a78;
  border-top:0;
  border-radius:0 0 var(--v4-radius) var(--v4-radius);
  color:#fff;
  background:var(--v4-primary);
  box-shadow:var(--v4-shadow);
}
.page-heading h1,.work-heading h1,.scheduled-heading h1,.fleet-heading h1,.material-heading h1,.alerts-heading h1,.archive-heading h1,
#fleet-availability-view .fleet-availability-heading h1 {
  margin:0;
  color:#fff;
  font-size:var(--v4-page-title-size);
  font-weight:750;
  line-height:1.1;
  letter-spacing:-.015em;
}
#alerts-view .alerts-heading h1 {
  font-size:var(--v4-page-title-size);
}
.v4-page-kicker,.page-heading .eyebrow,.archive-heading .eyebrow,.fleet-heading .eyebrow {
  margin:0 0 3px;
  color:var(--v4-accent);
  font-size:8px;
  font-weight:800;
  letter-spacing:.15em;
  text-transform:uppercase;
}
.title-company-logo { width:min(220px,20vw); max-height:38px; object-fit:contain; filter:none; }

/* Dashboard */
#alerts-view.is-active { min-height:calc(100dvh - var(--v4-footer)); }
#alerts-view > .alerts-heading { min-height:64px; margin:0; padding:8px 16px; }
#alerts-view .alerts-dashboard {
  display:grid;
  min-height:0;
  margin:0;
  padding:var(--v4-page-gap) 0 0;
  gap:var(--v4-gap);
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-template-rows:auto minmax(330px,1.35fr) minmax(230px,1fr);
  align-items:stretch;
  flex:1;
}
#alerts-view .alerts-operational-summary {
  display:grid;
  min-width:0;
  grid-column:1 / -1;
  grid-row:1;
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-template-rows:auto;
  gap:var(--v4-gap);
  overflow:visible;
  border:0;
  background:transparent;
  box-shadow:none;
}
#alerts-view .alerts-operational-summary article {
  position:relative;
  display:grid;
  min-height:78px;
  margin:0;
  padding:11px 58px 10px 14px;
  align-content:center;
  gap:2px;
  overflow:hidden;
  border:1px solid var(--v4-line);
  border-left:4px solid var(--v4-info);
  border-radius:var(--v4-radius);
  background:var(--v4-panel);
  box-shadow:var(--v4-shadow);
}
#alerts-view .alerts-operational-summary article:last-child { margin:0; }
#alerts-view .alerts-operational-summary article::after {
  position:absolute;
  top:50%;
  right:14px;
  display:grid;
  width:34px;
  height:34px;
  place-items:center;
  border:1px solid currentColor;
  border-radius:4px;
  opacity:.85;
  background:none;
  font-size:17px;
  transform:translateY(-50%);
}
#alerts-view .alerts-operational-summary .is-attention { border-left-color:var(--v4-warning); }
#alerts-view .alerts-operational-summary .is-attention::after { content:"!"; color:var(--v4-warning); }
#alerts-view .alerts-operational-summary .is-corrective { border-left-color:var(--v4-danger); }
#alerts-view .alerts-operational-summary .is-corrective::after { content:"◇"; color:var(--v4-danger); }
#alerts-view .alerts-operational-summary .is-scheduled::after { content:"▤"; color:var(--v4-info); }
#alerts-view .alerts-operational-summary .is-out-service { border-left-color:var(--v4-danger); }
#alerts-view .alerts-operational-summary .is-out-service::after { content:"▰"; color:var(--v4-danger); }
#alerts-view .alerts-operational-summary small { color:var(--v4-ink); font-size:10px; font-weight:750; }
#alerts-view .alerts-operational-summary strong { color:#0d3544; font-size:27px; font-variant-numeric:tabular-nums; }
#alerts-view .alerts-operational-summary span { color:var(--v4-muted); font-size:8px; font-weight:500; }

.alerts-dashboard-panel,.alerts-dashboard-alerts > section {
  border:1px solid var(--v4-line);
  border-radius:var(--v4-radius);
  background:var(--v4-panel);
  box-shadow:var(--v4-shadow);
}
#alerts-view .alerts-forecast-panel { grid-column:1 / -1; grid-row:2; }
#alerts-view .alerts-circulation-panel { grid-column:1; grid-row:3; }
#alerts-view .alerts-depot-panel { grid-column:2; grid-row:3; }
#alerts-view .alerts-calendar-panel { z-index:6; grid-column:3; grid-row:3; }
#alerts-view .alerts-dashboard-panel { display:flex; min-height:0; overflow:hidden; flex-direction:column; }
#alerts-view .alerts-dashboard-panel.alerts-calendar-panel { overflow:visible; }
#alerts-view .alerts-dashboard-heading,
#alerts-view .alerts-calendar-panel > .alerts-dashboard-heading {
  display:flex;
  box-sizing:border-box;
  min-height:40px;
  height:40px;
  padding:6px 10px;
  align-items:center;
  justify-content:space-between;
  gap:9px;
  border-bottom:1px solid var(--v4-line);
  color:var(--v4-ink);
  background:var(--v4-panel-head);
}
#alerts-view .alerts-dashboard-heading p { margin:0; color:var(--v4-ink); font-size:12px; font-weight:800; }
#alerts-view .alerts-dashboard-heading p::before { content:""; display:inline-block; width:3px; height:15px; margin-right:7px; vertical-align:-3px; background:var(--v4-accent); }
#alerts-view .fleet-alert-list { min-height:0; overflow-y:auto; overflow-x:hidden; flex:1; overscroll-behavior:contain; }
#alerts-view .alerts-forecast-panel .fleet-alert-list { overflow-y:auto; overflow-x:hidden; }
#alerts-view .fleet-alert-table { width:100%; table-layout:fixed; border-collapse:separate; border-spacing:0; color:var(--v4-ink); font-size:10px; }
#alerts-view .fleet-alert-table thead { position:sticky; z-index:4; top:0; }
#alerts-view .fleet-alert-table th {
  height:38px;
  padding:5px 4px;
  border-bottom:1px solid var(--v4-line-strong);
  color:#31515e;
  background:#eaf1f3;
  font-size:8px;
  font-weight:800;
  line-height:1.15;
  white-space:normal;
}
#alerts-view .fleet-alert-table td { height:35px; padding:5px 4px; border-bottom:1px solid #dae4e8; font-variant-numeric:tabular-nums; }
#alerts-view .fleet-alert-table tbody tr:hover { background:#f2f9fb; }
#alerts-view .alerts-forecast-panel .fleet-alert-table th { height:34px; padding:3px 3px; }
#alerts-view .alerts-forecast-panel .fleet-alert-table td { height:30px; padding:3px 3px; line-height:1.1; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td) { box-sizing:border-box; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td):nth-child(1) { width:4%; text-align:center; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td):nth-child(2) { width:4%; text-align:center; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td):nth-child(3) { width:5%; text-align:center; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td):nth-child(4) { width:7%; text-align:center; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td):nth-child(5) { width:6%; text-align:left; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td):nth-child(6) { width:5%; text-align:center; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td):nth-child(7) { width:9%; text-align:right; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td):nth-child(8) { width:9%; text-align:center; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td):nth-child(9) { width:8%; text-align:right; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td):nth-child(10) { width:8%; text-align:right; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td):nth-child(11) { width:9%; text-align:right; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td):nth-child(12) { width:10%; text-align:center; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td):nth-child(13) { width:8%; text-align:center; }
#alerts-view .alerts-forecast-panel .fleet-alert-table :is(th,td):nth-child(14) { width:8%; text-align:center; }
#alerts-view .alerts-forecast-panel .fleet-alert-table td { white-space:nowrap; }
.fleet-alert-icon,.fleet-alert-sync-icon { width:22px; height:22px; }
.dashboard-notice-row { min-height:44px; padding:7px 10px; border-bottom-color:#dbe5e9; font-size:10px; }
.dashboard-notice-row:hover { background:#f2f9fb; }
.dashboard-notice-status,.scheduled-state-tag { border-radius:3px; }

#alerts-view .alerts-calendar-panel > .alerts-dashboard-heading { display:grid; height:40px; min-height:40px; grid-template-columns:minmax(122px,1fr) minmax(140px,auto) minmax(96px,1fr); grid-template-rows:1fr; }
#alerts-view .alerts-calendar-panel > .alerts-dashboard-heading > p { box-sizing:border-box; width:100%; min-width:0; grid-column:1; grid-row:1; justify-self:stretch; white-space:nowrap; }
#alerts-view .alerts-calendar-panel .calendar-header-navigation { position:static; left:auto; display:grid; grid-column:2; grid-row:1; grid-template-columns:24px minmax(82px,100px) 24px; gap:5px; justify-self:center; align-items:center; transform:none; }
#alerts-view .alerts-calendar-panel .calendar-header-navigation strong { min-width:0; color:var(--v4-ink); font-size:10px; text-align:center; white-space:nowrap; }
#alerts-view .alerts-calendar-panel .forecast-calendar-nav { width:24px; height:24px; border:1px solid #9fc4d2; border-radius:3px; color:var(--v4-primary); background:#fff; font-size:17px; }
#alerts-view .alerts-calendar-panel #open-forecast-calendar-dialog {
  display:inline-flex;
  width:auto;
  height:26px;
  padding:0 8px;
  justify-self:end;
  grid-column:3;
  grid-row:1;
  align-items:center;
  gap:5px;
  border:1px solid #85bacc;
  border-radius:3px;
  color:var(--v4-primary);
  background:#fff;
}
#alerts-view .alerts-calendar-panel #open-forecast-calendar-dialog svg { width:13px; height:13px; }
#alerts-view .alerts-calendar-panel #open-forecast-calendar-dialog span { display:inline; color:inherit; font-size:9px; font-weight:750; white-space:nowrap; }
#alerts-view .fleet-forecast-calendar { min-height:0; flex:1; overflow:auto; }
#alerts-view .forecast-calendar-grid { min-height:100%; }
#alerts-view .forecast-calendar-weekday { color:#46616c; background:#eaf1f3; }
#alerts-view .forecast-calendar-day { min-height:clamp(26px,4vh,52px); border-color:#cbd9de; }
#alerts-view .dashboard-calendar-popover { bottom:4px; }

/* Shared component design system */
.button,button.button {
  min-height:var(--v4-control-height);
  padding:7px 12px;
  border:1px solid transparent;
  border-radius:4px;
  box-shadow:none;
  font-size:11px;
  font-weight:750;
  line-height:1.15;
  transition:border-color var(--v4-transition),background-color var(--v4-transition),color var(--v4-transition),box-shadow var(--v4-transition);
}
.button.primary { border-color:var(--v4-primary); color:#fff; background:var(--v4-primary); }
.button.primary:hover { border-color:#005570; background:#005b79; }
.button.secondary { border-color:#9fb8c2; color:#174554; background:#fff; }
.button.secondary:hover { border-color:#6fa8bc; background:#eef7fa; }
.button.danger,.danger-outline { border-color:#d79ca3; color:#a92f3d; background:#fff; }
.button.danger:hover,.danger-outline:hover { border-color:#c66570; background:#fff1f2; }
.button:disabled,button:disabled,.icon-button:disabled { border-color:#d6e0e4 !important; color:var(--v4-disabled) !important; background:#edf2f4 !important; box-shadow:none !important; cursor:not-allowed; opacity:1; }
.icon-button,.scheduled-plan-card-actions button,.scheduled-manual-library-actions button {
  display:inline-grid;
  min-width:var(--v4-control-height);
  min-height:var(--v4-control-height);
  place-items:center;
  border:1px solid #9fb8c2;
  border-radius:4px;
  color:var(--v4-primary);
  background:#fff;
  box-shadow:none;
  transition:border-color var(--v4-transition),background-color var(--v4-transition),color var(--v4-transition);
}
.icon-button:hover,.scheduled-plan-card-actions button:hover,.scheduled-manual-library-actions button:hover { border-color:#6fa8bc; color:#004f6a; background:var(--v4-hover); }
.button:focus-visible,.icon-button:focus-visible,button:focus-visible { outline:0; box-shadow:var(--v4-focus); }
input,select,textarea {
  box-sizing:border-box;
  min-height:var(--v4-control-height);
  padding:7px 9px;
  border:1px solid #afc2ca;
  border-radius:4px;
  color:var(--v4-ink);
  background:#fff;
  box-shadow:none;
  font:inherit;
  transition:border-color var(--v4-transition),box-shadow var(--v4-transition),background-color var(--v4-transition);
}
textarea { min-height:64px; resize:vertical; line-height:1.4; }
input::placeholder,textarea::placeholder { color:#82959d; opacity:1; }
input:focus,select:focus,textarea:focus { border-color:var(--v4-primary); outline:0; box-shadow:var(--v4-focus); }
input:disabled,select:disabled,textarea:disabled,input[readonly] { color:#657a83; background:#edf2f4; }
input[type="checkbox"],input[type="radio"] { accent-color:var(--v4-primary); }
label { color:#294752; font-weight:650; }
label > :is(input,select,textarea) { margin-top:5px; }
:is(.personnel-feedback,.profile-password-feedback,.scheduled-dialog-feedback,.mailing-feedback)[role="alert"] { color:var(--v4-danger); font-size:var(--v4-font-sm); font-weight:700; }
.muted,.help-text,label > small { color:var(--v4-muted); font-size:var(--v4-font-xs); font-weight:500; }
.form-band,.archive-panel,.material-panel,.settings-panel,.fleet-register,.analytics-card,
.maintenance-table-wrap,.scheduled-table-wrap,.scheduled-inline-workspace,.scheduled-operator-workspace,
.agenda-calendar-shell,.agenda-day-detail,.maintainer-workspace,.access-management-workspace {
  border-color:var(--v4-line);
  border-radius:var(--v4-radius);
  background:var(--v4-panel);
  box-shadow:var(--v4-shadow);
}
.form-band h2,.analytics-heading,.material-section-heading,.settings-panel > header {
  border-bottom-color:var(--v4-line);
  color:var(--v4-ink);
  background:var(--v4-panel-head);
}
table { font-variant-numeric:tabular-nums; }
.table-wrap,.maintenance-table-wrap,.scheduled-table-wrap,.fleet-register-table-wrap,.archive-table-wrap { max-width:100%; overflow:auto; }
.maintenance-table,.scheduled-table,.fleet-register-table,.archive-table,.scheduled-checklist-table { border-collapse:separate; border-spacing:0; }
.maintenance-table th,.scheduled-table th,.fleet-register-table th,.archive-table th,.scheduled-checklist-table th {
  position:sticky;
  z-index:2;
  top:0;
  border-bottom:1px solid var(--v4-line-strong);
  color:#31515e;
  background:#eaf1f3;
}
#fleet-form-view .fleet-register-table th { color:#fff; background:var(--v4-primary); }
.maintenance-table td,.scheduled-table td,.fleet-register-table td,.archive-table td,.scheduled-checklist-table td { border-bottom-color:#dbe5e9; }
.maintenance-table tbody tr:hover,.scheduled-table tbody tr:hover,.fleet-register-table tbody tr:hover,.archive-table tbody tr:hover { background:#f2f9fb; }
.maintenance-table :is(th,td),.scheduled-table :is(th,td),.fleet-register-table :is(th,td),.archive-table :is(th,td),.scheduled-checklist-table :is(th,td),.personnel-table :is(th,td) { padding:9px 10px; vertical-align:middle; }
.maintenance-table th,.scheduled-table th,.fleet-register-table th,.archive-table th,.scheduled-checklist-table th,.personnel-table th { font-size:var(--v4-font-sm); font-weight:800; line-height:1.2; text-align:left; white-space:normal; }
.maintenance-table td,.scheduled-table td,.fleet-register-table td,.archive-table td,.scheduled-checklist-table td,.personnel-table td { color:var(--v4-ink); font-size:11px; line-height:1.35; }
.maintenance-table tbody tr:last-child td,.scheduled-table tbody tr:last-child td,.fleet-register-table tbody tr:last-child td,.archive-table tbody tr:last-child td,.scheduled-checklist-table tbody tr:last-child td,.personnel-table tbody tr:last-child td { border-bottom:0; }
.maintenance-table :is(th,td):has(.button),.scheduled-table :is(th,td):has(.button),.archive-table :is(th,td):has(.button),.personnel-table :is(th,td):has(.button) { text-align:center; }

/* Block A: shared cards, service management and fleet surfaces. */
.fleet-availability-heading + #fleet-availability-content { gap:var(--v4-gap); }
.fleet-availability-summary,.fleet-availability-fleet,.fleet-availability-work,.fleet-availability-actions > section {
  border:1px solid var(--v4-line);
  background:var(--v4-panel);
}
.fleet-availability-summary > h2,.fleet-availability-fleet > h2,.fleet-availability-work > h2,.fleet-availability-actions > section > h2 {
  margin:0;
  padding:11px 14px;
  border-bottom:1px solid var(--v4-line);
  color:var(--v4-ink);
  background:var(--v4-panel-head);
  font-size:var(--v4-font-lg);
  line-height:1.2;
}
.fleet-availability-train { transition:border-color var(--v4-transition),background-color var(--v4-transition),box-shadow var(--v4-transition); }
.fleet-availability-train:focus-visible { outline:0; box-shadow:var(--v4-focus); }
.fleet-availability-train-icon { border-radius:4px; background:#eaf5f8; }
.fleet-availability-train-data strong { color:#103a48; font-size:13px; line-height:1.15; }
.fleet-availability-train-data small,.fleet-availability-info small,.fleet-availability-deadline small { color:var(--v4-muted); }
.fleet-availability-divider { background:var(--v4-line); }
.fleet-availability-work,.fleet-availability-actions > section { min-height:0; overflow:auto; }
.fleet-inline-reasons button,.fleet-inline-other-reasons button {
  border-color:var(--v4-line-strong);
  border-radius:4px;
  color:var(--v4-ink);
  background:#fff;
  box-shadow:none;
}
.fleet-inline-reasons button:hover,.fleet-inline-other-reasons button:hover { border-color:#78afc2; background:var(--v4-hover); }
.fleet-inline-reasons button.is-selected,.fleet-inline-other-reasons button.is-selected { border-color:var(--v4-primary); color:#073849; background:var(--v4-selected); }

.fleet-entry-band,.fleet-register,.fleet-management-panel,.fleet-registry-sidebar,.fleet-registry-detail {
  border:1px solid var(--v4-line);
  border-radius:var(--v4-radius);
  background:var(--v4-panel);
  box-shadow:var(--v4-shadow);
}
.fleet-entry-band { overflow:hidden; }
.fleet-register .analytics-heading,.fleet-registry-summary,.fleet-registry-sidebar > header {
  border-bottom:1px solid var(--v4-line);
  color:var(--v4-ink);
  background:var(--v4-panel-head);
}
.fleet-register-actions,.fleet-period-control,.fleet-form-actions { gap:var(--v4-space-2); }
/* Registro chilometrico: stessa altezza dei comandi del tema, anche in filtro. */
#fleet-form-view .fleet-form-actions > :is(.button,.icon-button) {
  box-sizing:border-box;
  height:var(--v4-control-height);
  min-height:var(--v4-control-height);
}
#fleet-form-view .fleet-form-actions > :is(.icon-button,.fleet-filter-export,.fleet-filter-print) {
  width:var(--v4-control-height);
  min-width:var(--v4-control-height);
}
@media (min-width:901px) {
  #fleet-form-view.is-active {
    min-height:calc(100dvh - var(--v4-footer));
    height:calc(100dvh - var(--v4-footer));
  }
}
.fleet-period-control .button.is-active { border-color:var(--v4-primary); color:#fff; background:var(--v4-primary); }
.fleet-register-table tbody tr:nth-child(even) { background:#f5f8f9; }
.fleet-register-table tbody tr:hover { background:#eaf5f8; }
.fleet-registry-list-item,.maintainer-list-item,.access-user-list-item {
  border:1px solid var(--v4-line);
  border-radius:4px;
  color:var(--v4-ink);
  background:#fff;
  box-shadow:none;
  transition:border-color var(--v4-transition),background-color var(--v4-transition);
}
.fleet-registry-list-item:hover,.maintainer-list-item:hover,.access-user-list-item:hover { border-color:#78afc2; background:var(--v4-hover); }
.fleet-registry-list-item.is-selected,.maintainer-list-item.is-selected,.access-user-list-item.is-selected { border-color:var(--v4-primary); background:var(--v4-selected); box-shadow:inset 3px 0 var(--v4-primary); }
.fleet-registry-summary-icon,.fleet-registry-empty-icon,.fleet-registry-new-icon { border-radius:4px; background:#e5f5fa; }
.fleet-registry-grid { gap:var(--v4-space-3); }

dialog:not(.login-dialog) {
  box-sizing:border-box;
  max-width:min(calc(100vw - 32px),1100px);
  max-height:calc(100dvh - 32px);
  border:1px solid var(--v4-line-strong);
  border-radius:var(--v4-radius);
  color:var(--v4-ink);
  background:#fff;
  box-shadow:0 18px 48px rgba(19,49,61,.24);
}
dialog::backdrop { background:rgba(12,34,43,.48); backdrop-filter:none; }
.dialog-header h2 { margin:0; color:var(--v4-ink); font-size:16px; font-weight:800; line-height:1.2; }
.dialog-header {
  position:sticky;
  z-index:5;
  top:0;
  min-height:48px;
  border-bottom:1px solid var(--v4-line);
  color:var(--v4-ink);
  background:var(--v4-panel-head);
}
.dialog-actions,dialog footer { border-top-color:var(--v4-line); background:#f7fafb; }
dialog:not(.login-dialog)[open] { display:flex; flex-direction:column; overflow:hidden; }
dialog:not(.login-dialog) > :is(.work-save-content,.detail-dialog-content,.scheduled-dialog-content,.scheduled-report-content,.scheduled-task-manual-content,.fleet-statistics-dialog-content,.fleet-out-of-service-content,.email-notification-history,.operational-summary-dialog-content,.forecast-calendar-expanded) { min-height:0; overflow:auto; }
.dialog-actions,dialog:not(.login-dialog) > footer { position:sticky; z-index:5; bottom:0; flex:0 0 auto; }
.fleet-statistics-dialog-header,.fleet-out-of-service-heading,.fleet-corrective-confirm-heading,.access-users-dialog > header {
  min-height:50px;
  border-bottom:1px solid var(--v4-line);
  color:var(--v4-ink);
  background:var(--v4-panel-head);
}
.fleet-statistics-dialog-header h2,.fleet-out-of-service-heading h2,.fleet-corrective-confirm-heading h2,.access-users-dialog > header h2 { color:var(--v4-ink); }
.fleet-out-of-service-title-icon { border:1px solid #a8d3e1; border-radius:4px; color:var(--v4-primary); background:#e7f6fa; }
.fleet-out-of-service-summary { border:1px solid var(--v4-line); border-radius:4px; background:#f7fafb; }
.fleet-out-of-service-summary small { color:var(--v4-muted); }
.fleet-out-of-service-summary strong { color:var(--v4-ink); }
.fleet-out-of-service-reasons button { border-color:var(--v4-line-strong); border-radius:4px; color:var(--v4-ink); background:#fff; box-shadow:none; }
.fleet-out-of-service-reasons button:hover { border-color:#78afc2; background:var(--v4-hover); }
.fleet-out-of-service-reasons button.is-selected { border-color:var(--v4-primary); color:var(--v4-ink); background:var(--v4-selected); }
.fleet-out-of-service-footer,.fleet-corrective-confirm-footer { border-top:1px solid var(--v4-line); }
.fleet-out-of-service-note-display { border-color:var(--v4-line); border-radius:4px; background:#f7fafb; }

/* Conferma operativa: densità coerente con le altre finestre V4. */
.service-communication-dialog.fleet-corrective-confirm-dialog {
  width:min(900px,calc(100vw - 24px));
  max-height:calc(100dvh - 24px);
}
.service-communication-dialog .fleet-corrective-confirm-content {
  min-height:0;
  padding:18px 22px 16px;
  overflow-y:auto;
}
.service-communication-dialog .fleet-corrective-confirm-heading { gap:12px; }
.service-communication-dialog .fleet-corrective-confirm-heading .fleet-out-of-service-title-icon { width:48px; height:48px; border-width:1px; }
.service-communication-dialog .fleet-corrective-confirm-heading .fleet-out-of-service-title-icon svg { width:26px; height:26px; }
.service-communication-dialog .fleet-corrective-confirm-heading h2 { font-size:22px; }
.service-communication-dialog .fleet-corrective-confirm-content > p { margin:14px 0 0; font-size:15px; line-height:1.3; }
.service-communication-dialog .fleet-corrective-confirm-content > p + p { margin-top:7px; font-size:14px; }
.service-communication-dialog .communication-composer { margin-top:12px; padding-top:12px; }
.service-communication-dialog .communication-composer > h3 { margin:8px 0 10px; font-size:15px; }
.service-communication-dialog .communication-composer fieldset { gap:9px; }
.service-communication-dialog .communication-composer label { gap:4px; }
.service-communication-dialog .communication-contacts { max-height:120px; }
.service-communication-dialog .communication-contacts label { padding:6px 8px; }
.service-communication-dialog .communication-selected { gap:4px 6px; padding:8px; }
.service-communication-dialog .communication-selected p { margin:0; }
.service-communication-dialog .communication-composer textarea { height:145px; min-height:120px; }
.service-communication-dialog .communication-composer summary { padding:5px 0; }
.service-communication-dialog .fleet-corrective-confirm-footer { gap:8px; padding:12px 22px; }
.service-communication-dialog .fleet-corrective-confirm-footer .button {
  width:auto;
  min-width:112px;
  min-height:36px;
  height:36px;
  padding:0 12px;
  font-size:11px;
}
.email-notification-history-heading { border-bottom:1px solid var(--v4-line); background:var(--v4-panel-head); }
.communication-history-item { border:1px solid var(--v4-line); border-radius:4px; background:#fff; }
.communication-history-item:hover { border-color:#78afc2; background:var(--v4-hover); }

/* Login uses only original project logos. */
.login-dialog::backdrop {
  background:
    url("assets/logo_ferrovie_del_gargano.svg?v=3") right 42px top 28px / min(30vw,360px) auto no-repeat,
    url("assets/login-brand-subtitle.svg?v=2") right 42px top 76px / min(20vw,240px) auto no-repeat,
    url("assets/login-bottom-left-effect-blueprint.png?v=3") left -85px bottom -65px / min(94vw,1520px) auto no-repeat,
    var(--v4-primary);
}
.login-dialog[open] { max-height:calc(100dvh - 24px); overflow:auto; border:1px solid #8eafb9; border-radius:6px; box-shadow:0 20px 60px rgba(17,55,69,.24); }
body:has(.login-dialog[open]) { height:100dvh; overflow:hidden; }
.login-dialog form { border-top:0; background:#fefefe; }
.login-dialog .login-symbol { border:1px solid #9bb8c2; border-radius:5px; background:#fff !important; box-shadow:none; }
.login-dialog .login-symbol img { filter:none; transform:none; }
.login-company-logo { background:var(--v4-primary); }
.login-company-logo img { filter:none; }
.login-dialog h2,.login-dialog strong { color:var(--v4-ink); }
.login-dialog p,.login-dialog small { color:var(--v4-muted); }
.login-dialog .button.primary { width:100%; }
#setup-complete > label {
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:0;
  color:var(--v4-ink);
  font-size:var(--v4-font-sm);
  font-weight:650;
  line-height:1.45;
  cursor:pointer;
}
#setup-complete #recovery-acknowledged {
  flex:0 0 18px;
  width:18px;
  height:18px;
  min-height:18px;
  margin:1px 0 0;
  padding:0;
}

/* Secondary workspaces share the same hierarchy and density. */
.maintenance-navigation { margin:0 0 var(--v4-gap); }
body.maintenance-active .app-header,body.maintenance-active .brand { transform:none; }
.maintenance-heading {
  min-height:60px;
  padding:8px 16px;
  border:1px solid #005a78;
  border-top:0;
  border-radius:0 0 var(--v4-radius) var(--v4-radius);
  color:#fff;
  background:var(--v4-primary);
  box-shadow:var(--v4-shadow);
}
.maintenance-heading h1 { color:#fff; font-size:var(--v4-page-title-size); }
.maintenance-navigation-bar {
  margin-top:10px;
  padding:7px 9px;
  border:1px solid var(--v4-line);
  border-radius:var(--v4-radius);
  background:#fff;
  box-shadow:var(--v4-shadow);
}
.maintenance-navigation button { min-height:33px; padding:6px 11px; border-radius:4px; color:#36545f; font-size:10px; font-weight:700; }
.maintenance-navigation button[aria-current="page"] { color:#fff; background:var(--v4-primary); }
.maintenance-navigation button:hover { color:#174554; background:#edf6f8; }
.maintenance-toolbar { gap:7px; }
.maintenance-classifications { gap:var(--v4-gap); }
.maintenance-classification-card { border-color:var(--v4-line); border-radius:var(--v4-radius); box-shadow:var(--v4-shadow); }

#fleet-availability-content,.fleet-availability-fleet,.fleet-availability-actions { min-width:0; }
.fleet-availability-summary,.fleet-availability-fleet,.fleet-availability-work,
.fleet-availability-actions > section {
  border-color:var(--v4-line);
  border-radius:var(--v4-radius);
  background:#fff;
  box-shadow:var(--v4-shadow);
}
.fleet-availability-trains {
  grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));
  gap:10px;
  max-height:none;
  min-height:0;
  align-content:start;
  overflow-x:hidden;
  overflow-y:auto;
}
.fleet-availability-train {
  min-width:0;
  border-color:var(--v4-line);
  border-radius:5px;
  background:#fff;
  box-shadow:none;
}
.fleet-availability-train:hover { border-color:#7fb7c8; background:#f4fafc; }
.fleet-availability-train.is-selected { border-color:var(--v4-primary); background:#edf8fb; }
.fleet-availability-train-data em,.fleet-availability-summary em { border-radius:3px; }

#maintenance-agenda-view .agenda-toolbar {
  min-height:43px;
  padding:6px 10px;
  border:1px solid var(--v4-line);
  border-radius:var(--v4-radius) var(--v4-radius) 0 0;
  background:var(--v4-panel-head);
}
#maintenance-agenda-view .agenda-layout { gap:var(--v4-gap); border:0; border-radius:0; background:transparent; box-shadow:none; }
#maintenance-agenda-view .agenda-calendar-shell,#maintenance-agenda-view .agenda-day-detail { border:1px solid var(--v4-line); border-radius:var(--v4-radius); }
#maintenance-agenda-view .agenda-calendar { border:0; border-radius:0; box-shadow:none; }
.agenda-detail-heading { color:var(--v4-ink); background:var(--v4-panel-head); border-bottom:1px solid var(--v4-line); }

#personnel-management-view > .settings-tabs {
  display:flex;
  max-width:100%;
  margin:0 0 var(--v4-gap);
  padding:5px;
  flex-wrap:wrap;
  gap:4px;
  overflow:visible;
  border:1px solid var(--v4-line);
  border-radius:var(--v4-radius);
  background:#e6eef1;
  box-shadow:none;
}
.settings-tab { min-height:34px; padding:6px 11px; border-radius:3px; color:#3c5863; font-size:10px; }
.settings-tab.is-active,.settings-tab[aria-selected="true"] { color:#fff; background:var(--v4-primary); }
.settings-card,.email-notifications-card,.backup-card,.access-user-card,.maintainer-profile-card {
  border-color:var(--v4-line);
  border-radius:var(--v4-radius);
  background:#fff;
  box-shadow:var(--v4-shadow);
}

#scheduled-maintenance-view .scheduled-operator-workspace {
  gap:var(--v4-gap);
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.scheduled-operator-activity-list,.scheduled-execution-content,.scheduled-operator-side > section,
.scheduled-inline-table-wrap,.scheduled-inline-actions {
  border-color:var(--v4-line);
  border-radius:var(--v4-radius);
  background:#fff;
  box-shadow:var(--v4-shadow);
}
.scheduled-operator-activity-list h2,.scheduled-actions-title,.work-center-list-title {
  color:var(--v4-ink);
  background:var(--v4-panel-head);
  border-bottom:1px solid var(--v4-line);
}
.record-card,.archive-card,.work-card { border-color:var(--v4-line); border-radius:var(--v4-radius); box-shadow:var(--v4-shadow); }
.record-card:hover,.archive-card:hover,.work-card:hover { border-color:#7fb7c8; transform:none; }

/* Block B: maintenance center, scheduled execution and corrective workflow. */
.maintenance-space { gap:var(--v4-gap); }
.maintenance-classifications {
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.maintenance-classification-card {
  min-height:76px;
  padding:13px 16px;
  border:1px solid var(--v4-line);
  background:var(--v4-panel);
}
.maintenance-classification-card small { color:var(--v4-muted); font-size:var(--v4-font-sm); font-weight:650; }
.maintenance-classification-card strong { color:#0d3a49; font-size:24px; line-height:1; font-variant-numeric:tabular-nums; }
.maintenance-toolbar { display:flex; flex-wrap:wrap; align-items:center; }
.maintenance-toolbar .button { border-color:#9fb8c2; background:#fff; }
.maintenance-toolbar .button:hover { border-color:#6fa8bc; background:var(--v4-hover); }
.maintenance-toolbar .count { border-radius:3px; color:#fff; background:var(--v4-info); }
.maintenance-message { min-height:15px; margin:0; color:var(--v4-muted); font-size:11px; line-height:15px; }
.maintenance-table-wrap { overflow:auto; border:1px solid var(--v4-line); }
.maintenance-table { width:100%; background:#fff; }
.maintenance-table td > small { display:block; margin-top:3px; color:var(--v4-muted); }
#maintenance-center-view .maintenance-reference > small { margin:0 0 3px; }
#maintenance-center-view .maintenance-reference > strong { display:block; }
#maintenance-center-view [data-maintenance-open] {
  box-sizing:border-box;
  width:68px;
  min-width:68px;
  height:33px;
  min-height:33px;
  padding:0 10px;
  font-family:inherit;
  font-size:10px;
  font-weight:750;
}
.maintenance-task-detail {
  overflow:hidden;
  border:1px solid var(--v4-line);
  border-radius:var(--v4-radius);
  background:var(--v4-panel);
  box-shadow:var(--v4-shadow);
}

#work-center-view { gap:var(--v4-gap); }
#work-center-view > .scheduled-table-wrap,.scheduled-inline-workflow,.work-center-placeholder {
  border:1px solid var(--v4-line);
  border-radius:var(--v4-radius);
  background:var(--v4-panel);
  box-shadow:var(--v4-shadow);
}
.work-center-list-title,.scheduled-actions-title {
  box-sizing:border-box;
  min-height:42px;
  margin:0;
  padding:11px 13px;
  border-bottom:1px solid var(--v4-line);
  color:var(--v4-ink);
  background:var(--v4-panel-head);
  font-size:13px;
  font-weight:800;
}
.work-center-card { color:var(--v4-ink); background:#fff; transition:background-color var(--v4-transition),box-shadow var(--v4-transition); }
.work-center-card:hover { background:var(--v4-hover); }
.work-center-card.is-selected { background:var(--v4-selected); box-shadow:inset 3px 0 var(--v4-primary); }
#work-center-view .scheduled-table tbody,
#work-center-view .scheduled-table tr.work-center-card {
  box-sizing:border-box;
  width:100%;
  min-width:0;
  max-width:100%;
}
#work-center-view .scheduled-table tr.work-center-card { overflow:hidden; }
#work-center-view .scheduled-table tr.work-center-card td { min-width:0; max-width:100%; }
#work-center-view .work-center-status { display:flex; margin-right:auto; margin-left:auto; }
.work-center-status,.record-link-badge,.maintenance-badge { border-radius:3px; font-weight:750; }
.work-center-progress-track,.scheduled-operator-card-progress { overflow:hidden; border-radius:2px; background:#dce7eb; }
.work-center-progress-track > span,.scheduled-operator-card-progress > span { background:var(--v4-primary); }
.scheduled-inline-workspace { overflow:hidden; border:0; box-shadow:none; }
.scheduled-inline-table-wrap,.scheduled-inline-actions { border:1px solid var(--v4-line); }
.scheduled-inline-actions { overflow:auto; }
.scheduled-reading-summary { border-color:var(--v4-line); border-radius:4px; background:#f6f9fa; }
.scheduled-reading-summary small { color:var(--v4-muted); }
.scheduled-reading-summary strong { color:var(--v4-ink); }
.scheduled-checklist-table { width:100%; background:#fff; }
.scheduled-checklist-table tbody tr:hover { background:var(--v4-hover); }

.scheduled-operator-activity-list,.scheduled-execution-content,.scheduled-operator-side > section { overflow:hidden; border:1px solid var(--v4-line); }
.scheduled-operator-activity-list h2,.scheduled-operator-side > section > p {
  min-height:42px;
  margin:0;
  padding:11px 13px;
  border-bottom:1px solid var(--v4-line);
  color:var(--v4-ink);
  background:var(--v4-panel-head);
  font-size:13px;
  font-weight:800;
}
.scheduled-operator-card {
  margin:0;
  border:0;
  border-bottom:1px solid var(--v4-line);
  border-radius:0;
  color:var(--v4-ink);
  background:#fff;
  box-shadow:none;
}
.scheduled-operator-card:hover { background:var(--v4-hover); }
.scheduled-operator-card.is-selected { background:var(--v4-selected); box-shadow:inset 3px 0 var(--v4-primary); }
.scheduled-execution-card { overflow:hidden; border:1px solid var(--v4-line); border-radius:var(--v4-radius); background:#fff; box-shadow:none; }
.scheduled-execution-card-header { border-bottom:1px solid var(--v4-line); background:var(--v4-panel-head); }
.scheduled-execution-card-header h2 { color:var(--v4-ink); }
.scheduled-execution-card-header p,.scheduled-execution-progress span { color:var(--v4-muted); }
.scheduled-execution-table { width:100%; border-collapse:separate; border-spacing:0; }
.scheduled-execution-table th { border-bottom:1px solid var(--v4-line-strong); color:var(--v4-secondary); background:#eaf1f3; font-size:var(--v4-font-sm); }
.scheduled-execution-table td { border-bottom:1px solid #dbe5e9; color:var(--v4-ink); font-size:11px; }
.scheduled-execution-table tbody tr:hover { background:var(--v4-hover); }

#work-archive-view .archive-list,#archive-view .archive-list { gap:var(--v4-gap); }
.record-card,.work-open-card,.closed-corrective-card,.office-report-card {
  border:1px solid var(--v4-line);
  border-left:4px solid var(--v4-info);
  background:#fff;
  box-shadow:var(--v4-shadow);
}
.work-open-card:hover { border-color:#7fb7c8; border-left-color:var(--v4-primary); background:var(--v4-hover); }
.closed-corrective-card { border-left-color:var(--v4-success); }
.record-card > div > small,.work-open-card > div > small { color:var(--v4-muted); font-size:var(--v4-font-xs); font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.record-card > div > p,.work-open-card > div > p { color:var(--v4-ink); }
.record-actions { gap:var(--v4-space-2); }
.corrective-sheet,.detail-section,.corrective-workflow-detail {
  border-color:var(--v4-line);
  border-radius:4px;
  background:#f7fafb;
}
.corrective-sheet h2,.detail-section h3 { color:var(--v4-ink); }
.empty-state,.work-center-placeholder { color:var(--v4-muted); background:#f8fafb; }
.empty-state strong,.work-center-placeholder strong { color:var(--v4-ink); }

/* Block C: calendar, agenda, archives and history. */
#maintenance-agenda-view { gap:var(--v4-gap); }
#maintenance-agenda-view .agenda-toolbar { box-shadow:var(--v4-shadow); }
#maintenance-agenda-view .agenda-month strong { color:var(--v4-ink); font-size:13px; }
#maintenance-agenda-view .agenda-back-link {
  min-height:var(--v4-control-height);
  padding:7px 11px;
  border:1px solid #9fb8c2;
  border-radius:4px;
  color:var(--v4-primary);
  background:#fff;
  font-size:10px;
  font-weight:750;
}
#maintenance-agenda-view .agenda-back-link:hover { border-color:#6fa8bc; background:var(--v4-hover); }
.agenda-calendar-shell,.agenda-day-detail { overflow:hidden; background:#fff; box-shadow:var(--v4-shadow); }
.agenda-calendar { color:var(--v4-ink); }
.agenda-calendar :is(button,[role="button"]):focus-visible { outline:0; box-shadow:inset var(--v4-focus); }
.agenda-detail-heading { min-height:42px; padding:10px 13px; font-size:13px; font-weight:800; }
.agenda-day-detail > h2 { color:var(--v4-ink); font-size:15px; }
.agenda-day-events,.agenda-notes { color:var(--v4-muted); }
.agenda-note-card { border:1px solid var(--v4-line); border-left:3px solid var(--v4-info); border-radius:4px; background:#fff; }
.agenda-bottom-legend { border-top:1px solid var(--v4-line); color:var(--v4-muted); background:#f7fafb; }
.forecast-calendar-dialog .dialog-header { color:#fff; background:var(--v4-primary); }
.forecast-calendar-dialog .dialog-header strong { color:#fff; }
.forecast-calendar-dialog .dialog-header .forecast-calendar-nav,.forecast-calendar-dialog .dialog-header .icon-button { border-color:rgba(255,255,255,.65); color:#fff; background:rgba(255,255,255,.06); }
.forecast-calendar-expanded { background:#fff; }

#archive-view { gap:var(--v4-gap); }
.filters,.material-filters {
  display:grid;
  box-sizing:border-box;
  padding:var(--v4-pad);
  align-items:end;
  gap:var(--v4-space-3);
  border:1px solid var(--v4-line);
  border-radius:var(--v4-radius);
  background:var(--v4-panel);
  box-shadow:var(--v4-shadow);
}
#archive-view .filters { grid-template-columns:minmax(190px,1.5fr) repeat(6,minmax(110px,1fr)) auto auto; }
.filters label,.material-filters label { min-width:0; color:var(--v4-secondary); font-size:var(--v4-font-sm); }
.filters :is(input,select),.material-filters select { width:100%; }
.search-field { position:relative; }
.search-field-icon { color:var(--v4-primary); }
.search-field #clear-search { border:0; color:var(--v4-muted); background:transparent; }
.archive-list { display:grid; align-content:start; }
#archive-view .record-card {
  display:grid;
  min-width:0;
  align-items:center;
  gap:var(--v4-space-3);
  border-left-color:var(--v4-primary);
}
#archive-view .record-card > div { min-width:0; }
.record-type-badge,.record-link-badge { border-radius:3px; font-size:var(--v4-font-xs); font-weight:750; }
.record-link-badge.is-open { color:#0b6a48; background:#e2f5ec; }
.record-link-badge.is-pending,.record-link-badge.is-to-close { color:#8a5700; background:#fff0d5; }
.detail-dialog,.detail-dialog-content { color:var(--v4-ink); }
.detail-section { overflow:hidden; border:1px solid var(--v4-line); background:#fff; }
.detail-section > h3 { margin:0; padding:10px 12px; border-bottom:1px solid var(--v4-line); background:var(--v4-panel-head); font-size:12px; }
.detail-grid { gap:0; }
.detail-item { padding:10px 12px; border-bottom:1px solid #e0e8eb; }
.detail-item dt { color:var(--v4-muted); font-size:var(--v4-font-xs); font-weight:750; text-transform:uppercase; letter-spacing:.04em; }
.detail-item dd { margin-top:3px; color:var(--v4-ink); }

/* Block D: maintenance plans and system administration. */
#personnel-management-view { gap:var(--v4-gap); }
#personnel-management-view > .settings-tabs { position:sticky; z-index:8; top:0; }
.settings-tab {
  border:1px solid transparent;
  font-weight:750;
  transition:border-color var(--v4-transition),background-color var(--v4-transition),color var(--v4-transition);
}
.settings-tab:hover { border-color:#bdd0d7; color:var(--v4-ink); background:#f7fafb; }
.settings-tab.is-active,.settings-tab[aria-selected="true"] { border-color:var(--v4-primary); box-shadow:none; }
.settings-panel { overflow:hidden; border:1px solid var(--v4-line); }
.access-hero,.maintainer-profile-summary,.fleet-registry-summary,.email-notifications-heading,.scheduled-plan-form-heading,.scheduled-catalog-heading {
  border-bottom:1px solid var(--v4-line);
  color:var(--v4-ink);
  background:var(--v4-panel-head);
}
.access-hero h2,.maintainer-profile-summary strong,.fleet-registry-summary h2,.email-notifications-heading h2,.scheduled-plan-form-heading h2,.scheduled-catalog-heading h2 { color:var(--v4-ink); }
.access-hero p,.fleet-registry-summary p,.email-notifications-heading p { color:var(--v4-muted); }
.access-hero-icon,.access-editor-empty-icon,.access-users-sidebar-icon,.maintainer-profile-avatar,.maintainer-list-avatar,.access-user-list-avatar {
  border:1px solid #a8d3e1;
  border-radius:4px;
  color:var(--v4-primary);
  background:#e7f6fa;
}
.access-users-sidebar,.maintainer-sidebar,.fleet-registry-sidebar,.email-recipients-card {
  border-right:1px solid var(--v4-line);
  background:#f8fafb;
}
.access-users-sidebar > header,.maintainer-sidebar-heading,.fleet-registry-sidebar > header,.email-recipients-card > header { border-bottom:1px solid var(--v4-line); background:var(--v4-panel-head); }
.access-users-sidebar-footer,.maintainer-sidebar-footer,.fleet-registry-sidebar-footer,.email-recipients-footer { border-top:1px solid var(--v4-line); background:#fff; }
.access-new-user-sidebar,.workspace-new-maintainer,.fleet-registry-new,.email-recipient-add {
  border:0;
  color:var(--v4-ink);
  background:transparent;
  font-weight:800;
}
.access-new-user-sidebar:hover,.workspace-new-maintainer:hover,.fleet-registry-new:hover,.email-recipient-add:hover { color:var(--v4-primary); background:var(--v4-hover); }
.access-delete-user,.workspace-delete-maintainer,.fleet-registry-delete-sidebar,.email-recipient-delete-sidebar {
  border:0;
  color:var(--v4-danger);
  background:transparent;
  font-weight:750;
}
.access-delete-user:hover,.workspace-delete-maintainer:hover,.fleet-registry-delete-sidebar:hover,.email-recipient-delete-sidebar:hover { background:#fff0f1; }
.access-editor-empty,.maintainer-workspace-empty,.fleet-registry-empty { color:var(--v4-muted); }
.access-editor-empty h2,.fleet-registry-empty h2 { color:var(--v4-ink); }
.access-user-card,.access-permissions-card,.maintainer-profile-card,.competency-expiry-section,.competency-train-section {
  border:1px solid var(--v4-line);
  border-radius:var(--v4-radius);
  background:#fff;
  box-shadow:none;
}
.access-permission-column { border-color:var(--v4-line); }
.access-permission-column h3,.competency-train-section h3 { color:var(--v4-ink); }
.access-permissions-card footer { border-top:1px solid var(--v4-line); background:#f7fafb; }
.access-enabled-field,.access-switch,.personnel-competencies-toggle,.competency-expiry-choice-toggle {
  border-color:var(--v4-line);
  border-radius:4px;
  color:var(--v4-ink);
  background:#fff;
}
.access-enabled-field:hover,.access-switch:hover,.personnel-competencies-toggle:hover,.competency-expiry-choice-toggle:hover { border-color:#78afc2; background:var(--v4-hover); }
.access-toggle-track,.access-switch-track { background:#aebec4; }
.access-enabled-field input:checked + .access-toggle-track,.access-switch input:checked + .access-switch-track { background:var(--v4-primary); }

.scheduled-catalog-panel { background:transparent; box-shadow:none; }
.scheduled-plans-layout { gap:var(--v4-gap); }
.scheduled-plan-form,.scheduled-plans-results,.scheduled-catalog-list {
  overflow:hidden;
  border:1px solid var(--v4-line);
  border-radius:var(--v4-radius);
  background:#fff;
  box-shadow:var(--v4-shadow);
}
.scheduled-plan-form-heading,.scheduled-catalog-heading { min-height:44px; padding:11px 14px; }
.scheduled-plan-grid { gap:var(--v4-space-3); padding:var(--v4-pad); }
.scheduled-plan-type { border:0; border-radius:0; background:transparent; }
.scheduled-plan-type legend { color:var(--v4-secondary); font-size:var(--v4-font-sm); font-weight:750; }
.scheduled-plan-type-options { border-color:var(--v4-line); border-radius:4px; padding:3px; }
.scheduled-plan-type-options label { min-width:0; border:0; border-radius:3px; background:transparent; }
.scheduled-plan-type-options span { display:grid; height:100%; place-items:center; padding:0 6px; border-radius:3px; }
.scheduled-plan-type-options input:focus-visible + span { box-shadow:var(--v4-focus); }
.scheduled-plan-mode { border-color:var(--v4-line); border-radius:4px; background:#f8fafb; }
.scheduled-plan-input-suffix { border-color:#afc2ca; border-radius:4px; background:#fff; }
.scheduled-plan-input-suffix:focus-within { border-color:var(--v4-primary); box-shadow:var(--v4-focus); }
.scheduled-plan-input-suffix input { border:0; box-shadow:none; }
.scheduled-plan-file { border:0; border-radius:0; background:transparent; }
.scheduled-plan-upload.button { height:auto; min-height:var(--v4-control-height); justify-content:flex-start; gap:8px; text-align:left; }
.scheduled-plan-upload b { font:inherit; }
.scheduled-plan-upload svg { width:16px; height:16px; flex:0 0 16px; }
.scheduled-plan-card-actions button,.scheduled-plan-files .scheduled-manual-library-actions button { width:32px; height:32px; min-width:32px; min-height:32px; padding:0; }
.scheduled-plan-card-actions svg,.scheduled-plan-files .scheduled-manual-library-actions svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.scheduled-plan-card,.scheduled-catalog-card,.scheduled-manual-library-row { border:1px solid var(--v4-line); border-radius:4px; background:#fff; box-shadow:none; }
.scheduled-plan-card:hover,.scheduled-catalog-card:hover,.scheduled-manual-library-row:hover { border-color:#78afc2; background:var(--v4-hover); }
.scheduled-plan-list-heading,.scheduled-plan-files-heading { min-height:44px; border-bottom:1px solid var(--v4-line); color:var(--v4-ink); background:var(--v4-panel-head); }
.scheduled-plan-list-heading h3,.scheduled-plan-files-heading h3 { color:var(--v4-ink); font-size:14px; }

.email-notifications-panel { background:transparent; box-shadow:none; }
.email-notifications-grid { gap:var(--v4-gap); }
.email-notifications-card {
  overflow:hidden;
  border:1px solid var(--v4-line);
  border-radius:var(--v4-radius);
  background:#fff;
  box-shadow:var(--v4-shadow);
}
.email-card-heading { min-height:44px; border-bottom:1px solid var(--v4-line); color:var(--v4-ink); background:var(--v4-panel-head); }
.email-card-heading h3 { color:var(--v4-ink); }
.email-recipient-list,.mailing-recovery-list { background:#fff; }
.email-recipient-list > button { border-color:var(--v4-line); color:var(--v4-ink); background:#fff; }
.email-recipient-list > button:hover { background:var(--v4-hover); }
.email-recipient-list > button.is-selected { background:var(--v4-selected); box-shadow:inset 3px 0 var(--v4-primary); }
.mailing-form { gap:var(--v4-space-3); }
.mailing-form .form-actions { border-top:1px solid var(--v4-line); }

.backup-panels { gap:var(--v4-gap); }
.backup-panel-shell,.backup-panel { border-color:var(--v4-line); border-radius:var(--v4-radius); background:#fff; box-shadow:var(--v4-shadow); }
.backup-panel-header { border-bottom:1px solid var(--v4-line); background:var(--v4-panel-head); }
.backup-status-copy strong { color:var(--v4-ink); }
.backup-status-copy :is(small,span) { color:var(--v4-muted); }
.backup-state-pill { border-radius:3px; font-weight:750; }
.backup-panel-tools { border-bottom:1px solid var(--v4-line); background:#f8fafb; }
.backup-row { border-bottom:1px solid #dbe5e9; background:#fff; }
.backup-row:hover { background:var(--v4-hover); }

.material-filters { grid-template-columns:repeat(2,minmax(180px,1fr)) auto auto; margin-top:var(--v4-gap); }
.material-panel,.material-card { border:1px solid var(--v4-line); border-radius:var(--v4-radius); background:#fff; box-shadow:var(--v4-shadow); }
.material-tabs { display:flex; min-height:40px; padding:3px; gap:3px; overflow-x:auto; border:1px solid var(--v4-line); border-radius:var(--v4-radius); background:var(--v4-panel-head); }
.material-tabs .settings-tab { min-height:32px; padding:5px 12px; flex:0 0 auto; font-size:10px; }
.material-section-panel { min-height:0; }
.material-section-panel[hidden] { display:none; }
#material-management-view.is-active { display:flex; flex-direction:column; height:calc(100dvh - 16px); min-height:0; overflow:hidden; }
.material-tabs { flex-shrink:0; margin-bottom:var(--v4-gap); }
.equipment-panel { display:grid; flex:1; min-height:0; grid-template-columns:minmax(270px,28%) minmax(0,1fr); gap:var(--v4-gap); }
.equipment-panel.is-read-only { grid-template-columns:minmax(0,1fr); }
.equipment-form,.equipment-saved-panel { display:flex; flex-direction:column; min-width:0; min-height:0; margin:0; padding:0; overflow:hidden; border:1px solid var(--v4-line); border-radius:var(--v4-radius); background:#fff; box-shadow:var(--v4-shadow); }
.equipment-form[hidden] { display:none; }
.equipment-panel-heading { flex-shrink:0; margin:0; padding:10px 12px; min-height:40px; border-bottom:1px solid var(--v4-line); background:var(--v4-panel-head); color:var(--v4-ink); font-size:var(--v4-font-md); font-weight:750; }
.equipment-form-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:4px 12px; }
.equipment-form-heading h2 { margin:0; font:inherit; color:inherit; }
#equipment-add { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:30px; height:30px; padding:4px 10px; }
#equipment-add svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.equipment-saved-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:4px 12px; }
.equipment-saved-heading h2 { margin:0; font:inherit; color:inherit; }
#equipment-print { display:inline-flex; align-items:center; justify-content:center; gap:6px; flex-shrink:0; min-height:30px; height:30px; padding:4px 12px; }
#equipment-print svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.equipment-form-fields { display:flex; flex-direction:column; gap:10px; flex:1; min-height:0; overflow:auto; padding:12px; }
.equipment-form-fields > label:not(.equipment-requirement-toggle) { display:grid; gap:4px; min-width:0; color:var(--v4-secondary); font-size:var(--v4-font-sm); }
.equipment-form :is(input:not([type="file"]):not([type="checkbox"]),select) { width:100%; height:var(--v4-control-height); min-height:var(--v4-control-height); margin:0; }
.equipment-form .equipment-requirement-toggle { display:flex; justify-content:space-between; align-items:center; align-self:stretch; flex-shrink:0; min-height:30px; margin-top:2px; padding:8px 0 0; border-top:1px solid var(--v4-line); border-radius:0; font-size:var(--v4-font-sm); }
.equipment-requirement-toggle input:indeterminate + .access-toggle-track::after { transform:translateX(9px); }
.equipment-requirement-toggle input[type="checkbox"] { width:1px; height:1px; min-height:0; padding:0; }
.equipment-form-feedback { margin:0; color:var(--v4-muted); font-size:var(--v4-font-sm); }
.equipment-certificate-control { display:grid; min-width:0; gap:3px; }
.equipment-certificate-control .button { white-space:nowrap; }
#equipment-certificate-status { max-width:100%; overflow-wrap:anywhere; color:var(--v4-muted); font-size:var(--v4-font-sm); }
.equipment-form-actions { display:flex; flex-shrink:0; justify-content:flex-end; align-items:center; gap:8px; padding:10px 12px; border-top:1px solid var(--v4-line); background:var(--v4-panel-head); }
.equipment-form-actions .button { min-width:86px; height:var(--v4-control-height); }
.equipment-table-wrap { flex:1; min-height:0; overflow:auto; background:#fff; }
.equipment-table { width:100%; border-collapse:separate; border-spacing:0; }
.equipment-table thead { position:sticky; z-index:2; top:0; }
.equipment-table th { padding:9px 10px; border-bottom:1px solid var(--v4-line-strong); color:var(--v4-secondary); background:#eaf1f3; font-size:var(--v4-font-sm); font-weight:800; text-align:left; }
.equipment-table td { padding:8px 10px; border-bottom:1px solid #dbe5e9; color:var(--v4-ink); font-size:11px; }
.equipment-table tbody tr:hover { background:var(--v4-hover); }
.equipment-table tbody tr[data-equipment-select] { cursor:pointer; }
.equipment-table tbody tr.is-calibration-due td { background:#fff9e9; }
.equipment-table tbody tr.is-calibration-due td:first-child { box-shadow:inset 3px 0 #d88a00; }
.equipment-table tbody tr.is-calibration-overdue td { background:#fff1ef; }
.equipment-table tbody tr.is-calibration-overdue td:first-child { box-shadow:inset 3px 0 var(--v4-danger); }
.equipment-table tbody tr[data-equipment-select]:hover td { background:var(--v4-hover); }
.equipment-table tbody tr.is-selected td { background:var(--v4-selected); }
.equipment-table tbody tr.is-selected td:first-child { box-shadow:inset 3px 0 var(--v4-primary); }
.equipment-table tbody tr[data-equipment-select]:focus-visible { outline:2px solid var(--v4-primary); outline-offset:-2px; }
.equipment-table tbody tr:last-child td { border-bottom:0; }
.equipment-serial { font-variant-numeric:tabular-nums; font-weight:700; }
.equipment-certificate-link { border:0; padding:0; color:var(--v4-primary); background:transparent; font-size:10px; font-weight:700; text-decoration:underline; }
.equipment-table { min-width:740px; }
.equipment-table td { padding:5px 8px; }
.equipment-certificate-link { display:inline-block; max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:middle; }
.equipment-expiry-indicator { display:inline-flex; align-items:center; gap:5px; color:#9a6100; white-space:nowrap; }
.equipment-expiry-indicator svg { width:14px; height:14px; flex:0 0 14px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.equipment-expiry-indicator strong { font-weight:750; }
.equipment-expiry-indicator em { padding:2px 6px; border:1px solid #dda448; border-radius:999px; color:#9a6100; background:#fff4d8; font-size:9px; font-style:normal; font-weight:800; }
.equipment-expiry-indicator.is-overdue { color:#a13225; }
.equipment-expiry-indicator.is-overdue em { border-color:#e2a095; color:#a13225; background:#ffe5e0; }
.equipment-status-badge { display:inline-flex; align-items:center; min-height:20px; padding:2px 7px; border:1px solid #a9d6bd; border-radius:999px; color:#17643b; background:#e8f6ee; font-size:10px; font-weight:800; white-space:nowrap; }
.equipment-status-badge.is-out-of-service { border-color:#f0b1a6; color:#a13225; background:#fff0ec; }
.equipment-actions { width:48px; white-space:nowrap; text-align:center; }
.equipment-actions .icon-button { width:30px; height:30px; min-width:30px; min-height:30px; margin:0 2px; padding:0; }
.equipment-actions .icon-button svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.material-empty { padding:20px !important; color:var(--v4-muted) !important; text-align:center; }

@container workspace (max-width:760px) {
  #material-management-view.is-active { height:auto; overflow:visible; }
  .equipment-panel { grid-template-columns:minmax(0,1fr); }
  .equipment-form-fields { overflow:visible; }
  .equipment-saved-panel { min-height:280px; max-height:450px; }
  .equipment-form-actions .button { flex:1; }
}

/* Existing semantic states retain their meaning with one visual vocabulary. */
:is(.is-in-service,.is-completed,.is-complete,.status-ok,.is-synced) { --state-color:var(--v4-success); }
:is(.is-warning,.is-due,.is-expiring,.status-warning) { --state-color:var(--v4-warning); }
:is(.is-critical,.is-overdue,.is-out,.is-out-of-service,.status-critical,.is-error) { --state-color:var(--v4-danger); }
:is(.is-in-progress,.is-planned,.status-info) { --state-color:var(--v4-info); }
.scheduled-state-tag,.dashboard-notice-status,.status-badge,.state-badge,.maintenance-status {
  border:1px solid color-mix(in srgb,var(--state-color,var(--v4-info)) 35%,white);
  border-radius:3px;
  color:color-mix(in srgb,var(--state-color,var(--v4-info)) 85%,black);
  background:color-mix(in srgb,var(--state-color,var(--v4-info)) 11%,white);
  font-weight:750;
}

main,.view,.view > *,form,fieldset,table { min-width:0; }
img,svg { max-width:100%; }

/* Shared density follows the effective workspace width. */
@container workspace (max-width:1799px) {
  .view {
    --v4-gap:12px;
    --v4-pad:12px;
    --v4-control-height:32px;
  }
  .page-heading,.work-heading,.scheduled-heading,.fleet-heading,.material-heading,.alerts-heading,.archive-heading,
  #fleet-availability-view .fleet-availability-heading { min-height:60px; padding:7px 13px; }
  .view,#maintenance-navigation { --v4-page-title-size:20px; }
  .maintenance-classification-card { min-height:70px; padding:11px 13px; }
  .maintenance-classification-card strong { font-size:22px; }
  .maintenance-table :is(th,td),.scheduled-table :is(th,td),.archive-table :is(th,td),.scheduled-checklist-table :is(th,td),.personnel-table :is(th,td) { padding:7px 8px; }
  #archive-view .filters { grid-template-columns:minmax(170px,1.5fr) repeat(6,minmax(100px,1fr)) auto auto; }
  .scheduled-plan-grid,.fleet-registry-grid { gap:10px; }
  .scheduled-inline-actions { padding:10px; }
}

@container workspace (max-width:1199px) {
  .view {
    --v4-gap:10px;
    --v4-pad:10px;
    --v4-control-height:31px;
  }
  .maintenance-classifications { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .maintenance-classification-card:nth-child(n+4) { min-height:62px; }
  #archive-view .filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #archive-view .filters .search-field { grid-column:span 2; }
  .material-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .material-filters .button { width:100%; }
  .scheduled-plans-layout { grid-template-columns:minmax(0,1fr); }
  .scheduled-plan-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .scheduled-plan-file { min-height:74px; }
  .email-notifications-grid,.backup-panels { grid-template-columns:minmax(0,1fr); }
  .maintainer-workspace,.fleet-management-panel { grid-template-columns:minmax(220px,30%) minmax(0,1fr); }
  .access-user-card { grid-template-columns:52px repeat(2,minmax(0,1fr)); }
  .access-permissions-card { grid-template-columns:minmax(0,1fr); }
  .access-permission-column { border-right:0; border-bottom:1px solid var(--v4-line); }
  .access-permission-column:last-of-type { border-bottom:0; }
  .scheduled-operator-workspace { grid-template-columns:minmax(220px,28%) minmax(0,1fr); }
  .scheduled-operator-side { grid-column:1 / -1; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .record-card,.work-open-card { gap:8px; }
}

@container workspace (max-width:760px) {
  .maintenance-classifications { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #archive-view .filters,.material-filters { grid-template-columns:minmax(0,1fr); }
  #archive-view .filters .search-field { grid-column:auto; }
  .scheduled-plan-grid { grid-template-columns:minmax(0,1fr); }
  .maintainer-workspace,.fleet-management-panel,.scheduled-operator-workspace { grid-template-columns:minmax(0,1fr); }
  .maintainer-sidebar,.fleet-registry-sidebar { border-right:0; border-bottom:1px solid var(--v4-line); }
  .scheduled-operator-side { grid-template-columns:minmax(0,1fr); }
}

@media (max-height:800px) {
  dialog:not(.login-dialog) { max-height:calc(100dvh - 16px); }
  .dialog-header,.fleet-statistics-dialog-header,.fleet-out-of-service-heading,.fleet-corrective-confirm-heading { min-height:44px; }
}

/* Wide */
@container workspace (min-width:1800px) {
  #alerts-view .alerts-dashboard { --v4-gap:16px; grid-template-rows:auto minmax(500px,1.35fr) minmax(330px,1fr); }
  #alerts-view .alerts-operational-summary article { min-height:92px; }
  #alerts-view .fleet-alert-table { font-size:10.5px; }
  #alerts-view .fleet-alert-table th { height:40px; font-size:8.5px; }
  #alerts-view .fleet-alert-table td { height:30px; padding:3px 4px; }
  #alerts-view .alerts-forecast-panel .fleet-alert-table th { height:35px; padding:4px; }
  #alerts-view .alerts-forecast-panel .fleet-alert-table td { height:30px; padding:3px 4px; }
}

/* Ultrawide con altezza limitata: conserva le colonne senza forzare il profilo verticale 2K. */
@media (min-width:1800px) and (max-height:1100px) {
  #alerts-view .alerts-dashboard { --v4-gap:12px; grid-template-rows:auto minmax(310px,1.35fr) minmax(200px,1fr); }
  #alerts-view .alerts-operational-summary article { min-height:76px; }
}

/* Gestione Servizi: ogni viewport desktop recupera gli stessi 30px nella riga Flotta. */
@media (min-width:901px) {
  body[data-active-view="fleet-availability-view"] main { height:100vh; height:100dvh; }
  #fleet-availability-view.is-active #fleet-availability-content {
    grid-template-rows:358px minmax(0,1fr);
  }
  body[data-active-view="maintenance-agenda-view"] main { height:100vh; height:100dvh; }
  #maintenance-agenda-view.is-active { padding-bottom:0; }
}

/* Lavorazioni: usa tutta l'altezza desktop e lascia lo scorrimento ai pannelli interni. */
@media (min-width:1101px) {
  body[data-active-view="work-center-view"] main,
  body[data-active-view="scheduled-maintenance-view"] main { height:100vh; height:100dvh; }
}

/* Compact */
@container workspace (min-width:1200px) and (max-width:1799px) {
  #alerts-view .alerts-dashboard { --v4-gap:12px; grid-template-rows:auto minmax(310px,1.35fr) minmax(200px,1fr); }
  #alerts-view .alerts-operational-summary { gap:12px; }
  #alerts-view .alerts-operational-summary article { min-height:76px; padding-right:47px; padding-left:11px; }
  #alerts-view .alerts-operational-summary article::after { right:10px; width:30px; height:30px; }
  #alerts-view .alerts-operational-summary small { font-size:9px; }
  #alerts-view .alerts-operational-summary strong { font-size:24px; }
  #alerts-view .fleet-alert-table { font-size:9px; }
  #alerts-view .fleet-alert-table th { height:37px; padding:4px 2px; font-size:7px; }
  #alerts-view .fleet-alert-table td { height:30px; padding:3px 2px; }
  #alerts-view .alerts-forecast-panel .fleet-alert-table th { height:33px; padding:3px 2px; }
  #alerts-view .alerts-forecast-panel .fleet-alert-table td { height:29px; padding:3px 2px; }
}

@container workspace (min-width:1200px) and (max-width:1399px) {
  #alerts-view .alerts-calendar-panel > .alerts-dashboard-heading { grid-template-columns:minmax(105px,1fr) minmax(142px,auto) minmax(86px,1fr); }
  #alerts-view .alerts-calendar-panel > .alerts-dashboard-heading > p { font-size:11px; line-height:1.05; white-space:normal; }
  #alerts-view .alerts-calendar-panel .calendar-header-navigation { grid-template-columns:22px minmax(78px,92px) 22px; gap:3px; }
  #alerts-view .alerts-calendar-panel #open-forecast-calendar-dialog { padding-right:6px; padding-left:6px; }
  #alerts-view .alerts-calendar-panel #open-forecast-calendar-dialog span { font-size:8px; }
}

/* Narrow desktop: document scroll is intentional; horizontal scroll is not. */
@container workspace (max-width:1199px) {
  #alerts-view.is-active { height:auto; overflow:visible; }
  #alerts-view .alerts-dashboard {
    --v4-gap:10px;
    overflow:visible;
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:auto minmax(300px,auto) minmax(210px,auto) minmax(300px,auto);
    flex:0 0 auto;
  }
  #alerts-view .alerts-operational-summary { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  #alerts-view .alerts-operational-summary article { min-height:62px; padding:7px 42px 7px 9px; }
  #alerts-view .alerts-operational-summary article::after { right:8px; width:26px; height:26px; font-size:14px; }
  #alerts-view .alerts-operational-summary strong { font-size:21px; }
  #alerts-view .alerts-operational-summary span { font-size:7px; }
  #alerts-view .alerts-forecast-panel { grid-column:1 / -1; grid-row:2; }
  #alerts-view .alerts-circulation-panel { grid-column:1; grid-row:3; }
  #alerts-view .alerts-depot-panel { grid-column:2; grid-row:3; }
  #alerts-view .alerts-calendar-panel { grid-column:1 / -1; grid-row:4; }
  #alerts-view .fleet-alert-table { font-size:8px; }
  #alerts-view .fleet-alert-table th { height:36px; padding:3px 2px; font-size:6.7px; }
  #alerts-view .fleet-alert-table td { height:33px; padding:3px 2px; }
}

@media (min-width:2200px) { :root { --v4-sidebar:300px; } .app-header { padding:22px 17px 15px; } main { margin-right:20px !important; margin-left:calc(var(--v4-sidebar) + 20px) !important; } }
@media (min-width:901px) and (max-width:1600px) { :root { --v4-sidebar:224px; } .app-header { padding:14px 10px 10px; } .brand { min-height:55px; padding-bottom:12px; } .app-header .brand-mark { flex-basis:40px; width:40px; height:40px; } .tabs { margin-top:9px; } .tab { height:37px; min-height:37px; padding-left:8px; font-size:9.5px; } main { margin-right:10px !important; margin-left:calc(var(--v4-sidebar) + 10px) !important; } }
@media (min-width:901px) and (max-width:1450px) { :root { --v4-sidebar:210px; } .nav-section-label { margin-top:6px; } .nav-system-label { margin-top:12px; padding-top:11px; } }
@media (max-height:820px) and (min-width:901px) { .app-header { padding-top:10px; } .brand { min-height:49px; padding-bottom:9px; } .app-header .brand-mark { flex-basis:36px; width:36px; height:36px; } .tabs { margin-top:7px; } .tab { height:34px; min-height:34px; } #alerts-view .alerts-dashboard { padding-top:6px; padding-bottom:8px; } }

/* Il Cruscotto non deve mai perdere il fondo quando zoom o scaling riducono il viewport. */
@media (min-width:901px) {
  html:has(body[data-active-view="alerts-view"]),
  body[data-active-view="alerts-view"] { overflow-x:hidden; overflow-y:auto; }
}

@media (max-width:900px) {
  :root { --v4-sidebar:260px; }
  body { padding-bottom:0; }
  .app-header { inset:0 auto 0 0; width:var(--v4-sidebar); }
  main { margin:0 8px !important; }
}
@media (max-width:620px) {
  #alerts-view .alerts-operational-summary { grid-template-columns:1fr; }
  #alerts-view .alerts-dashboard { grid-template-columns:1fr; grid-template-rows:auto minmax(320px,auto) repeat(3,minmax(220px,auto)); }
  #alerts-view .alerts-circulation-panel,#alerts-view .alerts-depot-panel,#alerts-view .alerts-calendar-panel { grid-column:1; }
  #alerts-view .alerts-circulation-panel { grid-row:3; }
  #alerts-view .alerts-depot-panel { grid-row:4; }
  #alerts-view .alerts-calendar-panel { grid-row:5; }
  #alerts-view .alerts-calendar-panel > .alerts-dashboard-heading { height:auto; min-height:72px; grid-template-columns:1fr auto; grid-template-rows:auto auto; }
  #alerts-view .alerts-calendar-panel > .alerts-dashboard-heading > p { grid-column:1; grid-row:1; }
  #alerts-view .alerts-calendar-panel .calendar-header-navigation { grid-column:1 / -1; grid-row:2; }
  #alerts-view .alerts-calendar-panel #open-forecast-calendar-dialog { grid-column:2; grid-row:1; }
  .title-company-logo { width:145px; }
}

/* V4 metric coherence: Dashboard is the reference for page and panel rhythm. */
.page-heading,.work-heading,.scheduled-heading,.fleet-heading,.material-heading,.alerts-heading,.archive-heading,
#fleet-availability-view .fleet-availability-heading,
#personnel-management-view > .personnel-heading {
  min-height:64px;
  padding:8px 16px;
}

/* System administration: structural V4 alignment, without changing functional markup. */
#personnel-management-view.is-active {
  display:grid;
  min-height:calc(100dvh - var(--v4-footer));
  height:calc(100dvh - var(--v4-footer));
  grid-template-rows:64px auto minmax(0,1fr);
  align-content:start;
  gap:var(--v4-page-gap);
}
#personnel-management-view > .personnel-heading {
  height:64px;
  margin:0;
  border:1px solid #005a78;
  border-top:0;
  border-radius:0 0 var(--v4-radius) var(--v4-radius);
  box-shadow:var(--v4-shadow);
}
#personnel-management-view > .personnel-heading h1 {
  margin:0;
  font-size:var(--v4-page-title-size);
  font-weight:750;
  line-height:1.1;
  letter-spacing:-.015em;
}
#personnel-management-view > .settings-tabs {
  position:relative;
  z-index:8;
  top:auto;
  min-height:40px;
  margin:0;
  padding:3px;
  flex-wrap:nowrap;
  gap:3px;
  overflow-x:auto;
  overflow-y:hidden;
  border:1px solid var(--v4-line);
  border-radius:var(--v4-radius);
  background:var(--v4-panel-head);
}
#personnel-management-view > .settings-tabs .settings-tab {
  min-height:32px;
  padding:5px 10px;
  flex:0 0 auto;
  white-space:nowrap;
  font-size:10px;
}
#personnel-management-view > .settings-panel:not([hidden]) {
  min-height:0;
  height:100%;
  margin:0;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
#personnel-management-view :is(#personnel-admin-panel,.maintainer-workspace,.fleet-management-panel,.scheduled-plans-layout,.email-notifications-grid,.backup-panels) {
  gap:var(--v4-gap);
}
#personnel-management-view :is(#personnel-admin-panel,.maintainer-workspace,.fleet-management-panel,.email-notifications-grid) {
  grid-template-columns:var(--v4-admin-sidebar) minmax(0,1fr);
}
#personnel-management-view :is(.access-users-sidebar,.maintainer-sidebar,.fleet-registry-sidebar,.email-recipients-card,.access-hero,.access-editor-empty,.access-user-card,.access-permissions-card,.maintainer-detail-summary,.maintainer-competency-card,.maintainer-matrix,.fleet-registry-summary,.fleet-registry-empty,#fleet-registry-form,.scheduled-plan-form,.scheduled-plans-results,.scheduled-catalog-list,.email-notifications-card,.backup-panel-shell,.backup-panel) {
  border-color:var(--v4-line);
  border-radius:var(--v4-radius);
  background:#fff;
  box-shadow:var(--v4-shadow);
}
#personnel-management-view :is(.access-hero,.maintainer-detail-summary,.fleet-registry-summary,.fleet-registry-detail-heading,.email-notifications-heading,.email-card-heading,.scheduled-plan-form-heading,.scheduled-catalog-heading,.scheduled-plan-list-heading,.scheduled-plan-files-heading,.access-users-sidebar > header,.maintainer-sidebar-heading,.fleet-registry-sidebar > header,.backup-panel-header) {
  box-sizing:border-box;
  min-height:var(--v4-panel-header-height);
  height:auto;
  padding:var(--v4-panel-header-pad);
  border-bottom:1px solid var(--v4-line);
  border-radius:0;
  background:var(--v4-panel-head);
  box-shadow:none;
}
#personnel-management-view :is(.access-hero,.maintainer-detail-summary,.fleet-registry-summary,.fleet-registry-detail-heading) { gap:9px; }
#personnel-management-view :is(.access-hero-icon,.maintainer-detail-summary > span,.fleet-registry-summary-icon,.access-users-sidebar-icon,.workspace-new-maintainer-icon,.fleet-registry-new-icon,.email-card-heading-icon) {
  width:26px;
  height:26px;
  flex-basis:26px;
  border-radius:4px;
}
#personnel-management-view :is(.access-hero-icon,.maintainer-detail-summary > span,.fleet-registry-summary-icon,.access-users-sidebar-icon,.workspace-new-maintainer-icon,.fleet-registry-new-icon,.email-card-heading-icon) :is(svg,img) {
  width:15px;
  height:15px;
}
#personnel-management-view :is(.access-hero,.maintainer-detail-summary,.fleet-registry-summary) h2 {
  font-size:13px;
  font-weight:800;
  line-height:1.1;
}
#personnel-management-view :is(.access-hero,.maintainer-detail-summary,.fleet-registry-summary) p {
  margin-top:1px;
  font-size:9px;
  line-height:1.2;
}
#personnel-management-view :is(.access-new-user-sidebar,.workspace-new-maintainer,.fleet-registry-new,.email-recipient-add) {
  min-height:28px;
  gap:8px;
  font-size:12px;
}
#personnel-management-view :is(.access-new-user-sidebar,.workspace-new-maintainer,.fleet-registry-new,.email-recipient-add) > span:last-child { font-size:12px; }
#personnel-management-view :is(.access-users-side-list,.maintainer-workspace-list,.fleet-registry-list) { gap:5px; padding:8px; }
#personnel-management-view :is(.access-user-list-item,.maintainer-list-item,.fleet-registry-list-item) {
  min-height:58px;
  padding:8px;
  border-radius:4px;
}
#personnel-management-view :is(.access-users-sidebar-footer,.maintainer-sidebar-footer,.fleet-registry-sidebar-footer,.email-recipients-footer) { padding:10px; }
#personnel-management-view :is(.access-editor-empty,.maintainer-workspace-empty,.fleet-registry-empty) { min-height:190px; padding:24px; }
#personnel-management-view .maintainer-detail,
#personnel-management-view .fleet-registry-detail,
#personnel-management-view .mailing-contact-column { gap:var(--v4-gap); }
#personnel-management-view .email-notifications-panel { gap:var(--v4-page-gap); background:transparent; }
#personnel-management-view .email-notifications-heading {
  flex:0 0 var(--v4-panel-header-height);
  border:1px solid var(--v4-line);
  border-radius:var(--v4-radius);
  box-shadow:var(--v4-shadow);
}
#personnel-management-view .email-notifications-heading h2,
#personnel-management-view :is(.email-card-heading,.scheduled-plan-form-heading,.scheduled-catalog-heading) h2,
#personnel-management-view :is(.scheduled-plan-list-heading,.scheduled-plan-files-heading) h2,
#personnel-management-view .email-card-heading h3 { font-size:12px; font-weight:800; }
#personnel-management-view :is(.scheduled-plan-list-heading,.scheduled-plan-files-heading) h2 { margin:0; color:var(--v4-ink); }
#personnel-management-view .scheduled-plans-results { overflow:visible; border:0; border-radius:0; background:transparent; box-shadow:none; }
#personnel-management-view :is(.scheduled-plan-list,.scheduled-plan-files) { border-color:var(--v4-line); border-radius:var(--v4-radius); box-shadow:var(--v4-shadow); }
#personnel-management-view .scheduled-plan-file { min-height:0; }
/* Piani manutentivi: stessa gerarchia e densità dei dati del cruscotto. */
#personnel-management-view [data-settings-panel="scheduled-catalog"] {
  --plan-data-font:13px;
  --plan-detail-font:11px;
  --plan-row-height:30px;
  --plan-action-size:26px;
  font-family:inherit;
  font-size:var(--plan-data-font);
  line-height:1.1;
}
#personnel-management-view [data-settings-panel="scheduled-catalog"] :is(.scheduled-plan-form-heading,.scheduled-plan-list-heading,.scheduled-plan-files-heading) {
  height:var(--v4-panel-header-height);
  min-height:var(--v4-panel-header-height);
  flex:0 0 var(--v4-panel-header-height);
}
#personnel-management-view [data-settings-panel="scheduled-catalog"] h2 { line-height:normal; letter-spacing:.015em; }
#personnel-management-view .scheduled-plans-results { grid-template-columns:minmax(0,1fr) minmax(0,1.08fr) minmax(0,.9fr); grid-template-rows:minmax(0,1fr); align-content:stretch; gap:var(--v4-gap); }
.scheduled-plan-list { grid-column:1; grid-row:1; max-height:none; overflow-y:auto !important; }
.scheduled-plan-files { grid-column:3; grid-row:1; }
#scheduled-task-requirements { grid-column:2; grid-row:1; min-width:0; min-height:0; }
.scheduled-task-requirements { display:flex; flex-direction:column; height:100%; min-height:0; box-sizing:border-box; overflow:auto; border:1px solid var(--v4-line); border-radius:var(--v4-radius); background:#fff; box-shadow:var(--v4-shadow); }
.scheduled-task-requirement-form { display:grid; flex-shrink:0; grid-template-columns:minmax(0,1fr) 76px; align-items:end; gap:12px 8px; padding:10px; }
.scheduled-task-requirement-form > label:not(.scheduled-task-report-flag) { grid-column:1 / -1; }
.scheduled-task-requirement-form label { display:grid; gap:4px; min-width:0; color:var(--v4-secondary); font-size:var(--v4-font-sm); font-weight:700; }
.scheduled-task-requirement-form select { min-width:0; }
.scheduled-task-requirement-form select[name="operationKey"] { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.scheduled-task-report-flag { min-height:var(--v4-control-height) !important; padding:0 !important; align-self:end; }
.scheduled-task-report-flag b { font-size:var(--v4-font-sm); }
.scheduled-task-requirement-form .button { width:100%; min-height:var(--v4-control-height); height:var(--v4-control-height); padding:0 10px; border-radius:4px; box-shadow:none; font-size:var(--v4-font-sm); font-weight:750; }
.scheduled-task-requirement-form .button:not(:disabled) { border-color:var(--v4-primary); color:#fff; background:var(--v4-primary); }
.scheduled-task-requirement-form .button:not(:disabled):hover { border-color:#005875; background:#005875; }
.scheduled-task-requirement-help { flex-shrink:0; margin:0 10px 8px; color:var(--v4-muted); font-size:var(--v4-font-sm); line-height:1.35; }
.scheduled-task-requirement-list { min-height:64px; margin:0 10px 10px; overflow-y:auto; border:1px solid var(--v4-line); border-radius:4px; }
.scheduled-task-requirement-list thead { position:sticky; top:0; background:#fff; z-index:1; }
.scheduled-task-requirement-list table { width:100%; table-layout:fixed; border-collapse:collapse; }
.scheduled-task-requirement-list th,.scheduled-task-requirement-list td { height:30px; padding:4px 8px; border-bottom:1px solid var(--v4-line); text-align:left; font-size:var(--v4-font-sm); line-height:1.15; }
.scheduled-task-requirement-list :is(th,td):nth-child(1) { width:44px; }
.scheduled-task-requirement-list :is(th,td):nth-child(3) { width:82px; white-space:nowrap; }
.scheduled-task-requirement-list :is(th,td):nth-child(4) { width:64px; padding-right:4px; padding-left:4px; text-align:center; }
.scheduled-task-rule-copy { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.scheduled-task-report { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:8px; min-width:0; }
.scheduled-task-report > small { flex:1 1 100%; min-width:0; overflow-wrap:anywhere; color:var(--v4-muted); font-size:var(--v4-font-sm); }
.scheduled-task-report .button,.scheduled-task-report-download { min-height:28px; padding:4px 8px; font-size:var(--v4-font-sm); }
#scheduled-maintenance-view :is(.scheduled-execution-controls,.scheduled-task-tool-row) { display:grid; grid-template-columns:minmax(138px,1fr) 72px; align-items:center; gap:8px; min-width:0; }
#scheduled-maintenance-view .scheduled-task-tool-row { margin-top:8px; }
#scheduled-maintenance-view .scheduled-task-tool-row > [data-task-equipment-menu] { grid-column:1; width:100%; }
#scheduled-maintenance-view .scheduled-task-tool-row > [data-task-report-menu] { grid-column:2; width:72px; }
#scheduled-maintenance-view .scheduled-execution-manual-entry { margin-bottom:8px; }
#scheduled-maintenance-view :is(.scheduled-execution-controls,.scheduled-task-tool-row) :is(input[type="date"],select,.button),
#scheduled-maintenance-view :is(.scheduled-execution-manual-button,.scheduled-execution-manual-unavailable) { height:var(--v4-control-height); min-height:var(--v4-control-height); box-sizing:border-box; border-radius:5px; }
#scheduled-maintenance-view :is(.scheduled-execution-controls,.scheduled-task-tool-row) .button { width:72px; min-width:0; padding:0 2px; font-size:var(--v4-font-sm); display:flex; align-items:center; justify-content:center; white-space:nowrap; }
#scheduled-maintenance-view .scheduled-task-tool-row > .button[data-task-equipment-menu] { width:100%; }
#scheduled-maintenance-view .scheduled-task-tool-row .scheduled-execution-wrench { display:contents; }
#scheduled-maintenance-view .scheduled-task-tool-row select { grid-column:1; grid-row:1; width:100%; min-width:0; margin:0; text-overflow:ellipsis; }
#scheduled-maintenance-view .scheduled-task-tool-row .scheduled-task-report { display:contents; }
#scheduled-maintenance-view .scheduled-task-tool-row .scheduled-task-report > [data-task-report-menu] { grid-column:2; grid-row:1; margin:0; }
#scheduled-maintenance-view .scheduled-task-tool-row .scheduled-task-report > button { grid-column:2; grid-row:2; }
#scheduled-maintenance-view .scheduled-task-tool-row .button[hidden] { display:none; }
#scheduled-maintenance-view .scheduled-task-tool-row [data-task-report-name] { grid-column:1; grid-row:2; overflow-wrap:anywhere; }
#scheduled-maintenance-view .scheduled-task-tool-row [data-task-report-name]:empty { display:none; }
#scheduled-maintenance-view .scheduled-task-tool-row.has-report [data-task-report-menu],
#scheduled-maintenance-view .scheduled-task-tool-row.has-report:not(.is-report-summary) [data-task-report-name],
#scheduled-maintenance-view .scheduled-task-tool-row.is-report-summary select { display:none; }
#scheduled-maintenance-view .scheduled-task-tool-row.has-report .scheduled-task-report > button { grid-row:1; }
#scheduled-maintenance-view .scheduled-task-tool-row.is-report-summary [data-task-report-name] { grid-row:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#scheduled-maintenance-view select.is-equipment-required { background:var(--v4-primary); color:#fff; border-color:var(--v4-primary); }
#scheduled-maintenance-view select.is-equipment-required option { background:#fff; color:var(--v4-ink); }
#scheduled-maintenance-view .scheduled-execution-complete.is-requirement-blocked { background:#fff !important; color:var(--v4-muted); border:1px solid var(--v4-line-strong); box-shadow:none; opacity:1; cursor:not-allowed; }
#task-report-choice-dialog { width:min(560px,calc(100vw - 32px)); padding:0; overflow:hidden; border:0; border-radius:12px; box-shadow:0 20px 56px rgba(16,41,80,.28); }
#task-report-choice-dialog::backdrop { background:rgba(13,31,50,.34); }
.task-report-choice-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:16px; }
.task-report-choice-options > button { display:grid; min-height:150px; place-content:center; justify-items:center; gap:12px; padding:18px; border:1px solid var(--v4-line-strong); border-radius:8px; color:var(--v4-primary); background:#fff; font:inherit; cursor:pointer; }
.task-report-choice-options > button:hover,.task-report-choice-options > button:focus-visible { border-color:var(--v4-primary); background:var(--v4-hover); outline:none; }
.task-report-choice-options > button > span { display:grid; width:54px; height:54px; place-items:center; border-radius:50%; background:#e8f5f8; }
.task-report-choice-options svg { width:28px; height:28px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.task-report-choice-options strong { font-size:15px; }
#task-report-choice-dialog .dialog-actions { justify-content:flex-end; }
@media (max-width:520px) { .task-report-choice-options { grid-template-columns:1fr; } .task-report-choice-options > button { min-height:108px; } }
#task-equipment-dialog,#task-reports-dialog { width:min(760px,calc(100vw - 32px)); padding:0; overflow:hidden; border:1px solid var(--v4-line-strong); border-radius:5px; box-shadow:0 10px 28px rgba(16,41,80,.18); }
#task-equipment-dialog::backdrop,#task-reports-dialog::backdrop { background:rgba(13,31,50,.24); }
.task-equipment-dialog-body { padding:12px 16px 0; }
.task-equipment-dialog-body > input { width:100%; height:var(--v4-control-height); margin:0 0 10px; box-sizing:border-box; }
.task-equipment-choice-list { max-height:310px; overflow-y:auto; border-top:1px solid var(--v4-line); border-bottom:1px solid var(--v4-line); }
.task-equipment-choice-list label { display:grid; grid-template-columns:24px minmax(0,1fr) auto; align-items:center; gap:8px; min-height:44px; padding:5px 8px; border-bottom:1px solid var(--v4-line); font-size:var(--v4-font-sm); }
.task-equipment-choice-list label:last-child { border-bottom:0; }
.task-equipment-choice-list input { margin:0; }
.task-equipment-choice-list small { color:var(--v4-muted); white-space:nowrap; }
#task-equipment-dialog .dialog-actions,#task-reports-dialog .dialog-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; padding:12px 16px; }
#task-equipment-dialog .dialog-actions small,#task-reports-dialog .dialog-actions small { margin-right:auto; color:var(--v4-muted); }
.task-reports-table { padding:0 16px; }
.task-reports-head,.task-reports-row { display:grid; grid-template-columns:minmax(220px,.9fr) minmax(390px,1.4fr); gap:16px; align-items:center; }
.task-reports-head { min-height:34px; border-bottom:1px solid var(--v4-line-strong); font-size:var(--v4-font-sm); }
[data-task-reports-list] { max-height:330px; overflow-y:auto; }
.task-reports-row { min-height:62px; padding:8px 0; border-bottom:1px solid var(--v4-line); }
.task-reports-row > div:first-child strong,.task-reports-row > div:first-child small { display:block; }
.task-reports-row small { margin-top:3px; color:var(--v4-muted); }
.task-reports-row > div:last-child { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:6px; }
.task-reports-row > div:last-child > span { margin-right:auto; color:var(--v4-secondary); font-size:var(--v4-font-sm); }
.task-reports-row .button { min-height:28px; padding:4px 8px; font-size:var(--v4-font-sm); }
.task-reports-empty { padding:18px 0; }
@media (max-width:760px) { .task-reports-head { display:none; }.task-reports-row { grid-template-columns:1fr;gap:8px }.task-reports-row > div:last-child { justify-content:flex-start }.task-equipment-choice-list label { grid-template-columns:24px 1fr }.task-equipment-choice-list small { grid-column:2;white-space:normal } }
.scheduled-task-row-actions { display:flex; align-items:center; justify-content:center; gap:4px; }
.scheduled-task-row-actions .icon-button { width:24px; height:24px; min-width:24px; min-height:24px; padding:0; border-radius:4px; }
.scheduled-task-row-actions svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
#personnel-management-view .scheduled-plan-grid,
#personnel-management-view .scheduled-plan-mode { gap:var(--v4-space-3); }
#personnel-management-view .scheduled-plan-mode { background:transparent; }
#personnel-management-view :is(.scheduled-plan-grid > label,.scheduled-plan-mode > label,.scheduled-plan-type legend) {
  gap:var(--v4-space-1);
  color:var(--v4-secondary);
  font-size:var(--plan-detail-font);
  font-weight:700;
  letter-spacing:0;
  line-height:1.2;
}
#personnel-management-view .scheduled-plan-type legend { margin-bottom:var(--v4-space-1); }
#personnel-management-view .scheduled-plan-grid :is(input[type="number"],input[type="text"],select) {
  height:var(--v4-control-height);
  min-height:var(--v4-control-height);
  margin-top:0;
  padding:5px 8px;
  font-family:inherit;
  font-size:var(--plan-data-font);
  font-weight:400;
  line-height:1.1;
}
#personnel-management-view :is(.scheduled-plan-input-suffix,.scheduled-plan-type-options) { height:var(--v4-control-height); min-height:var(--v4-control-height); }
#personnel-management-view .scheduled-plan-grid .scheduled-plan-input-suffix input { height:100%; min-height:0; }
#personnel-management-view .scheduled-plan-input-suffix span { min-width:34px; padding:0 8px; font-size:var(--plan-detail-font); font-weight:700; }
#personnel-management-view .scheduled-plan-type-options span { font-size:var(--plan-detail-font); font-weight:750; line-height:1.15; }
#personnel-management-view .scheduled-plan-upload.button { font-size:var(--plan-detail-font); padding:6px 8px; gap:6px; letter-spacing:0; }
#personnel-management-view .scheduled-plan-card {
  height:auto;
  min-height:var(--plan-row-height);
  grid-template-columns:22px minmax(0,1fr) auto;
  gap:6px;
  margin:0;
  padding:8px;
  border:0;
  border-bottom:1px solid var(--v4-line);
  border-radius:0;
  font-size:var(--plan-data-font);
  line-height:1.1;
}
#personnel-management-view .scheduled-plan-card .scheduled-plan-card-icon { grid-column:1; grid-row:1 / 3; width:22px; height:22px; }
#personnel-management-view .scheduled-plan-card-icon svg { width:17px; height:17px; }
#personnel-management-view .scheduled-plan-card-summary { grid-column:2; grid-row:1; flex-wrap:wrap; gap:2px 5px; white-space:normal; }
#personnel-management-view .scheduled-plan-card-summary strong { font-size:var(--plan-data-font); font-weight:700; line-height:1.1; }
#personnel-management-view .scheduled-plan-card-summary span { margin-top:0; font-size:var(--plan-detail-font); font-weight:400; }
#personnel-management-view .scheduled-plan-card-file { grid-column:2 / -1; grid-row:2; flex-wrap:wrap; gap:4px 6px; }
#personnel-management-view .scheduled-plan-card-file small { flex-basis:100%; }
#personnel-management-view .scheduled-plan-card-actions { grid-column:3; grid-row:1; }
#personnel-management-view .scheduled-plan-card-file b { padding:3px 5px; font-size:var(--plan-detail-font); font-weight:750; }
#personnel-management-view .scheduled-plan-card-file small { font-size:var(--plan-detail-font); font-weight:400; }
#personnel-management-view :is(.scheduled-plan-card-actions,.scheduled-manual-library-actions) { gap:4px; }
#personnel-management-view :is(.scheduled-plan-card-actions,.scheduled-manual-library-actions) button {
  width:var(--plan-action-size);
  height:var(--plan-action-size);
  min-width:var(--plan-action-size);
  min-height:var(--plan-action-size);
}
#personnel-management-view .scheduled-manual-library { gap:0; padding:0; }
#personnel-management-view .scheduled-manual-library-row { min-height:var(--plan-row-height); gap:6px; padding:1px 8px; border:0; border-bottom:1px solid var(--v4-line); border-radius:0; }
#personnel-management-view .scheduled-plan-files .scheduled-manual-library-file { height:auto; min-height:0; gap:6px; padding:0; line-height:1.1; }
#personnel-management-view .scheduled-manual-library-file > span:first-child { font-size:17px; }
#personnel-management-view .scheduled-manual-library b { font-size:var(--plan-data-font); font-weight:700; line-height:1.1; }
#personnel-management-view :is(.scheduled-plan-empty,.scheduled-manual-viewer-empty p,.scheduled-manual-viewer-loading) { font-size:var(--plan-detail-font); line-height:1.35; }
#personnel-management-view [data-settings-panel="scheduled-catalog"] { overflow-x:auto; }
#personnel-management-view [data-settings-panel="scheduled-catalog"] .scheduled-plans-layout { grid-template-columns:var(--v4-admin-sidebar) minmax(0,1fr); min-width:1060px; height:100%; min-height:0; }
#personnel-management-view [data-settings-panel="scheduled-catalog"] .scheduled-plan-form { display:flex; min-height:0; flex-direction:column; }
#personnel-management-view [data-settings-panel="scheduled-catalog"] .scheduled-plan-grid { display:flex; flex:1; flex-direction:column; min-height:0; overflow-y:auto; }
#personnel-management-view [data-settings-panel="scheduled-catalog"] .scheduled-plans-results { min-height:0; }
#personnel-management-view [data-settings-panel="scheduled-catalog"] :is(.scheduled-plan-list,.scheduled-plan-files) { height:100%; min-height:0; box-sizing:border-box; }
#personnel-management-view [data-settings-panel="scheduled-catalog"] .scheduled-plan-list { display:flex; flex-direction:column; gap:0; }
#personnel-management-view .scheduled-plan-list > :is(.scheduled-plan-list-heading,.scheduled-plan-card) { flex-shrink:0; }
#personnel-management-view .scheduled-plan-list > .scheduled-plan-list-heading { position:sticky; top:0; z-index:1; }
#personnel-management-view [data-settings-panel="scheduled-catalog"] .scheduled-catalog-heading {
  margin-top:var(--v4-gap);
  border:1px solid var(--v4-line);
  border-radius:var(--v4-radius) var(--v4-radius) 0 0;
  box-shadow:var(--v4-shadow);
}
#personnel-management-view [data-settings-panel="backup"] .backup-panels { padding:0; border-radius:0; background:transparent; }
#personnel-management-view .backup-panel-shell { overflow:hidden; }

/* The same page-header cadence is shared by standalone and maintenance workspaces. */
#maintenance-navigation > .maintenance-heading,
#maintenance-agenda-view > .agenda-heading {
  box-sizing:border-box;
  min-height:64px;
  height:64px;
  margin:0;
  padding:8px 16px;
  border:1px solid #005a78;
  border-top:0;
  border-radius:0 0 var(--v4-radius) var(--v4-radius);
  color:#fff;
  background:var(--v4-primary);
  box-shadow:var(--v4-shadow);
}
#maintenance-navigation > .maintenance-heading h1,
#maintenance-agenda-view > .agenda-heading h1 {
  margin:0;
  color:#fff;
  font-size:var(--v4-page-title-size);
  font-weight:750;
  line-height:1.1;
  letter-spacing:-.015em;
}
#maintenance-navigation > .maintenance-navigation-bar { margin-top:var(--v4-page-gap); }
#maintenance-agenda-view { gap:var(--v4-page-gap); }
#maintenance-agenda-view > .agenda-toolbar { margin:0 0 var(--v4-page-gap); }
#competency-monitoring-view > .page-heading,
#fleet-form-view > .fleet-heading,
#material-management-view > .material-heading { margin-bottom:var(--v4-page-gap); }
#competency-monitoring-view > .competency-monitoring-matrix { margin-top:var(--v4-page-gap); }
#material-management-view > .material-filters { margin-top:var(--v4-page-gap); }
#fleet-availability-view > .fleet-availability-heading { margin-bottom:var(--v4-page-gap); }
#personnel-management-view :is(.access-hero,.maintainer-detail-summary,.fleet-registry-summary) {
  box-sizing:border-box;
  height:var(--v4-panel-header-height);
  min-height:var(--v4-panel-header-height);
}

@container workspace (max-width:1799px) {
  #personnel-management-view { --v4-admin-sidebar:240px; }
}
@container workspace (max-width:1199px) {
  #personnel-management-view { --v4-admin-sidebar:210px; }
  #personnel-management-view > .settings-tabs .settings-tab { padding-right:8px; padding-left:8px; font-size:9px; }
}
@media (max-height:820px) and (min-width:901px) {
  :root { --v4-page-gap:6px; }
  #personnel-management-view > .settings-tabs { min-height:36px; padding:2px; }
  #personnel-management-view > .settings-tabs .settings-tab { min-height:30px; padding-top:4px; padding-bottom:4px; }
}

/* Anteprima dell'annullamento: stessa densità dei dialoghi operativi. */
.archive-annulment-dialog { width:min(680px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:0; border:1px solid var(--v4-line); border-radius:var(--v4-radius); color:var(--v4-ink); }
.archive-annulment-dialog form { display:flex; flex-direction:column; max-height:calc(100dvh - 36px); gap:0; }
.archive-annulment-dialog header { display:flex; align-items:center; justify-content:space-between; padding:8px 12px; background:var(--v4-panel-head); border-bottom:1px solid var(--v4-line); }
.archive-annulment-dialog h2 { margin:0; font-size:14px; }
.archive-annulment-content { padding:12px 16px; overflow:auto; font:13px/1.45 "Segoe UI",sans-serif; }
.archive-annulment-content p { margin:0 0 10px; }
.archive-annulment-content ul { margin:0 0 12px; padding-left:20px; }
.archive-annulment-content label { display:grid; gap:6px; font-size:12px; font-weight:600; }
.archive-annulment-content textarea { box-sizing:border-box; width:100%; resize:vertical; min-height:64px; font:13px "Segoe UI",sans-serif; }
.archive-annulment-content .help-text { margin-top:8px; color:var(--v4-muted); font-size:12px; }
.archive-annulment-content [role="status"] { color:var(--v4-danger); margin:8px 0 0; }
.archive-annulment-dialog footer { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; padding:10px 12px; border-top:1px solid var(--v4-line); }
.archive-annulment-dialog footer button { min-height:32px; font-size:12px; }

/* Gestione Servizi: elenco compatto degli ODL collegati al fermo. */
#fleet-availability-view .fleet-availability-work { padding:0; overflow-y:auto; scrollbar-gutter:stable; }
#fleet-availability-view .fleet-work-orders-heading {
  position:sticky; top:0; z-index:2; display:flex; min-height:51px; align-items:center; justify-content:space-between;
  gap:12px; padding:8px 12px; border-bottom:1px solid var(--v4-line); background:var(--v4-panel-head);
}
#fleet-availability-view .fleet-work-orders-heading > span { display:flex; min-width:0; align-items:center; gap:14px; }
#fleet-availability-view .fleet-work-orders-heading h2 { margin:0; }
#fleet-availability-view .fleet-work-orders-heading > span > b {
  padding:5px 11px; border-radius:999px; color:#17607a; background:#ccecf5; font-size:10px; line-height:1; white-space:nowrap;
}
#fleet-availability-view .fleet-work-orders-heading > .button {
  min-height:30px; margin-left:auto; padding:5px 10px; border:1px solid #b8cbd2; border-radius:4px;
  color:#17252c; background:var(--v4-panel-head); box-shadow:none; font-size:9px; white-space:nowrap;
}
#fleet-availability-view .fleet-work-orders-heading > .button:hover {
  border-color:#7faab8; color:#17252c; background:#e8f0f3; box-shadow:none;
}
#fleet-availability-view .fleet-work-order-list { display:grid; gap:8px; padding:12px; }
#fleet-availability-view .fleet-work-order-list > .temporal-order-list { display:contents; }
#fleet-availability-view .fleet-work-orders-empty {
  margin:0; padding:28px 16px; border:1px dashed #c5d5da; border-radius:6px;
  color:var(--v4-muted); background:#fbfcfd; font-size:11px; text-align:center;
}
#fleet-availability-view .fleet-work-order-row {
  display:grid; min-height:65px;
  grid-template-columns:50px minmax(118px,.9fr) minmax(98px,.65fr) minmax(116px,.8fr) minmax(105px,1fr) 61px;
  align-items:center; gap:0; overflow:hidden; border:1px solid #d4e1e5; border-radius:6px; color:#244653; background:#fff;
}
#fleet-availability-view .fleet-work-order-row > * { min-width:0; }
#fleet-availability-view .fleet-work-order-label {
  display:grid; width:43px; min-height:34px; place-items:center; margin-left:7px; border-radius:5px; color:#fff;
  background:linear-gradient(180deg,#078daf,#007495); box-shadow:0 2px 5px rgba(0,104,139,.22); font-size:12px;
}
#fleet-availability-view .fleet-work-order-code,
#fleet-availability-view .fleet-work-order-date,
#fleet-availability-view .fleet-work-order-status,
#fleet-availability-view .fleet-work-order-progress { min-height:39px; padding:0 12px; border-left:1px solid #dce7ea; }
#fleet-availability-view .fleet-work-order-code { display:grid; align-content:center; gap:2px; }
#fleet-availability-view .fleet-work-order-code small { display:block; margin:0; color:#718892; font-size:9px; }
#fleet-availability-view .fleet-work-order-code b {
  overflow:hidden; color:#102f3b; font-size:10px; text-overflow:ellipsis; white-space:nowrap;
}
#fleet-availability-view .fleet-work-order-date {
  display:flex; align-items:center; gap:8px; font-size:10px; font-weight:700; white-space:nowrap;
}
#fleet-availability-view .fleet-work-order-date svg {
  flex:0 0 17px; width:17px; height:17px; fill:none; stroke:#38647a; stroke-linecap:round;
  stroke-linejoin:round; stroke-width:1.7;
}
#fleet-availability-view .fleet-work-order-status {
  display:flex; width:max-content; min-height:26px; align-items:center; align-self:center; gap:7px; margin-left:10px;
  padding:5px 10px; border:1px solid; border-radius:5px; font-size:10px; font-weight:800; white-space:nowrap;
}
#fleet-availability-view .fleet-work-order-status i { width:7px; height:7px; border-radius:50%; background:currentColor; }
#fleet-availability-view .fleet-work-order-status.is-progress { border-color:#ffd797; color:#dc7d00; background:#fff5df; }
#fleet-availability-view .fleet-work-order-status.is-open { border-color:#c6dcec; color:#43657d; background:#eaf3f9; }
#fleet-availability-view .fleet-work-order-status.is-completed { border-color:#b9e3cf; color:#17804f; background:#e4f6ed; }
#fleet-availability-view .fleet-work-order-progress { display:grid; align-content:center; gap:8px; }
#fleet-availability-view .fleet-work-order-progress b { font-size:10px; }
#fleet-availability-view .fleet-work-order-progress > i {
  display:block; height:7px; overflow:hidden; border-radius:999px; background:#e7ecef;
}
#fleet-availability-view .fleet-work-order-progress > i > span {
  display:block; height:100%; border-radius:inherit; background:#0785a5;
}
#fleet-availability-view .fleet-work-order-open {
  min-height:34px; margin:0 7px; border:1px solid #0582a7; border-radius:5px; color:#17607a;
  background:#fff; font-family:inherit; font-size:10px; font-weight:700; cursor:pointer;
}
#fleet-availability-view .fleet-work-order-open:hover { color:#fff; background:#0785a5; }

@container workspace (max-width:1250px) {
  #fleet-availability-view .fleet-work-order-row {
    grid-template-columns:48px minmax(105px,1fr) 98px minmax(108px,.85fr) minmax(94px,.9fr) 57px;
  }
  #fleet-availability-view .fleet-work-order-code,
  #fleet-availability-view .fleet-work-order-date,
  #fleet-availability-view .fleet-work-order-progress { padding-right:8px; padding-left:8px; }
  #fleet-availability-view .fleet-work-order-status { margin-left:7px; padding-right:7px; padding-left:7px; }
}
