:root {
  --wf-red: #e30613;
  --wf-green: #1b6b3c;
  --wf-mint: #2ecc71;
  --wf-sky: #3498db;
  --wf-coral: #ff6b6b;
  --wf-orange: #ff9800;
  --wf-gold: #d4a017;
  --wf-ink: #2c3e50;
  --wf-muted: #5d6d7e;
  --wf-paper: #f4faf6;
  --wf-line: #d5e8dc;
  --wf-card: #ffffff;
  --wf-sidebar: #ffffff;
  --primary-color: #1b6b3c;
  --text-color: #2c3e50;
  --dark-bg: #2c3e50;
}

* { box-sizing: border-box; }

html {
  height: 100%;
}

body.suite {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--text-color);
  background: var(--wf-paper);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

body.shell-app {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--wf-paper);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  background: #fff;
  flex-shrink: 0;
  border-bottom: 1px solid var(--wf-line);
}

body.shell-app .header {
  border-bottom: 1px solid var(--wf-line);
  box-shadow: 0 1px 0 var(--wf-red);
}

body.shell-app .header .container {
  max-width: none;
  padding: 0 28px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

body.shell-app .header-content {
  padding: 8px 0;
}

body.shell-app .logo-img {
  height: 40px;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  line-height: 0;
}

.logo-img {
  height: 48px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.nav a, .nav button.nav-link-btn {
  text-decoration: none;
  color: var(--wf-ink);
  margin-left: 0;
  font-weight: 600;
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.nav a:hover, .nav button.nav-link-btn:hover,
.nav a.active {
  color: var(--wf-red);
}

.btn-accesso {
  color: #fff !important;
  background: var(--wf-red) !important;
  padding: 8px 18px !important;
  border-radius: 999px;
}

.btn-logout {
  color: #fff !important;
  background: var(--wf-ink) !important;
  padding: 8px 16px !important;
  border-radius: 999px;
}

.hero-section {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 480px;
  padding: 48px 0 56px;
  overflow: hidden;
  background: var(--wf-paper);
}

.hero-image-overlay {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--wf-ink);
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-logo {
  display: block;
  width: min(360px, 86%);
  height: auto;
  margin: 0 auto 22px;
  padding: 18px 24px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(44, 62, 80, 0.08);
}

.hero-content h1 {
  font-family: Outfit, sans-serif;
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 14px;
}

.hero-content p {
  font-size: 16px;
  margin: 0 auto 12px;
  font-weight: 400;
  line-height: 1.45;
  max-width: 640px;
  color: var(--wf-muted);
}

.hero-cta {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 28px;
}

.how-it-works-section {
  padding: 40px 0;
  text-align: center;
  background: var(--wf-paper);
}

.how-it-works-section h2 {
  font-family: Outfit, sans-serif;
  font-size: 24px;
  color: var(--wf-green);
  margin-bottom: 28px;
}

.steps-grid {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  flex-wrap: wrap;
}

.step { flex: 1 1 200px; }

.step-icon {
  font-size: 28px;
  border: 2px solid var(--wf-mint);
  color: var(--wf-green);
  border-radius: 16px;
  width: 70px;
  height: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.step p { font-weight: 600; font-size: 14px; }

.app-shell {
  flex: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 0;
  overflow: hidden;
  background: var(--wf-paper);
}

.app-nav {
  background: var(--wf-sidebar);
  color: var(--wf-ink);
  padding: 18px 16px;
  border-right: 1px solid var(--wf-line);
  overflow-y: auto;
}

.app-nav-label {
  font-family: Outfit, sans-serif;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wf-muted);
  margin: 0 0 18px 12px;
}

.app-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-nav li { margin-bottom: 4px; }

.app-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--wf-ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 14px;
}

.app-nav a i { width: 22px; text-align: center; color: var(--wf-green); font-size: 18px; }

.app-nav a:hover {
  background: #e9f9ef;
  color: var(--wf-ink);
}

.app-nav a.active {
  background: #e9f9ef;
  color: var(--wf-green);
  box-shadow: none;
}

.app-nav a.active i { color: var(--wf-green); }

.header-datetime {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 0 8px;
  color: var(--wf-muted);
  font-size: 14px;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.header-datetime i { color: var(--wf-green); }

.app-main {
  padding: 16px 28px 16px;
  background: var(--wf-paper);
  display: flex;
  justify-content: stretch;
  min-height: 0;
  overflow: auto;
}

.app-main:has(.hub-grid) {
  overflow: auto;
  align-items: flex-start;
}

.hub-page {
  width: 100%;
  max-width: none;
}

.app-main:has(.hub-grid) .hub-page {
  width: 100%;
  max-width: 960px;
}

.hub-header {
  margin-bottom: 14px;
  text-align: left;
  flex-shrink: 0;
}

.hub-kicker {
  font-family: Outfit, sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wf-red);
  margin: 0 0 8px;
}

.hub-header h1 {
  font-family: Outfit, sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: var(--wf-ink);
  margin: 0 0 4px;
}

.hub-header p {
  color: var(--wf-muted);
  font-size: 15px;
  margin: 0;
  max-width: 820px;
  line-height: 1.35;
}

.hub-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
  align-items: stretch;
}

.hub-status > div,
.hub-status > a {
  background: #fff;
  border: 2px solid var(--wf-line);
  border-radius: 16px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--wf-ink);
}

.hub-status span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--wf-muted);
  margin-bottom: 6px;
}

.hub-status strong {
  font-family: Outfit, sans-serif;
  font-size: 28px;
  color: var(--wf-green);
}

.hub-status > a {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  color: var(--wf-green);
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.hub-card {
  position: relative;
  background: #fff;
  border: 2px solid currentColor;
  border-radius: 16px;
  padding: 14px 48px 14px 16px;
  text-decoration: none;
  color: var(--wf-ink);
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: auto;
  overflow: hidden;
  box-shadow: 0 5px 0 rgba(44, 62, 80, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(44, 62, 80, 0.14);
}

.hub-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.hub-card-kicker { display: none; }

.hub-card-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 0;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  border: 2px solid currentColor;
}

.hub-card h2 {
  font-family: Outfit, sans-serif;
  font-size: 20px;
  margin: 0;
}

.hub-card p {
  margin: 0 0 6px 48px;
  color: var(--wf-ink);
  font-size: 14px;
  line-height: 1.35;
}

.hub-card-points {
  list-style: none;
  margin: 0 36px 0 48px;
  padding: 0;
  font-size: 13px;
  line-height: 1.4;
}

.hub-card-points li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 4px;
}

.hub-card-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.hub-card-go {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: #fff;
}

.hub-card--lab {
  background: linear-gradient(135deg, #16407A 0%, #1A4A8A 100%);
  color: #fff;
  border-color: #2ECC71;
}
.hub-card--lab h2 { color: #fff; }
.hub-card--lab .hub-card-icon,
.hub-card--lab .hub-card-go {
  color: #2ECC71;
  background: #143A72;
  border-color: #2ECC71;
}
.hub-card--lab p { color: #e8eef8; }

.hub-card--studio {
  background: linear-gradient(135deg, #c8f5dc 0%, #c5e6f7 100%);
  color: #1e8a4c;
  border-color: var(--wf-mint);
}
.hub-card--studio h2,
.hub-card--studio .hub-card-icon,
.hub-card--studio .hub-card-go { color: #1e8a4c; }

.hub-card--data {
  background: #a8d8f5;
  color: var(--wf-sky);
  border-color: var(--wf-sky);
}
.hub-card--data h2,
.hub-card--data .hub-card-icon,
.hub-card--data .hub-card-go { color: #1d6fa8; }

.hub-card--learn {
  background: #ffc878;
  color: var(--wf-orange);
  border-color: #e68900;
}
.hub-card--learn h2,
.hub-card--learn .hub-card-icon,
.hub-card--learn .hub-card-go { color: #d97700; }

.hub-card--links {
  padding-right: 28px;
  cursor: default;
}

.hub-card--links:hover {
  transform: none;
  box-shadow: 0 8px 0 rgba(44, 62, 80, 0.06);
}

.hub-mkt-icons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 0 48px;
}

.hub-mkt-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  text-align: center;
  padding: 8px 4px 7px;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hub-mkt-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 0 rgba(44, 62, 80, 0.12);
}

.hub-mkt-icon span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border: 2px solid currentColor;
  flex-shrink: 0;
}

.hub-mkt-icon em {
  font-style: normal;
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.15;
}

.hub-mkt-icon--lab {
  background: linear-gradient(180deg, #16407A 0%, #1A4A8A 100%);
  border-color: #2ECC71;
  color: #fff;
}
.hub-mkt-icon--lab span {
  color: #2ECC71;
  background: #143A72;
  border-color: #2ECC71;
}
.hub-mkt-icon--lab em { color: #fff; }

.hub-mkt-icon--studio {
  background: linear-gradient(180deg, #c8f5dc 0%, #c5e6f7 100%);
  border-color: #2ecc71;
  color: #1e8a4c;
}
.hub-mkt-icon--studio span {
  color: #1e8a4c;
  background: #fff;
  border-color: #2ecc71;
}
.hub-mkt-icon--studio em { color: #1e8a4c; }

.hub-mkt-icon--shop {
  background: linear-gradient(180deg, #fff 0%, #e8f4fc 100%);
  border-color: #1d6fa8;
  color: #1d6fa8;
}
.hub-mkt-icon--shop span {
  color: #1d6fa8;
  background: #fff;
  border-color: #1d6fa8;
}
.hub-mkt-icon--shop em { color: #1d6fa8; }

.access-log {
  margin-top: 22px;
  background: #fff;
  border: 2px solid var(--wf-line);
  border-radius: 16px;
  padding: 18px 20px;
}

.access-log h2 {
  font-family: Outfit, sans-serif;
  font-size: 22px;
  margin: 0 0 14px;
  color: var(--wf-ink);
}

.access-log-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.access-log-stats div {
  background: var(--wf-paper);
  border-radius: 12px;
  padding: 12px 14px;
}

.access-log-stats span {
  display: block;
  font-size: 13px;
  color: var(--wf-muted);
  font-weight: 600;
}

.access-log-stats strong {
  font-family: Outfit, sans-serif;
  font-size: 26px;
  color: var(--wf-green);
}

.access-log-empty {
  margin: 0;
  color: var(--wf-muted);
}

.access-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.access-log-list li {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--wf-line);
  font-size: 15px;
}

.access-log-name { font-weight: 700; }
.access-log-when { color: var(--wf-muted); text-transform: capitalize; }
.access-log-time { font-weight: 700; color: var(--wf-ink); }
.access-log-live {
  color: #fff;
  background: var(--wf-mint);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
}

.auth-page {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  background: var(--wf-paper);
}

.auth-panel {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: var(--wf-card);
  border-top: 6px solid var(--wf-red);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(44, 62, 80, 0.08);
  padding: 32px;
}

.auth-panel-wide {
  max-width: 640px;
}

.btn-social {
  display: block;
  width: 100%;
  border: 1px solid var(--wf-line);
  background: #fff;
  color: var(--wf-ink);
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  margin-bottom: 8px;
  cursor: pointer;
}

.btn-social:hover { background: var(--wf-paper); }

.btn-google { border-left: 4px solid #ea4335; }
.btn-microsoft { border-left: 4px solid #00a4ef; }

.auth-logo {
  display: block;
  width: min(280px, 100%);
  height: auto;
  margin: 0 auto 18px;
}

.auth-panel h1 {
  font-family: Outfit, sans-serif;
  color: var(--wf-ink);
  font-size: 26px;
  margin-bottom: 8px;
}

.auth-error {
  position: sticky;
  top: 12px;
  z-index: 2;
  margin: 0 0 16px;
}

.btn-suite {
  display: inline-block;
  background: var(--wf-red);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 28px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-suite:hover { background: #b80510; color: #fff; }

.form-control {
  border-radius: 10px;
}

.form-control:focus {
  border-color: var(--wf-red);
  box-shadow: 0 0 0 0.2rem rgba(227, 6, 19, 0.18);
}

.placeholder-note {
  background: var(--wf-card);
  border-left: 4px solid var(--wf-red);
  padding: 16px 18px;
  border-radius: 12px;
  font-size: 14px;
}

.mkt-stamp {
  color: var(--wf-muted);
  font-size: 15px;
  margin: -8px 0 22px;
  text-transform: capitalize;
}

.mkt-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.mkt-subnav a {
  text-decoration: none;
  color: var(--wf-ink);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid var(--wf-line);
  background: #fff;
}

.mkt-subnav a:hover,
.mkt-subnav a.active {
  border-color: var(--wf-green);
  color: var(--wf-green);
  background: #e9f9ef;
}

.mkt-section {
  background: #fff;
  border: 2px solid var(--wf-line);
  border-radius: 18px;
  padding: 22px 24px 26px;
  margin-bottom: 22px;
}

.mkt-section h2 {
  font-family: Outfit, sans-serif;
  font-size: 24px;
  margin: 0 0 6px;
  color: var(--wf-ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.mkt-section h3 {
  font-family: Outfit, sans-serif;
  font-size: 18px;
  margin: 22px 0 12px;
  color: var(--wf-ink);
}

.mkt-source {
  margin: 0 0 16px;
  color: var(--wf-muted);
  font-size: 14px;
}

.mkt-error {
  background: #fde8e8;
  color: #b42318;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.mkt-section--lab {
  background: linear-gradient(180deg, #eef3fa 0%, #fff 42%);
  border-color: #1A4A8A;
}

.mkt-section--lab h2 { color: #1A4A8A; }

.mkt-section--studio {
  background: linear-gradient(180deg, #eafaf1 0%, #fff 42%);
  border-color: var(--wf-mint);
}

.mkt-section--studio h2 { color: #1e8a4c; }

.mkt-section--dir {
  background: linear-gradient(180deg, #eaf4fb 0%, #fff 42%);
  border-color: var(--wf-sky);
}

.mkt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.mkt-kpi {
  background: var(--wf-paper);
  border: 1px solid var(--wf-line);
  border-radius: 14px;
  padding: 14px 16px;
  min-height: 108px;
}

.mkt-kpi span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--wf-muted);
  margin-bottom: 8px;
}

.mkt-kpi strong {
  font-family: Outfit, sans-serif;
  font-size: 28px;
  color: var(--wf-ink);
  display: block;
  line-height: 1.1;
}

.mkt-kpi em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 12px;
  color: var(--wf-muted);
}

.mkt-kpi--lab { background: #f4f7fc; border-color: #c5d4ea; }
.mkt-kpi--lab strong { color: #1A4A8A; }
.mkt-kpi--studio { background: #f3fbf6; border-color: #bfe8cf; }
.mkt-kpi--studio strong { color: #1e8a4c; }

.mkt-bars { display: flex; flex-direction: column; gap: 8px; }

.mkt-bar-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.mkt-bar-label { font-weight: 700; color: var(--wf-ink); }
.mkt-bar-track {
  display: block;
  height: 12px;
  background: #e8eef3;
  border-radius: 999px;
  overflow: hidden;
}
.mkt-bar-track span {
  display: block;
  height: 100%;
  background: #2ecc71;
  border-radius: 999px;
}

.mkt-cols {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 180px;
}

.mkt-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 180px;
  text-align: center;
}

.mkt-col-fill {
  width: 100%;
  max-width: 42px;
  background: #1A4A8A;
  border-radius: 8px 8px 0 0;
  margin-top: auto;
}

.mkt-col-fill.is-empty {
  background: #d5e0ea;
}

.mkt-cols--orange .mkt-col-fill { background: #ff9800; }

.mkt-col strong {
  font-family: Outfit, sans-serif;
  font-size: 14px;
  margin-top: 6px;
}

.mkt-col span {
  font-size: 11px;
  color: var(--wf-muted);
  text-transform: capitalize;
}

@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 220px 1fr; }
}

@media (max-width: 1100px) {
  .mkt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mkt-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .mkt-grid, .mkt-cols { grid-template-columns: 1fr 1fr; }
  .mkt-bar-row { grid-template-columns: 1fr; }
  .hub-mkt-icons { margin-left: 0; }
}

.formazione-list { list-style: none; padding: 0; }
.formazione-list a { color: var(--wf-red); font-weight: 600; }

.suite-footer {
  background: var(--dark-bg);
  color: #fff;
  padding: 10px 0;
  margin-top: auto;
  text-align: center;
  font-size: 12px;
  flex-shrink: 0;
  width: 100%;
}

.suite-footer h3 {
  font-family: Outfit, sans-serif;
  font-size: 14px;
  margin: 0 0 2px;
}

.hub-test-link {
  margin-top: 18px;
  font-size: 14px;
}

.ticket-prova-list {
  list-style: none;
  padding: 0;
  max-width: 560px;
}

.ticket-prova-list li {
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 8px;
}

.ticket-prova-list li.ok {
  background: #e8f6ee;
  color: #146c43;
}

.ticket-prova-list li.ko {
  background: #fde8e8;
  color: #b42318;
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 28px; }
  .app-main { padding: 16px; }
  .header-datetime { display: none; }
  .access-log-list li { grid-template-columns: 1fr; gap: 4px; }
  .access-log-stats { grid-template-columns: 1fr; }
  .hub-status { grid-template-columns: 1fr 1fr; }
  .hub-header h1 { font-size: 26px; }
}
