/* Neogamma Visual — prototipo UI con brand #1c73f7 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --wf-bg: #f0f5fc;
  --wf-surface: #ffffff;
  --wf-border: #d7e2f0;
  --wf-border-light: #e4ebf5;
  --wf-text: #0f1b2d;
  --wf-text-muted: #5b6b82;
  --wf-accent: #1c73f7;
  --wf-accent-hover: #155fd1;
  --wf-accent-soft: #e8f1fe;
  --wf-success: #0f9f6e;
  --wf-warning: #c98900;
  --wf-danger: #d14343;
  --wf-radius: 14px;
  --wf-radius-sm: 10px;
  --wf-shadow: 0 1px 2px rgba(15, 27, 45, 0.04), 0 8px 24px rgba(28, 115, 247, 0.06);
  --wf-shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.05);
  --wf-tile-size: 140px;
  --wf-gap: 16px;
  --wf-max-width: 1200px;
}

html {
  overflow-x: hidden;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--wf-text);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(28, 115, 247, 0.12), transparent 60%),
    radial-gradient(900px 420px at 100% 0%, rgba(28, 115, 247, 0.08), transparent 55%),
    var(--wf-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--wf-accent);
}

.wf-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wf-page--centered {
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(800px 420px at 50% 0%, rgba(28, 115, 247, 0.18), transparent 60%),
    linear-gradient(180deg, #eaf2ff 0%, var(--wf-bg) 55%);
}

.wf-container {
  width: 100%;
  max-width: var(--wf-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.wf-header {
  border-bottom: 1px solid var(--wf-border);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--wf-shadow-sm);
}

.wf-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.wf-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  min-width: 0;
}

.wf-header__logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.wf-header__logo.is-herp {
  height: 180px;
  max-width: 720px;
}

.wf-header__brand-fallback {
  display: none;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--wf-accent);
}

.wf-header__logo.is-missing {
  display: none;
}

.wf-header__logo.is-missing + .wf-header__brand-fallback {
  display: inline;
}

.wf-login__logo.is-missing {
  display: none;
}

.wf-login__logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 220px;
  margin: 0 auto 20px;
  object-fit: contain;
}

.wf-header__user {
  font-size: 0.85rem;
  color: var(--wf-text-muted);
}

.wf-header__profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 1;
  min-width: 0;
  max-width: min(100%, 240px);
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  padding: 8px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  color: var(--wf-text);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.wf-header__profile:hover {
  border-color: var(--wf-accent);
  background: var(--wf-accent-soft);
  color: var(--wf-accent);
}

.wf-header__profile-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.wf-header__profile-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wf-role-fab {
  position: fixed;
  right: 20px;
  bottom: 76px;
  z-index: 9989;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  background: var(--wf-accent);
  color: #fff;
  font: 600 0.85rem/1 "Plus Jakarta Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(28, 115, 247, 0.35);
  cursor: pointer;
}

.wf-role-fab:hover {
  background: var(--wf-accent-hover);
}

.wf-role-fab__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .wf-container {
    padding: 0 16px;
  }

  .wf-header {
    padding: 12px 0;
  }

  .wf-header__logo {
    max-width: 130px;
    height: 32px;
  }

  .wf-header__logo.is-herp {
    height: 128px;
    max-width: 520px;
  }

  .wf-header__profile {
    padding: 7px 12px;
    max-width: min(100%, 180px);
  }

  .wf-role-fab {
    right: 16px;
    bottom: 72px;
    padding: 11px 14px;
    font-size: 0.8rem;
  }
}

.wf-main {
  flex: 1;
  padding: 32px 0 48px;
}

.wf-section {
  margin-bottom: 40px;
}

.wf-section__title {
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wf-text-muted);
  border-bottom: 1px solid var(--wf-border);
  padding-bottom: 10px;
}

.wf-card {
  background: var(--wf-surface);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  box-shadow: var(--wf-shadow);
  padding: 28px;
}

.wf-box {
  border: 1px solid var(--wf-border-light);
  background: var(--wf-surface);
}

.wf-login {
  width: 100%;
  max-width: 400px;
}

.wf-login__title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
}

.wf-login__subtitle {
  margin: 0 0 24px;
  font-size: 0.85rem;
  color: var(--wf-text-muted);
}

.wf-form-group {
  margin-bottom: 16px;
}

.wf-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--wf-text-muted);
}

.wf-input {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-surface);
  font-size: 1rem;
  font-family: inherit;
  color: var(--wf-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wf-input:focus {
  outline: none;
  border-color: var(--wf-accent);
  box-shadow: 0 0 0 3px rgba(28, 115, 247, 0.18);
}

.wf-select {
  display: block;
  width: 100%;
  max-width: 320px;
  padding: 11px 14px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-surface);
  font-size: 1rem;
  font-family: inherit;
  color: var(--wf-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wf-select:focus {
  outline: none;
  border-color: var(--wf-accent);
  box-shadow: 0 0 0 3px rgba(28, 115, 247, 0.18);
}

/* Assegna corsi */

.wf-course {
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  padding: 20px;
  margin-bottom: 20px;
}

.wf-course__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.wf-course__title {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 700;
}

.wf-course__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--wf-text-muted);
}

.wf-course__badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border: 1px solid var(--wf-border-light);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wf-text-muted);
  white-space: nowrap;
}

.wf-workload {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--wf-border-light);
  background: #f7faff;
}

.wf-workload__title {
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wf-text-muted);
}

.wf-workload__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.wf-workload__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wf-workload__label {
  font-size: 0.8rem;
  color: var(--wf-text-muted);
  line-height: 1.3;
}

.wf-workload__value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

.wf-impact {
  font-size: 1rem;
  font-weight: 700;
  color: var(--wf-success);
}

.wf-impact--neutral {
  color: var(--wf-text-muted);
}

@media (max-width: 720px) {
  .wf-workload__grid {
    grid-template-columns: 1fr;
  }

  .wf-course__header {
    flex-direction: column;
  }
}

.wf-link {
  font-size: 0.85rem;
  color: var(--wf-text-muted);
}

.wf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-surface);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--wf-text);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.wf-btn:hover {
  border-color: #b8c9e0;
  background: #f8fbff;
}

.wf-btn--primary {
  background: var(--wf-accent);
  color: #fff;
  border-color: var(--wf-accent);
  width: 100%;
  box-shadow: 0 6px 16px rgba(28, 115, 247, 0.28);
}

.wf-btn--primary:hover {
  background: var(--wf-accent-hover);
  border-color: var(--wf-accent-hover);
  color: #fff;
  box-shadow: 0 8px 20px rgba(28, 115, 247, 0.34);
}

.wf-btn--primary:disabled,
.wf-btn--primary[disabled] {
  background: #d0d5dc;
  color: #6b7280;
  border-color: #b0b6c0;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.9;
}

.wf-btn--primary:disabled:hover,
.wf-btn--primary[disabled]:hover {
  background: #d0d5dc;
  color: #6b7280;
  border-color: #b0b6c0;
  box-shadow: none;
}

.wf-btn--ghost {
  font-size: 0.82rem;
  padding: 7px 12px;
  background: transparent;
}

.wf-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--wf-gap);
}

.wf-kpi-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .wf-kpi-grid--3 {
    grid-template-columns: 1fr;
  }
}

.wf-kpi {
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  background: var(--wf-surface);
  box-shadow: var(--wf-shadow);
  padding: 22px 20px;
  text-align: center;
}

a.wf-kpi,
.wf-kpi--link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.wf-kpi:hover,
.wf-kpi--link:hover {
  border-color: var(--wf-accent);
  box-shadow: 0 6px 20px rgba(74, 127, 212, 0.12);
  transform: translateY(-1px);
}

a.wf-kpi:focus-visible,
.wf-kpi--link:focus-visible {
  outline: 2px solid var(--wf-accent);
  outline-offset: 2px;
}

.wf-kpi__value {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--wf-accent);
  letter-spacing: -0.03em;
}

.wf-kpi__value--money {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.wf-kpi__label {
  font-size: 0.8rem;
  color: var(--wf-text-muted);
  line-height: 1.3;
}

.wf-tile {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 12px 12px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  background: var(--wf-surface);
  box-shadow: var(--wf-shadow-sm);
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.3;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.wf-tile:hover {
  transform: translateY(-2px);
  border-color: #b9cff0;
  box-shadow: var(--wf-shadow);
  background: #fbfdff;
}

.wf-tile:hover .wf-tile__icon {
  color: var(--wf-accent);
  background: #dceaff;
}

a.wf-tile[href="#"] {
  background: #f7f9fc;
  border-style: dashed;
  border-color: #c5d3e6;
  color: var(--wf-text-muted);
  opacity: 0.85;
}

a.wf-tile[href="#"] .wf-tile__icon {
  color: var(--wf-text-muted);
  background: #eef3f9;
}

.wf-tile--add {
  border: 1px dashed #b7c8de;
  background: rgba(255, 255, 255, 0.45);
  color: var(--wf-text-muted);
  cursor: pointer;
  font-family: inherit;
  box-shadow: none;
}

.wf-tile--add .wf-tile__label {
  font-weight: 500;
}

.wf-tile__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  flex-shrink: 0;
  color: var(--wf-accent);
  background: var(--wf-accent-soft);
  border-radius: 12px;
  transition: color 0.15s ease, background 0.15s ease;
}

.wf-tile__icon svg {
  width: 36px;
  height: 36px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wf-tile__label {
  font-weight: 600;
  text-align: center;
  overflow-wrap: break-word;
}

.wf-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--wf-tile-size), 1fr));
  gap: var(--wf-gap);
}

.wf-category {
  margin-bottom: 32px;
}

.wf-category__title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
}

.wf-badge {
  display: inline-block;
  padding: 3px 9px;
  border: none;
  border-radius: 999px;
  background: var(--wf-accent-soft);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--wf-accent);
  margin-left: 8px;
  vertical-align: middle;
  font-weight: 700;
}

.wf-alert {
  display: none;
  margin-bottom: 24px;
  padding: 14px 18px;
  border: 1px solid #b7e2cf;
  border-radius: var(--wf-radius-sm);
  background: #edf9f3;
  color: #0b6b4a;
  font-weight: 600;
}

.wf-alert:target {
  display: block;
}

.wf-alert--inline {
  display: block;
}

.wf-alert--inline[hidden] {
  display: none;
}

.is-hidden {
  display: none !important;
}

/* Modale profilo */

.wf-modal-open {
  overflow: hidden;
}

.wf-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.wf-modal[hidden] {
  display: none;
}

.wf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.wf-modal__panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--wf-surface);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  box-shadow: 0 20px 50px rgba(15, 27, 45, 0.18);
  padding: 28px;
}

.wf-modal__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
}

.wf-modal__subtitle {
  margin: 0 0 20px;
  font-size: 0.85rem;
  color: var(--wf-text-muted);
}

.wf-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.wf-profile-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wf-profile-option {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  font-size: 0.9rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.wf-profile-option:hover {
  background: var(--wf-accent-soft);
}

.wf-profile-option.is-active {
  background: var(--wf-accent);
  color: #fff;
}

.wf-quicklink-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wf-quicklink-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  font-size: 0.9rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.wf-quicklink-option:hover {
  background: var(--wf-accent-soft);
}

.wf-quicklink-option__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--wf-text);
}

.wf-quicklink-option__icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wf-quicklink-option__label {
  font-weight: 600;
}

.wf-modal__empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--wf-text-muted);
}

/* Pagine interne / form */

.wf-page-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
}

.wf-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.wf-page-heading .wf-page-title {
  margin-bottom: 4px;
}

.wf-page-heading .wf-page-subtitle {
  margin-bottom: 0;
}

.wf-page-heading .wf-btn--primary {
  width: auto;
  flex-shrink: 0;
}

.wf-page-subtitle {
  margin: 0 0 24px;
  font-size: 0.9rem;
  color: var(--wf-text-muted);
}

.wf-back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--wf-text-muted);
  text-decoration: none;
}

.wf-back:hover {
  color: var(--wf-text);
}

.wf-form-card {
  max-width: 480px;
}

.wf-form-card--wide {
  max-width: 900px;
}

.wf-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
}

.wf-form-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.wf-form-group--full {
  grid-column: 1 / -1;
}

.wf-input--readonly {
  background: var(--wf-accent-soft);
  color: var(--wf-text);
}

.wf-textarea {
  display: block;
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

.wf-checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.wf-checkbox-group input {
  width: 18px;
  height: 18px;
  accent-color: var(--wf-accent);
}

.wf-checkbox-group label {
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  margin: 0;
}

.wf-btn--block {
  width: 100%;
  margin-top: 8px;
}

.wf-btn--inline {
  width: auto;
}

.wf-btn--add {
  border: 1px dashed #b7c8de;
  background: transparent;
  color: var(--wf-text-muted);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
  padding: 14px 20px;
}

.wf-form-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--wf-border);
}

.wf-form-actions .wf-btn--primary {
  width: auto;
  flex: 1;
  max-width: 280px;
}

.wf-form-actions .wf-btn--ghost {
  min-width: 120px;
}

.wf-form-actions--flush {
  margin-top: 8px;
  padding-top: 16px;
  margin-bottom: 0;
}

.wf-form-error {
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--wf-danger);
  border-radius: var(--wf-radius-sm);
  background: #fdecec;
  font-size: 0.9rem;
  color: var(--wf-danger);
}

.wf-activity {
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  padding: 20px;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: var(--wf-radius);
  box-shadow: var(--wf-shadow-sm);
}

.wf-activity:has(.wf-activity__header),
.wf-activity:has(.wf-activity__toggle) {
  padding: 0;
}

.wf-activity__toggle {
  width: 100%;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin: 0;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid var(--wf-border);
  background: #f7fafc;
  font-family: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.wf-activity.is-collapsed .wf-activity__toggle {
  border-bottom: none;
}

.wf-activity__toggle:hover {
  background: #eef4fb;
}

.wf-activity__toggle:focus-visible {
  outline: 2px solid var(--wf-accent);
  outline-offset: -2px;
}

.wf-activity__chevron {
  flex-shrink: 0;
  width: 0.5em;
  height: 0.5em;
  margin-bottom: 0.85em;
  border-right: 2px solid var(--wf-text-muted);
  border-bottom: 2px solid var(--wf-text-muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.wf-activity:not(.is-collapsed) .wf-activity__chevron {
  transform: rotate(45deg);
  margin-bottom: 0.7em;
}

.wf-activity__toggle .wf-activity__index {
  margin-bottom: 2px;
}

.wf-activity__toggle .wf-activity__name {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.wf-activity__summary {
  flex-shrink: 0;
  margin-bottom: 4px;
  font-size: 0.82rem;
  color: var(--wf-text-muted);
  white-space: nowrap;
}

.wf-activity.is-collapsed .wf-activity__body {
  display: none;
}

.wf-activity__header {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--wf-border);
  background: #f7fafc;
}

.wf-activity__index {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--wf-border);
  border-radius: 10px;
  background: var(--wf-surface);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--wf-accent);
  margin-bottom: 2px;
}

.wf-activity__name {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.wf-activity__name .wf-label {
  margin-bottom: 4px;
}

.wf-activity__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
}

.wf-activity__fields {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 14px 16px;
}

.wf-activity__fields .wf-form-group {
  margin-bottom: 0;
}

.wf-activity__flags {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
}

.wf-inter-sessione {
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px dashed var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-accent-soft);
}

.wf-inter-sessione[hidden] {
  display: none;
}

.wf-inter-sessione .wf-bi-legend {
  margin-top: 8px;
}

.wf-inter-corsisti {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 6px 0 10px;
}

.wf-inter-corsista-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 10px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-surface);
}

.wf-inter-corsista-row__fields {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wf-inter-corsista-row .wf-form-group {
  margin: 0;
}

.wf-inter-corsista-row .wf-btn {
  flex-shrink: 0;
  margin-bottom: 1px;
}

@media (max-width: 720px) {
  .wf-inter-corsista-row {
    flex-direction: column;
    align-items: stretch;
  }

  .wf-inter-corsista-row__fields {
    grid-template-columns: 1fr;
  }
}

.wf-activity__flags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wf-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-surface);
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.wf-flag input {
  width: 16px;
  height: 16px;
  accent-color: var(--wf-accent);
  margin: 0;
}

.wf-flag:has(input:checked) {
  border-color: var(--wf-accent);
  background: var(--wf-accent-soft);
  font-weight: 600;
}

.wf-textarea--compact {
  min-height: 64px;
}

.wf-activity__title {
  margin: 0 0 16px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wf-text-muted);
}

.wf-activity:has(.wf-activity__header) > .wf-activity__title {
  padding: 20px 20px 0;
}

@media (max-width: 720px) {
  .wf-form-grid,
  .wf-form-grid--3,
  .wf-activity__fields {
    grid-template-columns: 1fr;
  }

  .wf-activity__header {
    align-items: flex-start;
  }
}

/* Foglio ore */

.wf-week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.wf-week-nav__label {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  flex: 1;
  min-width: 160px;
}

.wf-week-nav__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 160px;
}

.wf-week-nav__center .wf-week-nav__label {
  flex: none;
}

.wf-week-status {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--wf-border-light);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wf-text-muted);
}

.wf-week-status--draft {
  border-style: dashed;
}

.wf-week-status--definitive {
  border-color: var(--wf-border);
  background: var(--wf-accent-soft);
  color: var(--wf-text);
  font-weight: 700;
}

.wf-week-total {
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--wf-text-muted);
}

.wf-week-total__split {
  margin-left: 8px;
  font-size: 0.8rem;
}

.wf-week-readonly-note {
  margin: 0;
  flex: 1;
  font-size: 0.9rem;
  color: var(--wf-text-muted);
}

.wf-day--readonly {
  background: var(--wf-surface);
}

.wf-day-entry__hours-readonly {
  display: flex;
  align-items: center;
  min-height: 34px;
  font-size: 0.95rem;
  font-weight: 700;
}

.wf-day-entry__spacer {
  width: 28px;
}

/* Gestisci utenti */

.wf-users {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wf-user {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(280px, 1.2fr);
  gap: 20px;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  padding: 20px;
}

.wf-user--disabled {
  background: #f4f7fb;
  opacity: 0.92;
}

.wf-user__name {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
}

.wf-user__meta {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--wf-text-muted);
}

.wf-user__status {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--wf-border-light);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wf-text-muted);
}

.wf-user__status--disabled {
  border-color: var(--wf-border);
  background: #dce5f0;
  color: var(--wf-text);
  font-weight: 700;
}

.wf-user__status--reset {
  border-style: dashed;
  color: var(--wf-text);
}

.wf-user__controls .wf-form-group {
  margin-bottom: 12px;
}

.wf-user__controls .wf-select {
  display: block;
  width: 100%;
  max-width: 320px;
  padding: 11px 14px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-surface);
  font-size: 1rem;
  font-family: inherit;
  color: var(--wf-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wf-select:focus {
  outline: none;
  border-color: var(--wf-accent);
  box-shadow: 0 0 0 3px rgba(28, 115, 247, 0.18);
}

.wf-select--full {
  max-width: none;
  width: 100%;
}

.wf-user__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wf-user__actions .wf-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 800px) {
  .wf-user {
    grid-template-columns: 1fr;
  }
}

/* Business intelligence */

.wf-bi-filters {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}

.wf-kpi__delta {
  display: block;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--wf-text-muted);
}

.wf-kpi__delta--up {
  color: var(--wf-success);
  font-weight: 600;
}

.wf-kpi__delta--down {
  color: var(--wf-danger);
  font-weight: 600;
}

.wf-bi-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--wf-gap);
}

.wf-bi-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--wf-gap);
}

.wf-bi-card-title {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wf-text-muted);
}

.wf-bi-big {
  margin: 0 0 6px;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}

.wf-bi-note {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--wf-text-muted);
}

.wf-bar {
  height: 10px;
  border: 1px solid var(--wf-border);
  background: #e8eef7;
  margin-bottom: 8px;
}

.wf-bar__fill {
  height: 100%;
  background: var(--wf-accent);
}

.wf-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
}

.wf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.wf-table th,
.wf-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  white-space: nowrap;
}

.wf-table th {
  background: #eef3f9;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wf-text-muted);
}

.wf-table tr:last-child td {
  border-bottom: none;
}

.wf-margin--good {
  color: var(--wf-success);
}

.wf-margin--mid {
  color: var(--wf-warning);
}

.wf-margin--low {
  color: var(--wf-danger);
}

.wf-bi-legend {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--wf-text-muted);
}

.wf-bi-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.wf-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid var(--wf-border);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.wf-tag--ok {
  border-style: dashed;
  color: var(--wf-success);
  border-color: var(--wf-success);
}

.wf-stack-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wf-stack-row {
  display: grid;
  grid-template-columns: 90px 1fr 40px;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
}

.wf-stack-row .wf-bar {
  margin: 0;
}

.wf-month-chart {
  display: flex;
  gap: 32px;
  align-items: flex-end;
  justify-content: center;
  min-height: 180px;
  padding: 16px 8px 8px;
}

.wf-month-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.wf-month-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 140px;
}

.wf-month-bar {
  width: 28px;
  border: 1px solid var(--wf-border);
}

.wf-month-bar--rev {
  background: #9db7e0;
}

.wf-month-bar--margin {
  background: var(--wf-accent);
}

.wf-month-vals {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--wf-text-muted);
}

/* BI — fatturato tipologie e grafici interattivi */

.wf-bi-fat-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wf-bi-fat-totale {
  margin: 0;
  font-size: 1rem;
  color: var(--wf-text-muted);
}

.wf-bi-fat-totale strong {
  font-size: 1.35rem;
  color: var(--wf-text);
}

.wf-bi-fat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.wf-bi-fat-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 12px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-surface-muted, #fafbfc);
}

.wf-bi-fat-item__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

.wf-bi-fat-item__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wf-bi-fat-item__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--wf-text-muted);
}

.wf-bi-commesse-table th:nth-child(n + 4),
.wf-bi-commesse-table td:nth-child(n + 4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.wf-bi-commesse-table th:nth-child(n + 4) .wf-table-sort {
  justify-content: flex-end;
  width: 100%;
}

.wf-bi-month-table th:nth-child(n + 2),
.wf-bi-month-table td:nth-child(n + 2) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.wf-bi-fat-item__value {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.wf-bi-fat-item__pct {
  font-size: 0.72rem;
  color: var(--wf-text-muted);
}

.wf-bi-fat-item__sub {
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--wf-text-muted);
}

.wf-bi-pie-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 8px 0;
}

.wf-bi-pie-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  background: var(--wf-surface-muted, #fafbfc);
}

.wf-bi-pie-panel__title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}

.wf-bi-pie-panel__sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--wf-text-muted);
  text-align: center;
}

.wf-bi-pie-chart {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
}

.wf-bi-pie__svg {
  width: min(100%, 220px);
  height: auto;
  display: block;
}

.wf-bi-pie__seg {
  cursor: pointer;
  transition: opacity 0.15s ease, filter 0.15s ease;
  outline: none;
}

.wf-bi-pie__seg:hover,
.wf-bi-pie__seg.is-highlight,
.wf-bi-pie__seg:focus-visible {
  opacity: 0.88;
  filter: brightness(1.08);
}

.wf-bi-pie__center-title {
  font-size: 9px;
  font-weight: 600;
  fill: var(--wf-text-muted);
  font-family: inherit;
}

.wf-bi-pie__center-val {
  font-size: 11px;
  font-weight: 700;
  fill: var(--wf-text);
  font-family: inherit;
}

.wf-bi-pie-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 280px;
}

.wf-bi-pie-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
}

.wf-bi-pie-legend__item i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
  font-style: normal;
}

.wf-bi-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 240px;
  padding: 10px 12px;
  border-radius: var(--wf-radius-sm);
  background: var(--wf-text);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: var(--wf-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.18));
}

.wf-bi-tooltip strong {
  font-weight: 700;
}

.wf-bi-chart-card {
  overflow: hidden;
}

.wf-bi-bar-chart {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0 8px;
}

.wf-bi-bar-chart__plot {
  display: flex;
  align-items: flex-end;
  justify-content: safe center;
  gap: clamp(10px, 2.5vw, 24px);
  min-height: 196px;
  padding: 8px 12px 4px;
  margin: 0 auto;
  width: max-content;
  max-width: 100%;
  box-sizing: border-box;
}

.wf-bi-bar-chart__col {
  flex: 0 0 auto;
  width: clamp(40px, 7vw, 52px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-radius: var(--wf-radius-sm);
  padding: 4px 2px 0;
  outline: none;
  transition: background 0.15s ease;
}

.wf-bi-bar-chart__col:hover,
.wf-bi-bar-chart__col.is-active,
.wf-bi-bar-chart__col:focus-visible {
  background: var(--wf-surface-muted, rgba(0, 0, 0, 0.04));
}

.wf-bi-bar-chart__bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 132px;
  width: 100%;
}

.wf-bi-bar-chart__bar {
  width: 14px;
  min-height: 2px;
  border: 1px solid var(--wf-border);
  border-radius: 3px 3px 0 0;
  transition: filter 0.15s ease;
}

.wf-bi-bar-chart__bar--rev {
  background: #9db7e0;
}

.wf-bi-bar-chart__bar--margin {
  background: var(--wf-accent);
}

.wf-bi-bar-chart__col.is-active .wf-bi-bar-chart__bar {
  filter: brightness(1.06);
}

.wf-bi-bar-chart__label {
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.wf-bi-bar-chart__vals {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--wf-text-muted);
  text-align: center;
  line-height: 1.25;
  max-width: 100%;
  word-break: break-word;
}

.wf-bi-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 24px;
  margin-top: 0;
}

.wf-bi-chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--wf-text-muted);
}

.wf-bi-chart-legend__swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid var(--wf-border);
}

.wf-bi-chart-legend__swatch--rev {
  background: #9db7e0;
}

.wf-bi-chart-legend__swatch--margin {
  background: var(--wf-accent);
}

.wf-bi-commesse-toolbar {
  display: grid;
  grid-template-columns: 1fr 160px 160px;
  gap: 12px 16px;
  align-items: end;
  margin-bottom: 14px;
}

.wf-bi-commesse-search,
.wf-bi-commesse-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.wf-table-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.wf-table-sort:hover,
.wf-table-sort:focus-visible {
  color: var(--wf-accent);
  outline: none;
}

.wf-table-sort.is-active {
  color: var(--wf-accent);
}

.wf-table-sort::after {
  content: '↕';
  font-size: 0.7rem;
  opacity: 0.35;
}

.wf-table-sort.is-active[data-dir='asc']::after {
  content: '↑';
  opacity: 1;
}

.wf-table-sort.is-active[data-dir='desc']::after {
  content: '↓';
  opacity: 1;
}

.wf-bi-commesse-table th {
  white-space: nowrap;
}

.wf-bi-month-table-wrap {
  display: none;
  margin-top: 16px;
}

.wf-bi-month-table {
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .wf-bi-split,
  .wf-bi-grid-3 {
    grid-template-columns: 1fr;
  }

  .wf-bi-page .wf-page-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .wf-bi-page .wf-bi-filters {
    width: 100%;
    min-width: 0;
  }

  .wf-bi-page .wf-bi-filters .wf-select {
    width: 100%;
  }

  .wf-bi-page .wf-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .wf-bi-page .wf-kpi {
    padding: 16px 12px;
  }

  .wf-bi-page .wf-kpi__value {
    font-size: 1.85rem;
  }

  .wf-bi-fat-grid {
    grid-template-columns: 1fr;
  }

  .wf-bi-fat-item {
    align-items: center;
  }

  .wf-bi-fat-item__body {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
    width: 100%;
  }

  .wf-bi-fat-item__label {
    flex: 1 1 140px;
  }

  .wf-bi-fat-item__value {
    flex: 0 0 auto;
    text-align: right;
  }

  .wf-bi-fat-item__pct {
    flex: 1 1 100%;
  }

  .wf-bi-commesse-toolbar {
    grid-template-columns: 1fr;
  }

  .wf-bi-pie-duo {
    grid-template-columns: 1fr;
  }

  .wf-bi-pie-panel {
    padding: 14px 10px;
  }

  .wf-bi-pie-legend {
    max-width: none;
  }

  .wf-bi-pie-legend__item {
    justify-content: flex-start;
  }

  .wf-bi-chart-legend {
    justify-content: center;
  }

  .wf-bi-bar-chart__plot {
    justify-content: flex-start;
    padding-inline: 8px;
  }

  .wf-bi-bar-chart__vals {
    display: none;
  }

  .wf-bi-month-table-wrap {
    display: block;
  }
}

@media (max-width: 480px) {
  .wf-bi-page .wf-kpi-grid {
    grid-template-columns: 1fr;
  }

  .wf-bi-page .wf-kpi__value {
    font-size: 2rem;
  }

  .wf-bi-big {
    font-size: 1.75rem;
  }
}

/* Gestione corsi */

.wf-course-filters {
  display: grid;
  grid-template-columns: 180px 160px 1fr 200px;
  gap: 16px;
  align-items: end;
}

.wf-corsi-filters {
  grid-template-columns: minmax(140px, 1fr) minmax(160px, 0.85fr) minmax(160px, 0.85fr) minmax(140px, 1fr) minmax(180px, 1.3fr);
}

.wf-course-group-title {
  margin: 8px 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wf-text-muted);
}

.wf-course-card--mine {
  border-color: var(--wf-border);
  outline: 2px solid var(--wf-accent);
  outline-offset: -6px;
}

.wf-course-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wf-course-card {
  display: block;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
}

.wf-course-card:hover {
  background: #f5f8fc;
}

.wf-course-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.wf-course-card__code {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--wf-text-muted);
  margin-bottom: 2px;
}

.wf-course-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.wf-course-card__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 16px;
  margin-bottom: 12px;
}

.wf-course-card__label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wf-text-muted);
  margin-bottom: 2px;
}

.wf-course-card__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.8rem;
  color: var(--wf-text-muted);
  border-top: 1px solid var(--wf-border);
  padding-top: 10px;
}

.wf-course-status {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--wf-border);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.wf-course-status--ok {
  background: #e8f5e9;
  border-color: var(--wf-success);
  color: var(--wf-success);
  font-weight: 700;
}

.wf-course-status--mid {
  background: #fff8e1;
  border-color: var(--wf-warning);
  color: var(--wf-warning);
  font-weight: 700;
}

.wf-course-status--open {
  border-style: dashed;
  color: var(--wf-text-muted);
}

/* Formazione finanziata */

.wf-piano-filters {
  display: grid;
  grid-template-columns: 160px 220px 180px 1fr;
  gap: 16px;
  align-items: end;
}

.wf-piano-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wf-piano-card {
  display: block;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  background: var(--wf-surface);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--wf-shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wf-piano-card:hover {
  border-color: #b9cdf0;
  box-shadow: var(--wf-shadow);
}

.wf-piano-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.wf-piano-card__code {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--wf-text-muted);
  margin-bottom: 2px;
}

.wf-piano-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.wf-piano-card__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 16px;
  margin-bottom: 12px;
}

.wf-piano-card__label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wf-text-muted);
  margin-bottom: 2px;
}

.wf-piano-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 16px;
  font-size: 0.85rem;
  color: var(--wf-text-muted);
  border-top: 1px solid var(--wf-border);
  padding-top: 10px;
}

.wf-piano-card__note {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
  color: var(--wf-text);
}

.wf-piano-card__note--empty {
  color: var(--wf-text-muted);
  font-style: italic;
}

.wf-piano-card__cta {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--wf-accent);
}

.wf-piano-status {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--wf-border);
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 160px;
  line-height: 1.25;
}

.wf-piano-status--action {
  background: #fff8e1;
  border-color: var(--wf-warning);
  color: var(--wf-warning);
  font-weight: 700;
}

.wf-piano-status--wait {
  background: var(--wf-accent-soft);
  border-color: var(--wf-accent);
  color: var(--wf-accent);
  font-weight: 700;
}

.wf-piano-status--idle {
  border-style: dashed;
  color: var(--wf-text-muted);
}

.wf-piano-status--done {
  background: #e8f8f1;
  border-color: var(--wf-success);
  color: var(--wf-success);
  font-weight: 700;
}

.wf-piano-status--progress {
  background: #e8f4f2;
  border-color: #1a6a5a;
  color: #1a6a5a;
  font-weight: 700;
}

.wf-piano-scadenza--overdue {
  color: var(--wf-danger);
}

.wf-piano-scadenza--soon {
  color: var(--wf-warning);
}

.wf-piano-scadenza-banner {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  font-size: 0.9rem;
  line-height: 1.4;
}

.wf-piano-scadenza-banner--overdue {
  border-color: var(--wf-danger);
  background: #fdecec;
}

.wf-piano-scadenza-banner--soon {
  border-color: var(--wf-warning);
  background: #fff8e1;
}

.wf-piano-fatture {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--wf-border);
}

.wf-piano-fatture__title {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wf-text-muted);
}

.wf-piano-fatture__list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.wf-section__lead {
  margin: -4px 0 16px;
  font-size: 0.9rem;
  color: var(--wf-text-muted);
}

.wf-piano-corsi {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wf-piano-corso {
  display: block;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-surface);
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wf-piano-corso:hover {
  border-color: #b9cdf0;
  box-shadow: var(--wf-shadow-sm);
}

.wf-piano-corso__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 6px;
}

.wf-piano-corso__code {
  display: block;
  font-size: 0.75rem;
  color: var(--wf-text-muted);
  margin-bottom: 2px;
}

.wf-piano-corso__title {
  font-size: 1rem;
}

.wf-piano-corso__meta {
  font-size: 0.85rem;
  color: var(--wf-text-muted);
}

.wf-piano-link__selected {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: #f7fafc;
}

.wf-piano-link__selected[hidden] {
  display: none;
}

.wf-piano-link__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.wf-piano-link__meta {
  font-size: 0.85rem;
  color: var(--wf-text-muted);
}

.wf-piano-link__open {
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wf-accent);
  text-decoration: none;
}

.wf-piano-link__open:hover {
  text-decoration: underline;
}

.wf-piano-link__results {
  margin-top: 8px;
}

.wf-piano-link__empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0 4px;
}

.wf-piano-link__empty .wf-day__empty {
  margin: 0;
}

.wf-piano-pick {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-surface);
  font-family: inherit;
  cursor: pointer;
  color: inherit;
}

.wf-piano-pick:hover {
  background: var(--wf-accent-soft);
  border-color: #b9cdf0;
}

.wf-piano-pick__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.wf-piano-pick__meta {
  font-size: 0.8rem;
  color: var(--wf-text-muted);
  line-height: 1.4;
}

.wf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--wf-border);
}

.wf-tabs__item {
  padding: 8px 12px;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: inherit;
}

.wf-tabs__item.is-active,
.wf-tabs__item:hover {
  background: var(--wf-accent-soft);
}

.wf-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wf-check-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
}

.wf-check-item__value {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--wf-text-muted);
}

.wf-check-item__state {
  flex-shrink: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.wf-check-item--done {
  border-color: var(--wf-success);
}

.wf-check-item--done .wf-check-item__state {
  color: var(--wf-success);
}

.wf-check-item--todo {
  border-style: dashed;
}

.wf-check-item--todo .wf-check-item__state {
  color: var(--wf-text-muted);
}

.wf-check-item--partial .wf-check-item__state,
.wf-check-item--na .wf-check-item__state {
  color: var(--wf-warning);
}

@media (max-width: 900px) {
  .wf-course-filters,
  .wf-course-card__grid,
  .wf-piano-filters,
  .wf-piano-card__grid {
    grid-template-columns: 1fr;
  }
}

.wf-week-days {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wf-day {
  border: none;
  background: var(--wf-surface);
  padding: 12px 14px 14px;
  box-shadow: none;
}

.wf-day--weekend {
  border: none;
  border-style: solid;
  background: var(--wf-surface);
}

.wf-day--readonly {
  background: var(--wf-surface);
}

.wf-day--collapsed {
  padding: 8px 14px;
}

.wf-day__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 4px 2px 6px;
  border-bottom: none;
}

.wf-day--collapsed .wf-day__header {
  margin-bottom: 0;
  padding: 2px 0;
  border-bottom: none;
  align-items: center;
}

.wf-day__toggle {
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.wf-day__toggle:hover .wf-day__title {
  text-decoration: underline;
}

.wf-day__heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.wf-day__chevron {
  flex-shrink: 0;
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid var(--wf-text-muted);
  border-bottom: 2px solid var(--wf-text-muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.wf-day--weekend:not(.wf-day--collapsed) .wf-day__chevron {
  transform: rotate(45deg);
}

.wf-day__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.wf-day--collapsed .wf-day__title {
  font-size: 0.9rem;
  margin: 0;
}

.wf-day__date {
  margin: 0;
  font-size: 0.78rem;
  color: var(--wf-text-muted);
}

.wf-day--collapsed .wf-day__date {
  font-size: 0.75rem;
}

.wf-day__total {
  font-size: 1rem;
  font-weight: 700;
}

.wf-day__total--low {
  color: var(--wf-danger);
}

.wf-day__total--ok {
  color: var(--wf-success);
}

.wf-day--collapsed .wf-day__total {
  font-size: 0.9rem;
}

.wf-day__body {
  margin-top: 0;
}

.wf-day__empty {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--wf-text-muted);
  font-style: italic;
}

.wf-day__entries {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.wf-day-entry {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border: none;
  background: var(--wf-accent-soft);
  box-shadow: none;
}

.wf-day--readonly .wf-day-entry {
  background: #e8edf5;
}

.wf-day-entry__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.wf-day-entry__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
}

.wf-day-entry__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.wf-day-entry__title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}

.wf-day-entry__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  font-size: 0.72rem;
  color: var(--wf-text-muted);
}

.wf-day-entry__meta span:not(:last-child)::after {
  content: '·';
  margin-left: 8px;
  color: #c0c0c0;
}

.wf-day-entry__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
}

.wf-day-entry__client {
  min-height: auto;
  padding-bottom: 0;
  white-space: nowrap;
}

.wf-day-entry__client-flag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 8px;
  border: none;
  background: transparent;
  font-size: 0.8rem;
  color: var(--wf-text-muted);
}

.wf-day-entry__client-flag.is-on {
  border: none;
  color: var(--wf-accent);
  font-weight: 600;
  background: transparent;
}

.wf-day-entry__notes-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wf-day-entry__notes-field .wf-label {
  display: block;
  margin-bottom: 2px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--wf-text-muted);
}

.wf-input--notes {
  width: 100%;
  max-width: none;
  padding: 6px 8px;
  font-size: 0.85rem;
  min-height: 0;
}

.wf-day-entry__notes-readonly {
  font-size: 0.85rem;
  color: var(--wf-text);
  line-height: 1.35;
}

.wf-day-entry__hours-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 72px;
}

.wf-day-entry__hours-field .wf-label {
  display: block;
  margin-bottom: 2px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--wf-text-muted);
}

.wf-input--hours {
  width: 72px;
  max-width: 72px;
  padding: 6px 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.wf-day-entry__remove {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--wf-text-muted);
  border-radius: var(--wf-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.wf-day-entry__remove:hover {
  border-color: var(--wf-danger);
  color: var(--wf-danger);
  background: #fdecec;
}

.wf-modal__panel--wide {
  max-width: 640px;
  max-height: 90vh;
  overflow: auto;
}

.wf-search-results {
  margin-top: 8px;
}

.wf-search-group {
  margin-bottom: 20px;
}

.wf-search-group__title {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wf-text-muted);
  border-bottom: 1px solid var(--wf-border);
  padding-bottom: 6px;
}

.wf-activity-pick {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  font-family: inherit;
  cursor: pointer;
}

.wf-activity-pick:hover {
  background: var(--wf-accent-soft);
}

.wf-activity-pick__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.wf-activity-pick__type {
  flex-shrink: 0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wf-text-muted);
  border: 1px solid var(--wf-border-light);
  padding: 2px 6px;
}

.wf-activity-pick__meta {
  font-size: 0.8rem;
  color: var(--wf-text-muted);
  line-height: 1.4;
}


/* —— Visual polish overrides —— */

.wf-course,
.wf-activity,
.wf-user,
.wf-day,
.wf-day-entry,
.wf-course-card,
.wf-check-item,
.wf-table-wrap,
.wf-activity-pick {
  border-radius: var(--wf-radius);
  box-shadow: var(--wf-shadow-sm);
}

.wf-day {
  box-shadow: var(--wf-shadow-sm);
  border: 1px solid var(--wf-border-light);
}

.wf-day-entry {
  box-shadow: none;
  border-radius: var(--wf-radius-sm);
}

.wf-course-card:hover,
.wf-activity-pick:hover {
  background: var(--wf-accent-soft) !important;
  border-color: #b9cff0;
}

.wf-tabs__item {
  border-radius: 999px;
  border-width: 1px;
}

.wf-tabs__item.is-active,
.wf-tabs__item:hover {
  background: var(--wf-accent-soft) !important;
  border-color: var(--wf-accent);
  color: var(--wf-accent);
}

.wf-course-status,
.wf-week-status,
.wf-user__status,
.wf-tag,
.wf-course__badge,
.wf-activity-pick__type {
  border-radius: 999px;
}

.wf-textarea {
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
}

.wf-textarea:focus {
  outline: none;
  border-color: var(--wf-accent);
  box-shadow: 0 0 0 3px rgba(28, 115, 247, 0.18);
}

.wf-bar {
  border: none;
  border-radius: 999px;
  overflow: hidden;
}

.wf-bar__fill {
  background: linear-gradient(90deg, #4b92f8, var(--wf-accent));
  border-radius: 999px;
}

.wf-month-bar {
  border: none;
  border-radius: 6px 6px 0 0;
}

.wf-month-bar--margin {
  background: linear-gradient(180deg, #4b92f8, var(--wf-accent));
}

.wf-back:hover {
  color: var(--wf-accent);
}

.wf-link {
  color: var(--wf-accent);
  text-decoration: none;
}

.wf-link:hover {
  text-decoration: underline;
}

.wf-btn--add {
  border-radius: var(--wf-radius-sm);
}

.wf-day-entry__remove {
  border-radius: 8px;
}

.wf-input--readonly {
  background: #eef3f9;
}

.wf-modal__backdrop {
  background: rgba(15, 27, 45, 0.45);
  backdrop-filter: blur(2px);
}

.wf-category__title {
  color: var(--wf-text);
  letter-spacing: -0.01em;
}

.wf-page-title {
  letter-spacing: -0.02em;
}

.wf-form-actions {
  border-top: 1px solid var(--wf-border);
}

.wf-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* —— Interaziendali —— */

.wf-corsisti {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wf-corsista {
  border: 1px solid var(--wf-border);
  background: var(--wf-surface);
  border-radius: var(--wf-radius);
  box-shadow: var(--wf-shadow-sm);
  padding: 12px 14px;
}

.wf-corsista--sent {
  border-color: #9fd6c0;
  background: linear-gradient(180deg, #f3fbf7 0%, var(--wf-surface) 40%);
}

.wf-corsista--closed .wf-corsista__index {
  color: var(--wf-muted, #6b7280);
}

.wf-corsista--compact {
  padding: 8px 10px;
  box-shadow: none;
}

.wf-corsista--compact .wf-corsista__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.wf-corsista--compact .wf-corsista__index {
  font-size: 0.75rem;
  margin: 0;
}

.wf-corsista--compact .wf-corsista__attestati {
  min-height: 0;
  gap: 6px;
  font-size: 0.8rem;
}

.wf-corsista--compact .wf-corsista__fields {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.9fr 1.6fr;
  gap: 8px 10px;
  align-items: end;
}

.wf-corsista--compact .wf-form-group {
  margin-bottom: 0;
}

.wf-corsista--compact .wf-label {
  font-size: 0.68rem;
  margin-bottom: 2px;
}

.wf-corsista--compact .wf-input {
  min-height: 34px;
  padding: 5px 8px;
  font-size: 0.875rem;
}

@media (max-width: 900px) {
  .wf-corsista--compact .wf-corsista__fields {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .wf-corsista--compact .wf-corsista__fields {
    grid-template-columns: 1fr;
  }
}

.wf-corsista__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--wf-border-light);
}

.wf-corsista__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.wf-session-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
}

.wf-session-pick {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-surface);
  font-family: inherit;
  cursor: pointer;
}

.wf-session-pick:hover {
  background: var(--wf-accent-soft);
  border-color: #b9cff0;
}

.wf-session-pick__date {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--wf-accent);
  margin-bottom: 2px;
}

.wf-session-pick__title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}

.wf-session-pick__meta {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--wf-text-muted);
}

.wf-tipologia-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 4px;
}

.wf-tipologia-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-sm);
  background: var(--wf-surface);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.wf-tipologia-option:hover {
  background: var(--wf-accent-soft);
  border-color: #b9cff0;
}

.wf-tipologia-new {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--wf-border-light);
}

.wf-corsista__index {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wf-text-muted);
  margin-bottom: 1px;
}

.wf-corsista__name {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.wf-corsista__meta {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--wf-text-muted);
}

.wf-corsista .wf-form-group {
  margin: 0;
}

.wf-corsista .wf-label {
  margin-bottom: 4px;
  font-size: 0.68rem;
}

.wf-corsista .wf-input,
.wf-corsista .wf-select {
  padding: 8px 10px;
  font-size: 0.9rem;
}

.wf-form-group--span-2 {
  grid-column: span 2;
}

.wf-textarea--compact {
  min-height: 56px;
}

.wf-btn--sent {
  background: #e8f5e9;
  color: var(--wf-success);
  border: 1px solid #9fd6c0;
  cursor: default;
}

.wf-btn--sent:disabled {
  opacity: 1;
}

.wf-inter-date {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--wf-accent);
  margin-bottom: 4px;
}

.wf-inter-date--hero {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.wf-inter-filters {
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) 150px 150px minmax(180px, 1.2fr);
}

.wf-page-heading__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.wf-pendente__assign {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--wf-border-light);
}

.wf-pendente__row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.wf-pendente__row .wf-select {
  flex: 1;
}

.wf-pendente__row .wf-btn {
  flex-shrink: 0;
  align-self: stretch;
}

@media (max-width: 720px) {
  .wf-page-heading__actions {
    width: 100%;
  }

  .wf-page-heading__actions .wf-btn {
    width: 100%;
  }

  .wf-pendente__row {
    flex-direction: column;
  }
}

.wf-corso-accordions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.wf-corso-acc {
  border: 1px solid var(--wf-border, #d8dde6);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.wf-corso-acc__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 16px 18px;
  border: none;
  background: #f7fafc;
  font-family: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.wf-corso-acc:not(.is-collapsed) .wf-corso-acc__toggle {
  border-bottom: 1px solid var(--wf-border, #d8dde6);
}

.wf-corso-acc__toggle:hover {
  background: #eef4fb;
}

.wf-corso-acc__toggle:focus-visible {
  outline: 2px solid var(--wf-accent, #2563eb);
  outline-offset: -2px;
}

.wf-corso-acc__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wf-corso-acc__chevron {
  flex-shrink: 0;
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid var(--wf-text-muted, #6b7280);
  border-bottom: 2px solid var(--wf-text-muted, #6b7280);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.wf-corso-acc:not(.is-collapsed) .wf-corso-acc__chevron {
  transform: rotate(45deg);
}

.wf-corso-acc__body {
  padding: 16px 18px 18px;
}

.wf-corso-acc__body .wf-form-card {
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  background: transparent;
}

.wf-corso-acc.is-collapsed .wf-corso-acc__body {
  display: none;
}

.wf-sessioni-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.wf-sessione-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}

.wf-sessione-orario {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wf-sessione-orario .wf-input {
  flex: 1;
  min-width: 0;
}

.wf-sessione-remove {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--wf-border, #d8dde6);
  border-radius: 8px;
  background: #fff;
  color: var(--wf-text-muted, #6b7280);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.wf-sessione-remove:hover {
  border-color: #c45c5c;
  color: #c45c5c;
  background: #fff7f7;
}

.wf-sessione-remove-slot {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

@media (max-width: 720px) {
  .wf-sessione-row {
    grid-template-columns: 1fr;
  }
}

.wf-input-euro {
  position: relative;
  display: flex;
  align-items: stretch;
}

.wf-input-euro__prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--wf-text-muted);
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
}

.wf-input-euro .wf-input {
  padding-left: 28px;
  width: 100%;
}

.wf-course-card--closed {
  opacity: 0.88;
}

/* Fatturazione formazione */

.wf-fatt-filters {
  grid-template-columns: 220px 180px 1fr;
}

.wf-fatt-groups {
  display: flex;
  flex-direction: column;
}

.wf-fatt-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wf-fatt-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wf-fatt-group + .wf-fatt-group {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--wf-border);
}

.wf-fatt-group__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--wf-text-muted);
}

.wf-fatt-commessa {
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  background: var(--wf-surface);
  box-shadow: var(--wf-shadow-sm);
  overflow: hidden;
}

.wf-fatt-commessa__toggle {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 16px 18px;
  border: none;
  background: #f7fafc;
  font-family: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.wf-fatt-commessa:not(.is-collapsed) .wf-fatt-commessa__toggle {
  border-bottom: 1px solid var(--wf-border);
}

.wf-fatt-commessa__toggle:hover {
  background: #eef4fb;
}

.wf-fatt-commessa__toggle:focus-visible {
  outline: 2px solid var(--wf-accent);
  outline-offset: -2px;
}

.wf-fatt-commessa__chevron {
  flex-shrink: 0;
  width: 0.5em;
  height: 0.5em;
  margin-top: 0.55em;
  border-right: 2px solid var(--wf-text-muted);
  border-bottom: 2px solid var(--wf-text-muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.wf-fatt-commessa:not(.is-collapsed) .wf-fatt-commessa__chevron {
  transform: rotate(45deg);
  margin-top: 0.7em;
}

.wf-fatt-commessa__heading {
  flex: 1;
  min-width: 0;
}

.wf-fatt-commessa__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wf-fatt-commessa__meta {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--wf-text-muted);
}

.wf-fatt-commessa__status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.wf-fatt-commessa__mese {
  font-size: 0.78rem;
  color: var(--wf-text-muted);
  text-transform: capitalize;
}

.wf-fatt-commessa__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.wf-fatt-commessa.is-collapsed .wf-fatt-commessa__body {
  display: none;
}

.wf-fatt-attivita {
  margin-bottom: 0;
  padding: 0;
}

.wf-fatt-attivita--corso {
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  background: var(--wf-surface);
  box-shadow: var(--wf-shadow-sm);
  overflow: hidden;
}

.wf-fatt-attivita--corso.is-sent {
  background: #f3f5f8;
  border-color: #c4c8ce;
}

.wf-fatt-attivita__row {
  display: flex;
  align-items: center;
  gap: 12px 14px;
  padding: 12px 14px;
  flex-wrap: wrap;
}

.wf-fatt-attivita--corso .wf-activity__index {
  margin-bottom: 0;
}

.wf-fatt-attivita--corso .wf-fatt-attivita__heading {
  flex: 1 1 220px;
  min-width: 0;
}

.wf-fatt-attivita__importo {
  font-size: 0.98rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.wf-fatt-attivita__note {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--wf-text-muted);
}

.wf-fatt-attivita--corso .wf-course-status,
.wf-fatt-attivita--corso .wf-btn {
  flex-shrink: 0;
}

.wf-fatt-attivita--inter {
  padding: 0;
  overflow: hidden;
}

.wf-fatt-attivita--inter .wf-fatt-attivita__row {
  padding: 14px 16px;
  align-items: center;
}

.wf-fatt-attivita--inter:not(.is-collapsed) .wf-fatt-attivita__row {
  border-bottom: 1px solid var(--wf-border);
}

.wf-fatt-attivita__expand {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.wf-fatt-attivita__expand:hover .wf-fatt-attivita__title {
  color: var(--wf-accent);
}

.wf-fatt-attivita__expand:focus-visible {
  outline: 2px solid var(--wf-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.wf-fatt-attivita__side {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.wf-fatt-attivita--inter .wf-fatt-attivita__chevron {
  flex-shrink: 0;
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid var(--wf-text-muted);
  border-bottom: 2px solid var(--wf-text-muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.wf-fatt-attivita--inter:not(.is-collapsed) .wf-fatt-attivita__chevron {
  transform: rotate(45deg);
}

.wf-fatt-attivita--inter .wf-fatt-attivita__panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px 14px;
  background: #fafbfc;
}

.wf-fatt-attivita--inter.is-collapsed .wf-fatt-attivita__panel {
  display: none;
}

.wf-fatt-attivita__toggle {
  width: 100%;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin: 0;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid var(--wf-border);
  background: #f7fafc;
  font-family: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.wf-fatt-attivita.is-collapsed .wf-fatt-attivita__toggle {
  border-bottom: none;
}

.wf-fatt-attivita__toggle:hover {
  background: #eef4fb;
}

.wf-fatt-attivita__toggle:focus-visible {
  outline: 2px solid var(--wf-accent);
  outline-offset: -2px;
}

.wf-fatt-attivita__chevron {
  flex-shrink: 0;
  width: 0.5em;
  height: 0.5em;
  margin-bottom: 0.85em;
  border-right: 2px solid var(--wf-text-muted);
  border-bottom: 2px solid var(--wf-text-muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.wf-fatt-attivita:not(.is-collapsed) .wf-fatt-attivita__chevron {
  transform: rotate(45deg);
  margin-bottom: 0.7em;
}

.wf-fatt-attivita__toggle .wf-activity__index {
  margin-bottom: 2px;
}

.wf-fatt-attivita__panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 8px;
}

.wf-fatt-attivita.is-collapsed .wf-fatt-attivita__panel {
  display: none;
}

.wf-fatt-attivita__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px 14px;
}

.wf-fatt-attivita.is-collapsed .wf-fatt-attivita__actions {
  padding-top: 0;
}

.wf-fatt-attivita__heading {
  flex: 1;
  min-width: 0;
}

.wf-fatt-attivita__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.wf-fatt-attivita__title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.wf-fatt-attivita__title-row .wf-fatt-attivita__title {
  flex: 0 1 auto;
}

.wf-fatt-attivita__meta {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--wf-text-muted);
}

.wf-fatt-promemoria {
  margin: 0;
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.wf-fatt-promemoria__label {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--wf-text-muted);
}

.wf-fatt-promemoria .wf-promemoria-saved {
  margin: 0 0 6px;
  padding: 6px 8px;
  font-size: 0.78rem;
}

.wf-fatt-attivita--inter .wf-fatt-promemoria {
  border-top-color: var(--wf-border);
}

.wf-fatt-attivita__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.wf-fatt-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wf-fatt-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  background: var(--wf-surface);
}

.wf-fatt-item--sent {
  border-color: #9fd6c0;
  background: linear-gradient(180deg, #f3fbf7 0%, var(--wf-surface) 40%);
}

.wf-fatt-item--cloud {
  background: #eceef1;
  border-color: #c4c8ce;
  color: #5a616c;
  box-shadow: none;
}

.wf-fatt-item--cloud .wf-fatt-item__title {
  color: #4b5563;
}

.wf-fatt-item--cloud .wf-fatt-item__meta,
.wf-fatt-item--cloud .wf-fatt-item__tipo {
  color: #7b8494;
}

.wf-fatt-item--cloud .wf-fatt-item__importo {
  color: #5a616c;
}

.wf-fatt-item--missing {
  border-color: #d5d8de;
  background: #f7f8fa;
}

.wf-course-status--cloud {
  background: #d8dde4;
  color: #4b5563;
  border: 1px solid #b8bfc7;
}

.wf-btn--cloud,
.wf-btn--cloud:disabled {
  background: #d0d5dc;
  color: #4b5563;
  border: 1px solid #b0b6c0;
  cursor: default;
  opacity: 1;
}

.wf-corso-fatt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.wf-corso-fatt-actions .wf-bi-legend {
  margin: 0;
}

.wf-fatt-item__tipo {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wf-accent);
  margin-bottom: 2px;
}

.wf-fatt-item__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
}

.wf-fatt-item__meta {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--wf-text-muted);
}

.wf-fatt-item__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.wf-fatt-item__importo {
  font-size: 0.95rem;
}

.wf-fatt-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .wf-fatt-filters {
    grid-template-columns: 1fr 1fr;
  }

  .wf-fatt-attivita__toggle {
    flex-wrap: wrap;
  }

  .wf-fatt-attivita__badges {
    width: 100%;
    justify-content: flex-start;
    padding-left: 1.1em;
  }

  .wf-fatt-attivita__row {
    align-items: flex-start;
  }

  .wf-fatt-attivita__row .wf-btn,
  .wf-fatt-attivita__row .wf-course-status,
  .wf-fatt-attivita__importo {
    margin-left: 50px;
  }

  .wf-fatt-item {
    flex-direction: column;
  }

  .wf-fatt-item__side {
    align-items: stretch;
  }

  .wf-fatt-item__actions {
    flex-direction: column;
  }

  .wf-fatt-item__actions .wf-btn {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .wf-fatt-filters {
    grid-template-columns: 1fr;
  }

  .wf-fatt-commessa__toggle {
    flex-wrap: wrap;
  }

  .wf-fatt-commessa__status {
    width: 100%;
    align-items: flex-start;
    padding-left: 1.1em;
  }
}

@media (max-width: 900px) {
  .wf-form-group--span-2 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .wf-corsista__head {
    flex-direction: column;
    align-items: stretch;
  }

  .wf-corsista__actions {
    flex-direction: column;
  }

  .wf-corsista__actions .wf-btn {
    width: 100%;
  }
}

/* Gestione attività tecniche */

.wf-attivita-filters {
  grid-template-columns: minmax(160px, 1fr) minmax(150px, 0.85fr) minmax(150px, 0.85fr) minmax(200px, 1.4fr);
}

.wf-attivita-card__grid {
  grid-template-columns: repeat(2, 1fr);
}

.wf-course-group-title--danger {
  color: var(--wf-danger);
}

.wf-attivita-scadenza--overdue {
  color: var(--wf-danger);
}

.wf-course-status--work {
  background: var(--wf-accent-soft);
  border-color: var(--wf-accent);
  color: var(--wf-accent);
  font-weight: 700;
}

.wf-section-lead {
  margin-top: 0;
  margin-bottom: 16px;
}

.wf-status-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.wf-avanzamento-panel {
  border: 1px solid var(--wf-border);
  border-radius: 12px;
  background: #fff;
  padding: 16px 18px 18px;
}

.wf-avanzamento-panel__head {
  margin-bottom: 14px;
}

.wf-avanzamento-panel__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wf-avanzamento-panel .wf-section-lead {
  margin-bottom: 0;
}

.wf-status-step {
  margin: 0;
  padding: 12px 8px;
  border: 1px solid var(--wf-border);
  background: #fff;
  color: var(--wf-text-muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.wf-status-step:hover {
  border-color: var(--wf-accent);
  color: var(--wf-accent);
}

.wf-status-step:focus-visible {
  outline: 2px solid var(--wf-accent);
  outline-offset: 2px;
}

.wf-status-step.is-done {
  background: #e8f5e9;
  border-color: #9fd6c0;
  color: var(--wf-success);
}

.wf-status-step.is-current {
  background: var(--wf-accent);
  border-color: var(--wf-accent);
  color: #fff;
}

.wf-status-step.is-current:hover {
  background: var(--wf-accent-hover);
  border-color: var(--wf-accent-hover);
  color: #fff;
}

.wf-promemoria-row {
  display: grid;
  grid-template-columns: 120px 1fr minmax(180px, 1.2fr);
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.wf-promemoria-preview {
  display: block;
  padding: 10px 0;
  font-size: 0.95rem;
}

.wf-promemoria-saved {
  margin: 0 0 16px;
  padding: 10px 12px;
  background: var(--wf-accent-soft);
  border: 1px solid var(--wf-border);
  font-size: 0.85rem;
}

.wf-piano-day {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(180px, 1.1fr) 40px;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--wf-border);
  background: #fff;
}

.wf-piano-day__note {
  grid-column: 1 / -1;
}

.wf-piano-day__remove {
  justify-self: end;
}

@media (max-width: 900px) {
  .wf-attivita-filters,
  .wf-attivita-card__grid,
  .wf-status-steps,
  .wf-promemoria-row {
    grid-template-columns: 1fr;
  }

  .wf-piano-day {
    grid-template-columns: 1fr 40px;
  }

  .wf-piano-day__data,
  .wf-piano-day__orario,
  .wf-piano-day__sede,
  .wf-piano-day__note {
    grid-column: 1;
  }

  .wf-piano-day__remove {
    grid-column: 2;
    grid-row: 1;
  }
}

/* Documentazione e rapporto di intervento */

.wf-docs-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.wf-doc-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--wf-border);
  background: #fff;
}

.wf-doc-row__file-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wf-doc-row__file-main {
  flex: 1;
  min-width: 0;
}

.wf-doc-row__file-line .wf-input {
  flex: 1;
  min-width: 0;
}

.wf-doc-row__download {
  display: inline-block;
  padding: 8px 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.wf-input--file {
  padding: 8px 10px;
  font-size: 0.85rem;
}

.wf-doc-row__name {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--wf-text-muted);
}

@media (max-width: 900px) {
  .wf-doc-row {
    grid-template-columns: 1fr;
  }
}

/* Stato avanzamento commesse tecniche */

.wf-sa-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.wf-sa-commessa {
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius);
  background: var(--wf-surface);
  box-shadow: var(--wf-shadow);
  padding: 14px 16px 12px;
}

.wf-sa-commessa--done {
  background: #f1faf5;
  border-color: #b7dfc8;
}

.wf-sa-commessa__head {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--wf-border);
}

.wf-sa-commessa__code {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wf-text-muted);
}

.wf-sa-commessa__title {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.wf-sa-commessa__sub {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--wf-text-muted);
  line-height: 1.35;
}

.wf-sa-commessa__activities {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wf-sa-row {
  border: 1px solid var(--wf-border);
  border-radius: 10px;
  padding: 10px 12px;
}

.wf-sa-row--assegnata {
  background: #eef1f5;
  border-color: #d5dbe4;
}

.wf-sa-row--pianificata {
  background: #fbf4e4;
  border-color: #ead9b0;
}

.wf-sa-row--in-svolgimento {
  background: #eaf2fc;
  border-color: #c5d8f2;
}

.wf-sa-row--conclusa {
  background: #eaf6ef;
  border-color: #c5e2d1;
}

.wf-sa-row--scaduta {
  background: #f8ecec;
  border-color: #e8c0c0;
}

.wf-sa-row__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wf-sa-row__info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wf-sa-row__title {
  font-size: 0.95rem;
  font-weight: 650;
  color: inherit;
  text-decoration: none;
  line-height: 1.3;
}

.wf-sa-row__title:hover {
  color: var(--wf-accent);
  text-decoration: underline;
}

.wf-sa-row__meta {
  font-size: 0.78rem;
  color: var(--wf-text-muted);
}

.wf-sa-row__side {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
}

.wf-sa-fatt-btn {
  white-space: nowrap;
}

.wf-sa-azioni {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.wf-sa-azioni .wf-promemoria-saved {
  margin: 0 0 6px;
  padding: 6px 8px;
  font-size: 0.78rem;
}

.wf-sa-promo-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wf-sa-promo-inline .wf-input {
  width: 72px;
  min-width: 72px;
}

.wf-sa-promo-inline .wf-select {
  width: auto;
  min-width: 110px;
}

.wf-sa-promo-preview {
  font-size: 0.8rem;
  color: var(--wf-text-muted);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .wf-sa-row__main {
    align-items: flex-start;
    flex-direction: column;
  }

  .wf-sa-row__side {
    flex-wrap: wrap;
  }

  .wf-sa-promo-preview {
    white-space: normal;
  }
}

/* Scadenziario */

.wf-promo-filters {
  max-width: 640px;
}

.wf-promo-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.wf-promo-group {
  border: 1px solid var(--wf-border);
  background: #fff;
}

.wf-promo-group__toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 14px 18px;
  border: none;
  background: var(--wf-surface-muted, #f8f9fb);
  font-family: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.wf-promo-group:not(.is-collapsed) .wf-promo-group__toggle {
  border-bottom: 1px solid var(--wf-border);
}

.wf-promo-group__toggle:hover {
  background: #eef4fb;
}

.wf-promo-group__toggle:focus-visible {
  outline: 2px solid var(--wf-accent);
  outline-offset: -2px;
}

.wf-promo-group__chevron {
  flex-shrink: 0;
  width: 0.5em;
  height: 0.5em;
  margin-top: 0.55em;
  border-right: 2px solid var(--wf-text-muted);
  border-bottom: 2px solid var(--wf-text-muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.wf-promo-group:not(.is-collapsed) .wf-promo-group__chevron {
  transform: rotate(45deg);
  margin-top: 0.7em;
}

.wf-promo-group__heading {
  display: flex;
  flex: 1;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.wf-promo-group__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.wf-promo-group__count {
  font-size: 0.82rem;
  color: var(--wf-text-muted);
  white-space: nowrap;
}

.wf-promo-group__body {
  display: flex;
  flex-direction: column;
}

.wf-promo-group.is-collapsed .wf-promo-group__body {
  display: none;
}

.wf-promo-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.wf-promo-row:last-child {
  border-bottom: none;
}

.wf-promo-row__date {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wf-promo-row__date time {
  font-size: 1rem;
  font-weight: 700;
  color: var(--wf-accent);
}

.wf-promo-row__weekday {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wf-text-muted);
}

.wf-promo-row__title {
  font-weight: 600;
  color: var(--wf-text);
  text-decoration: none;
}

.wf-promo-row__title:hover {
  color: var(--wf-accent);
}

.wf-promo-row__meta {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--wf-text-muted);
}

.wf-promo-row__edit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wf-promo-row__edit-label {
  width: auto;
  margin: 0;
  font-size: 0.72rem;
  white-space: nowrap;
}

.wf-promo-row__date-input {
  width: 148px;
  min-width: 148px;
}

@media (max-width: 900px) {
  .wf-promo-filters {
    max-width: none;
  }

  .wf-promo-list {
    gap: 20px;
  }

  .wf-promo-group__toggle {
    padding: 12px 14px;
  }

  .wf-promo-group__heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .wf-promo-group__count {
    white-space: normal;
  }

  .wf-promo-row {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    align-items: stretch;
  }

  .wf-promo-row__date {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--wf-surface-muted, #f8f9fb);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .wf-promo-row__main {
    min-width: 0;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .wf-promo-row__title {
    display: block;
    line-height: 1.35;
    word-break: break-word;
  }

  .wf-promo-row__meta {
    line-height: 1.45;
    word-break: break-word;
  }

  .wf-promo-row__edit {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 10px;
    align-items: center;
    padding: 12px 14px 14px;
    background: #fff;
  }

  .wf-promo-row__edit-label {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wf-text-muted);
  }

  .wf-promo-row__date-input {
    width: 100%;
    min-width: 0;
  }

  .wf-promo-row__edit .wf-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .wf-promo-row__edit {
    grid-template-columns: 1fr;
  }

  .wf-promo-row__edit .wf-btn {
    width: 100%;
  }
}

/* Profilo utente */

.wf-header__profile.is-active {
  border-color: var(--wf-accent);
  background: var(--wf-accent-soft);
  color: var(--wf-accent);
  cursor: default;
}

.wf-header__profile-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.wf-profile-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wf-profile-card__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.wf-profile-card__desc {
  margin: 0 0 20px;
  font-size: 0.88rem;
  color: var(--wf-text-muted);
  line-height: 1.5;
}

.wf-profile-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.wf-profile-block + .wf-profile-block {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--wf-border-light);
}

.wf-profile-block__title {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wf-text-muted);
}

.wf-profile-block__desc {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--wf-text-muted);
  line-height: 1.45;
}

.wf-profile-session {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--wf-border-light);
}

.wf-profile-hint {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--wf-text-muted);
}

.wf-profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.wf-profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--wf-border);
  background: var(--wf-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.wf-profile-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wf-profile-avatar__fallback {
  width: 42px;
  height: 42px;
  color: var(--wf-accent);
}

.wf-profile-hero__name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.wf-profile-hero__meta,
.wf-profile-hero__role {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--wf-text-muted);
}

.wf-profile-hero__role {
  font-weight: 600;
  color: var(--wf-accent);
}

.wf-profile-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wf-notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.wf-notif-row + .wf-notif-row {
  border-top: 1px solid var(--wf-border-light);
}

.wf-notif-row__text {
  min-width: 0;
  flex: 1;
}

.wf-notif-row__label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.wf-notif-row__control {
  max-width: 200px;
  flex-shrink: 0;
}

.wf-btn--danger {
  border: 1px solid #f0c4c4;
  background: #fef2f2;
  color: var(--wf-danger);
}

.wf-btn--danger:hover {
  border-color: var(--wf-danger);
  background: #fde8e8;
}

@media (max-width: 640px) {
  .wf-notif-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .wf-notif-row__control {
    max-width: none;
  }
}

/* Carichi di lavoro */

.wf-carichi-acc__toggle {
  gap: 20px;
}

.wf-carichi-acc__summary {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wf-carichi-acc__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wf-carichi-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef4fb;
  border: 1px solid var(--wf-border-light, #e5eaf0);
  font-size: 0.78rem;
  color: var(--wf-text-muted);
}

.wf-carichi-badge strong {
  color: var(--wf-text, #1a1f2e);
  font-weight: 700;
}

.wf-carichi-acc__preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.wf-carichi-acc__preview-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wf-text-muted);
}

.wf-carichi-acc__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wf-carichi-subtitle {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wf-text-muted);
}

.wf-carichi-assegnazioni {
  width: 100%;
}

.wf-carichi-assign-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.wf-carichi-assign-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--wf-border-light, #e5eaf0);
  border-radius: 10px;
  background: #fafbfd;
  font-size: 0.9rem;
}

.wf-carichi-assign-list__tipo {
  color: var(--wf-text-muted);
  flex-shrink: 0;
}

.wf-carichi-assign-list__count {
  font-weight: 700;
  white-space: nowrap;
  text-align: right;
}

.wf-carichi-periods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.wf-carichi-period {
  border: 1px solid var(--wf-border-light, #e5eaf0);
  border-radius: 12px;
  padding: 16px;
  background: #fafcff;
}

.wf-carichi-period__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.wf-carichi-period__title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

.wf-carichi-period__range {
  margin: 0;
  font-size: 0.8rem;
  color: var(--wf-text-muted);
}

.wf-carichi-period__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.wf-carichi-stat {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--wf-border-light, #e5eaf0);
}

.wf-carichi-stat span {
  display: block;
  font-size: 0.75rem;
  color: var(--wf-text-muted);
  margin-bottom: 2px;
}

.wf-carichi-stat strong {
  font-size: 1.05rem;
}

.wf-carichi-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wf-carichi-breakdown li {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 6px 0;
  border-bottom: 1px dashed var(--wf-border-light, #e5eaf0);
}

.wf-carichi-breakdown li:last-child {
  border-bottom: none;
}

.wf-carichi-period__empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--wf-text-muted);
}

.wf-carichi-ring {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.wf-carichi-ring__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.wf-carichi-ring__track {
  fill: none;
  stroke: #e8edf4;
  stroke-width: 3.2;
}

.wf-carichi-ring__fill {
  fill: none;
  stroke-width: 3.2;
  stroke-linecap: round;
  transition: stroke-dasharray 0.35s ease;
}

.wf-carichi-ring--ok .wf-carichi-ring__fill {
  stroke: #22a06b;
}

.wf-carichi-ring--mid .wf-carichi-ring__fill {
  stroke: #c9971a;
}

.wf-carichi-ring--high .wf-carichi-ring__fill {
  stroke: #e56910;
}

.wf-carichi-ring--critical .wf-carichi-ring__fill {
  stroke: #c9372c;
}

.wf-carichi-ring__pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wf-carichi-param-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.wf-input-addon {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.wf-input-addon .wf-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  flex: 1;
  min-width: 0;
}

.wf-input-addon__suffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--wf-border, #d8dde6);
  border-left: none;
  border-radius: 0 8px 8px 0;
  background: #f3f6fa;
  font-size: 0.8rem;
  color: var(--wf-text-muted);
  white-space: nowrap;
}

.wf-field-hint {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--wf-text-muted);
  line-height: 1.4;
}

.wf-form-group--narrow {
  max-width: 320px;
}

.wf-alert--success {
  background: #e8f6ef;
  border-color: #8fd4b0;
  color: #1a5c3a;
}

.wf-carichi-ring--overflow .wf-carichi-ring__fill {
  stroke: #c9372c;
  filter: drop-shadow(0 0 2px rgba(201, 55, 44, 0.35));
}

.wf-carichi-ring__pct--compact {
  font-size: 0.62rem;
}

.wf-carichi-period--overflow {
  border-color: #e8b4b0;
  background: #fff8f7;
}

.wf-carichi-overflow-alert {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fde8e8;
  border: 1px solid #e8b4b0;
  color: #8a1f1a;
  font-size: 0.85rem;
  font-weight: 600;
}

.wf-carichi-stat--danger {
  border-color: #e8b4b0;
  background: #fff5f4;
}

.wf-carichi-stat--danger strong {
  color: #c9372c;
}

.wf-carichi-acc--overflow .wf-corso-acc__toggle {
  background: #fff5f4;
}

.wf-carichi-acc__warn {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fde8e8;
  color: #c9372c;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

@media (max-width: 900px) {
  .wf-carichi-periods,
  .wf-carichi-param-grid {
    grid-template-columns: 1fr;
  }

  .wf-carichi-assign-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wf-carichi-acc__toggle {
    flex-wrap: wrap;
  }

  .wf-carichi-acc__preview {
    order: 3;
    flex-direction: row;
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
  }
}
